diff --git a/wear/src/main/java/info/nightscout/androidaps/Aaps.kt b/wear/src/main/java/info/nightscout/androidaps/Aaps.kt index 06049167b3..c3ddb09936 100644 --- a/wear/src/main/java/info/nightscout/androidaps/Aaps.kt +++ b/wear/src/main/java/info/nightscout/androidaps/Aaps.kt @@ -7,7 +7,7 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager import androidx.preference.PreferenceManager import dagger.android.AndroidInjector import dagger.android.DaggerApplication -import info.nightscout.androidaps.di.DaggerAppComponent +import info.nightscout.androidaps.di.DaggerWearComponent class Aaps : DaggerApplication(), OnSharedPreferenceChangeListener { @@ -17,7 +17,7 @@ class Aaps : DaggerApplication(), OnSharedPreferenceChangeListener { } override fun applicationInjector(): AndroidInjector = - DaggerAppComponent + DaggerWearComponent .builder() .application(this) .build() diff --git a/wear/src/main/java/info/nightscout/androidaps/di/AppComponent.kt b/wear/src/main/java/info/nightscout/androidaps/di/WearComponent.kt similarity index 80% rename from wear/src/main/java/info/nightscout/androidaps/di/AppComponent.kt rename to wear/src/main/java/info/nightscout/androidaps/di/WearComponent.kt index e211b615bc..a80af7aa6f 100644 --- a/wear/src/main/java/info/nightscout/androidaps/di/AppComponent.kt +++ b/wear/src/main/java/info/nightscout/androidaps/di/WearComponent.kt @@ -12,10 +12,10 @@ import javax.inject.Singleton modules = [ AndroidInjectionModule::class, WearModule::class, - ServicesModule::class + WearServicesModule::class ] ) -interface AppComponent : AndroidInjector { +interface WearComponent : AndroidInjector { @Component.Builder interface Builder { @@ -23,6 +23,6 @@ interface AppComponent : AndroidInjector { @BindsInstance fun application(aaps: Aaps): Builder - fun build(): AppComponent + fun build(): WearComponent } } \ No newline at end of file diff --git a/wear/src/main/java/info/nightscout/androidaps/di/ServicesModule.kt b/wear/src/main/java/info/nightscout/androidaps/di/WearServicesModule.kt similarity index 98% rename from wear/src/main/java/info/nightscout/androidaps/di/ServicesModule.kt rename to wear/src/main/java/info/nightscout/androidaps/di/WearServicesModule.kt index 61714e77d9..49a3eb5561 100644 --- a/wear/src/main/java/info/nightscout/androidaps/di/ServicesModule.kt +++ b/wear/src/main/java/info/nightscout/androidaps/di/WearServicesModule.kt @@ -8,7 +8,7 @@ import info.nightscout.androidaps.watchfaces.* @Module @Suppress("unused") -abstract class ServicesModule { +abstract class WearServicesModule { @ContributesAndroidInjector abstract fun contributesListenerService(): ListenerService