diff --git a/shared/.gitignore b/app-wear-shared/rx/.gitignore similarity index 100% rename from shared/.gitignore rename to app-wear-shared/rx/.gitignore diff --git a/app-wear-shared/rx/build.gradle b/app-wear-shared/rx/build.gradle new file mode 100644 index 0000000000..0a7785a55e --- /dev/null +++ b/app-wear-shared/rx/build.gradle @@ -0,0 +1,35 @@ +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' +apply plugin: 'kotlin-kapt' +apply plugin: 'kotlin-allopen' +apply plugin: 'com.hiya.jacoco-android' +apply plugin: 'kotlinx-serialization' + +apply from: "${project.rootDir}/core/android_dependencies.gradle" +apply from: "${project.rootDir}/core/android_module_dependencies.gradle" +apply from: "${project.rootDir}/core/test_dependencies.gradle" +apply from: "${project.rootDir}/core/jacoco_global.gradle" + +android { + + namespace 'info.nightscout.rx' + defaultConfig { + minSdkVersion 23 // for wear + } +} +dependencies { + api "com.google.dagger:dagger:$dagger_version" + api "com.google.dagger:dagger-android:$dagger_version" + + //Logger + api 'org.slf4j:slf4j-api:1.7.36' // 2.0.x breaks logging. Code change needed + api 'com.github.tony19:logback-android:2.0.0' + + //RxBus + api "io.reactivex.rxjava3:rxjava:$rxjava_version" + api "io.reactivex.rxjava3:rxkotlin:$rxkotlin_version" + api "io.reactivex.rxjava3:rxandroid:$rxandroid_version" + + api "org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1" + api "org.apache.commons:commons-lang3:$commonslang3_version" +} diff --git a/shared/consumer-rules.pro b/app-wear-shared/rx/consumer-rules.pro similarity index 100% rename from shared/consumer-rules.pro rename to app-wear-shared/rx/consumer-rules.pro diff --git a/shared/proguard-rules.pro b/app-wear-shared/rx/proguard-rules.pro similarity index 100% rename from shared/proguard-rules.pro rename to app-wear-shared/rx/proguard-rules.pro diff --git a/app-wear-shared/rx/src/debug/java/info/nightscout/rx/annotations/RxOpenForTesting.kt b/app-wear-shared/rx/src/debug/java/info/nightscout/rx/annotations/RxOpenForTesting.kt new file mode 100644 index 0000000000..dd515ed180 --- /dev/null +++ b/app-wear-shared/rx/src/debug/java/info/nightscout/rx/annotations/RxOpenForTesting.kt @@ -0,0 +1,15 @@ +package info.nightscout.rx.annotations + +/** + * This is the actual annotation that makes the class open. Don't use it directly, only through [RxOpenForTesting] + * which has a NOOP replacement in production. + */ +@Target(AnnotationTarget.ANNOTATION_CLASS) +annotation class RxOpenClass + +/** + * Annotate a class with [RxOpenForTesting] if it should be extendable for testing. + */ +@RxOpenClass +@Target(AnnotationTarget.CLASS) +annotation class RxOpenForTesting \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/AndroidManifest.xml b/app-wear-shared/rx/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..44008a4332 --- /dev/null +++ b/app-wear-shared/rx/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/shared/src/main/java/info/nightscout/androidaps/utils/rx/AapsSchedulers.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/AapsSchedulers.kt similarity index 95% rename from shared/src/main/java/info/nightscout/androidaps/utils/rx/AapsSchedulers.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/AapsSchedulers.kt index 5acdfb2220..4377909f3d 100644 --- a/shared/src/main/java/info/nightscout/androidaps/utils/rx/AapsSchedulers.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/AapsSchedulers.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.utils.rx +package info.nightscout.rx import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.core.Scheduler diff --git a/shared/src/main/java/info/nightscout/androidaps/plugins/bus/RxBus.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/bus/RxBus.kt similarity index 63% rename from shared/src/main/java/info/nightscout/androidaps/plugins/bus/RxBus.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/bus/RxBus.kt index d1c5cb573d..8c352794be 100644 --- a/shared/src/main/java/info/nightscout/androidaps/plugins/bus/RxBus.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/bus/RxBus.kt @@ -1,16 +1,16 @@ -package info.nightscout.androidaps.plugins.bus +package info.nightscout.rx.bus -import info.nightscout.androidaps.annotations.OpenForTesting -import info.nightscout.androidaps.events.Event -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.annotations.RxOpenForTesting +import info.nightscout.rx.events.Event +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.core.Observable import io.reactivex.rxjava3.subjects.PublishSubject import javax.inject.Inject import javax.inject.Singleton -@OpenForTesting +@RxOpenForTesting @Singleton class RxBus @Inject constructor( val aapsSchedulers: AapsSchedulers, @@ -26,7 +26,7 @@ class RxBus @Inject constructor( // Listen should return an Observable and not the publisher // Using ofType we filter only events that match that class type - fun toObservable(eventType: Class): Observable = + fun toObservable(eventType: Class): Observable = publisher .subscribeOn(aapsSchedulers.io) .ofType(eventType) diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/di/RxModule.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/di/RxModule.kt new file mode 100644 index 0000000000..0e584cf5e7 --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/di/RxModule.kt @@ -0,0 +1,25 @@ +package info.nightscout.rx.di + +import dagger.Module +import dagger.Provides +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.DefaultAapsSchedulers +import info.nightscout.rx.interfaces.L +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLoggerProduction +import javax.inject.Singleton + +@Module( + includes = [ + ] +) +open class RxModule { + + @Provides + @Singleton + internal fun provideSchedulers(): AapsSchedulers = DefaultAapsSchedulers() + + @Provides + @Singleton + fun provideAAPSLogger(l: L): AAPSLogger = AAPSLoggerProduction(l) +} \ No newline at end of file diff --git a/shared/src/main/java/info/nightscout/androidaps/events/Event.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/Event.kt similarity index 91% rename from shared/src/main/java/info/nightscout/androidaps/events/Event.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/events/Event.kt index 5c06afcc15..189c816f33 100644 --- a/shared/src/main/java/info/nightscout/androidaps/events/Event.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/Event.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.events +package info.nightscout.rx.events import org.apache.commons.lang3.builder.ReflectionToStringBuilder import org.apache.commons.lang3.builder.ToStringStyle diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventAcceptOpenLoopChange.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventAcceptOpenLoopChange.kt new file mode 100644 index 0000000000..4ce0b81178 --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventAcceptOpenLoopChange.kt @@ -0,0 +1,3 @@ +package info.nightscout.rx.events + +class EventAcceptOpenLoopChange : Event() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventAppExit.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventAppExit.kt new file mode 100644 index 0000000000..1f59fe2547 --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventAppExit.kt @@ -0,0 +1,3 @@ +package info.nightscout.rx.events + +class EventAppExit : Event() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventAppInitialized.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventAppInitialized.kt new file mode 100644 index 0000000000..60adbf2676 --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventAppInitialized.kt @@ -0,0 +1,3 @@ +package info.nightscout.rx.events + +class EventAppInitialized : Event() \ No newline at end of file diff --git a/core/src/main/java/info/nightscout/androidaps/events/EventAutosensCalculationFinished.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventAutosensCalculationFinished.kt similarity index 56% rename from core/src/main/java/info/nightscout/androidaps/events/EventAutosensCalculationFinished.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventAutosensCalculationFinished.kt index d6bcb8bde9..531ab29910 100644 --- a/core/src/main/java/info/nightscout/androidaps/events/EventAutosensCalculationFinished.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventAutosensCalculationFinished.kt @@ -1,3 +1,3 @@ -package info.nightscout.androidaps.events +package info.nightscout.rx.events -class EventAutosensCalculationFinished(val cause: Event?) : EventLoop() +class EventAutosensCalculationFinished(val cause: Event?) : EventLoop() \ No newline at end of file diff --git a/core/src/main/java/info/nightscout/androidaps/events/EventBTChange.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventBTChange.kt similarity index 81% rename from core/src/main/java/info/nightscout/androidaps/events/EventBTChange.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventBTChange.kt index 9285fa5750..3e30f4695f 100644 --- a/core/src/main/java/info/nightscout/androidaps/events/EventBTChange.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventBTChange.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.events +package info.nightscout.rx.events class EventBTChange(val state: Change, val deviceName: String?, val deviceAddress: String? = null) : Event() { diff --git a/core/src/main/java/info/nightscout/androidaps/events/EventChargingState.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventChargingState.kt similarity index 52% rename from core/src/main/java/info/nightscout/androidaps/events/EventChargingState.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventChargingState.kt index 71c36ca387..81606ec944 100644 --- a/core/src/main/java/info/nightscout/androidaps/events/EventChargingState.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventChargingState.kt @@ -1,3 +1,3 @@ -package info.nightscout.androidaps.events +package info.nightscout.rx.events -class EventChargingState(val isCharging: Boolean, val batterLevel: Int) : Event() +class EventChargingState(val isCharging: Boolean, val batterLevel: Int) : Event() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventConfigBuilderChange.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventConfigBuilderChange.kt new file mode 100644 index 0000000000..c898c5c7da --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventConfigBuilderChange.kt @@ -0,0 +1,3 @@ +package info.nightscout.rx.events + +class EventConfigBuilderChange : Event() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventCustomActionsChanged.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventCustomActionsChanged.kt new file mode 100644 index 0000000000..a6b2ff8203 --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventCustomActionsChanged.kt @@ -0,0 +1,3 @@ +package info.nightscout.rx.events + +class EventCustomActionsChanged : Event() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/events/EventCustomCalculationFinished.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventCustomCalculationFinished.kt similarity index 52% rename from app/src/main/java/info/nightscout/androidaps/events/EventCustomCalculationFinished.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventCustomCalculationFinished.kt index f6092b395d..32888aa35c 100644 --- a/app/src/main/java/info/nightscout/androidaps/events/EventCustomCalculationFinished.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventCustomCalculationFinished.kt @@ -1,3 +1,3 @@ -package info.nightscout.androidaps.events +package info.nightscout.rx.events class EventCustomCalculationFinished : Event() \ No newline at end of file diff --git a/core/src/main/java/info/nightscout/androidaps/events/EventDanaRSyncStatus.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventDanaRSyncStatus.kt similarity index 58% rename from core/src/main/java/info/nightscout/androidaps/events/EventDanaRSyncStatus.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventDanaRSyncStatus.kt index d30180eeb1..a79f0b57d0 100644 --- a/core/src/main/java/info/nightscout/androidaps/events/EventDanaRSyncStatus.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventDanaRSyncStatus.kt @@ -1,3 +1,3 @@ -package info.nightscout.androidaps.events +package info.nightscout.rx.events class EventDanaRSyncStatus(var message: String) : Event() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventExtendedBolusChange.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventExtendedBolusChange.kt new file mode 100644 index 0000000000..73e2811363 --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventExtendedBolusChange.kt @@ -0,0 +1,3 @@ +package info.nightscout.rx.events + +class EventExtendedBolusChange : EventLoop() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventFoodDatabaseChanged.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventFoodDatabaseChanged.kt new file mode 100644 index 0000000000..845df25de7 --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventFoodDatabaseChanged.kt @@ -0,0 +1,3 @@ +package info.nightscout.rx.events + +class EventFoodDatabaseChanged : Event() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventInitializationChanged.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventInitializationChanged.kt new file mode 100644 index 0000000000..a91c183006 --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventInitializationChanged.kt @@ -0,0 +1,3 @@ +package info.nightscout.rx.events + +class EventInitializationChanged : Event() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventLocalProfileChanged.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventLocalProfileChanged.kt new file mode 100644 index 0000000000..562cfc8dfc --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventLocalProfileChanged.kt @@ -0,0 +1,3 @@ +package info.nightscout.rx.events + +class EventLocalProfileChanged : Event() \ No newline at end of file diff --git a/core/src/main/java/info/nightscout/androidaps/events/EventLoop.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventLoop.kt similarity index 54% rename from core/src/main/java/info/nightscout/androidaps/events/EventLoop.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventLoop.kt index dd28e2323b..51319dc756 100644 --- a/core/src/main/java/info/nightscout/androidaps/events/EventLoop.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventLoop.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.events +package info.nightscout.rx.events /** Supeclass for all events concerned with input or output into or from the LoopPlugin. */ -abstract class EventLoop : Event() +abstract class EventLoop : Event() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventMobileToWear.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventMobileToWear.kt new file mode 100644 index 0000000000..681c243be7 --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventMobileToWear.kt @@ -0,0 +1,5 @@ +package info.nightscout.rx.events + +import info.nightscout.rx.weardata.EventData + +class EventMobileToWear(val payload: EventData) : Event() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventNSClientRestart.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventNSClientRestart.kt new file mode 100644 index 0000000000..d4e7fd4d6b --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventNSClientRestart.kt @@ -0,0 +1,3 @@ +package info.nightscout.rx.events + +class EventNSClientRestart : Event() \ No newline at end of file diff --git a/core/src/main/java/info/nightscout/androidaps/events/EventNetworkChange.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventNetworkChange.kt similarity index 81% rename from core/src/main/java/info/nightscout/androidaps/events/EventNetworkChange.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventNetworkChange.kt index 0f19800f22..d93ec73de9 100644 --- a/core/src/main/java/info/nightscout/androidaps/events/EventNetworkChange.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventNetworkChange.kt @@ -1,4 +1,4 @@ -package info.nightscout.androidaps.events +package info.nightscout.rx.events class EventNetworkChange( var mobileConnected: Boolean = false, @@ -7,4 +7,4 @@ class EventNetworkChange( var ssid: String = "", var roaming: Boolean = false, var metered: Boolean = false -) : Event() +) : Event() \ No newline at end of file diff --git a/core/src/main/java/info/nightscout/androidaps/events/EventNtpStatus.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventNtpStatus.kt similarity index 62% rename from core/src/main/java/info/nightscout/androidaps/events/EventNtpStatus.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventNtpStatus.kt index 46b90b33f4..cd8f79efe5 100644 --- a/core/src/main/java/info/nightscout/androidaps/events/EventNtpStatus.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventNtpStatus.kt @@ -1,3 +1,3 @@ -package info.nightscout.androidaps.events +package info.nightscout.rx.events class EventNtpStatus(val status: String, val percent: Int) : Event() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventOfflineChange.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventOfflineChange.kt new file mode 100644 index 0000000000..be2abcd52a --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventOfflineChange.kt @@ -0,0 +1,3 @@ +package info.nightscout.rx.events + +class EventOfflineChange : Event() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventProfileStoreChanged.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventProfileStoreChanged.kt new file mode 100644 index 0000000000..00ba8ab6a8 --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventProfileStoreChanged.kt @@ -0,0 +1,3 @@ +package info.nightscout.rx.events + +class EventProfileStoreChanged : Event() \ No newline at end of file diff --git a/core/src/main/java/info/nightscout/androidaps/events/EventProfileSwitchChanged.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventProfileSwitchChanged.kt similarity index 50% rename from core/src/main/java/info/nightscout/androidaps/events/EventProfileSwitchChanged.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventProfileSwitchChanged.kt index da6bd7b1cc..4ccb7540b6 100644 --- a/core/src/main/java/info/nightscout/androidaps/events/EventProfileSwitchChanged.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventProfileSwitchChanged.kt @@ -1,3 +1,3 @@ -package info.nightscout.androidaps.events +package info.nightscout.rx.events class EventProfileSwitchChanged : Event() \ No newline at end of file diff --git a/core/src/main/java/info/nightscout/androidaps/events/EventRebuildTabs.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventRebuildTabs.kt similarity index 54% rename from core/src/main/java/info/nightscout/androidaps/events/EventRebuildTabs.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventRebuildTabs.kt index 3d4180f29f..a1e9ababd0 100644 --- a/core/src/main/java/info/nightscout/androidaps/events/EventRebuildTabs.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventRebuildTabs.kt @@ -1,3 +1,3 @@ -package info.nightscout.androidaps.events +package info.nightscout.rx.events -class EventRebuildTabs constructor(var recreate: Boolean = false) : Event() +class EventRebuildTabs constructor(var recreate: Boolean = false) : Event() \ No newline at end of file diff --git a/core/src/main/java/info/nightscout/androidaps/events/EventRefreshOverview.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventRefreshOverview.kt similarity index 52% rename from core/src/main/java/info/nightscout/androidaps/events/EventRefreshOverview.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventRefreshOverview.kt index 25b22d4e81..4c0f4222e8 100644 --- a/core/src/main/java/info/nightscout/androidaps/events/EventRefreshOverview.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventRefreshOverview.kt @@ -1,3 +1,3 @@ -package info.nightscout.androidaps.events +package info.nightscout.rx.events -class EventRefreshOverview(var from: String, val now : Boolean = false) : Event() +class EventRefreshOverview(var from: String, val now : Boolean = false) : Event() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/events/EventScale.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventScale.kt similarity index 50% rename from app/src/main/java/info/nightscout/androidaps/events/EventScale.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventScale.kt index 830782c3d1..225243e7c8 100644 --- a/app/src/main/java/info/nightscout/androidaps/events/EventScale.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventScale.kt @@ -1,3 +1,3 @@ -package info.nightscout.androidaps.events +package info.nightscout.rx.events class EventScale(val hours: Int) : Event() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventTempBasalChange.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventTempBasalChange.kt new file mode 100644 index 0000000000..d6871ddc97 --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventTempBasalChange.kt @@ -0,0 +1,3 @@ +package info.nightscout.rx.events + +class EventTempBasalChange : EventLoop() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventTempTargetChange.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventTempTargetChange.kt new file mode 100644 index 0000000000..fd1409591a --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventTempTargetChange.kt @@ -0,0 +1,3 @@ +package info.nightscout.rx.events + +class EventTempTargetChange : Event() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventThemeSwitch.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventThemeSwitch.kt new file mode 100644 index 0000000000..46ac76983c --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventThemeSwitch.kt @@ -0,0 +1,3 @@ +package info.nightscout.rx.events + +class EventThemeSwitch : Event() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventTherapyEventChange.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventTherapyEventChange.kt new file mode 100644 index 0000000000..e0b00c5d0f --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventTherapyEventChange.kt @@ -0,0 +1,3 @@ +package info.nightscout.rx.events + +class EventTherapyEventChange : Event() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventTreatmentChange.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventTreatmentChange.kt new file mode 100644 index 0000000000..01ac125d0b --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventTreatmentChange.kt @@ -0,0 +1,3 @@ +package info.nightscout.rx.events + +class EventTreatmentChange : EventLoop() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventUpdateGui.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventUpdateGui.kt new file mode 100644 index 0000000000..026a3e701f --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventUpdateGui.kt @@ -0,0 +1,4 @@ +package info.nightscout.rx.events + +/** Base class for events to update the UI, mostly a specific tab. */ +abstract class EventUpdateGui : Event() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventWearToMobile.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventWearToMobile.kt new file mode 100644 index 0000000000..c0d430ea51 --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/events/EventWearToMobile.kt @@ -0,0 +1,5 @@ +package info.nightscout.rx.events + +import info.nightscout.rx.weardata.EventData + +class EventWearToMobile(val payload: EventData) : Event() \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/interfaces/L.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/interfaces/L.kt new file mode 100644 index 0000000000..02b264741e --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/interfaces/L.kt @@ -0,0 +1,7 @@ +package info.nightscout.rx.interfaces + +interface L { + fun resetToDefaults() + fun findByName(name: String): LogElement + fun getLogElements(): List +} \ No newline at end of file diff --git a/app-wear-shared/rx/src/main/java/info/nightscout/rx/interfaces/LogElement.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/interfaces/LogElement.kt new file mode 100644 index 0000000000..9d4699fbc4 --- /dev/null +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/interfaces/LogElement.kt @@ -0,0 +1,11 @@ +package info.nightscout.rx.interfaces + +interface LogElement { + + var name: String + var defaultValue: Boolean + var enabled: Boolean + + fun enable(enabled: Boolean) + fun resetToDefault() +} \ No newline at end of file diff --git a/shared/src/main/java/info/nightscout/shared/logging/AAPSLogger.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/logging/AAPSLogger.kt similarity index 97% rename from shared/src/main/java/info/nightscout/shared/logging/AAPSLogger.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/logging/AAPSLogger.kt index 436849b461..0ced293c52 100644 --- a/shared/src/main/java/info/nightscout/shared/logging/AAPSLogger.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/logging/AAPSLogger.kt @@ -1,4 +1,4 @@ -package info.nightscout.shared.logging +package info.nightscout.rx.logging /** * Created by adrian on 2019-12-27. diff --git a/shared/src/main/java/info/nightscout/shared/logging/AAPSLoggerProduction.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/logging/AAPSLoggerProduction.kt similarity index 98% rename from shared/src/main/java/info/nightscout/shared/logging/AAPSLoggerProduction.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/logging/AAPSLoggerProduction.kt index be0c6a54df..4a6bcd8900 100644 --- a/shared/src/main/java/info/nightscout/shared/logging/AAPSLoggerProduction.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/logging/AAPSLoggerProduction.kt @@ -1,5 +1,6 @@ -package info.nightscout.shared.logging +package info.nightscout.rx.logging +import info.nightscout.rx.interfaces.L import org.slf4j.LoggerFactory /** diff --git a/shared/src/main/java/info/nightscout/shared/logging/AAPSLoggerTest.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/logging/AAPSLoggerTest.kt similarity index 98% rename from shared/src/main/java/info/nightscout/shared/logging/AAPSLoggerTest.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/logging/AAPSLoggerTest.kt index d7ff2ded5a..88142c93a8 100644 --- a/shared/src/main/java/info/nightscout/shared/logging/AAPSLoggerTest.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/logging/AAPSLoggerTest.kt @@ -1,4 +1,4 @@ -package info.nightscout.shared.logging +package info.nightscout.rx.logging /** * Created by adrian on 2019-12-27. diff --git a/shared/src/main/java/info/nightscout/shared/logging/BundleLogger.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/logging/BundleLogger.kt similarity index 90% rename from shared/src/main/java/info/nightscout/shared/logging/BundleLogger.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/logging/BundleLogger.kt index ddfc492c6a..89f32df356 100644 --- a/shared/src/main/java/info/nightscout/shared/logging/BundleLogger.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/logging/BundleLogger.kt @@ -1,4 +1,4 @@ -package info.nightscout.shared.logging +package info.nightscout.rx.logging import android.os.Bundle diff --git a/shared/src/main/java/info/nightscout/shared/logging/LTag.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/logging/LTag.kt similarity index 95% rename from shared/src/main/java/info/nightscout/shared/logging/LTag.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/logging/LTag.kt index d9ef1e3c56..7ed26eda4d 100644 --- a/shared/src/main/java/info/nightscout/shared/logging/LTag.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/logging/LTag.kt @@ -1,4 +1,4 @@ -package info.nightscout.shared.logging +package info.nightscout.rx.logging enum class LTag(val tag: String, val defaultValue : Boolean = true, val requiresRestart: Boolean = false) { CORE("CORE"), diff --git a/shared/src/main/java/info/nightscout/shared/weardata/EventData.kt b/app-wear-shared/rx/src/main/java/info/nightscout/rx/weardata/EventData.kt similarity index 98% rename from shared/src/main/java/info/nightscout/shared/weardata/EventData.kt rename to app-wear-shared/rx/src/main/java/info/nightscout/rx/weardata/EventData.kt index ec450b91a8..a1c2fecced 100644 --- a/shared/src/main/java/info/nightscout/shared/weardata/EventData.kt +++ b/app-wear-shared/rx/src/main/java/info/nightscout/rx/weardata/EventData.kt @@ -1,9 +1,9 @@ -package info.nightscout.shared.weardata +package info.nightscout.rx.weardata -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event import kotlinx.serialization.Serializable import kotlinx.serialization.json.Json -import java.util.* +import java.util.Objects @Serializable sealed class EventData : Event() { diff --git a/app-wear-shared/rx/src/release/java/info/nightscout/rx/annotations/RxOpenForTesting.kt b/app-wear-shared/rx/src/release/java/info/nightscout/rx/annotations/RxOpenForTesting.kt new file mode 100644 index 0000000000..7b067babec --- /dev/null +++ b/app-wear-shared/rx/src/release/java/info/nightscout/rx/annotations/RxOpenForTesting.kt @@ -0,0 +1,8 @@ +package info.nightscout.rx.annotations + +/** + * Annotate a class with [DbOpenForTesting] if it should be extendable for testing. + * In production the class remains final. + */ +@Target(AnnotationTarget.CLASS) +annotation class RxOpenForTesting \ No newline at end of file diff --git a/app-wear-shared/shared-impl/.gitignore b/app-wear-shared/shared-impl/.gitignore new file mode 100644 index 0000000000..42afabfd2a --- /dev/null +++ b/app-wear-shared/shared-impl/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app-wear-shared/shared-impl/build.gradle b/app-wear-shared/shared-impl/build.gradle new file mode 100644 index 0000000000..aec0dc99b4 --- /dev/null +++ b/app-wear-shared/shared-impl/build.gradle @@ -0,0 +1,24 @@ +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' +apply plugin: 'kotlin-kapt' +apply plugin: 'kotlin-allopen' +apply plugin: 'com.hiya.jacoco-android' +apply plugin: 'kotlinx-serialization' + +apply from: "${project.rootDir}/core/android_dependencies.gradle" +apply from: "${project.rootDir}/core/android_module_dependencies.gradle" +//apply from: "${project.rootDir}/core/test_dependencies.gradle" +//apply from: "${project.rootDir}/core/jacoco_global.gradle" + +android { + + namespace 'info.nightscout.shared.impl' + defaultConfig { + minSdkVersion 23 // for wear + } +} + +dependencies { + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') +} \ No newline at end of file diff --git a/app-wear-shared/shared-impl/consumer-rules.pro b/app-wear-shared/shared-impl/consumer-rules.pro new file mode 100644 index 0000000000..e69de29bb2 diff --git a/app-wear-shared/shared-impl/proguard-rules.pro b/app-wear-shared/shared-impl/proguard-rules.pro new file mode 100644 index 0000000000..481bb43481 --- /dev/null +++ b/app-wear-shared/shared-impl/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/app-wear-shared/shared-impl/src/main/AndroidManifest.xml b/app-wear-shared/shared-impl/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..44008a4332 --- /dev/null +++ b/app-wear-shared/shared-impl/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app-wear-shared/shared-impl/src/main/java/info/nightcout/shared/impl/di/SharedImplModule.kt b/app-wear-shared/shared-impl/src/main/java/info/nightcout/shared/impl/di/SharedImplModule.kt new file mode 100644 index 0000000000..38f8b32239 --- /dev/null +++ b/app-wear-shared/shared-impl/src/main/java/info/nightcout/shared/impl/di/SharedImplModule.kt @@ -0,0 +1,19 @@ +package info.nightscout.rx.di + +import dagger.Module +import dagger.Provides +import info.nightcout.shared.impl.logging.LImpl +import info.nightscout.rx.interfaces.L +import info.nightscout.shared.sharedPreferences.SP +import javax.inject.Singleton + +@Module( + includes = [ + ] +) +open class SharedImplModule { + + @Provides + @Singleton + fun provideL(sp: SP): L = LImpl(sp) +} \ No newline at end of file diff --git a/shared/src/main/java/info/nightscout/shared/logging/L.kt b/app-wear-shared/shared-impl/src/main/java/info/nightcout/shared/impl/logging/LImpl.kt similarity index 63% rename from shared/src/main/java/info/nightscout/shared/logging/L.kt rename to app-wear-shared/shared-impl/src/main/java/info/nightcout/shared/impl/logging/LImpl.kt index 0149ac047a..8f7c36781b 100644 --- a/shared/src/main/java/info/nightscout/shared/logging/L.kt +++ b/app-wear-shared/shared-impl/src/main/java/info/nightcout/shared/impl/logging/LImpl.kt @@ -1,43 +1,46 @@ -package info.nightscout.shared.logging +package info.nightcout.shared.impl.logging +import info.nightscout.rx.interfaces.L +import info.nightscout.rx.interfaces.LogElement +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP -import java.util.* import javax.inject.Inject import javax.inject.Singleton @Singleton -class L @Inject constructor( +class LImpl @Inject constructor( private val sp: SP -) { +) : L { private var logElements: MutableList = ArrayList() init { - LTag.values().forEach { logElements.add(LogElement(it, sp)) } + LTag.values().forEach { logElements.add(LogElementImpl(it, sp)) } } - fun findByName(name: String): LogElement { + override fun findByName(name: String): LogElement { for (element in logElements) { if (element.name == name) return element } - return LogElement(false, sp) + return LogElementImpl(false, sp) } - fun getLogElements(): List { + override fun getLogElements(): List { return logElements } - fun resetToDefaults() { + override fun resetToDefaults() { for (element in logElements) { element.resetToDefault() } } - class LogElement { + class LogElementImpl : LogElement { + var sp: SP - var name: String - var defaultValue: Boolean - var enabled: Boolean + override var name: String + override var defaultValue: Boolean + override var enabled: Boolean private var requiresRestart = false internal constructor(tag: LTag, sp: SP) { @@ -57,12 +60,12 @@ class L @Inject constructor( private fun getSPName(): String = "log_$name" - fun enable(enabled: Boolean) { + override fun enable(enabled: Boolean) { this.enabled = enabled sp.putBoolean(getSPName(), enabled) } - fun resetToDefault() { + override fun resetToDefault() { enable(defaultValue) } } diff --git a/app-wear-shared/shared/.gitignore b/app-wear-shared/shared/.gitignore new file mode 100644 index 0000000000..42afabfd2a --- /dev/null +++ b/app-wear-shared/shared/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/shared/build.gradle b/app-wear-shared/shared/build.gradle similarity index 100% rename from shared/build.gradle rename to app-wear-shared/shared/build.gradle diff --git a/app-wear-shared/shared/consumer-rules.pro b/app-wear-shared/shared/consumer-rules.pro new file mode 100644 index 0000000000..e69de29bb2 diff --git a/app-wear-shared/shared/proguard-rules.pro b/app-wear-shared/shared/proguard-rules.pro new file mode 100644 index 0000000000..481bb43481 --- /dev/null +++ b/app-wear-shared/shared/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/shared/src/debug/java/info/nightscout/androidaps/annotations/OpenForTesting.kt b/app-wear-shared/shared/src/debug/java/info/nightscout/androidaps/annotations/OpenForTesting.kt similarity index 100% rename from shared/src/debug/java/info/nightscout/androidaps/annotations/OpenForTesting.kt rename to app-wear-shared/shared/src/debug/java/info/nightscout/androidaps/annotations/OpenForTesting.kt diff --git a/app-wear-shared/shared/src/main/AndroidManifest.xml b/app-wear-shared/shared/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..44008a4332 --- /dev/null +++ b/app-wear-shared/shared/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/shared/src/main/java/info/nightscout/androidaps/extensions/PackageManagerExtension.kt b/app-wear-shared/shared/src/main/java/info/nightscout/androidaps/extensions/PackageManagerExtension.kt similarity index 100% rename from shared/src/main/java/info/nightscout/androidaps/extensions/PackageManagerExtension.kt rename to app-wear-shared/shared/src/main/java/info/nightscout/androidaps/extensions/PackageManagerExtension.kt diff --git a/shared/src/main/java/info/nightscout/androidaps/extensions/UIUtils.kt b/app-wear-shared/shared/src/main/java/info/nightscout/androidaps/extensions/UIUtils.kt similarity index 100% rename from shared/src/main/java/info/nightscout/androidaps/extensions/UIUtils.kt rename to app-wear-shared/shared/src/main/java/info/nightscout/androidaps/extensions/UIUtils.kt diff --git a/shared/src/main/java/info/nightscout/androidaps/interfaces/ResourceHelper.kt b/app-wear-shared/shared/src/main/java/info/nightscout/androidaps/interfaces/ResourceHelper.kt similarity index 81% rename from shared/src/main/java/info/nightscout/androidaps/interfaces/ResourceHelper.kt rename to app-wear-shared/shared/src/main/java/info/nightscout/androidaps/interfaces/ResourceHelper.kt index 4e34c10355..b7371e967e 100644 --- a/shared/src/main/java/info/nightscout/androidaps/interfaces/ResourceHelper.kt +++ b/app-wear-shared/shared/src/main/java/info/nightscout/androidaps/interfaces/ResourceHelper.kt @@ -5,7 +5,15 @@ import android.content.res.AssetFileDescriptor import android.graphics.Bitmap import android.graphics.drawable.Drawable import android.util.DisplayMetrics -import androidx.annotation.* +import androidx.annotation.ArrayRes +import androidx.annotation.AttrRes +import androidx.annotation.BoolRes +import androidx.annotation.ColorInt +import androidx.annotation.ColorRes +import androidx.annotation.DrawableRes +import androidx.annotation.PluralsRes +import androidx.annotation.RawRes +import androidx.annotation.StringRes interface ResourceHelper { fun updateContext(ctx: Context?) diff --git a/shared/src/main/java/info/nightscout/androidaps/utils/DateUtil.kt b/app-wear-shared/shared/src/main/java/info/nightscout/androidaps/utils/DateUtil.kt similarity index 99% rename from shared/src/main/java/info/nightscout/androidaps/utils/DateUtil.kt rename to app-wear-shared/shared/src/main/java/info/nightscout/androidaps/utils/DateUtil.kt index 4e56335320..64f169c193 100644 --- a/shared/src/main/java/info/nightscout/androidaps/utils/DateUtil.kt +++ b/app-wear-shared/shared/src/main/java/info/nightscout/androidaps/utils/DateUtil.kt @@ -20,7 +20,12 @@ import java.text.SimpleDateFormat import java.time.Instant import java.time.ZoneId import java.time.ZoneOffset -import java.util.* +import java.util.Calendar +import java.util.Date +import java.util.EnumSet +import java.util.GregorianCalendar +import java.util.Locale +import java.util.TimeZone import java.util.concurrent.TimeUnit import java.util.regex.Pattern import java.util.stream.Collectors diff --git a/shared/src/main/java/info/nightscout/androidaps/utils/T.kt b/app-wear-shared/shared/src/main/java/info/nightscout/androidaps/utils/T.kt similarity index 100% rename from shared/src/main/java/info/nightscout/androidaps/utils/T.kt rename to app-wear-shared/shared/src/main/java/info/nightscout/androidaps/utils/T.kt diff --git a/shared/src/main/java/info/nightscout/shared/SafeParse.kt b/app-wear-shared/shared/src/main/java/info/nightscout/shared/SafeParse.kt similarity index 100% rename from shared/src/main/java/info/nightscout/shared/SafeParse.kt rename to app-wear-shared/shared/src/main/java/info/nightscout/shared/SafeParse.kt diff --git a/shared/src/main/java/info/nightscout/shared/di/SharedModule.kt b/app-wear-shared/shared/src/main/java/info/nightscout/shared/di/SharedModule.kt similarity index 64% rename from shared/src/main/java/info/nightscout/shared/di/SharedModule.kt rename to app-wear-shared/shared/src/main/java/info/nightscout/shared/di/SharedModule.kt index d7a061e3b8..51536f3d29 100644 --- a/shared/src/main/java/info/nightscout/shared/di/SharedModule.kt +++ b/app-wear-shared/shared/src/main/java/info/nightscout/shared/di/SharedModule.kt @@ -4,22 +4,17 @@ import android.content.Context import androidx.preference.PreferenceManager import dagger.Module import dagger.Provides -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.AAPSLoggerProduction -import info.nightscout.shared.logging.L import info.nightscout.shared.sharedPreferences.SP import info.nightscout.shared.sharedPreferences.SPImplementation import javax.inject.Singleton -@Module(includes = [ -]) +@Module( + includes = [ + ] +) open class SharedModule { @Provides @Singleton fun provideSharedPreferences(context: Context): SP = SPImplementation(PreferenceManager.getDefaultSharedPreferences(context), context) - - @Provides - @Singleton - fun provideAAPSLogger(l: L): AAPSLogger = AAPSLoggerProduction(l) } \ No newline at end of file diff --git a/shared/src/main/java/info/nightscout/shared/sharedPreferences/Delegates.kt b/app-wear-shared/shared/src/main/java/info/nightscout/shared/sharedPreferences/Delegates.kt similarity index 100% rename from shared/src/main/java/info/nightscout/shared/sharedPreferences/Delegates.kt rename to app-wear-shared/shared/src/main/java/info/nightscout/shared/sharedPreferences/Delegates.kt diff --git a/shared/src/main/java/info/nightscout/shared/sharedPreferences/SP.kt b/app-wear-shared/shared/src/main/java/info/nightscout/shared/sharedPreferences/SP.kt similarity index 100% rename from shared/src/main/java/info/nightscout/shared/sharedPreferences/SP.kt rename to app-wear-shared/shared/src/main/java/info/nightscout/shared/sharedPreferences/SP.kt diff --git a/shared/src/main/java/info/nightscout/shared/sharedPreferences/SPImplementation.kt b/app-wear-shared/shared/src/main/java/info/nightscout/shared/sharedPreferences/SPImplementation.kt similarity index 100% rename from shared/src/main/java/info/nightscout/shared/sharedPreferences/SPImplementation.kt rename to app-wear-shared/shared/src/main/java/info/nightscout/shared/sharedPreferences/SPImplementation.kt diff --git a/shared/src/main/res/values-af-rZA/strings.xml b/app-wear-shared/shared/src/main/res/values-af-rZA/strings.xml similarity index 100% rename from shared/src/main/res/values-af-rZA/strings.xml rename to app-wear-shared/shared/src/main/res/values-af-rZA/strings.xml diff --git a/shared/src/main/res/values-bg-rBG/strings.xml b/app-wear-shared/shared/src/main/res/values-bg-rBG/strings.xml similarity index 100% rename from shared/src/main/res/values-bg-rBG/strings.xml rename to app-wear-shared/shared/src/main/res/values-bg-rBG/strings.xml diff --git a/shared/src/main/res/values-ca-rES/strings.xml b/app-wear-shared/shared/src/main/res/values-ca-rES/strings.xml similarity index 100% rename from shared/src/main/res/values-ca-rES/strings.xml rename to app-wear-shared/shared/src/main/res/values-ca-rES/strings.xml diff --git a/shared/src/main/res/values-cs-rCZ/strings.xml b/app-wear-shared/shared/src/main/res/values-cs-rCZ/strings.xml similarity index 100% rename from shared/src/main/res/values-cs-rCZ/strings.xml rename to app-wear-shared/shared/src/main/res/values-cs-rCZ/strings.xml diff --git a/shared/src/main/res/values-da-rDK/strings.xml b/app-wear-shared/shared/src/main/res/values-da-rDK/strings.xml similarity index 100% rename from shared/src/main/res/values-da-rDK/strings.xml rename to app-wear-shared/shared/src/main/res/values-da-rDK/strings.xml diff --git a/shared/src/main/res/values-de-rDE/strings.xml b/app-wear-shared/shared/src/main/res/values-de-rDE/strings.xml similarity index 100% rename from shared/src/main/res/values-de-rDE/strings.xml rename to app-wear-shared/shared/src/main/res/values-de-rDE/strings.xml diff --git a/shared/src/main/res/values-el-rGR/strings.xml b/app-wear-shared/shared/src/main/res/values-el-rGR/strings.xml similarity index 100% rename from shared/src/main/res/values-el-rGR/strings.xml rename to app-wear-shared/shared/src/main/res/values-el-rGR/strings.xml diff --git a/shared/src/main/res/values-es-rES/strings.xml b/app-wear-shared/shared/src/main/res/values-es-rES/strings.xml similarity index 100% rename from shared/src/main/res/values-es-rES/strings.xml rename to app-wear-shared/shared/src/main/res/values-es-rES/strings.xml diff --git a/shared/src/main/res/values-fr-rFR/strings.xml b/app-wear-shared/shared/src/main/res/values-fr-rFR/strings.xml similarity index 100% rename from shared/src/main/res/values-fr-rFR/strings.xml rename to app-wear-shared/shared/src/main/res/values-fr-rFR/strings.xml diff --git a/shared/src/main/res/values-ga-rIE/strings.xml b/app-wear-shared/shared/src/main/res/values-ga-rIE/strings.xml similarity index 100% rename from shared/src/main/res/values-ga-rIE/strings.xml rename to app-wear-shared/shared/src/main/res/values-ga-rIE/strings.xml diff --git a/shared/src/main/res/values-hr-rHR/strings.xml b/app-wear-shared/shared/src/main/res/values-hr-rHR/strings.xml similarity index 100% rename from shared/src/main/res/values-hr-rHR/strings.xml rename to app-wear-shared/shared/src/main/res/values-hr-rHR/strings.xml diff --git a/shared/src/main/res/values-hu-rHU/strings.xml b/app-wear-shared/shared/src/main/res/values-hu-rHU/strings.xml similarity index 100% rename from shared/src/main/res/values-hu-rHU/strings.xml rename to app-wear-shared/shared/src/main/res/values-hu-rHU/strings.xml diff --git a/shared/src/main/res/values-it-rIT/strings.xml b/app-wear-shared/shared/src/main/res/values-it-rIT/strings.xml similarity index 100% rename from shared/src/main/res/values-it-rIT/strings.xml rename to app-wear-shared/shared/src/main/res/values-it-rIT/strings.xml diff --git a/shared/src/main/res/values-iw-rIL/strings.xml b/app-wear-shared/shared/src/main/res/values-iw-rIL/strings.xml similarity index 100% rename from shared/src/main/res/values-iw-rIL/strings.xml rename to app-wear-shared/shared/src/main/res/values-iw-rIL/strings.xml diff --git a/shared/src/main/res/values-ko-rKR/strings.xml b/app-wear-shared/shared/src/main/res/values-ko-rKR/strings.xml similarity index 100% rename from shared/src/main/res/values-ko-rKR/strings.xml rename to app-wear-shared/shared/src/main/res/values-ko-rKR/strings.xml diff --git a/shared/src/main/res/values-lt-rLT/strings.xml b/app-wear-shared/shared/src/main/res/values-lt-rLT/strings.xml similarity index 100% rename from shared/src/main/res/values-lt-rLT/strings.xml rename to app-wear-shared/shared/src/main/res/values-lt-rLT/strings.xml diff --git a/shared/src/main/res/values-nl-rNL/strings.xml b/app-wear-shared/shared/src/main/res/values-nl-rNL/strings.xml similarity index 100% rename from shared/src/main/res/values-nl-rNL/strings.xml rename to app-wear-shared/shared/src/main/res/values-nl-rNL/strings.xml diff --git a/shared/src/main/res/values-no-rNO/strings.xml b/app-wear-shared/shared/src/main/res/values-no-rNO/strings.xml similarity index 100% rename from shared/src/main/res/values-no-rNO/strings.xml rename to app-wear-shared/shared/src/main/res/values-no-rNO/strings.xml diff --git a/shared/src/main/res/values-pl-rPL/strings.xml b/app-wear-shared/shared/src/main/res/values-pl-rPL/strings.xml similarity index 100% rename from shared/src/main/res/values-pl-rPL/strings.xml rename to app-wear-shared/shared/src/main/res/values-pl-rPL/strings.xml diff --git a/shared/src/main/res/values-pt-rBR/strings.xml b/app-wear-shared/shared/src/main/res/values-pt-rBR/strings.xml similarity index 100% rename from shared/src/main/res/values-pt-rBR/strings.xml rename to app-wear-shared/shared/src/main/res/values-pt-rBR/strings.xml diff --git a/shared/src/main/res/values-pt-rPT/strings.xml b/app-wear-shared/shared/src/main/res/values-pt-rPT/strings.xml similarity index 100% rename from shared/src/main/res/values-pt-rPT/strings.xml rename to app-wear-shared/shared/src/main/res/values-pt-rPT/strings.xml diff --git a/shared/src/main/res/values-ro-rRO/strings.xml b/app-wear-shared/shared/src/main/res/values-ro-rRO/strings.xml similarity index 100% rename from shared/src/main/res/values-ro-rRO/strings.xml rename to app-wear-shared/shared/src/main/res/values-ro-rRO/strings.xml diff --git a/shared/src/main/res/values-ru-rRU/strings.xml b/app-wear-shared/shared/src/main/res/values-ru-rRU/strings.xml similarity index 100% rename from shared/src/main/res/values-ru-rRU/strings.xml rename to app-wear-shared/shared/src/main/res/values-ru-rRU/strings.xml diff --git a/shared/src/main/res/values-sk-rSK/strings.xml b/app-wear-shared/shared/src/main/res/values-sk-rSK/strings.xml similarity index 100% rename from shared/src/main/res/values-sk-rSK/strings.xml rename to app-wear-shared/shared/src/main/res/values-sk-rSK/strings.xml diff --git a/shared/src/main/res/values-sr-rCS/strings.xml b/app-wear-shared/shared/src/main/res/values-sr-rCS/strings.xml similarity index 100% rename from shared/src/main/res/values-sr-rCS/strings.xml rename to app-wear-shared/shared/src/main/res/values-sr-rCS/strings.xml diff --git a/shared/src/main/res/values-sv-rSE/strings.xml b/app-wear-shared/shared/src/main/res/values-sv-rSE/strings.xml similarity index 100% rename from shared/src/main/res/values-sv-rSE/strings.xml rename to app-wear-shared/shared/src/main/res/values-sv-rSE/strings.xml diff --git a/shared/src/main/res/values-sw600dp/layout.xml b/app-wear-shared/shared/src/main/res/values-sw600dp/layout.xml similarity index 100% rename from shared/src/main/res/values-sw600dp/layout.xml rename to app-wear-shared/shared/src/main/res/values-sw600dp/layout.xml diff --git a/shared/src/main/res/values-tr-rTR/strings.xml b/app-wear-shared/shared/src/main/res/values-tr-rTR/strings.xml similarity index 100% rename from shared/src/main/res/values-tr-rTR/strings.xml rename to app-wear-shared/shared/src/main/res/values-tr-rTR/strings.xml diff --git a/shared/src/main/res/values-zh-rCN/strings.xml b/app-wear-shared/shared/src/main/res/values-zh-rCN/strings.xml similarity index 100% rename from shared/src/main/res/values-zh-rCN/strings.xml rename to app-wear-shared/shared/src/main/res/values-zh-rCN/strings.xml diff --git a/shared/src/main/res/values/layout.xml b/app-wear-shared/shared/src/main/res/values/layout.xml similarity index 100% rename from shared/src/main/res/values/layout.xml rename to app-wear-shared/shared/src/main/res/values/layout.xml diff --git a/shared/src/main/res/values/strings.xml b/app-wear-shared/shared/src/main/res/values/strings.xml similarity index 100% rename from shared/src/main/res/values/strings.xml rename to app-wear-shared/shared/src/main/res/values/strings.xml diff --git a/shared/src/main/res/values/wear_paths.xml b/app-wear-shared/shared/src/main/res/values/wear_paths.xml similarity index 100% rename from shared/src/main/res/values/wear_paths.xml rename to app-wear-shared/shared/src/main/res/values/wear_paths.xml diff --git a/shared/src/release/java/info/nightscout/androidaps/annotations/OpenForTesting.kt b/app-wear-shared/shared/src/release/java/info/nightscout/androidaps/annotations/OpenForTesting.kt similarity index 100% rename from shared/src/release/java/info/nightscout/androidaps/annotations/OpenForTesting.kt rename to app-wear-shared/shared/src/release/java/info/nightscout/androidaps/annotations/OpenForTesting.kt diff --git a/shared/src/test/java/info/nightscout/androidaps/utils/rx/RxSchedulerRule.kt b/app-wear-shared/shared/src/test/java/info/nightscout/androidaps/utils/rx/RxSchedulerRule.kt similarity index 100% rename from shared/src/test/java/info/nightscout/androidaps/utils/rx/RxSchedulerRule.kt rename to app-wear-shared/shared/src/test/java/info/nightscout/androidaps/utils/rx/RxSchedulerRule.kt diff --git a/shared/src/test/java/info/nightscout/shared/SafeParseTest.kt b/app-wear-shared/shared/src/test/java/info/nightscout/shared/SafeParseTest.kt similarity index 100% rename from shared/src/test/java/info/nightscout/shared/SafeParseTest.kt rename to app-wear-shared/shared/src/test/java/info/nightscout/shared/SafeParseTest.kt diff --git a/app/build.gradle b/app/build.gradle index f6d9d81088..e88d6f2e3b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -178,7 +178,9 @@ dependencies { // https://github.com/nightscout/iconify.git implementation project(':graphview') implementation project(':libraries') - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') + implementation project(':app-wear-shared:shared-impl') implementation project(':core') implementation project(':ui') implementation project(':plugins') diff --git a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt index 0061e053ba..500a917e0e 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt @@ -35,14 +35,10 @@ import info.nightscout.androidaps.activities.NoSplashAppCompatActivity import info.nightscout.androidaps.activities.PreferencesActivity import info.nightscout.androidaps.activities.ProfileHelperActivity import info.nightscout.androidaps.activities.SingleFragmentActivity -import info.nightscout.ui.activities.TreatmentsActivity import info.nightscout.androidaps.database.entities.UserEntry.Action import info.nightscout.androidaps.database.entities.UserEntry.Sources import info.nightscout.androidaps.databinding.ActivityMainBinding -import info.nightscout.androidaps.events.EventAppExit -import info.nightscout.androidaps.events.EventInitializationChanged import info.nightscout.androidaps.events.EventPreferenceChange -import info.nightscout.androidaps.events.EventRebuildTabs import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.AndroidPermission import info.nightscout.androidaps.interfaces.BuildHelper @@ -63,13 +59,17 @@ import info.nightscout.androidaps.utils.extensions.isRunningRealPumpTest import info.nightscout.androidaps.utils.locale.LocaleHelper import info.nightscout.androidaps.utils.protection.PasswordCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.tabs.TabPageAdapter import info.nightscout.androidaps.utils.ui.UIRunnable import info.nightscout.plugins.constraints.signatureVerifier.SignatureVerifierPlugin -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.events.EventAppExit +import info.nightscout.rx.events.EventInitializationChanged +import info.nightscout.rx.events.EventRebuildTabs +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import info.nightscout.ui.activities.StatsActivity +import info.nightscout.ui.activities.TreatmentsActivity import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.Locale diff --git a/app/src/main/java/info/nightscout/androidaps/MainApp.kt b/app/src/main/java/info/nightscout/androidaps/MainApp.kt index 020153365a..01e64ff8cd 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainApp.kt +++ b/app/src/main/java/info/nightscout/androidaps/MainApp.kt @@ -34,7 +34,6 @@ import info.nightscout.androidaps.plugins.configBuilder.PluginStore import info.nightscout.androidaps.plugins.constraints.versionChecker.VersionCheckerUtils import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.general.overview.notifications.NotificationStore -import info.nightscout.plugins.general.themes.ThemeSwitcherPlugin import info.nightscout.androidaps.receivers.BTReceiver import info.nightscout.androidaps.receivers.ChargingStateReceiver import info.nightscout.androidaps.receivers.KeepAliveWorker @@ -44,8 +43,9 @@ import info.nightscout.androidaps.services.AlarmSoundServiceHelper import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.ProcessLifecycleListener import info.nightscout.androidaps.utils.locale.LocaleHelper -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.plugins.general.themes.ThemeSwitcherPlugin +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import info.nightscout.ui.utils.ActivityMonitor import info.nightscout.ui.widget.Widget diff --git a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt index 552a7fdb93..3679196f3c 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt @@ -13,10 +13,6 @@ import com.jjoe64.graphview.GraphView import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R import info.nightscout.androidaps.databinding.ActivityHistorybrowseBinding -import info.nightscout.androidaps.events.EventAutosensCalculationFinished -import info.nightscout.androidaps.events.EventCustomCalculationFinished -import info.nightscout.androidaps.events.EventRefreshOverview -import info.nightscout.androidaps.events.EventScale import info.nightscout.androidaps.extensions.toVisibility import info.nightscout.androidaps.extensions.toVisibilityKeepSpace import info.nightscout.androidaps.interfaces.ActivePlugin @@ -29,12 +25,17 @@ import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.workflow.CalculationWorkflow -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.events.EventAutosensCalculationFinished +import info.nightscout.rx.events.EventCustomCalculationFinished +import info.nightscout.rx.events.EventRefreshOverview +import info.nightscout.rx.events.EventScale +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign -import java.util.* +import java.util.Calendar +import java.util.GregorianCalendar import javax.inject.Inject import kotlin.math.min diff --git a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowserData.kt b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowserData.kt index 9161bf685e..b434c87629 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowserData.kt +++ b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowserData.kt @@ -5,15 +5,15 @@ import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.OverviewData import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.workflow.CalculationWorkflow -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/activities/MyPreferenceFragment.kt b/app/src/main/java/info/nightscout/androidaps/activities/MyPreferenceFragment.kt index b5c849d9e2..b84d1898e2 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/MyPreferenceFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/activities/MyPreferenceFragment.kt @@ -23,7 +23,6 @@ import info.nightscout.androidaps.danar.DanaRPlugin import info.nightscout.androidaps.danars.DanaRSPlugin import info.nightscout.androidaps.diaconn.DiaconnG8Plugin import info.nightscout.androidaps.events.EventPreferenceChange -import info.nightscout.androidaps.events.EventRebuildTabs import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.Profile @@ -34,7 +33,6 @@ import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin import info.nightscout.androidaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin import info.nightscout.androidaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin import info.nightscout.androidaps.plugins.aps.openAPSSMBDynamicISF.OpenAPSSMBDynamicISFPlugin -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.configBuilder.PluginStore import info.nightscout.androidaps.plugins.constraints.safety.SafetyPlugin import info.nightscout.androidaps.plugins.general.maintenance.MaintenancePlugin @@ -69,6 +67,8 @@ import info.nightscout.plugins.general.autotune.AutotunePlugin import info.nightscout.plugins.general.smsCommunicator.SmsCommunicatorPlugin import info.nightscout.plugins.general.xdripStatusline.StatusLinePlugin import info.nightscout.plugins.insulin.InsulinOrefFreePeakPlugin +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventRebuildTabs import info.nightscout.shared.SafeParse import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/activities/ProfileHelperActivity.kt b/app/src/main/java/info/nightscout/androidaps/activities/ProfileHelperActivity.kt index 98060ac024..bbf79e13dd 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/ProfileHelperActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/activities/ProfileHelperActivity.kt @@ -18,17 +18,17 @@ import info.nightscout.androidaps.dialogs.ProfileViewerDialog import info.nightscout.androidaps.extensions.toVisibility import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.plugins.profile.ProfilePlugin -import info.nightscout.androidaps.events.EventLocalProfileChanged +import info.nightscout.androidaps.interfaces.stats.TddCalculator import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog +import info.nightscout.plugins.profile.ProfilePlugin +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.events.EventLocalProfileChanged import info.nightscout.ui.defaultProfile.DefaultProfile import info.nightscout.ui.defaultProfile.DefaultProfileDPV -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.androidaps.interfaces.stats.TddCalculator import io.reactivex.rxjava3.core.Single import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/app/src/main/java/info/nightscout/androidaps/db/CompatDBHelper.kt b/app/src/main/java/info/nightscout/androidaps/db/CompatDBHelper.kt index 978876f9df..6240ad62de 100644 --- a/app/src/main/java/info/nightscout/androidaps/db/CompatDBHelper.kt +++ b/app/src/main/java/info/nightscout/androidaps/db/CompatDBHelper.kt @@ -14,19 +14,19 @@ import info.nightscout.androidaps.database.entities.TemporaryBasal import info.nightscout.androidaps.database.entities.TemporaryTarget import info.nightscout.androidaps.database.entities.TherapyEvent import info.nightscout.androidaps.events.EventEffectiveProfileSwitchChanged -import info.nightscout.androidaps.events.EventExtendedBolusChange -import info.nightscout.androidaps.events.EventFoodDatabaseChanged import info.nightscout.androidaps.events.EventNewBG import info.nightscout.androidaps.events.EventNewHistoryData -import info.nightscout.androidaps.events.EventOfflineChange -import info.nightscout.androidaps.events.EventProfileSwitchChanged -import info.nightscout.androidaps.events.EventTempBasalChange -import info.nightscout.androidaps.events.EventTempTargetChange -import info.nightscout.androidaps.events.EventTherapyEventChange -import info.nightscout.androidaps.events.EventTreatmentChange -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventExtendedBolusChange +import info.nightscout.rx.events.EventFoodDatabaseChanged +import info.nightscout.rx.events.EventOfflineChange +import info.nightscout.rx.events.EventProfileSwitchChanged +import info.nightscout.rx.events.EventTempBasalChange +import info.nightscout.rx.events.EventTempTargetChange +import info.nightscout.rx.events.EventTherapyEventChange +import info.nightscout.rx.events.EventTreatmentChange +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.ui.widget.Widget import io.reactivex.rxjava3.disposables.Disposable import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/di/AppComponent.kt b/app/src/main/java/info/nightscout/androidaps/di/AppComponent.kt index 406286242c..7bf8b71f5c 100644 --- a/app/src/main/java/info/nightscout/androidaps/di/AppComponent.kt +++ b/app/src/main/java/info/nightscout/androidaps/di/AppComponent.kt @@ -24,6 +24,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.di.OmnipodErosModule import info.nightscout.automation.di.AutomationModule import info.nightscout.implementation.di.ImplementationModule import info.nightscout.plugins.di.PluginsModule +import info.nightscout.rx.di.RxModule +import info.nightscout.rx.di.SharedImplModule import info.nightscout.shared.di.SharedModule import info.nightscout.ui.di.UiModule import javax.inject.Singleton @@ -55,7 +57,9 @@ import javax.inject.Singleton DatabaseModule::class, ImplementationModule::class, PluginsModule::class, + RxModule::class, SharedModule::class, + SharedImplModule::class, OpenHumansModule::class, UIModule::class, diff --git a/app/src/main/java/info/nightscout/androidaps/di/AppModule.kt b/app/src/main/java/info/nightscout/androidaps/di/AppModule.kt index d4abd543c6..5d6110b1ea 100644 --- a/app/src/main/java/info/nightscout/androidaps/di/AppModule.kt +++ b/app/src/main/java/info/nightscout/androidaps/di/AppModule.kt @@ -38,7 +38,6 @@ import info.nightscout.androidaps.interfaces.stats.DexcomTirCalculator import info.nightscout.androidaps.interfaces.stats.TddCalculator import info.nightscout.androidaps.interfaces.stats.TirCalculator import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin import info.nightscout.androidaps.plugins.configBuilder.PluginStore import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctionImpl @@ -55,8 +54,6 @@ import info.nightscout.androidaps.utils.androidNotification.NotificationHolderIm import info.nightscout.androidaps.utils.buildHelper.BuildHelperImpl import info.nightscout.androidaps.utils.buildHelper.ConfigImpl import info.nightscout.androidaps.utils.resources.IconsProviderImplementation -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.androidaps.utils.rx.DefaultAapsSchedulers import info.nightscout.androidaps.utils.storage.FileStorage import info.nightscout.androidaps.utils.storage.Storage import info.nightscout.implementation.AndroidPermissionImpl @@ -72,7 +69,9 @@ import info.nightscout.implementation.stats.TddCalculatorImpl import info.nightscout.implementation.stats.TirCalculatorImpl import info.nightscout.plugins.general.autotune.AutotunePlugin import info.nightscout.plugins.general.smsCommunicator.SmsCommunicatorPlugin -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import javax.inject.Singleton @@ -110,10 +109,6 @@ open class AppModule { @Singleton fun provideBuildHelper(config: Config, fileListProvider: PrefFileListProvider): BuildHelper = BuildHelperImpl(config, fileListProvider) - @Provides - @Singleton - internal fun provideSchedulers(): AapsSchedulers = DefaultAapsSchedulers() - @Provides @Singleton fun provideProfileFunction( diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/ExtendedBolusDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/ExtendedBolusDialog.kt index 37e74bef84..af34ae5b87 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/ExtendedBolusDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/ExtendedBolusDialog.kt @@ -25,8 +25,8 @@ import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.BOLUS +import info.nightscout.rx.logging.LTag import info.nightscout.shared.SafeParse -import info.nightscout.shared.logging.LTag import java.text.DecimalFormat import java.util.LinkedList import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/FillDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/FillDialog.kt index 383ac76b9c..aa5c3ad014 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/FillDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/FillDialog.kt @@ -30,8 +30,8 @@ import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.BOLUS +import info.nightscout.rx.logging.LTag import info.nightscout.shared.SafeParse -import info.nightscout.shared.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.LinkedList diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/InsulinDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/InsulinDialog.kt index 55498fbea7..16eb3aaf2a 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/InsulinDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/InsulinDialog.kt @@ -41,8 +41,8 @@ import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.extensions.toSignedString import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.BOLUS +import info.nightscout.rx.logging.LTag import info.nightscout.shared.SafeParse -import info.nightscout.shared.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.text.DecimalFormat diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/LoopDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/LoopDialog.kt index 8e001e348c..99d6571065 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/LoopDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/LoopDialog.kt @@ -21,7 +21,6 @@ import info.nightscout.androidaps.database.transactions.CancelCurrentOfflineEven import info.nightscout.androidaps.database.transactions.InsertAndCancelCurrentOfflineEventTransaction import info.nightscout.androidaps.databinding.DialogLoopBinding import info.nightscout.androidaps.events.EventPreferenceChange -import info.nightscout.androidaps.events.EventRefreshOverview import info.nightscout.androidaps.extensions.runOnUiThread import info.nightscout.androidaps.extensions.toVisibility import info.nightscout.androidaps.interfaces.ActivePlugin @@ -37,7 +36,6 @@ import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.PumpDescription import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.utils.DateUtil @@ -47,8 +45,10 @@ import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.BOLUS -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventRefreshOverview +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/NtpProgressDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/NtpProgressDialog.kt index 1b542c181e..13a753f17f 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/NtpProgressDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/NtpProgressDialog.kt @@ -8,13 +8,13 @@ import android.view.ViewGroup import dagger.android.support.DaggerDialogFragment import info.nightscout.androidaps.core.R import info.nightscout.androidaps.core.databinding.DialogBolusprogressBinding -import info.nightscout.androidaps.events.EventNtpStatus -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.androidaps.utils.FabricPrivacy +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventNtpStatus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/ProfileSwitchDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/ProfileSwitchDialog.kt index 37a2aef807..06dce558ef 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/ProfileSwitchDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/ProfileSwitchDialog.kt @@ -26,7 +26,6 @@ import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.utils.HardLimits import info.nightscout.androidaps.utils.HtmlHelper @@ -35,7 +34,8 @@ import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.BOLUS -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.text.DecimalFormat diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/TempBasalDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/TempBasalDialog.kt index 02db55fd02..d73a01efc7 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/TempBasalDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/TempBasalDialog.kt @@ -28,8 +28,8 @@ import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.BOLUS +import info.nightscout.rx.logging.LTag import info.nightscout.shared.SafeParse -import info.nightscout.shared.logging.LTag import java.text.DecimalFormat import java.util.LinkedList import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/TempTargetDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/TempTargetDialog.kt index d445de8dcb..1bdbf6c2da 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/TempTargetDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/TempTargetDialog.kt @@ -31,7 +31,8 @@ import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.BOLUS -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.text.DecimalFormat diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/TreatmentDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/TreatmentDialog.kt index 595a4026ec..c1dd82b8ca 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/TreatmentDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/TreatmentDialog.kt @@ -31,8 +31,8 @@ import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.BOLUS +import info.nightscout.rx.logging.LTag import info.nightscout.shared.SafeParse -import info.nightscout.shared.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.text.DecimalFormat diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/WizardDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/WizardDialog.kt index 504f5df0bb..308504161f 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/WizardDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/WizardDialog.kt @@ -24,7 +24,6 @@ import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.database.ValueWrapper import info.nightscout.androidaps.databinding.DialogWizardBinding -import info.nightscout.androidaps.events.EventAutosensCalculationFinished import info.nightscout.androidaps.extensions.formatColor import info.nightscout.androidaps.extensions.runOnUiThread import info.nightscout.androidaps.extensions.toVisibility @@ -37,7 +36,6 @@ import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.FabricPrivacy @@ -46,11 +44,13 @@ import info.nightscout.androidaps.utils.Round import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.BOLUS -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.wizard.BolusWizard +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAutosensCalculationFinished +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.SafeParse -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/app/src/main/java/info/nightscout/androidaps/events/EventAcceptOpenLoopChange.kt b/app/src/main/java/info/nightscout/androidaps/events/EventAcceptOpenLoopChange.kt deleted file mode 100644 index 552564edfc..0000000000 --- a/app/src/main/java/info/nightscout/androidaps/events/EventAcceptOpenLoopChange.kt +++ /dev/null @@ -1,3 +0,0 @@ -package info.nightscout.androidaps.events - -class EventAcceptOpenLoopChange : Event() diff --git a/app/src/main/java/info/nightscout/androidaps/events/EventNewBG.kt b/app/src/main/java/info/nightscout/androidaps/events/EventNewBG.kt index 4f05f83018..ae23b56a05 100644 --- a/app/src/main/java/info/nightscout/androidaps/events/EventNewBG.kt +++ b/app/src/main/java/info/nightscout/androidaps/events/EventNewBG.kt @@ -1,5 +1,6 @@ package info.nightscout.androidaps.events import info.nightscout.androidaps.database.entities.GlucoseValue +import info.nightscout.rx.events.EventLoop class EventNewBG(val glucoseValue: GlucoseValue?) : EventLoop() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/events/EventProfileStoreChanged.kt b/app/src/main/java/info/nightscout/androidaps/events/EventProfileStoreChanged.kt deleted file mode 100644 index 4d9fc1686a..0000000000 --- a/app/src/main/java/info/nightscout/androidaps/events/EventProfileStoreChanged.kt +++ /dev/null @@ -1,2 +0,0 @@ -package info.nightscout.androidaps.events - diff --git a/app/src/main/java/info/nightscout/androidaps/events/EventTempTargetChange.kt b/app/src/main/java/info/nightscout/androidaps/events/EventTempTargetChange.kt deleted file mode 100644 index 4d9fc1686a..0000000000 --- a/app/src/main/java/info/nightscout/androidaps/events/EventTempTargetChange.kt +++ /dev/null @@ -1,2 +0,0 @@ -package info.nightscout.androidaps.events - diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/OpenAPSFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/OpenAPSFragment.kt index a319185260..99d047eac1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/OpenAPSFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/OpenAPSFragment.kt @@ -19,13 +19,13 @@ import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.aps.events.EventOpenAPSUpdateGui import info.nightscout.androidaps.plugins.aps.events.EventOpenAPSUpdateResultGui -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.JSONFormatter -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import org.json.JSONArray diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/events/EventOpenAPSUpdateGui.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/events/EventOpenAPSUpdateGui.kt index 004bdacf41..f69265412a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/events/EventOpenAPSUpdateGui.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/events/EventOpenAPSUpdateGui.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.aps.events -import info.nightscout.androidaps.events.EventUpdateGui +import info.nightscout.rx.events.EventUpdateGui class EventOpenAPSUpdateGui : EventUpdateGui() diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/events/EventOpenAPSUpdateResultGui.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/events/EventOpenAPSUpdateResultGui.kt index 893309c9ba..0cb233502d 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/events/EventOpenAPSUpdateResultGui.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/events/EventOpenAPSUpdateResultGui.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.aps.events -import info.nightscout.androidaps.events.EventUpdateGui +import info.nightscout.rx.events.EventUpdateGui class EventOpenAPSUpdateResultGui(val text: String) : EventUpdateGui() diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/logger/LoggerCallback.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/logger/LoggerCallback.kt index e3f14189fa..bf095df835 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/logger/LoggerCallback.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/logger/LoggerCallback.kt @@ -1,8 +1,9 @@ package info.nightscout.androidaps.plugins.aps.logger import info.nightscout.androidaps.di.StaticInjector -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import org.mozilla.javascript.ScriptableObject import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopFragment.kt index 555f78bec6..eab0a8396f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopFragment.kt @@ -19,12 +19,12 @@ import info.nightscout.androidaps.interfaces.Loop import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopSetLastRunGui import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopUpdateGui -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.HtmlHelper -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt index d361f31b77..2977b07339 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt @@ -27,9 +27,6 @@ import info.nightscout.androidaps.database.entities.UserEntry.Sources import info.nightscout.androidaps.database.entities.ValueWithUnit import info.nightscout.androidaps.database.transactions.InsertAndCancelCurrentOfflineEventTransaction import info.nightscout.androidaps.database.transactions.InsertTherapyEventAnnouncementTransaction -import info.nightscout.androidaps.events.EventAcceptOpenLoopChange -import info.nightscout.androidaps.events.EventMobileToWear -import info.nightscout.androidaps.events.EventTempTargetChange import info.nightscout.androidaps.extensions.buildDeviceStatus import info.nightscout.androidaps.extensions.convertedToAbsolute import info.nightscout.androidaps.extensions.convertedToPercent @@ -39,6 +36,7 @@ import info.nightscout.androidaps.interfaces.ActivityNames import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Constraint +import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.Loop import info.nightscout.androidaps.interfaces.Loop.LastRun @@ -54,8 +52,6 @@ import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopSetLastRunGui import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopUpdateGui import info.nightscout.androidaps.plugins.aps.loop.events.EventNewOpenLoopNotification -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.plugins.configBuilder.RunningConfiguration import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification @@ -67,11 +63,15 @@ import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.HardLimits import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAcceptOpenLoopChange +import info.nightscout.rx.events.EventMobileToWear +import info.nightscout.rx.events.EventTempTargetChange +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag +import info.nightscout.rx.weardata.EventData import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.weardata.EventData import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/events/EventLoopSetLastRunGui.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/events/EventLoopSetLastRunGui.kt index 19c7e92c5c..d43ceca646 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/events/EventLoopSetLastRunGui.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/events/EventLoopSetLastRunGui.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.aps.loop.events -import info.nightscout.androidaps.events.EventUpdateGui +import info.nightscout.rx.events.EventUpdateGui /** * Created by mike on 05.08.2016. diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/events/EventLoopUpdateGui.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/events/EventLoopUpdateGui.kt index 89507d85f8..c2d2ae6f4d 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/events/EventLoopUpdateGui.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/events/EventLoopUpdateGui.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.aps.loop.events -import info.nightscout.androidaps.events.EventUpdateGui +import info.nightscout.rx.events.EventUpdateGui /** * Created by mike on 05.08.2016. diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/events/EventNewOpenLoopNotification.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/events/EventNewOpenLoopNotification.kt index 2933318dd6..354f855807 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/events/EventNewOpenLoopNotification.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/events/EventNewOpenLoopNotification.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.aps.loop.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventNewOpenLoopNotification : Event() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/DetermineBasalAdapterAMAJS.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/DetermineBasalAdapterAMAJS.kt index 08ad43aa41..d4e8a8317d 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/DetermineBasalAdapterAMAJS.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/DetermineBasalAdapterAMAJS.kt @@ -7,25 +7,31 @@ import info.nightscout.androidaps.data.MealData import info.nightscout.androidaps.extensions.convertedToAbsolute import info.nightscout.androidaps.extensions.getPassedDurationToTimeInMinutes import info.nightscout.androidaps.extensions.plannedRemainingMinutes +import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.interfaces.DetermineBasalAdapterInterface import info.nightscout.androidaps.interfaces.GlucoseUnit import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.aps.logger.LoggerCallback import info.nightscout.androidaps.plugins.aps.loop.APSResult import info.nightscout.androidaps.plugins.aps.loop.ScriptReader import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults -import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.json.JSONArray import org.json.JSONException import org.json.JSONObject -import org.mozilla.javascript.* +import org.mozilla.javascript.Context import org.mozilla.javascript.Function +import org.mozilla.javascript.NativeJSON +import org.mozilla.javascript.NativeObject +import org.mozilla.javascript.RhinoException +import org.mozilla.javascript.Scriptable +import org.mozilla.javascript.ScriptableObject +import org.mozilla.javascript.Undefined import java.io.IOException import java.lang.reflect.InvocationTargetException import java.nio.charset.StandardCharsets diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/DetermineBasalResultAMA.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/DetermineBasalResultAMA.kt index 5b56094c34..f91d5d2b62 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/DetermineBasalResultAMA.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/DetermineBasalResultAMA.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.plugins.aps.openAPSAMA import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.aps.loop.APSResult +import info.nightscout.rx.logging.LTag import org.json.JSONException import org.json.JSONObject import org.mozilla.javascript.NativeObject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt index a658026409..631db8e535 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt @@ -10,6 +10,7 @@ import info.nightscout.androidaps.extensions.target import info.nightscout.androidaps.interfaces.APS import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.Constraint +import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.interfaces.DetermineBasalAdapterInterface import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.PluginBase @@ -22,8 +23,6 @@ import info.nightscout.androidaps.plugins.aps.OpenAPSFragment import info.nightscout.androidaps.plugins.aps.events.EventOpenAPSUpdateGui import info.nightscout.androidaps.plugins.aps.events.EventOpenAPSUpdateResultGui import info.nightscout.androidaps.plugins.aps.loop.ScriptReader -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensResult import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider import info.nightscout.androidaps.utils.DateUtil @@ -31,8 +30,9 @@ import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.HardLimits import info.nightscout.androidaps.utils.Profiler import info.nightscout.androidaps.utils.Round -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import org.json.JSONException import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/DetermineBasalAdapterSMBJS.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/DetermineBasalAdapterSMBJS.kt index aac146196b..682bf2c158 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/DetermineBasalAdapterSMBJS.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/DetermineBasalAdapterSMBJS.kt @@ -7,22 +7,33 @@ import info.nightscout.androidaps.data.MealData import info.nightscout.androidaps.extensions.convertedToAbsolute import info.nightscout.androidaps.extensions.getPassedDurationToTimeInMinutes import info.nightscout.androidaps.extensions.plannedRemainingMinutes -import info.nightscout.androidaps.interfaces.* -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.Constraints +import info.nightscout.androidaps.interfaces.DetermineBasalAdapterInterface +import info.nightscout.androidaps.interfaces.GlucoseUnit +import info.nightscout.androidaps.interfaces.IobCobCalculator +import info.nightscout.androidaps.interfaces.Profile +import info.nightscout.androidaps.interfaces.ProfileFunction +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.aps.logger.LoggerCallback import info.nightscout.androidaps.plugins.aps.loop.APSResult import info.nightscout.androidaps.plugins.aps.loop.ScriptReader -import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.SafeParse -import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.shared.sharedPreferences.SP import org.json.JSONArray import org.json.JSONException import org.json.JSONObject -import org.mozilla.javascript.* +import org.mozilla.javascript.Context import org.mozilla.javascript.Function +import org.mozilla.javascript.NativeJSON +import org.mozilla.javascript.NativeObject +import org.mozilla.javascript.RhinoException +import org.mozilla.javascript.Scriptable +import org.mozilla.javascript.ScriptableObject +import org.mozilla.javascript.Undefined import java.io.IOException import java.lang.reflect.InvocationTargetException import java.nio.charset.StandardCharsets diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/DetermineBasalResultSMB.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/DetermineBasalResultSMB.kt index 9e7401f7c4..04ab453fc8 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/DetermineBasalResultSMB.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/DetermineBasalResultSMB.kt @@ -2,8 +2,8 @@ package info.nightscout.androidaps.plugins.aps.openAPSSMB import dagger.android.HasAndroidInjector import info.nightscout.androidaps.interfaces.VariableSensitivityResult -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.aps.loop.APSResult +import info.nightscout.rx.logging.LTag import org.json.JSONException import org.json.JSONObject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt index d69750e7a9..03f062359e 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt @@ -25,15 +25,15 @@ import info.nightscout.androidaps.plugins.aps.OpenAPSFragment import info.nightscout.androidaps.plugins.aps.events.EventOpenAPSUpdateGui import info.nightscout.androidaps.plugins.aps.events.EventOpenAPSUpdateResultGui import info.nightscout.androidaps.plugins.aps.loop.ScriptReader -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensResult import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.HardLimits import info.nightscout.androidaps.utils.Profiler import info.nightscout.androidaps.utils.Round -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/DetermineBasalAdapterSMBDynamicISFJS.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/DetermineBasalAdapterSMBDynamicISFJS.kt index 505ff725b8..87952c15ba 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/DetermineBasalAdapterSMBDynamicISFJS.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/DetermineBasalAdapterSMBDynamicISFJS.kt @@ -9,30 +9,36 @@ import info.nightscout.androidaps.extensions.convertedToAbsolute import info.nightscout.androidaps.extensions.getPassedDurationToTimeInMinutes import info.nightscout.androidaps.extensions.plannedRemainingMinutes import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.Constraints +import info.nightscout.androidaps.interfaces.DetermineBasalAdapterInterface import info.nightscout.androidaps.interfaces.GlucoseUnit import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.interfaces.stats.TddCalculator import info.nightscout.androidaps.plugins.aps.logger.LoggerCallback import info.nightscout.androidaps.plugins.aps.loop.ScriptReader -import info.nightscout.androidaps.interfaces.DetermineBasalAdapterInterface import info.nightscout.androidaps.plugins.aps.openAPSSMB.DetermineBasalResultSMB import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults -import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.Round -import info.nightscout.androidaps.interfaces.stats.TddCalculator +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.SafeParse -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.json.JSONArray import org.json.JSONException import org.json.JSONObject -import org.mozilla.javascript.* +import org.mozilla.javascript.Context import org.mozilla.javascript.Function +import org.mozilla.javascript.NativeJSON +import org.mozilla.javascript.NativeObject +import org.mozilla.javascript.RhinoException +import org.mozilla.javascript.Scriptable +import org.mozilla.javascript.ScriptableObject +import org.mozilla.javascript.Undefined import java.io.IOException import java.lang.reflect.InvocationTargetException import java.nio.charset.StandardCharsets diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt index 176cfe3089..158537157a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt @@ -6,20 +6,20 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.annotations.OpenForTesting import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.BuildHelper +import info.nightscout.androidaps.interfaces.Constraints +import info.nightscout.androidaps.interfaces.DetermineBasalAdapterInterface import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.ProfileFunction +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.aps.loop.ScriptReader -import info.nightscout.androidaps.interfaces.DetermineBasalAdapterInterface import info.nightscout.androidaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.HardLimits import info.nightscout.androidaps.utils.Profiler -import info.nightscout.androidaps.interfaces.BuildHelper -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderFragment.kt index 34d058ac5c..f491ecc191 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderFragment.kt @@ -6,7 +6,12 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.widget.* +import android.widget.CheckBox +import android.widget.ImageButton +import android.widget.ImageView +import android.widget.LinearLayout +import android.widget.RadioButton +import android.widget.TextView import androidx.annotation.StringRes import androidx.core.content.ContextCompat import dagger.android.support.DaggerFragment @@ -14,20 +19,20 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.activities.PreferencesActivity import info.nightscout.androidaps.activities.SingleFragmentActivity import info.nightscout.androidaps.databinding.ConfigbuilderFragmentBinding -import info.nightscout.androidaps.events.EventRebuildTabs import info.nightscout.androidaps.extensions.toVisibility import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginType -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.configBuilder.events.EventConfigBuilderUpdateGui import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.PREFERENCES -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventRebuildTabs import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderPlugin.kt index e45ec36117..f3036ff34b 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderPlugin.kt @@ -6,19 +6,29 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.database.entities.UserEntry.Action import info.nightscout.androidaps.database.entities.UserEntry.Sources import info.nightscout.androidaps.database.entities.ValueWithUnit -import info.nightscout.androidaps.events.EventAppInitialized -import info.nightscout.androidaps.events.EventConfigBuilderChange -import info.nightscout.androidaps.events.EventRebuildTabs -import info.nightscout.androidaps.interfaces.* -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.androidaps.interfaces.APS +import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.BgSource +import info.nightscout.androidaps.interfaces.ConfigBuilder +import info.nightscout.androidaps.interfaces.Insulin +import info.nightscout.androidaps.interfaces.PluginBase +import info.nightscout.androidaps.interfaces.PluginDescription +import info.nightscout.androidaps.interfaces.PluginType +import info.nightscout.androidaps.interfaces.ProfileSource +import info.nightscout.androidaps.interfaces.Pump +import info.nightscout.androidaps.interfaces.PumpSync +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.interfaces.Sensitivity import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.configBuilder.events.EventConfigBuilderUpdateGui import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAppInitialized +import info.nightscout.rx.events.EventConfigBuilderChange +import info.nightscout.rx.events.EventRebuildTabs +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP -import java.util.* import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/PluginStore.kt b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/PluginStore.kt index a574219396..a64246dad7 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/PluginStore.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/PluginStore.kt @@ -1,8 +1,20 @@ package info.nightscout.androidaps.plugins.configBuilder -import info.nightscout.androidaps.interfaces.* -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.androidaps.interfaces.APS +import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.BgSource +import info.nightscout.androidaps.interfaces.Config +import info.nightscout.androidaps.interfaces.Insulin +import info.nightscout.androidaps.interfaces.IobCobCalculator +import info.nightscout.androidaps.interfaces.Overview +import info.nightscout.androidaps.interfaces.PluginBase +import info.nightscout.androidaps.interfaces.PluginType +import info.nightscout.androidaps.interfaces.ProfileSource +import info.nightscout.androidaps.interfaces.Pump +import info.nightscout.androidaps.interfaces.Safety +import info.nightscout.androidaps.interfaces.Sensitivity +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ProfileFunctionImpl.kt b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ProfileFunctionImpl.kt index 992a18bd64..e691ef748d 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ProfileFunctionImpl.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ProfileFunctionImpl.kt @@ -16,15 +16,15 @@ import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ProfileStore import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.nsclient.data.DeviceStatusData import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.HardLimits import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/events/EventConfigBuilderUpdateGui.kt b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/events/EventConfigBuilderUpdateGui.kt index 8d24c912ad..f28fe962a1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/events/EventConfigBuilderUpdateGui.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/events/EventConfigBuilderUpdateGui.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.configBuilder.events -import info.nightscout.androidaps.events.EventUpdateGui +import info.nightscout.rx.events.EventUpdateGui class EventConfigBuilderUpdateGui : EventUpdateGui() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/ObjectivesFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/ObjectivesFragment.kt index 4287fd2743..2de90f9022 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/ObjectivesFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/ObjectivesFragment.kt @@ -23,10 +23,8 @@ import info.nightscout.androidaps.database.entities.ValueWithUnit import info.nightscout.androidaps.databinding.ObjectivesFragmentBinding import info.nightscout.androidaps.databinding.ObjectivesItemBinding import info.nightscout.androidaps.dialogs.NtpProgressDialog -import info.nightscout.androidaps.events.EventNtpStatus -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.constraints.objectives.activities.ObjectivesExamDialog import info.nightscout.androidaps.plugins.constraints.objectives.events.EventObjectivesUpdateGui import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Objective.ExamTask @@ -37,11 +35,13 @@ import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.HtmlHelper import info.nightscout.androidaps.utils.SntpClient import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import io.reactivex.rxjava3.kotlin.plusAssign -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventNtpStatus +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable +import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject class ObjectivesFragment : DaggerFragment() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/ObjectivesPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/ObjectivesPlugin.kt index 76e5f397e5..3f01b3fd8d 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/ObjectivesPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/ObjectivesPlugin.kt @@ -8,15 +8,31 @@ import info.nightscout.androidaps.BuildConfig import info.nightscout.androidaps.R import info.nightscout.androidaps.database.entities.UserEntry.Action import info.nightscout.androidaps.database.entities.UserEntry.Sources -import info.nightscout.androidaps.interfaces.* -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.Config +import info.nightscout.androidaps.interfaces.Constraint +import info.nightscout.androidaps.interfaces.Constraints +import info.nightscout.androidaps.interfaces.PluginBase +import info.nightscout.androidaps.interfaces.PluginDescription +import info.nightscout.androidaps.interfaces.PluginType +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.constraints.objectives.objectives.* +import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Objective +import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Objective0 +import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Objective1 +import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Objective10 +import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Objective2 +import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Objective3 +import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Objective4 +import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Objective5 +import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Objective6 +import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Objective7 +import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Objective9 import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP -import java.util.* +import java.util.Locale import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/activities/ObjectivesExamDialog.kt b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/activities/ObjectivesExamDialog.kt index 7e4ac193fa..b647ed53b0 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/activities/ObjectivesExamDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/activities/ObjectivesExamDialog.kt @@ -7,7 +7,7 @@ import android.view.ViewGroup import dagger.android.support.DaggerDialogFragment import info.nightscout.androidaps.R import info.nightscout.androidaps.databinding.ObjectivesExamFragmentBinding -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.constraints.objectives.events.EventObjectivesUpdateGui import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Objective import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Objective.ExamTask @@ -15,7 +15,7 @@ import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Obje import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.ToastUtils -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus import javax.inject.Inject class ObjectivesExamDialog : DaggerDialogFragment() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/events/EventObjectivesUpdateGui.kt b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/events/EventObjectivesUpdateGui.kt index fd59db7d9f..d5acd670f1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/events/EventObjectivesUpdateGui.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/objectives/events/EventObjectivesUpdateGui.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.constraints.objectives.events -import info.nightscout.androidaps.events.EventUpdateGui +import info.nightscout.rx.events.EventUpdateGui class EventObjectivesUpdateGui : EventUpdateGui() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPlugin.kt index 30a2f47603..58795e277f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPlugin.kt @@ -1,17 +1,29 @@ package info.nightscout.androidaps.plugins.constraints.safety import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.R -import info.nightscout.androidaps.extensions.* +import info.nightscout.androidaps.extensions.putDouble +import info.nightscout.androidaps.extensions.putInt +import info.nightscout.androidaps.extensions.putString +import info.nightscout.androidaps.extensions.storeDouble +import info.nightscout.androidaps.extensions.storeInt +import info.nightscout.androidaps.extensions.storeString +import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.BuildHelper +import info.nightscout.androidaps.interfaces.Config +import info.nightscout.androidaps.interfaces.Constraint +import info.nightscout.androidaps.interfaces.Constraints +import info.nightscout.androidaps.interfaces.IobCobCalculator +import info.nightscout.androidaps.interfaces.PluginBase +import info.nightscout.androidaps.interfaces.PluginDescription +import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.interfaces.Profile -import info.nightscout.androidaps.interfaces.* -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.androidaps.interfaces.PumpDescription +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.interfaces.Safety import info.nightscout.androidaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin import info.nightscout.androidaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin import info.nightscout.androidaps.plugins.aps.openAPSSMBDynamicISF.OpenAPSSMBDynamicISFPlugin -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref1Plugin @@ -19,8 +31,8 @@ import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.HardLimits import info.nightscout.androidaps.utils.Round -import info.nightscout.androidaps.interfaces.BuildHelper -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import org.json.JSONObject import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt index 6f06614629..2a4df62023 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt @@ -22,11 +22,6 @@ import info.nightscout.androidaps.dialogs.FillDialog import info.nightscout.androidaps.dialogs.ProfileSwitchDialog import info.nightscout.androidaps.dialogs.TempBasalDialog import info.nightscout.androidaps.dialogs.TempTargetDialog -import info.nightscout.androidaps.events.EventCustomActionsChanged -import info.nightscout.androidaps.events.EventExtendedBolusChange -import info.nightscout.androidaps.events.EventInitializationChanged -import info.nightscout.androidaps.events.EventTempBasalChange -import info.nightscout.androidaps.events.EventTherapyEventChange import info.nightscout.androidaps.extensions.toStringMedium import info.nightscout.androidaps.extensions.toStringShort import info.nightscout.androidaps.extensions.toVisibility @@ -40,7 +35,6 @@ import info.nightscout.androidaps.interfaces.Loop import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction import info.nightscout.androidaps.plugins.general.overview.StatusLightHandler import info.nightscout.androidaps.queue.Callback @@ -49,10 +43,16 @@ import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.protection.ProtectionCheck -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.ui.SingleClickButton import info.nightscout.androidaps.utils.ui.UIRunnable -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventCustomActionsChanged +import info.nightscout.rx.events.EventExtendedBolusChange +import info.nightscout.rx.events.EventInitializationChanged +import info.nightscout.rx.events.EventTempBasalChange +import info.nightscout.rx.events.EventTherapyEventChange +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import info.nightscout.ui.activities.TDDStatsActivity import info.nightscout.ui.dialogs.CareDialog diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsPlugin.kt index 879c084315..3f0866657f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsPlugin.kt @@ -1,13 +1,13 @@ package info.nightscout.androidaps.plugins.general.actions import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.R +import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType -import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.logging.AAPSLogger import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/dataBroadcaster/DataBroadcastPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/dataBroadcaster/DataBroadcastPlugin.kt index 0f3c03a404..3f981a0a06 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/dataBroadcaster/DataBroadcastPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/dataBroadcaster/DataBroadcastPlugin.kt @@ -6,14 +6,19 @@ import android.content.pm.ResolveInfo import android.os.Bundle import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.Event -import info.nightscout.androidaps.events.EventAutosensCalculationFinished import info.nightscout.androidaps.extensions.durationInMinutes import info.nightscout.androidaps.extensions.safeQueryBroadcastReceivers import info.nightscout.androidaps.extensions.toStringFull -import info.nightscout.androidaps.interfaces.* +import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.Config +import info.nightscout.androidaps.interfaces.IobCobCalculator +import info.nightscout.androidaps.interfaces.Loop +import info.nightscout.androidaps.interfaces.PluginBase +import info.nightscout.androidaps.interfaces.PluginDescription +import info.nightscout.androidaps.interfaces.PluginType +import info.nightscout.androidaps.interfaces.ProfileFunction +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.aps.events.EventOpenAPSUpdateGui -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.nsclient.data.DeviceStatusData import info.nightscout.androidaps.plugins.general.nsclient.data.NSDeviceStatus import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress @@ -23,9 +28,12 @@ import info.nightscout.androidaps.receivers.ReceiverStatusStore import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.Event +import info.nightscout.rx.events.EventAutosensCalculationFinished +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefsImpl.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefsImpl.kt index 7ae9c83d2a..a8e43b7aac 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefsImpl.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefsImpl.kt @@ -29,14 +29,12 @@ import info.nightscout.androidaps.database.entities.UserEntry import info.nightscout.androidaps.database.entities.UserEntry.Action import info.nightscout.androidaps.database.entities.UserEntry.Sources import info.nightscout.androidaps.diaconn.events.EventDiaconnG8PumpLogReset -import info.nightscout.androidaps.events.EventAppExit import info.nightscout.androidaps.interfaces.AndroidPermission import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.ImportExportPrefs import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.maintenance.formats.EncryptedPrefsFormat import info.nightscout.androidaps.plugins.general.maintenance.formats.PrefFileNotFoundError import info.nightscout.androidaps.plugins.general.maintenance.formats.PrefIOError @@ -56,8 +54,10 @@ import info.nightscout.androidaps.utils.alertDialogs.WarningDialog import info.nightscout.androidaps.utils.protection.PasswordCheck import info.nightscout.androidaps.utils.storage.Storage import info.nightscout.androidaps.utils.userEntry.UserEntryPresentationHelper -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAppExit +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import java.io.File import java.io.FileNotFoundException diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/MaintenanceFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/MaintenanceFragment.kt index 9d161e9855..12ba0bb024 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/MaintenanceFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/MaintenanceFragment.kt @@ -24,7 +24,6 @@ import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.maintenance.activities.LogSettingActivity import info.nightscout.androidaps.plugins.general.overview.OverviewData import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.database.DashHistoryDatabase @@ -34,9 +33,10 @@ import info.nightscout.androidaps.utils.HtmlHelper import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.PREFERENCES -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.core.Completable import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/MaintenancePlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/MaintenancePlugin.kt index fdcf2a87ce..bd6def8186 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/MaintenancePlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/MaintenancePlugin.kt @@ -15,7 +15,7 @@ import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.nsclient.data.NSSettingsStatus import info.nightscout.plugins.general.maintenance.LoggerUtils -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import java.io.BufferedInputStream import java.io.BufferedOutputStream diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/activities/LogSettingActivity.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/activities/LogSettingActivity.kt index a0d52e0736..e83b19a48f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/activities/LogSettingActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/activities/LogSettingActivity.kt @@ -8,7 +8,8 @@ import android.widget.TextView import info.nightscout.androidaps.R import info.nightscout.androidaps.activities.NoSplashAppCompatActivity import info.nightscout.androidaps.databinding.ActivityLogsettingBinding -import info.nightscout.shared.logging.L +import info.nightscout.rx.interfaces.L +import info.nightscout.rx.interfaces.LogElement import javax.inject.Inject class LogSettingActivity : NoSplashAppCompatActivity() { @@ -40,7 +41,7 @@ class LogSettingActivity : NoSplashAppCompatActivity() { } - internal inner class LogViewHolder(element: L.LogElement) { + internal inner class LogViewHolder(element: LogElement) { @Suppress("InflateParams") var baseView = layoutInflater.inflate(R.layout.logsettings_item, null) as LinearLayout diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/DataSyncSelectorImplementation.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/DataSyncSelectorImplementation.kt index b7967085cd..8ef4968ab8 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/DataSyncSelectorImplementation.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/DataSyncSelectorImplementation.kt @@ -3,15 +3,27 @@ package info.nightscout.androidaps.plugins.general.nsclient import info.nightscout.androidaps.R import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.database.ValueWrapper -import info.nightscout.androidaps.database.entities.* +import info.nightscout.androidaps.database.entities.Bolus +import info.nightscout.androidaps.database.entities.BolusCalculatorResult +import info.nightscout.androidaps.database.entities.Carbs +import info.nightscout.androidaps.database.entities.DeviceStatus +import info.nightscout.androidaps.database.entities.EffectiveProfileSwitch +import info.nightscout.androidaps.database.entities.ExtendedBolus +import info.nightscout.androidaps.database.entities.Food +import info.nightscout.androidaps.database.entities.GlucoseValue +import info.nightscout.androidaps.database.entities.OfflineEvent +import info.nightscout.androidaps.database.entities.ProfileSwitch +import info.nightscout.androidaps.database.entities.TemporaryBasal +import info.nightscout.androidaps.database.entities.TemporaryTarget +import info.nightscout.androidaps.database.entities.TherapyEvent import info.nightscout.androidaps.extensions.toJson import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.DataSyncSelector import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.plugins.profile.ProfilePlugin import info.nightscout.androidaps.utils.DateUtil +import info.nightscout.plugins.profile.ProfilePlugin +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientAddAckWorker.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientAddAckWorker.kt index 60331c4355..14a3786a2b 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientAddAckWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientAddAckWorker.kt @@ -9,16 +9,40 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.database.entities.DeviceStatus -import info.nightscout.androidaps.database.transactions.* +import info.nightscout.androidaps.database.transactions.UpdateNsIdBolusCalculatorResultTransaction +import info.nightscout.androidaps.database.transactions.UpdateNsIdBolusTransaction +import info.nightscout.androidaps.database.transactions.UpdateNsIdCarbsTransaction +import info.nightscout.androidaps.database.transactions.UpdateNsIdDeviceStatusTransaction +import info.nightscout.androidaps.database.transactions.UpdateNsIdEffectiveProfileSwitchTransaction +import info.nightscout.androidaps.database.transactions.UpdateNsIdExtendedBolusTransaction +import info.nightscout.androidaps.database.transactions.UpdateNsIdFoodTransaction +import info.nightscout.androidaps.database.transactions.UpdateNsIdGlucoseValueTransaction +import info.nightscout.androidaps.database.transactions.UpdateNsIdOfflineEventTransaction +import info.nightscout.androidaps.database.transactions.UpdateNsIdProfileSwitchTransaction +import info.nightscout.androidaps.database.transactions.UpdateNsIdTemporaryBasalTransaction +import info.nightscout.androidaps.database.transactions.UpdateNsIdTemporaryTargetTransaction +import info.nightscout.androidaps.database.transactions.UpdateNsIdTherapyEventTransaction import info.nightscout.androidaps.interfaces.DataSyncSelector -import info.nightscout.androidaps.interfaces.DataSyncSelector.* -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairBolus +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairBolusCalculatorResult +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairCarbs +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairEffectiveProfileSwitch +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairExtendedBolus +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairFood +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairGlucoseValue +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairOfflineEvent +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairProfileStore +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairProfileSwitch +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairTemporaryBasal +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairTemporaryTarget +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairTherapyEvent import info.nightscout.androidaps.plugins.general.nsclient.acks.NSAddAck import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientNewLog import info.nightscout.androidaps.receivers.DataWorkerStorage -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientAddUpdateWorker.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientAddUpdateWorker.kt index 2424a667ba..d022facb19 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientAddUpdateWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientAddUpdateWorker.kt @@ -12,14 +12,32 @@ import info.nightscout.androidaps.database.entities.TherapyEvent import info.nightscout.androidaps.database.entities.UserEntry.Action import info.nightscout.androidaps.database.entities.UserEntry.Sources import info.nightscout.androidaps.database.entities.ValueWithUnit -import info.nightscout.androidaps.database.transactions.* -import info.nightscout.androidaps.extensions.* +import info.nightscout.androidaps.database.transactions.SyncNsBolusCalculatorResultTransaction +import info.nightscout.androidaps.database.transactions.SyncNsBolusTransaction +import info.nightscout.androidaps.database.transactions.SyncNsCarbsTransaction +import info.nightscout.androidaps.database.transactions.SyncNsEffectiveProfileSwitchTransaction +import info.nightscout.androidaps.database.transactions.SyncNsExtendedBolusTransaction +import info.nightscout.androidaps.database.transactions.SyncNsOfflineEventTransaction +import info.nightscout.androidaps.database.transactions.SyncNsProfileSwitchTransaction +import info.nightscout.androidaps.database.transactions.SyncNsTemporaryBasalTransaction +import info.nightscout.androidaps.database.transactions.SyncNsTemporaryTargetTransaction +import info.nightscout.androidaps.database.transactions.SyncNsTherapyEventTransaction +import info.nightscout.androidaps.extensions.bolusCalculatorResultFromJson +import info.nightscout.androidaps.extensions.bolusFromJson +import info.nightscout.androidaps.extensions.carbsFromJson +import info.nightscout.androidaps.extensions.effectiveProfileSwitchFromJson +import info.nightscout.androidaps.extensions.extendedBolusFromJson +import info.nightscout.androidaps.extensions.isEffectiveProfileSwitch +import info.nightscout.androidaps.extensions.offlineEventFromJson +import info.nightscout.androidaps.extensions.profileSwitchFromJson +import info.nightscout.androidaps.extensions.temporaryBasalFromJson +import info.nightscout.androidaps.extensions.temporaryTargetFromJson +import info.nightscout.androidaps.extensions.therapyEventFromJson import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.interfaces.Config -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.androidaps.interfaces.XDripBroadcast import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin @@ -27,8 +45,9 @@ import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.JsonHelper import info.nightscout.androidaps.utils.JsonHelper.safeGetLong -import info.nightscout.androidaps.interfaces.BuildHelper -import info.nightscout.androidaps.interfaces.XDripBroadcast +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import java.util.concurrent.TimeUnit import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientFragment.kt index f110b0fcc8..d86d3951bf 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientFragment.kt @@ -1,7 +1,12 @@ package info.nightscout.androidaps.plugins.general.nsclient import android.os.Bundle -import android.view.* +import android.view.LayoutInflater +import android.view.Menu +import android.view.MenuInflater +import android.view.MenuItem +import android.view.View +import android.view.ViewGroup import android.widget.ScrollView import androidx.core.view.MenuProvider import androidx.lifecycle.Lifecycle @@ -13,12 +18,12 @@ import info.nightscout.androidaps.databinding.NsClientFragmentBinding import info.nightscout.androidaps.interfaces.DataSyncSelector import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.events.EventNSClientRestart import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientUpdateGUI import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventNSClientRestart import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientMbgWorker.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientMbgWorker.kt index 6014b557b1..7a2fb9adf4 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientMbgWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientMbgWorker.kt @@ -9,12 +9,12 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.database.transactions.SyncNsTherapyEventTransaction import info.nightscout.androidaps.extensions.therapyEventFromNsMbg +import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.interfaces.Config -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.general.nsclient.data.NSMbg import info.nightscout.androidaps.receivers.DataWorkerStorage -import info.nightscout.androidaps.interfaces.BuildHelper +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientPlugin.kt index 2a8954c583..032c064bdb 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientPlugin.kt @@ -13,16 +13,13 @@ import androidx.preference.SwitchPreference import dagger.android.HasAndroidInjector import info.nightscout.androidaps.Constants import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventAppExit -import info.nightscout.androidaps.events.EventChargingState -import info.nightscout.androidaps.events.EventNetworkChange import info.nightscout.androidaps.events.EventPreferenceChange +import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.nsclient.data.AlarmAck import info.nightscout.androidaps.plugins.general.nsclient.data.NSAlarm import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientNewLog @@ -33,10 +30,13 @@ import info.nightscout.androidaps.plugins.general.nsclient.services.NSClientServ import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.HtmlHelper.fromHtml import info.nightscout.androidaps.utils.ToastUtils -import info.nightscout.androidaps.interfaces.BuildHelper -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAppExit +import info.nightscout.rx.events.EventChargingState +import info.nightscout.rx.events.EventNetworkChange +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientUpdateRemoveAckWorker.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientUpdateRemoveAckWorker.kt index 3e96885cea..fa97e4a0e4 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientUpdateRemoveAckWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientUpdateRemoveAckWorker.kt @@ -7,13 +7,24 @@ import androidx.work.workDataOf import dagger.android.HasAndroidInjector import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.interfaces.DataSyncSelector -import info.nightscout.androidaps.interfaces.DataSyncSelector.* -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairBolus +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairBolusCalculatorResult +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairCarbs +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairEffectiveProfileSwitch +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairExtendedBolus +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairFood +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairGlucoseValue +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairOfflineEvent +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairProfileSwitch +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairTemporaryBasal +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairTemporaryTarget +import info.nightscout.androidaps.interfaces.DataSyncSelector.PairTherapyEvent import info.nightscout.androidaps.plugins.general.nsclient.acks.NSUpdateAck import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientNewLog import info.nightscout.androidaps.receivers.DataWorkerStorage -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import javax.inject.Inject class NSClientUpdateRemoveAckWorker( diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NsClientReceiverDelegate.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NsClientReceiverDelegate.kt index ad69554a51..6c0a36aaba 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NsClientReceiverDelegate.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NsClientReceiverDelegate.kt @@ -1,12 +1,12 @@ package info.nightscout.androidaps.plugins.general.nsclient import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventChargingState -import info.nightscout.androidaps.events.EventNetworkChange import info.nightscout.androidaps.events.EventPreferenceChange -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.receivers.ReceiverStatusStore import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.receivers.ReceiverStatusStore +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventChargingState +import info.nightscout.rx.events.EventNetworkChange import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/acks/NSAddAck.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/acks/NSAddAck.kt index d21f1112aa..043e8e21d5 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/acks/NSAddAck.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/acks/NSAddAck.kt @@ -1,10 +1,10 @@ package info.nightscout.androidaps.plugins.general.nsclient.acks -import info.nightscout.androidaps.events.Event -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.events.EventNSClientRestart +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.Event +import info.nightscout.rx.events.EventNSClientRestart +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.socket.client.Ack import org.json.JSONArray import org.json.JSONObject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/acks/NSAuthAck.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/acks/NSAuthAck.kt index 72c6d5bc24..f52d2cb8e7 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/acks/NSAuthAck.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/acks/NSAuthAck.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.general.nsclient.acks -import info.nightscout.androidaps.events.Event -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.Event import io.socket.client.Ack import org.json.JSONObject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/acks/NSUpdateAck.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/acks/NSUpdateAck.kt index bbb237fefe..91856277ce 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/acks/NSUpdateAck.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/acks/NSUpdateAck.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.plugins.general.nsclient.acks -import info.nightscout.androidaps.events.Event -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.Event +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.socket.client.Ack import org.json.JSONException import org.json.JSONObject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/data/NSDeviceStatus.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/data/NSDeviceStatus.kt index 37248349da..59c154a297 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/data/NSDeviceStatus.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/data/NSDeviceStatus.kt @@ -4,6 +4,7 @@ import android.text.Spanned import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R import info.nightscout.androidaps.interfaces.Config +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.aps.loop.APSResult import info.nightscout.androidaps.plugins.configBuilder.RunningConfiguration import info.nightscout.androidaps.utils.DateUtil @@ -11,9 +12,8 @@ import info.nightscout.androidaps.utils.HtmlHelper.fromHtml import info.nightscout.androidaps.utils.JsonHelper import info.nightscout.androidaps.utils.Round import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.json.JSONArray import org.json.JSONException diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/data/NSSettingsStatus.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/data/NSSettingsStatus.kt index 455466bbac..33d136edd2 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/data/NSSettingsStatus.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/data/NSSettingsStatus.kt @@ -1,22 +1,22 @@ package info.nightscout.androidaps.plugins.general.nsclient.data import android.content.Context -import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.R import info.nightscout.androidaps.annotations.OpenForTesting import info.nightscout.androidaps.database.entities.UserEntry import info.nightscout.androidaps.database.entities.UserEntry.Action -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.androidaps.interfaces.Config +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.utils.JsonHelper import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.json.JSONException import org.json.JSONObject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/events/EventNSClientResend.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/events/EventNSClientResend.kt index 26f70b8a82..51b2528229 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/events/EventNSClientResend.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/events/EventNSClientResend.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.general.nsclient.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventNSClientResend(val reason: String) : Event() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/events/EventNSClientUpdateGUI.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/events/EventNSClientUpdateGUI.kt index 891e61895c..66ecdc7787 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/events/EventNSClientUpdateGUI.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/events/EventNSClientUpdateGUI.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.general.nsclient.events -import info.nightscout.androidaps.events.EventUpdateGui +import info.nightscout.rx.events.EventUpdateGui class EventNSClientUpdateGUI : EventUpdateGui() diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/services/NSClientService.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/services/NSClientService.kt index 1487258435..d527167917 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/services/NSClientService.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/services/NSClientService.kt @@ -3,7 +3,12 @@ package info.nightscout.androidaps.plugins.general.nsclient.services import android.annotation.SuppressLint import android.content.Context import android.content.Intent -import android.os.* +import android.os.Binder +import android.os.Handler +import android.os.HandlerThread +import android.os.IBinder +import android.os.PowerManager +import android.os.SystemClock import androidx.work.OneTimeWorkRequest import com.google.common.base.Charsets import com.google.common.hash.Hashing @@ -11,15 +16,11 @@ import dagger.android.DaggerService import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R import info.nightscout.androidaps.database.AppRepository -import info.nightscout.androidaps.events.EventAppExit -import info.nightscout.androidaps.events.EventConfigBuilderChange import info.nightscout.androidaps.events.EventPreferenceChange import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.DataSyncSelector import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.plugins.general.food.FoodPlugin.FoodWorker import info.nightscout.androidaps.plugins.general.nsclient.NSClientAddAckWorker import info.nightscout.androidaps.plugins.general.nsclient.NSClientAddUpdateWorker import info.nightscout.androidaps.plugins.general.nsclient.NSClientMbgWorker @@ -33,14 +34,12 @@ import info.nightscout.androidaps.plugins.general.nsclient.data.NSAlarm import info.nightscout.androidaps.plugins.general.nsclient.data.NSDeviceStatus import info.nightscout.androidaps.plugins.general.nsclient.data.NSSettingsStatus import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientNewLog -import info.nightscout.androidaps.events.EventNSClientRestart import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientStatus import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientUpdateGUI import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.general.overview.notifications.NotificationWithAction -import info.nightscout.plugins.profile.ProfilePlugin import info.nightscout.androidaps.plugins.source.NSClientSourcePlugin.NSClientSourceWorker import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.DateUtil @@ -48,9 +47,15 @@ import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.JsonHelper.safeGetString import info.nightscout.androidaps.utils.JsonHelper.safeGetStringAllowNull import info.nightscout.androidaps.utils.T.Companion.mins -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.plugins.general.food.FoodPlugin.FoodWorker +import info.nightscout.plugins.profile.ProfilePlugin +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAppExit +import info.nightscout.rx.events.EventConfigBuilderChange +import info.nightscout.rx.events.EventNSClientRestart +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign @@ -61,7 +66,7 @@ import org.json.JSONArray import org.json.JSONException import org.json.JSONObject import java.net.URISyntaxException -import java.util.* +import java.util.Locale import javax.inject.Inject class NSClientService : DaggerService() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt index 734a8661b9..229b506349 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt @@ -42,17 +42,10 @@ import info.nightscout.androidaps.dialogs.ProfileViewerDialog import info.nightscout.androidaps.dialogs.TempTargetDialog import info.nightscout.androidaps.dialogs.TreatmentDialog import info.nightscout.androidaps.dialogs.WizardDialog -import info.nightscout.androidaps.events.EventAcceptOpenLoopChange import info.nightscout.androidaps.events.EventEffectiveProfileSwitchChanged -import info.nightscout.androidaps.events.EventExtendedBolusChange -import info.nightscout.androidaps.events.EventMobileToWear import info.nightscout.androidaps.events.EventNewBG import info.nightscout.androidaps.events.EventPreferenceChange import info.nightscout.androidaps.events.EventPumpStatusChanged -import info.nightscout.androidaps.events.EventRefreshOverview -import info.nightscout.androidaps.events.EventScale -import info.nightscout.androidaps.events.EventTempBasalChange -import info.nightscout.androidaps.events.EventTempTargetChange import info.nightscout.androidaps.extensions.directionToIcon import info.nightscout.androidaps.extensions.runOnUiThread import info.nightscout.androidaps.extensions.toVisibility @@ -74,7 +67,6 @@ import info.nightscout.androidaps.interfaces.TrendCalculator import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.plugins.aps.loop.events.EventNewOpenLoopNotification import info.nightscout.androidaps.plugins.aps.openAPSSMB.DetermineBasalResultSMB -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.nsclient.data.NSDeviceStatus import info.nightscout.androidaps.plugins.general.overview.activities.QuickWizardListActivity import info.nightscout.androidaps.plugins.general.overview.events.EventUpdateOverviewCalcProgress @@ -97,15 +89,23 @@ import info.nightscout.androidaps.utils.JsonHelper import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.protection.ProtectionCheck -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.ui.SingleClickButton import info.nightscout.androidaps.utils.ui.UIRunnable import info.nightscout.androidaps.utils.wizard.QuickWizard import info.nightscout.automation.AutomationPlugin import info.nightscout.plugins.constraints.bgQualityCheck.BgQualityCheckPlugin -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAcceptOpenLoopChange +import info.nightscout.rx.events.EventExtendedBolusChange +import info.nightscout.rx.events.EventMobileToWear +import info.nightscout.rx.events.EventRefreshOverview +import info.nightscout.rx.events.EventScale +import info.nightscout.rx.events.EventTempBasalChange +import info.nightscout.rx.events.EventTempTargetChange +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.weardata.EventData import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.weardata.EventData import info.nightscout.ui.dialogs.CalibrationDialog import info.nightscout.ui.dialogs.CarbsDialog import io.reactivex.rxjava3.disposables.CompositeDisposable diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewMenus.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewMenus.kt index 2431dc5f61..b33f684b4d 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewMenus.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewMenus.kt @@ -12,15 +12,15 @@ import androidx.annotation.StringRes import androidx.appcompat.widget.PopupMenu import com.google.gson.Gson import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventRefreshOverview -import info.nightscout.androidaps.events.EventScale +import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Loop import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.interfaces.BuildHelper -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventRefreshOverview +import info.nightscout.rx.events.EventScale +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewPlugin.kt index c2f5dd0e6f..69ceeab2f0 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewPlugin.kt @@ -19,7 +19,6 @@ import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.events.EventUpdateOverviewCalcProgress @@ -29,8 +28,9 @@ import info.nightscout.androidaps.plugins.general.overview.notifications.Notific import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.kt index 7522148982..ddd841b336 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.kt @@ -3,7 +3,12 @@ package info.nightscout.androidaps.plugins.general.overview.activities import android.annotation.SuppressLint import android.os.Bundle import android.util.SparseArray -import android.view.* +import android.view.LayoutInflater +import android.view.Menu +import android.view.MenuItem +import android.view.MotionEvent +import android.view.View +import android.view.ViewGroup import androidx.core.util.forEach import androidx.fragment.app.FragmentManager import androidx.recyclerview.widget.ItemTouchHelper @@ -14,19 +19,19 @@ import info.nightscout.androidaps.activities.DaggerAppCompatActivityWithResult import info.nightscout.androidaps.databinding.OverviewQuickwizardlistActivityBinding import info.nightscout.androidaps.databinding.OverviewQuickwizardlistItemBinding import info.nightscout.androidaps.extensions.toVisibility -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.utils.dragHelpers.ItemTouchHelperAdapter -import info.nightscout.androidaps.utils.dragHelpers.OnStartDragListener -import info.nightscout.androidaps.utils.dragHelpers.SimpleItemTouchHelperCallback import info.nightscout.androidaps.plugins.general.overview.dialogs.EditQuickWizardDialog import info.nightscout.androidaps.plugins.general.overview.events.EventQuickWizardChange import info.nightscout.androidaps.utils.ActionModeHelper import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.androidaps.utils.dragHelpers.ItemTouchHelperAdapter +import info.nightscout.androidaps.utils.dragHelpers.OnStartDragListener +import info.nightscout.androidaps.utils.dragHelpers.SimpleItemTouchHelperCallback import info.nightscout.androidaps.utils.wizard.QuickWizard import info.nightscout.androidaps.utils.wizard.QuickWizardEntry +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/EditQuickWizardDialog.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/EditQuickWizardDialog.kt index 9341f74dc7..94287c7701 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/EditQuickWizardDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/EditQuickWizardDialog.kt @@ -12,20 +12,19 @@ import com.google.android.material.timepicker.TimeFormat import dagger.android.support.DaggerDialogFragment import info.nightscout.androidaps.R import info.nightscout.androidaps.databinding.OverviewEditquickwizardDialogBinding -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventQuickWizardChange import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.shared.SafeParse import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.extensions.selectedItemPosition import info.nightscout.androidaps.utils.extensions.setEnableForChildren import info.nightscout.androidaps.utils.extensions.setSelection import info.nightscout.androidaps.utils.wizard.QuickWizard import info.nightscout.androidaps.utils.wizard.QuickWizardEntry +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.shared.SafeParse import info.nightscout.shared.sharedPreferences.SP import org.json.JSONException -import java.util.* import javax.inject.Inject class EditQuickWizardDialog : DaggerDialogFragment(), View.OnClickListener { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventQuickWizardChange.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventQuickWizardChange.kt index 7cfa02f3ba..b02bf909aa 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventQuickWizardChange.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventQuickWizardChange.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.general.overview.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventQuickWizardChange : Event() diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewCalcProgress.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewCalcProgress.kt index 6932500fe3..ac931599e7 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewCalcProgress.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewCalcProgress.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.general.overview.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventUpdateOverviewCalcProgress(val from: String) : Event() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewGraph.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewGraph.kt index 3f7ad2faad..12135b93a3 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewGraph.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewGraph.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.general.overview.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventUpdateOverviewGraph(val from: String) : Event() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewIobCob.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewIobCob.kt index 75c8d16bac..7029768a69 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewIobCob.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewIobCob.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.general.overview.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventUpdateOverviewIobCob(val from: String) : Event() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewNotification.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewNotification.kt index 7a4ce41eea..f20816c0d7 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewNotification.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewNotification.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.general.overview.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventUpdateOverviewNotification(val from: String) : Event() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewSensitivity.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewSensitivity.kt index 93c432f507..ef63ee8e4a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewSensitivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventUpdateOverviewSensitivity.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.general.overview.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventUpdateOverviewSensitivity(val from: String) : Event() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.kt index d3aeb014e0..eb151c8b14 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.kt @@ -13,12 +13,16 @@ import info.nightscout.androidaps.interfaces.GlucoseUnit import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.overview.OverviewData -import info.nightscout.androidaps.plugins.general.overview.graphExtensions.* +import info.nightscout.androidaps.plugins.general.overview.graphExtensions.AreaGraphSeries +import info.nightscout.androidaps.plugins.general.overview.graphExtensions.BolusDataPoint +import info.nightscout.androidaps.plugins.general.overview.graphExtensions.DoubleDataPoint +import info.nightscout.androidaps.plugins.general.overview.graphExtensions.EffectiveProfileSwitchDataPoint +import info.nightscout.androidaps.plugins.general.overview.graphExtensions.GlucoseValueDataPoint +import info.nightscout.androidaps.plugins.general.overview.graphExtensions.TimeAsXAxisLabelFormatter import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.utils.Round import info.nightscout.androidaps.utils.ToastUtils -import info.nightscout.shared.logging.AAPSLogger -import java.util.* +import info.nightscout.rx.logging.AAPSLogger import javax.inject.Inject import kotlin.math.abs import kotlin.math.max diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/DismissNotificationService.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/DismissNotificationService.kt index f1ed81de61..ec0a87162d 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/DismissNotificationService.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/DismissNotificationService.kt @@ -2,8 +2,8 @@ package info.nightscout.androidaps.plugins.general.overview.notifications import android.content.Intent import dagger.android.DaggerIntentService -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification +import info.nightscout.rx.bus.RxBus import javax.inject.Inject class DismissNotificationService : DaggerIntentService(DismissNotificationService::class.simpleName) { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/NotificationStore.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/NotificationStore.kt index 6fefe0c3ad..23b0f6e579 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/NotificationStore.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/NotificationStore.kt @@ -21,10 +21,10 @@ import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.overview.events.EventUpdateOverviewNotification import info.nightscout.androidaps.services.AlarmSoundServiceHelper import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP -import java.util.* +import java.util.Collections import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/NotificationWithAction.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/NotificationWithAction.kt index 2591bafc7c..6ecdbbd048 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/NotificationWithAction.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/NotificationWithAction.kt @@ -2,13 +2,13 @@ package info.nightscout.androidaps.plugins.general.overview.notifications import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.nsclient.NSClientPlugin import info.nightscout.androidaps.plugins.general.nsclient.data.NSAlarm import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/DummyService.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/DummyService.kt index 438cb4f7d0..3ab7771f31 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/DummyService.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/DummyService.kt @@ -6,13 +6,13 @@ import android.content.Intent import android.os.Binder import android.os.IBinder import dagger.android.DaggerService -import info.nightscout.androidaps.events.EventAppExit import info.nightscout.androidaps.interfaces.NotificationHolder -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAppExit +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.kt index 0a4072250b..be83b44f8a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.kt @@ -9,20 +9,28 @@ import androidx.core.app.RemoteInput import dagger.android.HasAndroidInjector import info.nightscout.androidaps.Constants import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventAutosensCalculationFinished -import info.nightscout.androidaps.events.EventInitializationChanged import info.nightscout.androidaps.events.EventPreferenceChange -import info.nightscout.androidaps.events.EventRefreshOverview import info.nightscout.androidaps.extensions.toStringShort import info.nightscout.androidaps.extensions.valueToUnitsString -import info.nightscout.androidaps.interfaces.* -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.IconsProvider +import info.nightscout.androidaps.interfaces.IobCobCalculator +import info.nightscout.androidaps.interfaces.NotificationHolder +import info.nightscout.androidaps.interfaces.PluginBase +import info.nightscout.androidaps.interfaces.PluginDescription +import info.nightscout.androidaps.interfaces.PluginType +import info.nightscout.androidaps.interfaces.Profile +import info.nightscout.androidaps.interfaces.ProfileFunction +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAutosensCalculationFinished +import info.nightscout.rx.events.EventInitializationChanged +import info.nightscout.rx.events.EventRefreshOverview +import info.nightscout.rx.logging.AAPSLogger import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/TidepoolFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/TidepoolFragment.kt index db3ba0ba7f..a757b6e6a8 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/TidepoolFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/TidepoolFragment.kt @@ -8,16 +8,16 @@ import android.widget.ScrollView import dagger.android.support.DaggerFragment import info.nightscout.androidaps.R import info.nightscout.androidaps.databinding.TidepoolFragmentBinding -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.tidepool.comm.TidepoolUploader import info.nightscout.androidaps.plugins.general.tidepool.events.EventTidepoolDoUpload import info.nightscout.androidaps.plugins.general.tidepool.events.EventTidepoolResetData import info.nightscout.androidaps.plugins.general.tidepool.events.EventTidepoolUpdateGUI import info.nightscout.androidaps.utils.FabricPrivacy -import io.reactivex.rxjava3.kotlin.plusAssign -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable +import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject class TidepoolFragment : DaggerFragment() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/TidepoolPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/TidepoolPlugin.kt index e6e58e9264..76b7fec541 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/TidepoolPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/TidepoolPlugin.kt @@ -7,15 +7,12 @@ import androidx.preference.PreferenceFragmentCompat import dagger.android.HasAndroidInjector import info.nightscout.androidaps.Constants import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventNetworkChange import info.nightscout.androidaps.events.EventNewBG import info.nightscout.androidaps.events.EventPreferenceChange import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.tidepool.comm.TidepoolUploader import info.nightscout.androidaps.plugins.general.tidepool.comm.TidepoolUploader.ConnectionStatus.CONNECTED import info.nightscout.androidaps.plugins.general.tidepool.comm.TidepoolUploader.ConnectionStatus.DISCONNECTED @@ -30,12 +27,14 @@ import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.HtmlHelper import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.ToastUtils -import io.reactivex.rxjava3.kotlin.plusAssign -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventNetworkChange +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable -import java.util.* +import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/InfoInterceptor.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/InfoInterceptor.kt index 30ca8ad5e8..748d427d43 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/InfoInterceptor.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/InfoInterceptor.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.plugins.general.tidepool.comm -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import okhttp3.Interceptor import okhttp3.Response import okio.Buffer diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/TidepoolCallback.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/TidepoolCallback.kt index e8760bcbd5..909c84291a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/TidepoolCallback.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/TidepoolCallback.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.plugins.general.tidepool.comm -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.tidepool.events.EventTidepoolStatus +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import retrofit2.Call import retrofit2.Callback import retrofit2.Response diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/TidepoolUploader.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/TidepoolUploader.kt index 45ad50857b..285dd766c9 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/TidepoolUploader.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/TidepoolUploader.kt @@ -6,9 +6,7 @@ import android.os.SystemClock import info.nightscout.androidaps.BuildConfig import info.nightscout.androidaps.R import info.nightscout.androidaps.interfaces.ActivePlugin -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.tidepool.events.EventTidepoolStatus import info.nightscout.androidaps.plugins.general.tidepool.messages.AuthReplyMessage import info.nightscout.androidaps.plugins.general.tidepool.messages.AuthRequestMessage @@ -18,7 +16,9 @@ import info.nightscout.androidaps.plugins.general.tidepool.messages.UploadReplyM import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.OkHttpClient diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/UploadChunk.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/UploadChunk.kt index d08ce07a0d..532ef1f095 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/UploadChunk.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/comm/UploadChunk.kt @@ -6,16 +6,22 @@ import info.nightscout.androidaps.database.entities.EffectiveProfileSwitch import info.nightscout.androidaps.database.entities.TemporaryBasal import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.plugins.general.tidepool.elements.* +import info.nightscout.androidaps.plugins.general.tidepool.elements.BasalElement +import info.nightscout.androidaps.plugins.general.tidepool.elements.BaseElement +import info.nightscout.androidaps.plugins.general.tidepool.elements.BloodGlucoseElement +import info.nightscout.androidaps.plugins.general.tidepool.elements.BolusElement +import info.nightscout.androidaps.plugins.general.tidepool.elements.ProfileElement +import info.nightscout.androidaps.plugins.general.tidepool.elements.SensorGlucoseElement +import info.nightscout.androidaps.plugins.general.tidepool.elements.WizardElement import info.nightscout.androidaps.plugins.general.tidepool.events.EventTidepoolStatus import info.nightscout.androidaps.plugins.general.tidepool.utils.GsonInstance import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.T +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP -import java.util.* +import java.util.LinkedList import javax.inject.Inject import javax.inject.Singleton import kotlin.math.max diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/events/EventTidepoolDoUpload.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/events/EventTidepoolDoUpload.kt index d20868f348..d97e354f1b 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/events/EventTidepoolDoUpload.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/events/EventTidepoolDoUpload.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.general.tidepool.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventTidepoolDoUpload : Event() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/events/EventTidepoolResetData.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/events/EventTidepoolResetData.kt index 8ea3460801..43ed9ff251 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/events/EventTidepoolResetData.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/events/EventTidepoolResetData.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.general.tidepool.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventTidepoolResetData : Event() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/events/EventTidepoolStatus.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/events/EventTidepoolStatus.kt index e2e0caf8ae..a3abc3f8ed 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/events/EventTidepoolStatus.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/events/EventTidepoolStatus.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.plugins.general.tidepool.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event import java.text.SimpleDateFormat -import java.util.* +import java.util.Locale class EventTidepoolStatus(val status: String) : Event() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/events/EventTidepoolUpdateGUI.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/events/EventTidepoolUpdateGUI.kt index de2b353dc0..5e4f76717e 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/events/EventTidepoolUpdateGUI.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/events/EventTidepoolUpdateGUI.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.general.tidepool.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventTidepoolUpdateGUI : Event() diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/utils/RateLimit.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/utils/RateLimit.kt index 42a73bde1e..40480ec784 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/utils/RateLimit.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/tidepool/utils/RateLimit.kt @@ -1,10 +1,9 @@ package info.nightscout.androidaps.plugins.general.tidepool.utils -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.T -import java.util.* +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearFragment.kt index 0cad0dcd55..67864710ff 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearFragment.kt @@ -6,13 +6,13 @@ import android.view.View import android.view.ViewGroup import dagger.android.support.DaggerFragment import info.nightscout.androidaps.databinding.WearFragmentBinding -import info.nightscout.androidaps.events.EventMobileToWear -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientUpdateGUI import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.weardata.EventData +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventMobileToWear +import info.nightscout.rx.weardata.EventData import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearPlugin.kt index e705b0b8bb..8178099127 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearPlugin.kt @@ -3,24 +3,24 @@ package info.nightscout.androidaps.plugins.general.wear import android.content.Context import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventAutosensCalculationFinished -import info.nightscout.androidaps.events.EventMobileToWear import info.nightscout.androidaps.events.EventPreferenceChange import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopUpdateGui -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress import info.nightscout.androidaps.plugins.general.wear.wearintegration.DataHandlerMobile import info.nightscout.androidaps.plugins.general.wear.wearintegration.DataLayerListenerServiceMobileHelper import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAutosensCalculationFinished +import info.nightscout.rx.events.EventMobileToWear +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.weardata.EventData import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.weardata.EventData import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataHandlerMobile.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataHandlerMobile.kt index f77267e978..57f5fd3729 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataHandlerMobile.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataHandlerMobile.kt @@ -12,9 +12,7 @@ import info.nightscout.androidaps.database.entities.* import info.nightscout.androidaps.database.interfaces.end import info.nightscout.androidaps.database.transactions.CancelCurrentTemporaryTargetIfAnyTransaction import info.nightscout.androidaps.database.transactions.InsertAndCancelCurrentTemporaryTargetTransaction -import info.nightscout.ui.dialogs.CarbsDialog import info.nightscout.androidaps.dialogs.InsulinDialog -import info.nightscout.androidaps.events.EventMobileToWear import info.nightscout.androidaps.extensions.convertedToAbsolute import info.nightscout.androidaps.extensions.toStringShort import info.nightscout.androidaps.extensions.total @@ -22,8 +20,6 @@ import info.nightscout.androidaps.extensions.valueToUnits import info.nightscout.androidaps.extensions.valueToUnitsString import info.nightscout.androidaps.interfaces.* import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.plugins.general.nsclient.data.NSDeviceStatus import info.nightscout.androidaps.plugins.general.overview.graphExtensions.GlucoseValueDataPoint import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider @@ -31,14 +27,17 @@ import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.receivers.ReceiverStatusStore import info.nightscout.androidaps.services.AlarmSoundServiceHelper import info.nightscout.androidaps.utils.* -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.wizard.BolusWizard import info.nightscout.androidaps.utils.wizard.QuickWizard import info.nightscout.androidaps.utils.wizard.QuickWizardEntry -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventMobileToWear +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag +import info.nightscout.rx.weardata.EventData import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.weardata.EventData +import info.nightscout.ui.dialogs.CarbsDialog import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.text.DateFormat diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataLayerListenerServiceMobile.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataLayerListenerServiceMobile.kt index 1a3cd7f601..27e97c7ac4 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataLayerListenerServiceMobile.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/DataLayerListenerServiceMobile.kt @@ -4,26 +4,45 @@ import android.os.Binder import android.os.Handler import android.os.HandlerThread import com.google.android.gms.tasks.Tasks -import com.google.android.gms.wearable.* +import com.google.android.gms.wearable.CapabilityClient +import com.google.android.gms.wearable.CapabilityInfo +import com.google.android.gms.wearable.DataEvent +import com.google.android.gms.wearable.DataEventBuffer +import com.google.android.gms.wearable.DataMap +import com.google.android.gms.wearable.MessageEvent +import com.google.android.gms.wearable.Node +import com.google.android.gms.wearable.PutDataMapRequest +import com.google.android.gms.wearable.Wearable +import com.google.android.gms.wearable.WearableListenerService import dagger.android.AndroidInjection import info.nightscout.androidaps.R import info.nightscout.androidaps.database.AppRepository -import info.nightscout.androidaps.events.EventMobileToWear -import info.nightscout.androidaps.interfaces.* -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.Config +import info.nightscout.androidaps.interfaces.IobCobCalculator +import info.nightscout.androidaps.interfaces.Loop +import info.nightscout.androidaps.interfaces.ProfileFunction +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.wear.WearPlugin import info.nightscout.androidaps.plugins.general.wear.events.EventWearUpdateGui import info.nightscout.androidaps.receivers.ReceiverStatusStore import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventMobileToWear +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag +import info.nightscout.rx.weardata.EventData import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.weardata.EventData import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign -import kotlinx.coroutines.* +import kotlinx.coroutines.CancellationException +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel +import kotlinx.coroutines.launch import kotlinx.coroutines.tasks.await import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt index d08cffd0fb..65ad45decf 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt @@ -13,8 +13,6 @@ import info.nightscout.androidaps.database.entities.Bolus import info.nightscout.androidaps.database.entities.ExtendedBolus import info.nightscout.androidaps.database.entities.TemporaryBasal import info.nightscout.androidaps.database.interfaces.end -import info.nightscout.androidaps.events.Event -import info.nightscout.androidaps.events.EventConfigBuilderChange import info.nightscout.androidaps.events.EventEffectiveProfileSwitchChanged import info.nightscout.androidaps.events.EventNewBG import info.nightscout.androidaps.events.EventNewHistoryData @@ -30,7 +28,6 @@ import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.OverviewData import info.nightscout.androidaps.plugins.iob.iobCobCalculator.data.AutosensData import info.nightscout.androidaps.utils.DateUtil @@ -38,10 +35,13 @@ import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.MidnightTime import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.workflow.CalculationWorkflow -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.Event +import info.nightscout.rx.events.EventConfigBuilderChange +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt index b5bb5f79ff..765b817a55 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt @@ -10,14 +10,13 @@ import info.nightscout.androidaps.Constants import info.nightscout.androidaps.R import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.database.ValueWrapper -import info.nightscout.androidaps.events.Event -import info.nightscout.androidaps.events.EventAutosensCalculationFinished import info.nightscout.androidaps.extensions.target import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.ProfileFunction +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.iob.iobCobCalculator.data.AutosensData @@ -30,13 +29,15 @@ import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.Profiler import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.interfaces.BuildHelper -import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.workflow.CalculationWorkflow -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.Event +import info.nightscout.rx.events.EventAutosensCalculationFinished +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP -import java.util.* +import java.util.Calendar +import java.util.GregorianCalendar import javax.inject.Inject import kotlin.math.abs import kotlin.math.max diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOrefWorker.kt b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOrefWorker.kt index b22f092719..f64012dd91 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOrefWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOrefWorker.kt @@ -9,13 +9,12 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.Constants import info.nightscout.androidaps.R import info.nightscout.androidaps.database.AppRepository -import info.nightscout.androidaps.events.Event -import info.nightscout.androidaps.events.EventAutosensCalculationFinished import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.ProfileFunction +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.iob.iobCobCalculator.data.AutosensData @@ -28,11 +27,12 @@ import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.Profiler import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.interfaces.BuildHelper -import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.workflow.CalculationWorkflow -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.Event +import info.nightscout.rx.events.EventAutosensCalculationFinished +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject import kotlin.math.abs diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/events/EventIobCalculationProgress.kt b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/events/EventIobCalculationProgress.kt index 3da3b8e3bd..aef9156319 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/events/EventIobCalculationProgress.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/events/EventIobCalculationProgress.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.iob.iobCobCalculator.events -import info.nightscout.androidaps.events.Event import info.nightscout.androidaps.workflow.CalculationWorkflow +import info.nightscout.rx.events.Event class EventIobCalculationProgress(val pass: CalculationWorkflow.ProgressData, val progressPct: Int, val cause: Event?) : Event() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/PumpSyncImplementation.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/PumpSyncImplementation.kt index 83704b9489..89152e3794 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/PumpSyncImplementation.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/PumpSyncImplementation.kt @@ -34,15 +34,15 @@ import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.T -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpFragment.kt index 1f3d8b1f29..102d588ffa 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpFragment.kt @@ -9,18 +9,18 @@ import android.view.ViewGroup import dagger.android.support.DaggerFragment import info.nightscout.androidaps.R import info.nightscout.androidaps.databinding.VirtualpumpFragmentBinding -import info.nightscout.androidaps.events.EventExtendedBolusChange -import info.nightscout.androidaps.events.EventTempBasalChange import info.nightscout.androidaps.extensions.toStringFull import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.pump.virtual.events.EventVirtualPumpUpdateGui import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventExtendedBolusChange +import info.nightscout.rx.events.EventTempBasalChange import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpPlugin.kt index e60b7547be..ec5a5435e7 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpPlugin.kt @@ -23,7 +23,6 @@ import info.nightscout.androidaps.interfaces.PumpDescription import info.nightscout.androidaps.interfaces.PumpPluginBase import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.common.ManufacturerType import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress @@ -35,9 +34,10 @@ import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.InstanceId import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.TimeChangeType -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/events/EventVirtualPumpUpdateGui.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/events/EventVirtualPumpUpdateGui.kt index a0498aa14d..b5f08f2b2f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/events/EventVirtualPumpUpdateGui.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/events/EventVirtualPumpUpdateGui.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.pump.virtual.events -import info.nightscout.androidaps.events.EventUpdateGui +import info.nightscout.rx.events.EventUpdateGui class EventVirtualPumpUpdateGui : EventUpdateGui() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/AbstractSensitivityPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/AbstractSensitivityPlugin.kt index a942d50f94..6fb6018361 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/AbstractSensitivityPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/AbstractSensitivityPlugin.kt @@ -4,14 +4,14 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.interfaces.Sensitivity -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensDataStore import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensResult import info.nightscout.androidaps.utils.Round +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.SafeParse -import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.shared.sharedPreferences.SP import kotlin.math.max import kotlin.math.min diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityAAPSPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityAAPSPlugin.kt index 9550e9f8f9..8fbb1fdcf6 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityAAPSPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityAAPSPlugin.kt @@ -18,8 +18,9 @@ import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensDataStore import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensResult import info.nightscout.androidaps.utils.DateUtil import info.nightscout.plugins.utils.Percentile -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import org.json.JSONException import org.json.JSONObject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityOref1Plugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityOref1Plugin.kt index 34ace702d0..af482d3cd6 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityOref1Plugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityOref1Plugin.kt @@ -19,8 +19,9 @@ import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensDataStore import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensResult import info.nightscout.androidaps.utils.DateUtil import info.nightscout.plugins.utils.Percentile -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import org.json.JSONException import org.json.JSONObject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityWeightedAveragePlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityWeightedAveragePlugin.kt index aa3033733e..c0f2fcf3ac 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityWeightedAveragePlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityWeightedAveragePlugin.kt @@ -13,13 +13,13 @@ import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.interfaces.Sensitivity.SensitivityType -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensDataStore import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensResult import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.json.JSONException import org.json.JSONObject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/AidexPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/AidexPlugin.kt index 21d4a75b0f..c18625206d 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/AidexPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/AidexPlugin.kt @@ -10,12 +10,17 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.database.entities.GlucoseValue import info.nightscout.androidaps.database.transactions.CgmSourceTransaction -import info.nightscout.androidaps.interfaces.* +import info.nightscout.androidaps.interfaces.BgSource +import info.nightscout.androidaps.interfaces.BuildHelper +import info.nightscout.androidaps.interfaces.Config +import info.nightscout.androidaps.interfaces.PluginBase +import info.nightscout.androidaps.interfaces.PluginDescription +import info.nightscout.androidaps.interfaces.PluginType +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.receivers.Intents -import info.nightscout.androidaps.interfaces.BuildHelper -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/BGSourceFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/BGSourceFragment.kt index 6266213326..61b5f1ee7e 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/BGSourceFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/BGSourceFragment.kt @@ -2,7 +2,12 @@ package info.nightscout.androidaps.plugins.source import android.os.Bundle import android.util.SparseArray -import android.view.* +import android.view.LayoutInflater +import android.view.Menu +import android.view.MenuInflater +import android.view.MenuItem +import android.view.View +import android.view.ViewGroup import androidx.core.util.forEach import androidx.core.view.MenuProvider import androidx.lifecycle.Lifecycle @@ -27,15 +32,15 @@ import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.ActionModeHelper import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.concurrent.TimeUnit diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/DexcomPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/DexcomPlugin.kt index c170c0a7d6..7dfeb49669 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/DexcomPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/DexcomPlugin.kt @@ -9,7 +9,6 @@ import androidx.work.WorkerParameters import androidx.work.workDataOf import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R -import info.nightscout.androidaps.plugins.source.activities.RequestDexcomPermissionActivity import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.database.entities.GlucoseValue import info.nightscout.androidaps.database.entities.TherapyEvent @@ -27,13 +26,14 @@ import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.interfaces.XDripBroadcast import info.nightscout.androidaps.logging.UserEntryLogger +import info.nightscout.androidaps.plugins.source.activities.RequestDexcomPermissionActivity import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.interfaces.XDripBroadcast -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/EversensePlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/EversensePlugin.kt index 92b24df2df..52e59af732 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/EversensePlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/EversensePlugin.kt @@ -15,14 +15,14 @@ import info.nightscout.androidaps.interfaces.BgSource import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.interfaces.XDripBroadcast import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.androidaps.interfaces.XDripBroadcast -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP -import java.util.* +import java.util.Arrays import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/GlimpPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/GlimpPlugin.kt index 2daf641769..fd5a3f728c 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/GlimpPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/GlimpPlugin.kt @@ -14,10 +14,10 @@ import info.nightscout.androidaps.interfaces.BgSource import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.interfaces.XDripBroadcast import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.interfaces.XDripBroadcast +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/GlunovoPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/GlunovoPlugin.kt index 12dabeff51..6397aa7a6a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/GlunovoPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/GlunovoPlugin.kt @@ -17,14 +17,14 @@ import info.nightscout.androidaps.interfaces.BgSource import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.interfaces.XDripBroadcast import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.interfaces.XDripBroadcast +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/IntelligoPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/IntelligoPlugin.kt index 1183c22fa7..547d247676 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/IntelligoPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/IntelligoPlugin.kt @@ -21,13 +21,13 @@ import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.interfaces.XDripBroadcast import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.interfaces.XDripBroadcast -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/MM640gPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/MM640gPlugin.kt index b21599a57f..9952accd15 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/MM640gPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/MM640gPlugin.kt @@ -13,12 +13,12 @@ import info.nightscout.androidaps.interfaces.BgSource import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.interfaces.XDripBroadcast import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.androidaps.interfaces.XDripBroadcast -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.json.JSONArray import org.json.JSONException diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/NSClientSourcePlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/NSClientSourcePlugin.kt index 8d8ba5ef8c..f28015d260 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/NSClientSourcePlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/NSClientSourcePlugin.kt @@ -14,9 +14,8 @@ import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.interfaces.XDripBroadcast import info.nightscout.androidaps.plugins.general.nsclient.NSClientPlugin import info.nightscout.androidaps.plugins.general.nsclient.data.NSSgv import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification @@ -24,8 +23,9 @@ import info.nightscout.androidaps.plugins.general.overview.notifications.Notific import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.interfaces.XDripBroadcast -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.json.JSONObject import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/PoctechPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/PoctechPlugin.kt index 2047be6e7a..89f742c4d0 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/PoctechPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/PoctechPlugin.kt @@ -14,11 +14,11 @@ import info.nightscout.androidaps.interfaces.BgSource import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.utils.JsonHelper.safeGetString -import info.nightscout.androidaps.interfaces.XDripBroadcast import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.interfaces.XDripBroadcast +import info.nightscout.androidaps.utils.JsonHelper.safeGetString +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.json.JSONArray import org.json.JSONException diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/RandomBgPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/RandomBgPlugin.kt index deff869400..57a143f8ea 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/RandomBgPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/RandomBgPlugin.kt @@ -8,17 +8,23 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.database.entities.GlucoseValue import info.nightscout.androidaps.database.transactions.CgmSourceTransaction -import info.nightscout.androidaps.interfaces.* -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.utils.T +import info.nightscout.androidaps.interfaces.BgSource +import info.nightscout.androidaps.interfaces.BuildHelper +import info.nightscout.androidaps.interfaces.PluginBase +import info.nightscout.androidaps.interfaces.PluginDescription +import info.nightscout.androidaps.interfaces.PluginType +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.interfaces.XDripBroadcast import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin +import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.extensions.isRunningTest +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign -import java.util.* +import java.util.Calendar +import java.util.GregorianCalendar import javax.inject.Inject import javax.inject.Singleton import kotlin.math.PI diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/TomatoPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/TomatoPlugin.kt index 719357cf81..cc18b05559 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/TomatoPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/TomatoPlugin.kt @@ -13,10 +13,10 @@ import info.nightscout.androidaps.interfaces.BgSource import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.interfaces.XDripBroadcast import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.interfaces.XDripBroadcast +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/XdripPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/XdripPlugin.kt index 4ca1f0eb01..4b54a66f02 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/source/XdripPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/XdripPlugin.kt @@ -13,11 +13,11 @@ import info.nightscout.androidaps.interfaces.BgSource import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.receivers.Intents -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/receivers/BTReceiver.kt b/app/src/main/java/info/nightscout/androidaps/receivers/BTReceiver.kt index 8d4a97c243..677a8a95d5 100644 --- a/app/src/main/java/info/nightscout/androidaps/receivers/BTReceiver.kt +++ b/app/src/main/java/info/nightscout/androidaps/receivers/BTReceiver.kt @@ -4,9 +4,9 @@ import android.bluetooth.BluetoothDevice import android.content.Context import android.content.Intent import dagger.android.DaggerBroadcastReceiver -import info.nightscout.androidaps.events.EventBTChange import info.nightscout.androidaps.extensions.safeGetParcelableExtra -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventBTChange import javax.inject.Inject class BTReceiver : DaggerBroadcastReceiver() { diff --git a/app/src/main/java/info/nightscout/androidaps/receivers/ChargingStateReceiver.kt b/app/src/main/java/info/nightscout/androidaps/receivers/ChargingStateReceiver.kt index 0013616cc9..161f548878 100644 --- a/app/src/main/java/info/nightscout/androidaps/receivers/ChargingStateReceiver.kt +++ b/app/src/main/java/info/nightscout/androidaps/receivers/ChargingStateReceiver.kt @@ -5,10 +5,10 @@ import android.content.Intent import android.content.IntentFilter import android.os.BatteryManager import dagger.android.DaggerBroadcastReceiver -import info.nightscout.androidaps.events.EventChargingState -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventChargingState +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject class ChargingStateReceiver : DaggerBroadcastReceiver() { diff --git a/app/src/main/java/info/nightscout/androidaps/receivers/DataReceiver.kt b/app/src/main/java/info/nightscout/androidaps/receivers/DataReceiver.kt index c19b71ad8e..44a0273433 100644 --- a/app/src/main/java/info/nightscout/androidaps/receivers/DataReceiver.kt +++ b/app/src/main/java/info/nightscout/androidaps/receivers/DataReceiver.kt @@ -6,14 +6,21 @@ import android.provider.Telephony import androidx.work.Data import androidx.work.OneTimeWorkRequest import dagger.android.DaggerBroadcastReceiver -import info.nightscout.plugins.general.smsCommunicator.SmsCommunicatorPlugin -import info.nightscout.androidaps.plugins.source.* +import info.nightscout.androidaps.plugins.source.AidexPlugin +import info.nightscout.androidaps.plugins.source.DexcomPlugin +import info.nightscout.androidaps.plugins.source.EversensePlugin +import info.nightscout.androidaps.plugins.source.GlimpPlugin +import info.nightscout.androidaps.plugins.source.MM640gPlugin +import info.nightscout.androidaps.plugins.source.PoctechPlugin +import info.nightscout.androidaps.plugins.source.TomatoPlugin +import info.nightscout.androidaps.plugins.source.XdripPlugin import info.nightscout.androidaps.utils.extensions.copyDouble import info.nightscout.androidaps.utils.extensions.copyLong import info.nightscout.androidaps.utils.extensions.copyString -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.BundleLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.plugins.general.smsCommunicator.SmsCommunicatorPlugin +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.BundleLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject open class DataReceiver : DaggerBroadcastReceiver() { diff --git a/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveWorker.kt b/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveWorker.kt index 4245c645f9..fa9875cbc9 100644 --- a/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveWorker.kt @@ -16,7 +16,6 @@ import info.nightscout.androidaps.BuildConfig import info.nightscout.androidaps.R import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.database.AppRepository -import info.nightscout.androidaps.events.EventProfileSwitchChanged import info.nightscout.androidaps.extensions.buildDeviceStatus import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.CommandQueue @@ -27,15 +26,16 @@ import info.nightscout.androidaps.interfaces.Loop import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.configBuilder.RunningConfiguration import info.nightscout.androidaps.plugins.general.maintenance.MaintenancePlugin import info.nightscout.androidaps.queue.commands.Command import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventProfileSwitchChanged +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import info.nightscout.ui.widget.Widget import java.util.concurrent.TimeUnit diff --git a/app/src/main/java/info/nightscout/androidaps/receivers/TimeDateOrTZChangeReceiver.kt b/app/src/main/java/info/nightscout/androidaps/receivers/TimeDateOrTZChangeReceiver.kt index f07a843d00..9d15dd9678 100644 --- a/app/src/main/java/info/nightscout/androidaps/receivers/TimeDateOrTZChangeReceiver.kt +++ b/app/src/main/java/info/nightscout/androidaps/receivers/TimeDateOrTZChangeReceiver.kt @@ -6,11 +6,12 @@ import com.google.gson.Gson import dagger.android.DaggerBroadcastReceiver import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.Pump -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.BundleLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.utils.TimeChangeType -import java.util.* +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.BundleLogger +import info.nightscout.rx.logging.LTag +import java.util.Date +import java.util.TimeZone import javax.inject.Inject class TimeDateOrTZChangeReceiver : DaggerBroadcastReceiver() { diff --git a/app/src/main/java/info/nightscout/androidaps/setupwizard/SWDefinition.kt b/app/src/main/java/info/nightscout/androidaps/setupwizard/SWDefinition.kt index 742ea969f6..a1a7f2b21d 100644 --- a/app/src/main/java/info/nightscout/androidaps/setupwizard/SWDefinition.kt +++ b/app/src/main/java/info/nightscout/androidaps/setupwizard/SWDefinition.kt @@ -22,13 +22,10 @@ import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesFragment import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin import info.nightscout.androidaps.plugins.general.nsclient.NSClientPlugin import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientStatus -import info.nightscout.plugins.profile.ProfileFragment -import info.nightscout.plugins.profile.ProfilePlugin import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange import info.nightscout.androidaps.plugins.pump.omnipod.dash.OmnipodDashPumpPlugin import info.nightscout.androidaps.plugins.pump.omnipod.eros.OmnipodErosPumpPlugin @@ -50,6 +47,9 @@ import info.nightscout.androidaps.setupwizard.events.EventSWUpdate import info.nightscout.androidaps.utils.CryptoUtil import info.nightscout.androidaps.utils.HardLimits import info.nightscout.androidaps.utils.extensions.isRunningTest +import info.nightscout.plugins.profile.ProfileFragment +import info.nightscout.plugins.profile.ProfilePlugin +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/setupwizard/SWEventListener.kt b/app/src/main/java/info/nightscout/androidaps/setupwizard/SWEventListener.kt index c1cfb270aa..24ca417851 100644 --- a/app/src/main/java/info/nightscout/androidaps/setupwizard/SWEventListener.kt +++ b/app/src/main/java/info/nightscout/androidaps/setupwizard/SWEventListener.kt @@ -7,7 +7,7 @@ import android.widget.TextView import dagger.android.HasAndroidInjector import info.nightscout.androidaps.events.EventStatus import info.nightscout.androidaps.setupwizard.elements.SWItem -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers import io.reactivex.rxjava3.disposables.CompositeDisposable import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/setupwizard/SetupWizardActivity.kt b/app/src/main/java/info/nightscout/androidaps/setupwizard/SetupWizardActivity.kt index 9bd975de19..9819c62aee 100644 --- a/app/src/main/java/info/nightscout/androidaps/setupwizard/SetupWizardActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/setupwizard/SetupWizardActivity.kt @@ -9,19 +9,19 @@ import info.nightscout.androidaps.MainActivity import info.nightscout.androidaps.R import info.nightscout.androidaps.activities.NoSplashAppCompatActivity import info.nightscout.androidaps.databinding.ActivitySetupwizardBinding -import info.nightscout.androidaps.events.EventProfileSwitchChanged -import info.nightscout.androidaps.events.EventProfileStoreChanged import info.nightscout.androidaps.events.EventPumpStatusChanged import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientStatus -import info.nightscout.plugins.profile.ProfilePlugin import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange import info.nightscout.androidaps.setupwizard.elements.SWItem import info.nightscout.androidaps.setupwizard.events.EventSWUpdate import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.locale.LocaleHelper.update -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.plugins.profile.ProfilePlugin +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.events.EventProfileStoreChanged +import info.nightscout.rx.events.EventProfileSwitchChanged import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWItem.kt b/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWItem.kt index 4db19af5d0..9e703c1e52 100644 --- a/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWItem.kt +++ b/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWItem.kt @@ -8,12 +8,12 @@ import androidx.annotation.StringRes import androidx.appcompat.app.AppCompatActivity import dagger.android.HasAndroidInjector import info.nightscout.androidaps.events.EventPreferenceChange -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.setupwizard.events.EventSWUpdate import info.nightscout.androidaps.utils.protection.PasswordCheck -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import java.util.concurrent.Executors import java.util.concurrent.ScheduledFuture diff --git a/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWPlugin.kt b/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWPlugin.kt index 95401bdfab..f8a5ad0af5 100644 --- a/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWPlugin.kt @@ -9,13 +9,13 @@ import android.widget.RadioGroup import android.widget.TextView import dagger.android.HasAndroidInjector import info.nightscout.androidaps.activities.MyPreferenceFragment -import info.nightscout.androidaps.events.EventConfigBuilderChange import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin import info.nightscout.androidaps.plugins.configBuilder.PluginStore import info.nightscout.androidaps.setupwizard.SWDefinition import info.nightscout.androidaps.setupwizard.events.EventSWUpdate +import info.nightscout.rx.events.EventConfigBuilderChange import javax.inject.Inject class SWPlugin(injector: HasAndroidInjector, private val definition: SWDefinition) : SWItem(injector, Type.PLUGIN) { diff --git a/app/src/main/java/info/nightscout/androidaps/setupwizard/events/EventSWLabel.kt b/app/src/main/java/info/nightscout/androidaps/setupwizard/events/EventSWLabel.kt index 636c94c2bf..4c9322ec3c 100644 --- a/app/src/main/java/info/nightscout/androidaps/setupwizard/events/EventSWLabel.kt +++ b/app/src/main/java/info/nightscout/androidaps/setupwizard/events/EventSWLabel.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.setupwizard.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventSWLabel(var label: String) : Event() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/setupwizard/events/EventSWUpdate.kt b/app/src/main/java/info/nightscout/androidaps/setupwizard/events/EventSWUpdate.kt index 3c700cda41..f67b6b0566 100644 --- a/app/src/main/java/info/nightscout/androidaps/setupwizard/events/EventSWUpdate.kt +++ b/app/src/main/java/info/nightscout/androidaps/setupwizard/events/EventSWUpdate.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.setupwizard.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventSWUpdate(var redraw: Boolean) : Event() \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/utils/JSONFormatter.kt b/app/src/main/java/info/nightscout/androidaps/utils/JSONFormatter.kt index ffeecdce1b..ed9202fe0d 100644 --- a/app/src/main/java/info/nightscout/androidaps/utils/JSONFormatter.kt +++ b/app/src/main/java/info/nightscout/androidaps/utils/JSONFormatter.kt @@ -1,14 +1,15 @@ package info.nightscout.androidaps.utils import android.text.Spanned -import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.utils.HtmlHelper.fromHtml +import info.nightscout.rx.logging.AAPSLogger import org.json.JSONArray import org.json.JSONException import org.json.JSONObject import java.text.DateFormat import java.text.SimpleDateFormat -import java.util.* +import java.util.Date +import java.util.Locale import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/utils/Profiler.kt b/app/src/main/java/info/nightscout/androidaps/utils/Profiler.kt index 899fdf3e3f..34d7ca78d5 100644 --- a/app/src/main/java/info/nightscout/androidaps/utils/Profiler.kt +++ b/app/src/main/java/info/nightscout/androidaps/utils/Profiler.kt @@ -1,8 +1,9 @@ package info.nightscout.androidaps.utils import info.nightscout.androidaps.annotations.OpenForTesting -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/info/nightscout/androidaps/utils/SntpClient.kt b/app/src/main/java/info/nightscout/androidaps/utils/SntpClient.kt index 2749708ea7..0499951dfd 100644 --- a/app/src/main/java/info/nightscout/androidaps/utils/SntpClient.kt +++ b/app/src/main/java/info/nightscout/androidaps/utils/SntpClient.kt @@ -1,13 +1,12 @@ package info.nightscout.androidaps.utils import android.os.SystemClock -import javax.inject.Singleton -import javax.inject.Inject -import info.nightscout.shared.logging.AAPSLogger -import java.lang.Exception +import info.nightscout.rx.logging.AAPSLogger import java.net.DatagramPacket import java.net.DatagramSocket import java.net.InetAddress +import javax.inject.Inject +import javax.inject.Singleton /* * Copyright (C) 2008 The Android Open Source Project diff --git a/app/src/main/java/info/nightscout/androidaps/utils/buildHelper/ConfigImpl.kt b/app/src/main/java/info/nightscout/androidaps/utils/buildHelper/ConfigImpl.kt index 00cfef4013..30085521bb 100644 --- a/app/src/main/java/info/nightscout/androidaps/utils/buildHelper/ConfigImpl.kt +++ b/app/src/main/java/info/nightscout/androidaps/utils/buildHelper/ConfigImpl.kt @@ -16,6 +16,7 @@ class ConfigImpl @Inject constructor() : Config { override val PUMPDRIVERS = BuildConfig.FLAVOR == "full" || BuildConfig.FLAVOR == "pumpcontrol" override val FLAVOR = BuildConfig.FLAVOR override val VERSION_NAME = BuildConfig.VERSION_NAME + override val DEBUG = BuildConfig.DEBUG override val currentDeviceModelString = Build.MANUFACTURER + " " + Build.MODEL + " (" + Build.DEVICE + ")" diff --git a/app/src/main/java/info/nightscout/androidaps/utils/wizard/BolusWizard.kt b/app/src/main/java/info/nightscout/androidaps/utils/wizard/BolusWizard.kt index 0f0aa7211d..ff0c0e3c51 100644 --- a/app/src/main/java/info/nightscout/androidaps/utils/wizard/BolusWizard.kt +++ b/app/src/main/java/info/nightscout/androidaps/utils/wizard/BolusWizard.kt @@ -14,7 +14,6 @@ import info.nightscout.androidaps.database.entities.UserEntry.Action import info.nightscout.androidaps.database.entities.UserEntry.Sources import info.nightscout.androidaps.database.entities.ValueWithUnit import info.nightscout.androidaps.database.transactions.InsertOrUpdateBolusCalculatorResultTransaction -import info.nightscout.androidaps.events.EventRefreshOverview import info.nightscout.androidaps.extensions.formatColor import info.nightscout.androidaps.extensions.highValueToUnitsToString import info.nightscout.androidaps.extensions.lowValueToUnitsToString @@ -25,6 +24,7 @@ import info.nightscout.androidaps.interfaces.CarbTimer import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Constraint +import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.Loop import info.nightscout.androidaps.interfaces.PluginBase @@ -34,8 +34,6 @@ import info.nightscout.androidaps.interfaces.PumpDescription import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider import info.nightscout.androidaps.queue.Callback @@ -44,8 +42,10 @@ import info.nightscout.androidaps.utils.HtmlHelper import info.nightscout.androidaps.utils.Round import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventRefreshOverview +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/app/src/main/java/info/nightscout/androidaps/utils/wizard/QuickWizardEntry.kt b/app/src/main/java/info/nightscout/androidaps/utils/wizard/QuickWizardEntry.kt index c6dee8a660..a85ede2596 100644 --- a/app/src/main/java/info/nightscout/androidaps/utils/wizard/QuickWizardEntry.kt +++ b/app/src/main/java/info/nightscout/androidaps/utils/wizard/QuickWizardEntry.kt @@ -11,15 +11,15 @@ import info.nightscout.androidaps.interfaces.Loop import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.JsonHelper.safeGetInt import info.nightscout.androidaps.utils.JsonHelper.safeGetString +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import org.json.JSONException import org.json.JSONObject -import java.util.* +import java.util.UUID import javax.inject.Inject class QuickWizardEntry @Inject constructor(private val injector: HasAndroidInjector) { diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/CalculationWorkflow.kt b/app/src/main/java/info/nightscout/androidaps/workflow/CalculationWorkflow.kt index 7fe6ed3a1c..88de76bf7f 100644 --- a/app/src/main/java/info/nightscout/androidaps/workflow/CalculationWorkflow.kt +++ b/app/src/main/java/info/nightscout/androidaps/workflow/CalculationWorkflow.kt @@ -10,16 +10,11 @@ import androidx.work.WorkInfo import androidx.work.WorkManager import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.Event -import info.nightscout.androidaps.events.EventAppInitialized import info.nightscout.androidaps.events.EventNewHistoryData -import info.nightscout.androidaps.events.EventOfflineChange import info.nightscout.androidaps.events.EventPreferenceChange -import info.nightscout.androidaps.events.EventTherapyEventChange import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.OverviewData import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobOref1Worker @@ -28,9 +23,14 @@ import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref1Plugin import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.Event +import info.nightscout.rx.events.EventAppInitialized +import info.nightscout.rx.events.EventOfflineChange +import info.nightscout.rx.events.EventTherapyEventChange +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/InvokeLoopWorker.kt b/app/src/main/java/info/nightscout/androidaps/workflow/InvokeLoopWorker.kt index 398968d6c2..afd05522ab 100644 --- a/app/src/main/java/info/nightscout/androidaps/workflow/InvokeLoopWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/workflow/InvokeLoopWorker.kt @@ -5,11 +5,11 @@ import androidx.work.Worker import androidx.work.WorkerParameters import androidx.work.workDataOf import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.events.Event import info.nightscout.androidaps.events.EventNewBG import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.Loop import info.nightscout.androidaps.receivers.DataWorkerStorage +import info.nightscout.rx.events.Event import javax.inject.Inject class InvokeLoopWorker( diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/LoadBgDataWorker.kt b/app/src/main/java/info/nightscout/androidaps/workflow/LoadBgDataWorker.kt index 9de696516a..0e012a45f5 100644 --- a/app/src/main/java/info/nightscout/androidaps/workflow/LoadBgDataWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/workflow/LoadBgDataWorker.kt @@ -7,10 +7,10 @@ import androidx.work.workDataOf import dagger.android.HasAndroidInjector import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.interfaces.IobCobCalculator -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import javax.inject.Inject class LoadBgDataWorker( diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareBasalDataWorker.kt b/app/src/main/java/info/nightscout/androidaps/workflow/PrepareBasalDataWorker.kt index 17113fcdca..909ea4929c 100644 --- a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareBasalDataWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/workflow/PrepareBasalDataWorker.kt @@ -11,13 +11,12 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.R import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.overview.OverviewData import info.nightscout.androidaps.plugins.general.overview.graphExtensions.ScaledDataPoint import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress import info.nightscout.androidaps.receivers.DataWorkerStorage -import info.nightscout.androidaps.interfaces.ResourceHelper -import java.util.ArrayList +import info.nightscout.rx.bus.RxBus import javax.inject.Inject class PrepareBasalDataWorker( diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareBucketedDataWorker.kt b/app/src/main/java/info/nightscout/androidaps/workflow/PrepareBucketedDataWorker.kt index 967d637f7d..b51cbfece8 100644 --- a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareBucketedDataWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/workflow/PrepareBucketedDataWorker.kt @@ -7,13 +7,13 @@ import androidx.work.workDataOf import dagger.android.HasAndroidInjector import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.ProfileFunction +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.overview.OverviewData import info.nightscout.androidaps.plugins.general.overview.graphExtensions.DataPointWithLabelInterface import info.nightscout.androidaps.plugins.general.overview.graphExtensions.InMemoryGlucoseValueDataPoint import info.nightscout.androidaps.plugins.general.overview.graphExtensions.PointsWithLabelGraphSeries import info.nightscout.androidaps.receivers.DataWorkerStorage -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLogger import javax.inject.Inject class PrepareBucketedDataWorker( diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareIobAutosensGraphDataWorker.kt b/app/src/main/java/info/nightscout/androidaps/workflow/PrepareIobAutosensGraphDataWorker.kt index 1ed9abf4e3..498e481a56 100644 --- a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareIobAutosensGraphDataWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/workflow/PrepareIobAutosensGraphDataWorker.kt @@ -17,7 +17,6 @@ import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.OverviewData import info.nightscout.androidaps.plugins.general.overview.OverviewMenus import info.nightscout.androidaps.plugins.general.overview.graphExtensions.DataPointWithLabelInterface @@ -30,8 +29,9 @@ import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCa import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DecimalFormatter -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject import kotlin.math.abs import kotlin.math.max diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/PreparePredictionsWorker.kt b/app/src/main/java/info/nightscout/androidaps/workflow/PreparePredictionsWorker.kt index 2377af0fd3..35a7825f25 100644 --- a/app/src/main/java/info/nightscout/androidaps/workflow/PreparePredictionsWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/workflow/PreparePredictionsWorker.kt @@ -10,7 +10,6 @@ import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Loop import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.nsclient.data.NSDeviceStatus import info.nightscout.androidaps.plugins.general.overview.OverviewData import info.nightscout.androidaps.plugins.general.overview.OverviewMenus @@ -20,6 +19,7 @@ import info.nightscout.androidaps.plugins.general.overview.graphExtensions.Point import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.utils.T +import info.nightscout.rx.bus.RxBus import java.util.Calendar import javax.inject.Inject import kotlin.math.ceil diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareTemporaryTargetDataWorker.kt b/app/src/main/java/info/nightscout/androidaps/workflow/PrepareTemporaryTargetDataWorker.kt index 820a93b4f7..8de67bd294 100644 --- a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareTemporaryTargetDataWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/workflow/PrepareTemporaryTargetDataWorker.kt @@ -14,11 +14,11 @@ import info.nightscout.androidaps.extensions.target import info.nightscout.androidaps.interfaces.Loop import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.overview.OverviewData import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress import info.nightscout.androidaps.receivers.DataWorkerStorage -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus import javax.inject.Inject import kotlin.math.max diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareTreatmentsDataWorker.kt b/app/src/main/java/info/nightscout/androidaps/workflow/PrepareTreatmentsDataWorker.kt index 71e996c1d6..344c10c228 100644 --- a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareTreatmentsDataWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/workflow/PrepareTreatmentsDataWorker.kt @@ -13,15 +13,21 @@ import info.nightscout.androidaps.interfaces.GlucoseUnit import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.OverviewData -import info.nightscout.androidaps.plugins.general.overview.graphExtensions.* +import info.nightscout.androidaps.plugins.general.overview.graphExtensions.BolusDataPoint +import info.nightscout.androidaps.plugins.general.overview.graphExtensions.CarbsDataPoint +import info.nightscout.androidaps.plugins.general.overview.graphExtensions.DataPointWithLabelInterface +import info.nightscout.androidaps.plugins.general.overview.graphExtensions.EffectiveProfileSwitchDataPoint +import info.nightscout.androidaps.plugins.general.overview.graphExtensions.ExtendedBolusDataPoint +import info.nightscout.androidaps.plugins.general.overview.graphExtensions.PointsWithLabelGraphSeries +import info.nightscout.androidaps.plugins.general.overview.graphExtensions.TherapyEventDataPoint import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.utils.Round import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.Translator +import info.nightscout.rx.bus.RxBus import javax.inject.Inject class PrepareTreatmentsDataWorker( diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/UpdateGraphWorker.kt b/app/src/main/java/info/nightscout/androidaps/workflow/UpdateGraphWorker.kt index f5294d6d7f..9a61557e6b 100644 --- a/app/src/main/java/info/nightscout/androidaps/workflow/UpdateGraphWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/workflow/UpdateGraphWorker.kt @@ -4,10 +4,10 @@ import android.content.Context import androidx.work.Worker import androidx.work.WorkerParameters import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.OverviewPlugin import info.nightscout.androidaps.plugins.general.overview.events.EventUpdateOverviewGraph import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress +import info.nightscout.rx.bus.RxBus import javax.inject.Inject class UpdateGraphWorker( diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/UpdateIobCobSensWorker.kt b/app/src/main/java/info/nightscout/androidaps/workflow/UpdateIobCobSensWorker.kt index 5f611e130c..f1ddd358d6 100644 --- a/app/src/main/java/info/nightscout/androidaps/workflow/UpdateIobCobSensWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/workflow/UpdateIobCobSensWorker.kt @@ -4,10 +4,10 @@ import android.content.Context import androidx.work.Worker import androidx.work.WorkerParameters import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.OverviewPlugin import info.nightscout.androidaps.plugins.general.overview.events.EventUpdateOverviewIobCob import info.nightscout.androidaps.plugins.general.overview.events.EventUpdateOverviewSensitivity +import info.nightscout.rx.bus.RxBus import javax.inject.Inject class UpdateIobCobSensWorker( diff --git a/app/src/test/java/info/nightscout/androidaps/TestBase.kt b/app/src/test/java/info/nightscout/androidaps/TestBase.kt index 3d78d1b4f6..1a4ad8a9cc 100644 --- a/app/src/test/java/info/nightscout/androidaps/TestBase.kt +++ b/app/src/test/java/info/nightscout/androidaps/TestBase.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.TestAapsSchedulers import info.nightscout.shared.logging.AAPSLoggerTest -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.androidaps.utils.rx.TestAapsSchedulers import org.junit.Before import org.junit.Rule import org.mockito.Mockito diff --git a/app/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt b/app/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt index 0eb177fb7c..fca5f85d76 100644 --- a/app/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt +++ b/app/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt @@ -12,10 +12,10 @@ import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ProfileStore -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus import org.json.JSONObject import org.junit.Before import org.mockito.ArgumentMatchers.anyDouble diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt index df4af5b255..2fe3c044f1 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt @@ -11,19 +11,19 @@ import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ActivityNames import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.Config +import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.PumpDescription import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.plugins.configBuilder.RunningConfiguration import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin import info.nightscout.androidaps.receivers.ReceiverStatusStore import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import org.junit.Assert import org.junit.Before diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderPluginTest.kt index 2bd044ae26..9fbac0640b 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderPluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderPluginTest.kt @@ -5,9 +5,9 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.TestBase import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.logging.UserEntryLogger +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import org.junit.Before import org.junit.Test diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/general/nsclient/NsClientReceiverDelegateTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/general/nsclient/NsClientReceiverDelegateTest.kt index e98190d4fd..0a98a6876d 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/general/nsclient/NsClientReceiverDelegateTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/general/nsclient/NsClientReceiverDelegateTest.kt @@ -3,11 +3,11 @@ package info.nightscout.androidaps.plugins.general.nsclient import android.content.Context import info.nightscout.androidaps.R import info.nightscout.androidaps.TestBase -import info.nightscout.androidaps.events.EventChargingState -import info.nightscout.androidaps.events.EventNetworkChange import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.receivers.ReceiverStatusStore +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventChargingState +import info.nightscout.rx.events.EventNetworkChange import info.nightscout.shared.sharedPreferences.SP import org.junit.Assert import org.junit.Before diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpPluginUTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpPluginUTest.kt index 1f844ec3e7..2f972a8f7f 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpPluginUTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpPluginUTest.kt @@ -8,11 +8,11 @@ import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import org.junit.Assert import org.junit.Before diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/sensitivity/AbstractSensitivityPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/sensitivity/AbstractSensitivityPluginTest.kt index d2985f7450..a5305c4392 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/sensitivity/AbstractSensitivityPluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/sensitivity/AbstractSensitivityPluginTest.kt @@ -4,11 +4,11 @@ import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector import info.nightscout.androidaps.TestBase import info.nightscout.androidaps.interfaces.PluginDescription +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.interfaces.Sensitivity -import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensDataStore import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensResult -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import org.json.JSONObject import org.junit.Assert diff --git a/app/src/test/java/info/nightscout/androidaps/utils/wizard/BolusWizardTest.kt b/app/src/test/java/info/nightscout/androidaps/utils/wizard/BolusWizardTest.kt index 0e0d8bcb84..e309afb5c4 100644 --- a/app/src/test/java/info/nightscout/androidaps/utils/wizard/BolusWizardTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/utils/wizard/BolusWizardTest.kt @@ -5,15 +5,22 @@ import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector import info.nightscout.androidaps.TestBase import info.nightscout.androidaps.data.IobTotal -import info.nightscout.androidaps.interfaces.* -import info.nightscout.androidaps.interfaces.Profile -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.CommandQueue +import info.nightscout.androidaps.interfaces.Constraint import info.nightscout.androidaps.interfaces.Constraints +import info.nightscout.androidaps.interfaces.GlucoseUnit +import info.nightscout.androidaps.interfaces.IobCobCalculator +import info.nightscout.androidaps.interfaces.Loop +import info.nightscout.androidaps.interfaces.Profile +import info.nightscout.androidaps.interfaces.ProfileFunction +import info.nightscout.androidaps.interfaces.PumpDescription +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensDataStore import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus import org.junit.Assert import org.junit.Test import org.mockito.Mock diff --git a/automation/build.gradle b/automation/build.gradle index c938522da0..15984586c8 100644 --- a/automation/build.gradle +++ b/automation/build.gradle @@ -16,5 +16,6 @@ dependencies { implementation project(':graphview') implementation project(':core') implementation project(':database') - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') } \ No newline at end of file diff --git a/automation/src/main/java/info/nightscout/automation/AutomationEvent.kt b/automation/src/main/java/info/nightscout/automation/AutomationEvent.kt index 9b70ea5232..3c431ebd34 100644 --- a/automation/src/main/java/info/nightscout/automation/AutomationEvent.kt +++ b/automation/src/main/java/info/nightscout/automation/AutomationEvent.kt @@ -8,7 +8,7 @@ import info.nightscout.automation.actions.ActionDummy import info.nightscout.automation.actions.ActionStopProcessing import info.nightscout.automation.triggers.TriggerConnector import info.nightscout.automation.triggers.TriggerDummy -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLogger import org.json.JSONArray import org.json.JSONObject import javax.inject.Inject diff --git a/automation/src/main/java/info/nightscout/automation/AutomationFragment.kt b/automation/src/main/java/info/nightscout/automation/AutomationFragment.kt index 4d775cf789..497e4d46e7 100644 --- a/automation/src/main/java/info/nightscout/automation/AutomationFragment.kt +++ b/automation/src/main/java/info/nightscout/automation/AutomationFragment.kt @@ -28,7 +28,6 @@ import info.nightscout.androidaps.database.entities.UserEntry.Sources import info.nightscout.androidaps.extensions.toVisibility import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.ActionModeHelper import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.HtmlHelper @@ -36,13 +35,14 @@ import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.dragHelpers.ItemTouchHelperAdapter import info.nightscout.androidaps.utils.dragHelpers.OnStartDragListener import info.nightscout.androidaps.utils.dragHelpers.SimpleItemTouchHelperCallback -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.automation.databinding.AutomationEventItemBinding import info.nightscout.automation.databinding.AutomationFragmentBinding import info.nightscout.automation.dialogs.EditEventDialog import info.nightscout.automation.events.EventAutomationDataChanged import info.nightscout.automation.events.EventAutomationUpdateGui import info.nightscout.automation.triggers.TriggerConnector +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/automation/src/main/java/info/nightscout/automation/AutomationPlugin.kt b/automation/src/main/java/info/nightscout/automation/AutomationPlugin.kt index 3061decaa5..c82ff015f9 100644 --- a/automation/src/main/java/info/nightscout/automation/AutomationPlugin.kt +++ b/automation/src/main/java/info/nightscout/automation/AutomationPlugin.kt @@ -6,9 +6,6 @@ import android.os.HandlerThread import android.os.SystemClock import dagger.android.HasAndroidInjector import info.nightscout.androidaps.annotations.OpenForTesting -import info.nightscout.androidaps.events.EventBTChange -import info.nightscout.androidaps.events.EventChargingState -import info.nightscout.androidaps.events.EventNetworkChange import info.nightscout.androidaps.events.EventPreferenceChange import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.Config @@ -18,12 +15,10 @@ import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.automation.actions.Action import info.nightscout.automation.actions.ActionAlarm import info.nightscout.automation.actions.ActionCarePortalEvent @@ -57,8 +52,13 @@ import info.nightscout.automation.triggers.TriggerTempTargetValue import info.nightscout.automation.triggers.TriggerTime import info.nightscout.automation.triggers.TriggerTimeRange import info.nightscout.automation.triggers.TriggerWifiSsid -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventBTChange +import info.nightscout.rx.events.EventChargingState +import info.nightscout.rx.events.EventNetworkChange +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/automation/src/main/java/info/nightscout/automation/actions/Action.kt b/automation/src/main/java/info/nightscout/automation/actions/Action.kt index 0912187d79..82bf97823a 100644 --- a/automation/src/main/java/info/nightscout/automation/actions/Action.kt +++ b/automation/src/main/java/info/nightscout/automation/actions/Action.kt @@ -6,7 +6,7 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.queue.Callback import info.nightscout.automation.triggers.Trigger -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLogger import org.json.JSONException import org.json.JSONObject import javax.inject.Inject diff --git a/automation/src/main/java/info/nightscout/automation/actions/ActionAlarm.kt b/automation/src/main/java/info/nightscout/automation/actions/ActionAlarm.kt index 5b333d6865..d045ab95ef 100644 --- a/automation/src/main/java/info/nightscout/automation/actions/ActionAlarm.kt +++ b/automation/src/main/java/info/nightscout/automation/actions/ActionAlarm.kt @@ -5,7 +5,6 @@ import android.widget.LinearLayout import androidx.annotation.DrawableRes import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.PumpEnactResult -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.JsonHelper @@ -14,6 +13,7 @@ import info.nightscout.automation.R import info.nightscout.automation.elements.InputString import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder +import info.nightscout.rx.bus.RxBus import org.json.JSONObject import javax.inject.Inject diff --git a/automation/src/main/java/info/nightscout/automation/actions/ActionCarePortalEvent.kt b/automation/src/main/java/info/nightscout/automation/actions/ActionCarePortalEvent.kt index 1eb043d055..13b7c8d1bd 100644 --- a/automation/src/main/java/info/nightscout/automation/actions/ActionCarePortalEvent.kt +++ b/automation/src/main/java/info/nightscout/automation/actions/ActionCarePortalEvent.kt @@ -22,7 +22,8 @@ import info.nightscout.automation.elements.InputDuration import info.nightscout.automation.elements.InputString import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/automation/src/main/java/info/nightscout/automation/actions/ActionLoopDisable.kt b/automation/src/main/java/info/nightscout/automation/actions/ActionLoopDisable.kt index 2d0a2b79c3..ffeec5379d 100644 --- a/automation/src/main/java/info/nightscout/automation/actions/ActionLoopDisable.kt +++ b/automation/src/main/java/info/nightscout/automation/actions/ActionLoopDisable.kt @@ -5,16 +5,16 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.PumpEnactResult import info.nightscout.androidaps.database.entities.UserEntry import info.nightscout.androidaps.database.entities.UserEntry.Sources -import info.nightscout.androidaps.events.EventRefreshOverview import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.ConfigBuilder import info.nightscout.androidaps.interfaces.Loop import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.queue.Callback import info.nightscout.automation.R +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventRefreshOverview import javax.inject.Inject class ActionLoopDisable(injector: HasAndroidInjector) : Action(injector) { diff --git a/automation/src/main/java/info/nightscout/automation/actions/ActionLoopEnable.kt b/automation/src/main/java/info/nightscout/automation/actions/ActionLoopEnable.kt index d51a12002a..4e2dc2f1e4 100644 --- a/automation/src/main/java/info/nightscout/automation/actions/ActionLoopEnable.kt +++ b/automation/src/main/java/info/nightscout/automation/actions/ActionLoopEnable.kt @@ -5,15 +5,15 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.PumpEnactResult import info.nightscout.androidaps.database.entities.UserEntry import info.nightscout.androidaps.database.entities.UserEntry.Sources -import info.nightscout.androidaps.events.EventRefreshOverview import info.nightscout.androidaps.interfaces.ConfigBuilder import info.nightscout.androidaps.interfaces.Loop import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.queue.Callback import info.nightscout.automation.R +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventRefreshOverview import javax.inject.Inject class ActionLoopEnable(injector: HasAndroidInjector) : Action(injector) { diff --git a/automation/src/main/java/info/nightscout/automation/actions/ActionLoopResume.kt b/automation/src/main/java/info/nightscout/automation/actions/ActionLoopResume.kt index 157dde9be8..194b154ea9 100644 --- a/automation/src/main/java/info/nightscout/automation/actions/ActionLoopResume.kt +++ b/automation/src/main/java/info/nightscout/automation/actions/ActionLoopResume.kt @@ -7,15 +7,15 @@ import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.database.entities.UserEntry import info.nightscout.androidaps.database.entities.UserEntry.Sources import info.nightscout.androidaps.database.transactions.CancelCurrentOfflineEventIfAnyTransaction -import info.nightscout.androidaps.events.EventRefreshOverview import info.nightscout.androidaps.interfaces.ConfigBuilder import info.nightscout.androidaps.interfaces.Loop import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.utils.DateUtil import info.nightscout.automation.R -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventRefreshOverview +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/automation/src/main/java/info/nightscout/automation/actions/ActionLoopSuspend.kt b/automation/src/main/java/info/nightscout/automation/actions/ActionLoopSuspend.kt index 89daf25063..68b59f70af 100644 --- a/automation/src/main/java/info/nightscout/automation/actions/ActionLoopSuspend.kt +++ b/automation/src/main/java/info/nightscout/automation/actions/ActionLoopSuspend.kt @@ -7,16 +7,16 @@ import info.nightscout.androidaps.data.PumpEnactResult import info.nightscout.androidaps.database.entities.UserEntry import info.nightscout.androidaps.database.entities.UserEntry.Sources import info.nightscout.androidaps.database.entities.ValueWithUnit -import info.nightscout.androidaps.events.EventRefreshOverview import info.nightscout.androidaps.interfaces.Loop import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.utils.JsonHelper import info.nightscout.automation.R import info.nightscout.automation.elements.InputDuration import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventRefreshOverview import org.json.JSONObject import javax.inject.Inject diff --git a/automation/src/main/java/info/nightscout/automation/actions/ActionNotification.kt b/automation/src/main/java/info/nightscout/automation/actions/ActionNotification.kt index 7b5e824458..a9940d27af 100644 --- a/automation/src/main/java/info/nightscout/automation/actions/ActionNotification.kt +++ b/automation/src/main/java/info/nightscout/automation/actions/ActionNotification.kt @@ -6,8 +6,6 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.PumpEnactResult import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.database.transactions.InsertTherapyEventAnnouncementTransaction -import info.nightscout.androidaps.events.EventRefreshOverview -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.NotificationUserMessage import info.nightscout.androidaps.queue.Callback @@ -16,6 +14,8 @@ import info.nightscout.automation.R import info.nightscout.automation.elements.InputString import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventRefreshOverview import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import org.json.JSONObject diff --git a/automation/src/main/java/info/nightscout/automation/actions/ActionProfileSwitch.kt b/automation/src/main/java/info/nightscout/automation/actions/ActionProfileSwitch.kt index eb4f1d4915..e0308befd3 100644 --- a/automation/src/main/java/info/nightscout/automation/actions/ActionProfileSwitch.kt +++ b/automation/src/main/java/info/nightscout/automation/actions/ActionProfileSwitch.kt @@ -17,7 +17,8 @@ import info.nightscout.automation.R import info.nightscout.automation.elements.InputProfileName import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONObject import javax.inject.Inject diff --git a/automation/src/main/java/info/nightscout/automation/actions/ActionProfileSwitchPercent.kt b/automation/src/main/java/info/nightscout/automation/actions/ActionProfileSwitchPercent.kt index 975fc3a871..e8204b7bd8 100644 --- a/automation/src/main/java/info/nightscout/automation/actions/ActionProfileSwitchPercent.kt +++ b/automation/src/main/java/info/nightscout/automation/actions/ActionProfileSwitchPercent.kt @@ -18,7 +18,8 @@ import info.nightscout.automation.elements.InputPercent import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.triggers.TriggerProfilePercent -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONObject import javax.inject.Inject diff --git a/automation/src/main/java/info/nightscout/automation/actions/ActionRunAutotune.kt b/automation/src/main/java/info/nightscout/automation/actions/ActionRunAutotune.kt index af98613a0d..2b83fa074c 100644 --- a/automation/src/main/java/info/nightscout/automation/actions/ActionRunAutotune.kt +++ b/automation/src/main/java/info/nightscout/automation/actions/ActionRunAutotune.kt @@ -15,7 +15,8 @@ import info.nightscout.automation.elements.InputDuration import info.nightscout.automation.elements.InputProfileName import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import org.json.JSONObject import javax.inject.Inject diff --git a/automation/src/main/java/info/nightscout/automation/actions/ActionStartTempTarget.kt b/automation/src/main/java/info/nightscout/automation/actions/ActionStartTempTarget.kt index 985ad6b884..151341f1d5 100644 --- a/automation/src/main/java/info/nightscout/automation/actions/ActionStartTempTarget.kt +++ b/automation/src/main/java/info/nightscout/automation/actions/ActionStartTempTarget.kt @@ -28,7 +28,8 @@ import info.nightscout.automation.elements.InputTempTarget import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.triggers.TriggerTempTarget -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import org.json.JSONObject diff --git a/automation/src/main/java/info/nightscout/automation/actions/ActionStopTempTarget.kt b/automation/src/main/java/info/nightscout/automation/actions/ActionStopTempTarget.kt index c921884a58..6a8d5f1967 100644 --- a/automation/src/main/java/info/nightscout/automation/actions/ActionStopTempTarget.kt +++ b/automation/src/main/java/info/nightscout/automation/actions/ActionStopTempTarget.kt @@ -10,7 +10,8 @@ import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.utils.DateUtil import info.nightscout.automation.R -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/automation/src/main/java/info/nightscout/automation/dialogs/ChooseActionDialog.kt b/automation/src/main/java/info/nightscout/automation/dialogs/ChooseActionDialog.kt index 1f760c89f0..13b711aef6 100644 --- a/automation/src/main/java/info/nightscout/automation/dialogs/ChooseActionDialog.kt +++ b/automation/src/main/java/info/nightscout/automation/dialogs/ChooseActionDialog.kt @@ -7,12 +7,12 @@ import android.view.ViewGroup import android.widget.RadioButton import dagger.android.HasAndroidInjector import info.nightscout.androidaps.dialogs.DialogFragmentWithDate -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.automation.AutomationPlugin import info.nightscout.automation.actions.Action import info.nightscout.automation.databinding.AutomationDialogChooseActionBinding import info.nightscout.automation.events.EventAutomationAddAction import info.nightscout.automation.events.EventAutomationUpdateGui +import info.nightscout.rx.bus.RxBus import javax.inject.Inject import kotlin.reflect.full.primaryConstructor diff --git a/automation/src/main/java/info/nightscout/automation/dialogs/EditActionDialog.kt b/automation/src/main/java/info/nightscout/automation/dialogs/EditActionDialog.kt index 0371700726..65d9c1dbff 100644 --- a/automation/src/main/java/info/nightscout/automation/dialogs/EditActionDialog.kt +++ b/automation/src/main/java/info/nightscout/automation/dialogs/EditActionDialog.kt @@ -6,11 +6,11 @@ import android.view.View import android.view.ViewGroup import dagger.android.HasAndroidInjector import info.nightscout.androidaps.dialogs.DialogFragmentWithDate -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.automation.actions.Action import info.nightscout.automation.actions.ActionDummy import info.nightscout.automation.databinding.AutomationDialogActionBinding import info.nightscout.automation.events.EventAutomationUpdateAction +import info.nightscout.rx.bus.RxBus import org.json.JSONObject import javax.inject.Inject diff --git a/automation/src/main/java/info/nightscout/automation/dialogs/EditEventDialog.kt b/automation/src/main/java/info/nightscout/automation/dialogs/EditEventDialog.kt index 7362c47a92..1a27dd9821 100644 --- a/automation/src/main/java/info/nightscout/automation/dialogs/EditEventDialog.kt +++ b/automation/src/main/java/info/nightscout/automation/dialogs/EditEventDialog.kt @@ -12,10 +12,8 @@ import androidx.recyclerview.widget.RecyclerView import dagger.android.HasAndroidInjector import info.nightscout.androidaps.dialogs.DialogFragmentWithDate import info.nightscout.androidaps.extensions.toVisibility -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.ToastUtils -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.automation.AutomationEvent import info.nightscout.automation.AutomationPlugin import info.nightscout.automation.R @@ -26,6 +24,8 @@ import info.nightscout.automation.events.EventAutomationDataChanged import info.nightscout.automation.events.EventAutomationUpdateAction import info.nightscout.automation.events.EventAutomationUpdateGui import info.nightscout.automation.events.EventAutomationUpdateTrigger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/automation/src/main/java/info/nightscout/automation/dialogs/EditTriggerDialog.kt b/automation/src/main/java/info/nightscout/automation/dialogs/EditTriggerDialog.kt index e03aa29246..5d7bd3cc27 100644 --- a/automation/src/main/java/info/nightscout/automation/dialogs/EditTriggerDialog.kt +++ b/automation/src/main/java/info/nightscout/automation/dialogs/EditTriggerDialog.kt @@ -6,9 +6,7 @@ import android.view.View import android.view.ViewGroup import dagger.android.HasAndroidInjector import info.nightscout.androidaps.dialogs.DialogFragmentWithDate -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.automation.databinding.AutomationDialogEditTriggerBinding import info.nightscout.automation.events.EventAutomationUpdateTrigger import info.nightscout.automation.events.EventTriggerChanged @@ -17,6 +15,8 @@ import info.nightscout.automation.events.EventTriggerRemove import info.nightscout.automation.triggers.Trigger import info.nightscout.automation.triggers.TriggerConnector import info.nightscout.automation.triggers.TriggerDummy +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import org.json.JSONObject diff --git a/automation/src/main/java/info/nightscout/automation/events/EventAutomationAddAction.kt b/automation/src/main/java/info/nightscout/automation/events/EventAutomationAddAction.kt index 0927b0adee..c0bb064793 100644 --- a/automation/src/main/java/info/nightscout/automation/events/EventAutomationAddAction.kt +++ b/automation/src/main/java/info/nightscout/automation/events/EventAutomationAddAction.kt @@ -1,6 +1,6 @@ package info.nightscout.automation.events -import info.nightscout.androidaps.events.Event import info.nightscout.automation.actions.Action +import info.nightscout.rx.events.Event class EventAutomationAddAction(val action: Action) : Event() diff --git a/automation/src/main/java/info/nightscout/automation/events/EventAutomationDataChanged.kt b/automation/src/main/java/info/nightscout/automation/events/EventAutomationDataChanged.kt index 62afbd58fb..d0164d00b1 100644 --- a/automation/src/main/java/info/nightscout/automation/events/EventAutomationDataChanged.kt +++ b/automation/src/main/java/info/nightscout/automation/events/EventAutomationDataChanged.kt @@ -1,5 +1,5 @@ package info.nightscout.automation.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventAutomationDataChanged : Event() diff --git a/automation/src/main/java/info/nightscout/automation/events/EventAutomationUpdateAction.kt b/automation/src/main/java/info/nightscout/automation/events/EventAutomationUpdateAction.kt index c0a07acd0b..6b66e51230 100644 --- a/automation/src/main/java/info/nightscout/automation/events/EventAutomationUpdateAction.kt +++ b/automation/src/main/java/info/nightscout/automation/events/EventAutomationUpdateAction.kt @@ -1,6 +1,6 @@ package info.nightscout.automation.events -import info.nightscout.androidaps.events.Event import info.nightscout.automation.actions.Action +import info.nightscout.rx.events.Event class EventAutomationUpdateAction(val action: Action, val position: Int) : Event() \ No newline at end of file diff --git a/automation/src/main/java/info/nightscout/automation/events/EventAutomationUpdateGui.kt b/automation/src/main/java/info/nightscout/automation/events/EventAutomationUpdateGui.kt index 1e8a34fcd5..7c719cb9e3 100644 --- a/automation/src/main/java/info/nightscout/automation/events/EventAutomationUpdateGui.kt +++ b/automation/src/main/java/info/nightscout/automation/events/EventAutomationUpdateGui.kt @@ -1,5 +1,5 @@ package info.nightscout.automation.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventAutomationUpdateGui : Event() diff --git a/automation/src/main/java/info/nightscout/automation/events/EventAutomationUpdateTrigger.kt b/automation/src/main/java/info/nightscout/automation/events/EventAutomationUpdateTrigger.kt index 36641921d8..6d1d79d07a 100644 --- a/automation/src/main/java/info/nightscout/automation/events/EventAutomationUpdateTrigger.kt +++ b/automation/src/main/java/info/nightscout/automation/events/EventAutomationUpdateTrigger.kt @@ -1,6 +1,6 @@ package info.nightscout.automation.events -import info.nightscout.androidaps.events.Event import info.nightscout.automation.triggers.TriggerConnector +import info.nightscout.rx.events.Event class EventAutomationUpdateTrigger(val trigger: TriggerConnector) : Event() diff --git a/automation/src/main/java/info/nightscout/automation/events/EventLocationChange.kt b/automation/src/main/java/info/nightscout/automation/events/EventLocationChange.kt index f9b1e43dc0..516084aa87 100644 --- a/automation/src/main/java/info/nightscout/automation/events/EventLocationChange.kt +++ b/automation/src/main/java/info/nightscout/automation/events/EventLocationChange.kt @@ -1,6 +1,6 @@ package info.nightscout.automation.events import android.location.Location -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventLocationChange(var location: Location) : Event() diff --git a/automation/src/main/java/info/nightscout/automation/events/EventTriggerChanged.kt b/automation/src/main/java/info/nightscout/automation/events/EventTriggerChanged.kt index f876df72bd..864140086e 100644 --- a/automation/src/main/java/info/nightscout/automation/events/EventTriggerChanged.kt +++ b/automation/src/main/java/info/nightscout/automation/events/EventTriggerChanged.kt @@ -1,5 +1,5 @@ package info.nightscout.automation.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventTriggerChanged : Event() \ No newline at end of file diff --git a/automation/src/main/java/info/nightscout/automation/events/EventTriggerClone.kt b/automation/src/main/java/info/nightscout/automation/events/EventTriggerClone.kt index 2ac79c766b..f72a32c43a 100644 --- a/automation/src/main/java/info/nightscout/automation/events/EventTriggerClone.kt +++ b/automation/src/main/java/info/nightscout/automation/events/EventTriggerClone.kt @@ -1,6 +1,6 @@ package info.nightscout.automation.events -import info.nightscout.androidaps.events.Event import info.nightscout.automation.triggers.Trigger +import info.nightscout.rx.events.Event class EventTriggerClone(val trigger: Trigger) : Event() \ No newline at end of file diff --git a/automation/src/main/java/info/nightscout/automation/events/EventTriggerRemove.kt b/automation/src/main/java/info/nightscout/automation/events/EventTriggerRemove.kt index e7c2415eec..abd7e2bf15 100644 --- a/automation/src/main/java/info/nightscout/automation/events/EventTriggerRemove.kt +++ b/automation/src/main/java/info/nightscout/automation/events/EventTriggerRemove.kt @@ -1,6 +1,6 @@ package info.nightscout.automation.events -import info.nightscout.androidaps.events.Event import info.nightscout.automation.triggers.Trigger +import info.nightscout.rx.events.Event class EventTriggerRemove(val trigger: Trigger) : Event() \ No newline at end of file diff --git a/automation/src/main/java/info/nightscout/automation/services/LocationService.kt b/automation/src/main/java/info/nightscout/automation/services/LocationService.kt index 0cad0e3e61..f7ba427bae 100644 --- a/automation/src/main/java/info/nightscout/automation/services/LocationService.kt +++ b/automation/src/main/java/info/nightscout/automation/services/LocationService.kt @@ -16,16 +16,16 @@ import android.os.IBinder import androidx.core.app.ActivityCompat import com.google.android.gms.location.LocationServices import dagger.android.DaggerService -import info.nightscout.androidaps.events.EventAppExit import info.nightscout.androidaps.interfaces.NotificationHolder -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.automation.R import info.nightscout.automation.events.EventLocationChange -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAppExit +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import javax.inject.Inject diff --git a/automation/src/main/java/info/nightscout/automation/triggers/Trigger.kt b/automation/src/main/java/info/nightscout/automation/triggers/Trigger.kt index a7340492b5..36a6344d42 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/Trigger.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/Trigger.kt @@ -14,7 +14,6 @@ import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider import info.nightscout.androidaps.utils.DateUtil import info.nightscout.automation.R @@ -23,8 +22,9 @@ import info.nightscout.automation.events.EventTriggerChanged import info.nightscout.automation.events.EventTriggerClone import info.nightscout.automation.events.EventTriggerRemove import info.nightscout.automation.services.LastLocationDataContainer -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.json.JSONObject import javax.inject.Inject diff --git a/automation/src/main/java/info/nightscout/automation/triggers/TriggerAutosensValue.kt b/automation/src/main/java/info/nightscout/automation/triggers/TriggerAutosensValue.kt index 6faf32a001..7d24e3cd14 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/TriggerAutosensValue.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/TriggerAutosensValue.kt @@ -11,7 +11,8 @@ import info.nightscout.automation.elements.InputDouble import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONObject import java.text.DecimalFormat diff --git a/automation/src/main/java/info/nightscout/automation/triggers/TriggerBTDevice.kt b/automation/src/main/java/info/nightscout/automation/triggers/TriggerBTDevice.kt index 1b554b3d7f..1e20c7002c 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/TriggerBTDevice.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/TriggerBTDevice.kt @@ -9,7 +9,6 @@ import android.widget.LinearLayout import androidx.core.app.ActivityCompat import com.google.common.base.Optional import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.events.EventBTChange import info.nightscout.androidaps.utils.JsonHelper import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.automation.AutomationPlugin @@ -18,7 +17,8 @@ import info.nightscout.automation.elements.ComparatorConnect import info.nightscout.automation.elements.InputDropdownMenu import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.events.EventBTChange +import info.nightscout.rx.logging.LTag import org.json.JSONObject import javax.inject.Inject diff --git a/automation/src/main/java/info/nightscout/automation/triggers/TriggerBg.kt b/automation/src/main/java/info/nightscout/automation/triggers/TriggerBg.kt index 8b105a4650..892e61b7b6 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/TriggerBg.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/TriggerBg.kt @@ -13,7 +13,8 @@ import info.nightscout.automation.elements.InputBg import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONObject class TriggerBg(injector: HasAndroidInjector) : Trigger(injector) { diff --git a/automation/src/main/java/info/nightscout/automation/triggers/TriggerBolusAgo.kt b/automation/src/main/java/info/nightscout/automation/triggers/TriggerBolusAgo.kt index f1db96fa39..2d363d5442 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/TriggerBolusAgo.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/TriggerBolusAgo.kt @@ -13,7 +13,8 @@ import info.nightscout.automation.elements.InputDuration import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONObject class TriggerBolusAgo(injector: HasAndroidInjector) : Trigger(injector) { diff --git a/automation/src/main/java/info/nightscout/automation/triggers/TriggerCOB.kt b/automation/src/main/java/info/nightscout/automation/triggers/TriggerCOB.kt index ed3f2a2009..f1c1b63515 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/TriggerCOB.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/TriggerCOB.kt @@ -11,7 +11,8 @@ import info.nightscout.automation.elements.InputDouble import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONObject import java.text.DecimalFormat diff --git a/automation/src/main/java/info/nightscout/automation/triggers/TriggerConnector.kt b/automation/src/main/java/info/nightscout/automation/triggers/TriggerConnector.kt index abe89bd9fd..baf5e3ae36 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/TriggerConnector.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/TriggerConnector.kt @@ -14,7 +14,8 @@ import info.nightscout.androidaps.utils.JsonHelper.safeGetString import info.nightscout.androidaps.utils.ui.VerticalTextView import info.nightscout.automation.R import info.nightscout.automation.dialogs.ChooseOperationDialog -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONArray import org.json.JSONObject diff --git a/automation/src/main/java/info/nightscout/automation/triggers/TriggerDelta.kt b/automation/src/main/java/info/nightscout/automation/triggers/TriggerDelta.kt index 5c2721d468..24a1fb3415 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/TriggerDelta.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/TriggerDelta.kt @@ -14,7 +14,8 @@ import info.nightscout.automation.elements.InputDelta.DeltaType import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONObject import java.text.DecimalFormat diff --git a/automation/src/main/java/info/nightscout/automation/triggers/TriggerIob.kt b/automation/src/main/java/info/nightscout/automation/triggers/TriggerIob.kt index ff78e82bdb..d65e1205c7 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/TriggerIob.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/TriggerIob.kt @@ -10,7 +10,8 @@ import info.nightscout.automation.elements.InputInsulin import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONObject class TriggerIob(injector: HasAndroidInjector) : Trigger(injector) { diff --git a/automation/src/main/java/info/nightscout/automation/triggers/TriggerLocation.kt b/automation/src/main/java/info/nightscout/automation/triggers/TriggerLocation.kt index 1b21bfdea0..8326e881ac 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/TriggerLocation.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/TriggerLocation.kt @@ -13,7 +13,8 @@ import info.nightscout.automation.elements.InputString import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONObject import java.text.DecimalFormat diff --git a/automation/src/main/java/info/nightscout/automation/triggers/TriggerProfilePercent.kt b/automation/src/main/java/info/nightscout/automation/triggers/TriggerProfilePercent.kt index 13d5875101..2a2e7b69ef 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/TriggerProfilePercent.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/TriggerProfilePercent.kt @@ -11,7 +11,8 @@ import info.nightscout.automation.elements.InputPercent import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONObject class TriggerProfilePercent(injector: HasAndroidInjector) : Trigger(injector) { diff --git a/automation/src/main/java/info/nightscout/automation/triggers/TriggerPumpLastConnection.kt b/automation/src/main/java/info/nightscout/automation/triggers/TriggerPumpLastConnection.kt index 624bd34f7e..1f11e3ee61 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/TriggerPumpLastConnection.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/TriggerPumpLastConnection.kt @@ -11,7 +11,8 @@ import info.nightscout.automation.elements.InputDuration import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONObject class TriggerPumpLastConnection(injector: HasAndroidInjector) : Trigger(injector) { diff --git a/automation/src/main/java/info/nightscout/automation/triggers/TriggerRecurringTime.kt b/automation/src/main/java/info/nightscout/automation/triggers/TriggerRecurringTime.kt index 777caaa237..8a7710ea18 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/TriggerRecurringTime.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/TriggerRecurringTime.kt @@ -11,7 +11,8 @@ import info.nightscout.automation.elements.InputTime import info.nightscout.automation.elements.InputWeekDay import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONObject import java.util.Calendar import java.util.Objects diff --git a/automation/src/main/java/info/nightscout/automation/triggers/TriggerTempTarget.kt b/automation/src/main/java/info/nightscout/automation/triggers/TriggerTempTarget.kt index 93840e711e..13ab332295 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/TriggerTempTarget.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/TriggerTempTarget.kt @@ -9,7 +9,8 @@ import info.nightscout.automation.R import info.nightscout.automation.elements.ComparatorExists import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONObject class TriggerTempTarget(injector: HasAndroidInjector) : Trigger(injector) { diff --git a/automation/src/main/java/info/nightscout/automation/triggers/TriggerTempTargetValue.kt b/automation/src/main/java/info/nightscout/automation/triggers/TriggerTempTargetValue.kt index 48dad6bd83..6e64df98b4 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/TriggerTempTargetValue.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/TriggerTempTargetValue.kt @@ -14,7 +14,8 @@ import info.nightscout.automation.elements.InputBg import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONObject class TriggerTempTargetValue(injector: HasAndroidInjector) : Trigger(injector) { diff --git a/automation/src/main/java/info/nightscout/automation/triggers/TriggerTime.kt b/automation/src/main/java/info/nightscout/automation/triggers/TriggerTime.kt index 9227168f99..2c32bd8c01 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/TriggerTime.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/TriggerTime.kt @@ -9,7 +9,8 @@ import info.nightscout.automation.R import info.nightscout.automation.elements.InputDateTime import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONObject class TriggerTime(injector: HasAndroidInjector) : Trigger(injector) { diff --git a/automation/src/main/java/info/nightscout/automation/triggers/TriggerTimeRange.kt b/automation/src/main/java/info/nightscout/automation/triggers/TriggerTimeRange.kt index 399f079d51..09735c60bd 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/TriggerTimeRange.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/TriggerTimeRange.kt @@ -10,7 +10,8 @@ import info.nightscout.automation.R import info.nightscout.automation.elements.InputTimeRange import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONObject // Trigger for time range ( from 10:00AM till 13:00PM ) diff --git a/automation/src/main/java/info/nightscout/automation/triggers/TriggerWifiSsid.kt b/automation/src/main/java/info/nightscout/automation/triggers/TriggerWifiSsid.kt index 8431aac4d0..9cc2916c0e 100644 --- a/automation/src/main/java/info/nightscout/automation/triggers/TriggerWifiSsid.kt +++ b/automation/src/main/java/info/nightscout/automation/triggers/TriggerWifiSsid.kt @@ -11,7 +11,8 @@ import info.nightscout.automation.elements.InputString import info.nightscout.automation.elements.LabelWithElement import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.json.JSONObject import javax.inject.Inject diff --git a/automation/src/main/res/drawable/ic_as.xml b/automation/src/main/res/drawable/ic_as.xml index 152a314c2d..f11ce03313 100644 --- a/automation/src/main/res/drawable/ic_as.xml +++ b/automation/src/main/res/drawable/ic_as.xml @@ -1,5 +1,4 @@ >(private var value: T) { diff --git a/core/src/main/java/info/nightscout/androidaps/interfaces/Overview.kt b/core/src/main/java/info/nightscout/androidaps/interfaces/Overview.kt index eab8f4059b..8bfee90590 100644 --- a/core/src/main/java/info/nightscout/androidaps/interfaces/Overview.kt +++ b/core/src/main/java/info/nightscout/androidaps/interfaces/Overview.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.interfaces import androidx.annotation.StringRes -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.rx.bus.RxBus interface Overview : ConfigExportImport { diff --git a/core/src/main/java/info/nightscout/androidaps/interfaces/PluginBase.kt b/core/src/main/java/info/nightscout/androidaps/interfaces/PluginBase.kt index c57fc847ba..65e69ba142 100644 --- a/core/src/main/java/info/nightscout/androidaps/interfaces/PluginBase.kt +++ b/core/src/main/java/info/nightscout/androidaps/interfaces/PluginBase.kt @@ -3,9 +3,8 @@ package info.nightscout.androidaps.interfaces import androidx.preference.Preference import androidx.preference.PreferenceFragmentCompat import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag /** * Created by mike on 09.06.2016. diff --git a/core/src/main/java/info/nightscout/androidaps/interfaces/Profile.kt b/core/src/main/java/info/nightscout/androidaps/interfaces/Profile.kt index fbe7845584..59ad26a56c 100644 --- a/core/src/main/java/info/nightscout/androidaps/interfaces/Profile.kt +++ b/core/src/main/java/info/nightscout/androidaps/interfaces/Profile.kt @@ -2,12 +2,12 @@ package info.nightscout.androidaps.interfaces import info.nightscout.androidaps.Constants import info.nightscout.androidaps.data.PureProfile -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DecimalFormatter.to0Decimal import info.nightscout.androidaps.utils.DecimalFormatter.to1Decimal import info.nightscout.androidaps.utils.HardLimits import info.nightscout.androidaps.utils.Round +import info.nightscout.rx.bus.RxBus import org.joda.time.DateTime import org.json.JSONObject diff --git a/core/src/main/java/info/nightscout/androidaps/interfaces/ProfileStore.kt b/core/src/main/java/info/nightscout/androidaps/interfaces/ProfileStore.kt index 3a39fdb446..4115c38977 100644 --- a/core/src/main/java/info/nightscout/androidaps/interfaces/ProfileStore.kt +++ b/core/src/main/java/info/nightscout/androidaps/interfaces/ProfileStore.kt @@ -5,11 +5,11 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.data.PureProfile import info.nightscout.androidaps.extensions.pureProfileFromJson -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.HardLimits import info.nightscout.androidaps.utils.JsonHelper -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import org.json.JSONException import org.json.JSONObject import javax.inject.Inject diff --git a/core/src/main/java/info/nightscout/androidaps/interfaces/PumpPluginBase.kt b/core/src/main/java/info/nightscout/androidaps/interfaces/PumpPluginBase.kt index 3e3e239216..f4a98b2f5d 100644 --- a/core/src/main/java/info/nightscout/androidaps/interfaces/PumpPluginBase.kt +++ b/core/src/main/java/info/nightscout/androidaps/interfaces/PumpPluginBase.kt @@ -3,8 +3,7 @@ package info.nightscout.androidaps.interfaces import android.os.SystemClock import dagger.android.HasAndroidInjector import info.nightscout.androidaps.core.R -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.logging.AAPSLogger abstract class PumpPluginBase( pluginDescription: PluginDescription, diff --git a/core/src/main/java/info/nightscout/androidaps/logging/LImpl.kt b/core/src/main/java/info/nightscout/androidaps/logging/LImpl.kt new file mode 100644 index 0000000000..b8c685b857 --- /dev/null +++ b/core/src/main/java/info/nightscout/androidaps/logging/LImpl.kt @@ -0,0 +1,2 @@ +package info.nightscout.androidaps.logging + diff --git a/core/src/main/java/info/nightscout/androidaps/logging/UserEntryLogger.kt b/core/src/main/java/info/nightscout/androidaps/logging/UserEntryLogger.kt index 89b5563caa..cc84ee76ba 100644 --- a/core/src/main/java/info/nightscout/androidaps/logging/UserEntryLogger.kt +++ b/core/src/main/java/info/nightscout/androidaps/logging/UserEntryLogger.kt @@ -2,14 +2,14 @@ package info.nightscout.androidaps.logging import info.nightscout.androidaps.annotations.OpenForTesting import info.nightscout.androidaps.database.AppRepository -import info.nightscout.androidaps.database.entities.ValueWithUnit import info.nightscout.androidaps.database.entities.UserEntry.Action import info.nightscout.androidaps.database.entities.UserEntry.Sources +import info.nightscout.androidaps.database.entities.ValueWithUnit import info.nightscout.androidaps.database.transactions.UserEntryTransaction -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.userEntry.UserEntryMapper import info.nightscout.androidaps.utils.userEntry.ValueWithUnitMapper -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import io.reactivex.rxjava3.kotlin.subscribeBy diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/aps/loop/APSResult.kt b/core/src/main/java/info/nightscout/androidaps/plugins/aps/loop/APSResult.kt index 010dea9225..0971699506 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/aps/loop/APSResult.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/aps/loop/APSResult.kt @@ -17,8 +17,9 @@ import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.HtmlHelper.fromHtml -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import org.json.JSONException import org.json.JSONObject diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/configBuilder/RunningConfiguration.kt b/core/src/main/java/info/nightscout/androidaps/plugins/configBuilder/RunningConfiguration.kt index 37ff0a5983..c71dedfca1 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/configBuilder/RunningConfiguration.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/configBuilder/RunningConfiguration.kt @@ -1,16 +1,22 @@ package info.nightscout.androidaps.plugins.configBuilder import info.nightscout.androidaps.core.R -import info.nightscout.androidaps.interfaces.* -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.Config +import info.nightscout.androidaps.interfaces.ConfigBuilder +import info.nightscout.androidaps.interfaces.Insulin +import info.nightscout.androidaps.interfaces.PluginType +import info.nightscout.androidaps.interfaces.PumpSync +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.interfaces.Sensitivity import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientNewLog import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.utils.JsonHelper -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.json.JSONException import org.json.JSONObject diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/constraints/versionChecker/VersionCheckerUtils.kt b/core/src/main/java/info/nightscout/androidaps/plugins/constraints/versionChecker/VersionCheckerUtils.kt index d1b50c3871..9c5a29d12e 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/constraints/versionChecker/VersionCheckerUtils.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/constraints/versionChecker/VersionCheckerUtils.kt @@ -3,15 +3,15 @@ package info.nightscout.androidaps.plugins.constraints.versionChecker import android.os.Build import info.nightscout.androidaps.core.R import info.nightscout.androidaps.interfaces.Config -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.receivers.ReceiverStatusStore import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import java.io.IOException import java.net.URL diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/events/EventNSClientNewLog.kt b/core/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/events/EventNSClientNewLog.kt index 8d0aa9fac2..db499d6296 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/events/EventNSClientNewLog.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/events/EventNSClientNewLog.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.plugins.general.nsclient.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event import java.text.SimpleDateFormat -import java.util.* +import java.util.Locale class EventNSClientNewLog(var action: String, var logText: String) : Event() { var date = System.currentTimeMillis() diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewData.kt b/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewData.kt index 0682f3646e..a50b7805b3 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewData.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewData.kt @@ -33,7 +33,7 @@ import info.nightscout.androidaps.plugins.iob.iobCobCalculator.data.AutosensData import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.utils.T -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import java.util.Calendar import javax.inject.Inject diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventDismissBolusProgressIfRunning.kt b/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventDismissBolusProgressIfRunning.kt index f368691c3b..d7595d7417 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventDismissBolusProgressIfRunning.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventDismissBolusProgressIfRunning.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.general.overview.events import info.nightscout.androidaps.data.PumpEnactResult -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventDismissBolusProgressIfRunning(val result: PumpEnactResult?, val id: Long?) : Event() \ No newline at end of file diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventDismissNotification.kt b/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventDismissNotification.kt index bd719ecac8..c9156c63ce 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventDismissNotification.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventDismissNotification.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.general.overview.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventDismissNotification(var id: Int) : Event() diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventNewNotification.kt b/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventNewNotification.kt index b70af5bfe1..e3896196b6 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventNewNotification.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventNewNotification.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.general.overview.events -import info.nightscout.androidaps.events.Event import info.nightscout.androidaps.plugins.general.overview.notifications.Notification +import info.nightscout.rx.events.Event class EventNewNotification(var notification: Notification) : Event() diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventOverviewBolusProgress.kt b/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventOverviewBolusProgress.kt index ba66ac32c0..b4db9ce15b 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventOverviewBolusProgress.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/general/overview/events/EventOverviewBolusProgress.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.general.overview.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event object EventOverviewBolusProgress : Event() { diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/AutosensDataStore.kt b/core/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/AutosensDataStore.kt index f57d71315b..a008aea3b6 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/AutosensDataStore.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/AutosensDataStore.kt @@ -6,13 +6,13 @@ import info.nightscout.androidaps.annotations.OpenForTesting import info.nightscout.androidaps.data.InMemoryGlucoseValue import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.database.entities.GlucoseValue -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.iob.iobCobCalculator.data.AutosensData import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventBucketedDataCreated import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.T +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import kotlin.math.abs import kotlin.math.roundToLong diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/GlucoseStatusProvider.kt b/core/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/GlucoseStatusProvider.kt index f722383f5f..37a01b3d4d 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/GlucoseStatusProvider.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/GlucoseStatusProvider.kt @@ -2,10 +2,9 @@ package info.nightscout.androidaps.plugins.iob.iobCobCalculator import dagger.Reusable import info.nightscout.androidaps.interfaces.IobCobCalculator -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.utils.DateUtil -import java.util.* +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject import kotlin.math.roundToLong diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/data/AutosensData.kt b/core/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/data/AutosensData.kt index c64871e52f..e1933cd9d1 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/data/AutosensData.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/data/AutosensData.kt @@ -6,17 +6,17 @@ import info.nightscout.androidaps.Constants import info.nightscout.androidaps.core.R import info.nightscout.androidaps.database.entities.Carbs import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults import info.nightscout.androidaps.plugins.general.overview.graphExtensions.DataPointWithLabelInterface import info.nightscout.androidaps.plugins.general.overview.graphExtensions.PointsWithLabelGraphSeries import info.nightscout.androidaps.plugins.general.overview.graphExtensions.Scale import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensResult import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP -import java.util.* +import java.util.Locale import javax.inject.Inject import kotlin.math.min diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/events/EventBucketedDataCreated.kt b/core/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/events/EventBucketedDataCreated.kt index c9411eb259..29edeb4e48 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/events/EventBucketedDataCreated.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/events/EventBucketedDataCreated.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.iob.iobCobCalculator.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventBucketedDataCreated : Event() \ No newline at end of file diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/bolusInfo/DetailedBolusInfoStorage.kt b/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/bolusInfo/DetailedBolusInfoStorage.kt index 3a3737d2cf..97c7cd0641 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/bolusInfo/DetailedBolusInfoStorage.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/bolusInfo/DetailedBolusInfoStorage.kt @@ -2,10 +2,9 @@ package info.nightscout.androidaps.plugins.pump.common.bolusInfo import info.nightscout.androidaps.annotations.OpenForTesting import info.nightscout.androidaps.data.DetailedBolusInfo -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.utils.T -import java.util.* +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject import javax.inject.Singleton import kotlin.math.abs diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/bolusInfo/TemporaryBasalStorage.kt b/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/bolusInfo/TemporaryBasalStorage.kt index a24ca2b6c7..615b4a660a 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/bolusInfo/TemporaryBasalStorage.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/pump/common/bolusInfo/TemporaryBasalStorage.kt @@ -2,10 +2,9 @@ package info.nightscout.androidaps.plugins.pump.common.bolusInfo import info.nightscout.androidaps.annotations.OpenForTesting import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.utils.T -import java.util.* +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject import javax.inject.Singleton import kotlin.math.abs diff --git a/core/src/main/java/info/nightscout/androidaps/queue/commands/Command.kt b/core/src/main/java/info/nightscout/androidaps/queue/commands/Command.kt index c180436adb..f4e827041f 100644 --- a/core/src/main/java/info/nightscout/androidaps/queue/commands/Command.kt +++ b/core/src/main/java/info/nightscout/androidaps/queue/commands/Command.kt @@ -4,10 +4,10 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.core.R import info.nightscout.androidaps.data.PumpEnactResult import info.nightscout.androidaps.database.AppRepository -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.queue.Callback +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject abstract class Command( diff --git a/core/src/main/java/info/nightscout/androidaps/queue/events/EventQueueChanged.kt b/core/src/main/java/info/nightscout/androidaps/queue/events/EventQueueChanged.kt index 297d443976..274c470372 100644 --- a/core/src/main/java/info/nightscout/androidaps/queue/events/EventQueueChanged.kt +++ b/core/src/main/java/info/nightscout/androidaps/queue/events/EventQueueChanged.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.queue.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventQueueChanged : Event() diff --git a/core/src/main/java/info/nightscout/androidaps/receivers/NetworkChangeReceiver.kt b/core/src/main/java/info/nightscout/androidaps/receivers/NetworkChangeReceiver.kt index 3a9f65c500..f6bcc219d7 100644 --- a/core/src/main/java/info/nightscout/androidaps/receivers/NetworkChangeReceiver.kt +++ b/core/src/main/java/info/nightscout/androidaps/receivers/NetworkChangeReceiver.kt @@ -8,11 +8,11 @@ import android.net.NetworkCapabilities import android.net.wifi.SupplicantState import android.net.wifi.WifiManager import dagger.android.DaggerBroadcastReceiver -import info.nightscout.androidaps.events.EventNetworkChange -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.StringUtils +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventNetworkChange +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject class NetworkChangeReceiver : DaggerBroadcastReceiver() { diff --git a/core/src/main/java/info/nightscout/androidaps/receivers/ReceiverStatusStore.kt b/core/src/main/java/info/nightscout/androidaps/receivers/ReceiverStatusStore.kt index 5a7bf617aa..38d6e96645 100644 --- a/core/src/main/java/info/nightscout/androidaps/receivers/ReceiverStatusStore.kt +++ b/core/src/main/java/info/nightscout/androidaps/receivers/ReceiverStatusStore.kt @@ -1,11 +1,11 @@ package info.nightscout.androidaps.receivers -import info.nightscout.androidaps.annotations.OpenForTesting import android.content.Context import android.content.Intent -import info.nightscout.androidaps.events.EventChargingState -import info.nightscout.androidaps.events.EventNetworkChange -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.annotations.OpenForTesting +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventChargingState +import info.nightscout.rx.events.EventNetworkChange import javax.inject.Inject import javax.inject.Singleton diff --git a/core/src/main/java/info/nightscout/androidaps/services/AlarmSoundService.kt b/core/src/main/java/info/nightscout/androidaps/services/AlarmSoundService.kt index 07e79a59ef..b945f77273 100644 --- a/core/src/main/java/info/nightscout/androidaps/services/AlarmSoundService.kt +++ b/core/src/main/java/info/nightscout/androidaps/services/AlarmSoundService.kt @@ -12,8 +12,9 @@ import dagger.android.DaggerService import info.nightscout.androidaps.core.R import info.nightscout.androidaps.interfaces.NotificationHolder import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject import kotlin.math.ln diff --git a/core/src/main/java/info/nightscout/androidaps/services/AlarmSoundServiceHelper.kt b/core/src/main/java/info/nightscout/androidaps/services/AlarmSoundServiceHelper.kt index 9d47b78572..bca49fa90a 100644 --- a/core/src/main/java/info/nightscout/androidaps/services/AlarmSoundServiceHelper.kt +++ b/core/src/main/java/info/nightscout/androidaps/services/AlarmSoundServiceHelper.kt @@ -6,8 +6,9 @@ import android.content.Intent import android.content.ServiceConnection import android.os.IBinder import info.nightscout.androidaps.interfaces.NotificationHolder -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import javax.inject.Inject import javax.inject.Singleton diff --git a/core/src/main/java/info/nightscout/androidaps/utils/CryptoUtil.kt b/core/src/main/java/info/nightscout/androidaps/utils/CryptoUtil.kt index a752675e7b..18beeac298 100644 --- a/core/src/main/java/info/nightscout/androidaps/utils/CryptoUtil.kt +++ b/core/src/main/java/info/nightscout/androidaps/utils/CryptoUtil.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.utils -import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.extensions.toHex +import info.nightscout.rx.logging.AAPSLogger import org.spongycastle.util.encoders.Base64 import java.nio.ByteBuffer import java.security.MessageDigest diff --git a/core/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.kt b/core/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.kt index 46a8813120..1b9cc5b517 100644 --- a/core/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.kt +++ b/core/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.kt @@ -7,10 +7,9 @@ import com.google.firebase.crashlytics.FirebaseCrashlytics import com.google.firebase.ktx.Firebase import info.nightscout.androidaps.annotations.OpenForTesting import info.nightscout.androidaps.core.R -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.weardata.EventData import java.io.ByteArrayInputStream import java.io.IOException import java.io.ObjectInputStream @@ -97,7 +96,7 @@ class FabricPrivacy @Inject constructor( return sp.getBoolean(R.string.key_enable_fabric, true) } - fun logWearException(wearException: EventData.WearException) { + fun logWearException(wearException: info.nightscout.rx.weardata.EventData.WearException) { aapsLogger.debug(LTag.WEAR, "logWearException") FirebaseCrashlytics.getInstance().apply { setCustomKey("wear_exception", true) diff --git a/core/src/main/java/info/nightscout/androidaps/utils/HardLimits.kt b/core/src/main/java/info/nightscout/androidaps/utils/HardLimits.kt index 178de9d920..4fcee4fac4 100644 --- a/core/src/main/java/info/nightscout/androidaps/utils/HardLimits.kt +++ b/core/src/main/java/info/nightscout/androidaps/utils/HardLimits.kt @@ -5,9 +5,9 @@ import info.nightscout.androidaps.annotations.OpenForTesting import info.nightscout.androidaps.core.R import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.database.transactions.InsertTherapyEventAnnouncementTransaction -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/core/src/main/java/info/nightscout/androidaps/utils/ToastUtils.kt b/core/src/main/java/info/nightscout/androidaps/utils/ToastUtils.kt index b0fcf672d3..e58b6d9fa7 100644 --- a/core/src/main/java/info/nightscout/androidaps/utils/ToastUtils.kt +++ b/core/src/main/java/info/nightscout/androidaps/utils/ToastUtils.kt @@ -13,10 +13,10 @@ import androidx.annotation.DrawableRes import androidx.annotation.StringRes import androidx.appcompat.view.ContextThemeWrapper import info.nightscout.androidaps.core.R -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.utils.resources.getThemeColor +import info.nightscout.rx.bus.RxBus object ToastUtils { diff --git a/core/src/main/java/info/nightscout/androidaps/utils/ui/SingleClickButton.kt b/core/src/main/java/info/nightscout/androidaps/utils/ui/SingleClickButton.kt index 185b97f89f..8fa18c3e67 100644 --- a/core/src/main/java/info/nightscout/androidaps/utils/ui/SingleClickButton.kt +++ b/core/src/main/java/info/nightscout/androidaps/utils/ui/SingleClickButton.kt @@ -4,8 +4,9 @@ import android.content.Context import android.util.AttributeSet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.core.R -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import javax.inject.Inject class SingleClickButton @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = R.style.Widget_MaterialComponents_Button) : diff --git a/core/src/test/java/info/nightscout/androidaps/TestBase.kt b/core/src/test/java/info/nightscout/androidaps/TestBase.kt index 57aca0507a..77f5cd6515 100644 --- a/core/src/test/java/info/nightscout/androidaps/TestBase.kt +++ b/core/src/test/java/info/nightscout/androidaps/TestBase.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.TestAapsSchedulers import info.nightscout.shared.logging.AAPSLoggerTest -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.androidaps.utils.rx.TestAapsSchedulers import org.junit.Before import org.junit.Rule import org.mockito.Mockito diff --git a/core/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt b/core/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt index 5b9d401678..355e298975 100644 --- a/core/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt +++ b/core/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt @@ -12,11 +12,11 @@ import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ProfileStore import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.HardLimits +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import org.json.JSONObject import org.junit.Before diff --git a/core/src/test/java/info/nightscout/androidaps/data/ProfileTest.kt b/core/src/test/java/info/nightscout/androidaps/data/ProfileTest.kt index fd28bdb158..f6a8030a54 100644 --- a/core/src/test/java/info/nightscout/androidaps/data/ProfileTest.kt +++ b/core/src/test/java/info/nightscout/androidaps/data/ProfileTest.kt @@ -11,21 +11,21 @@ import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.GlucoseUnit import info.nightscout.androidaps.interfaces.Profile -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.HardLimits -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.utils.rx.TestAapsSchedulers +import info.nightscout.rx.TestAapsSchedulers +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import org.json.JSONObject import org.junit.Assert import org.junit.Before import org.junit.Test import org.mockito.Mock -import org.mockito.Mockito.`when` import org.mockito.Mockito.anyInt import org.mockito.Mockito.anyString -import java.util.* +import org.mockito.Mockito.`when` +import java.util.Calendar /** * Created by mike on 18.03.2018. diff --git a/core/src/test/java/info/nightscout/androidaps/plugins/contraints/versionChecker/VersionCheckerUtilsKtTest.kt b/core/src/test/java/info/nightscout/androidaps/plugins/contraints/versionChecker/VersionCheckerUtilsKtTest.kt index da7413d2b5..fc92bcce56 100644 --- a/core/src/test/java/info/nightscout/androidaps/plugins/contraints/versionChecker/VersionCheckerUtilsKtTest.kt +++ b/core/src/test/java/info/nightscout/androidaps/plugins/contraints/versionChecker/VersionCheckerUtilsKtTest.kt @@ -3,12 +3,12 @@ package info.nightscout.androidaps.plugins.contraints.versionChecker import android.content.Context import info.nightscout.androidaps.TestBase import info.nightscout.androidaps.interfaces.Config -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.constraints.versionChecker.VersionCheckerUtils import info.nightscout.androidaps.plugins.constraints.versionChecker.numericVersionPart import info.nightscout.androidaps.receivers.ReceiverStatusStore import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import org.junit.Assert.assertArrayEquals import org.junit.Assert.assertEquals @@ -16,10 +16,10 @@ import org.junit.Before import org.junit.Test import org.mockito.ArgumentMatchers.anyInt import org.mockito.Mock -import org.mockito.Mockito.`when` import org.mockito.Mockito.anyString import org.mockito.Mockito.times import org.mockito.Mockito.verify +import org.mockito.Mockito.`when` @Suppress("SpellCheckingInspection") class VersionCheckerUtilsKtTest : TestBase() { diff --git a/implementation/build.gradle b/implementation/build.gradle index be1039c0b6..73702d2206 100644 --- a/implementation/build.gradle +++ b/implementation/build.gradle @@ -14,7 +14,8 @@ android { dependencies { implementation project(':core') - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') implementation project(':database') implementation project(':automation') } \ No newline at end of file diff --git a/implementation/src/main/java/info/nightscout/implementation/AndroidPermissionImpl.kt b/implementation/src/main/java/info/nightscout/implementation/AndroidPermissionImpl.kt index 7d5c100abc..4144e775a0 100644 --- a/implementation/src/main/java/info/nightscout/implementation/AndroidPermissionImpl.kt +++ b/implementation/src/main/java/info/nightscout/implementation/AndroidPermissionImpl.kt @@ -20,10 +20,10 @@ import info.nightscout.androidaps.interfaces.AndroidPermission import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.interfaces.SmsCommunicator -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog +import info.nightscout.rx.bus.RxBus import javax.inject.Inject import javax.inject.Singleton diff --git a/implementation/src/main/java/info/nightscout/implementation/LocalAlertUtilsImpl.kt b/implementation/src/main/java/info/nightscout/implementation/LocalAlertUtilsImpl.kt index c61e70cd63..01b1d2bd80 100644 --- a/implementation/src/main/java/info/nightscout/implementation/LocalAlertUtilsImpl.kt +++ b/implementation/src/main/java/info/nightscout/implementation/LocalAlertUtilsImpl.kt @@ -15,14 +15,14 @@ import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.interfaces.SmsCommunicator import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.T -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/implementation/src/main/java/info/nightscout/implementation/XDripBroadcastImpl.kt b/implementation/src/main/java/info/nightscout/implementation/XDripBroadcastImpl.kt index 92ea49f14b..55483637d3 100644 --- a/implementation/src/main/java/info/nightscout/implementation/XDripBroadcastImpl.kt +++ b/implementation/src/main/java/info/nightscout/implementation/XDripBroadcastImpl.kt @@ -12,8 +12,9 @@ import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.interfaces.XDripBroadcast import info.nightscout.androidaps.receivers.Intents import info.nightscout.androidaps.utils.ToastUtils -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import org.json.JSONArray import org.json.JSONException diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/CommandQueueImplementation.kt b/implementation/src/main/java/info/nightscout/implementation/queue/CommandQueueImplementation.kt index 519b260647..ef923528f9 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/CommandQueueImplementation.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/CommandQueueImplementation.kt @@ -16,8 +16,6 @@ import info.nightscout.androidaps.database.entities.EffectiveProfileSwitch import info.nightscout.androidaps.database.entities.ProfileSwitch import info.nightscout.androidaps.database.interfaces.end import info.nightscout.androidaps.dialogs.BolusProgressDialog -import info.nightscout.androidaps.events.EventMobileToWear -import info.nightscout.androidaps.events.EventProfileSwitchChanged import info.nightscout.androidaps.extensions.getCustomizedName import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ActivityNames @@ -26,12 +24,11 @@ import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Constraint +import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification @@ -43,7 +40,6 @@ import info.nightscout.androidaps.queue.commands.CustomCommand import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.HtmlHelper -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.implementation.R import info.nightscout.implementation.queue.commands.CommandBolus import info.nightscout.implementation.queue.commands.CommandCancelExtendedBolus @@ -62,10 +58,13 @@ import info.nightscout.implementation.queue.commands.CommandStartPump import info.nightscout.implementation.queue.commands.CommandStopPump import info.nightscout.implementation.queue.commands.CommandTempBasalAbsolute import info.nightscout.implementation.queue.commands.CommandTempBasalPercent -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventMobileToWear +import info.nightscout.rx.events.EventProfileSwitchChanged +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.weardata.EventData import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import io.reactivex.rxjava3.kotlin.subscribeBy @@ -325,7 +324,7 @@ class CommandQueueImplementation @Inject constructor( // not when the Bolus command is starting. The command closes the dialog upon completion). showBolusProgressDialog(detailedBolusInfo) // Notify Wear about upcoming bolus - rxBus.send(EventMobileToWear(EventData.BolusProgress(percent = 0, status = rh.gs(R.string.goingtodeliver, detailedBolusInfo.insulin)))) + rxBus.send(EventMobileToWear(info.nightscout.rx.weardata.EventData.BolusProgress(percent = 0, status = rh.gs(R.string.goingtodeliver, detailedBolusInfo.insulin)))) } } notifyAboutNewCommand() diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/QueueThread.kt b/implementation/src/main/java/info/nightscout/implementation/queue/QueueThread.kt index 86e7887daf..ea211cdf3c 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/QueueThread.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/QueueThread.kt @@ -14,13 +14,13 @@ import info.nightscout.androidaps.interfaces.AndroidPermission import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning import info.nightscout.androidaps.queue.events.EventQueueChanged import info.nightscout.androidaps.utils.T import info.nightscout.implementation.R -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP class QueueThread internal constructor( diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandBolus.kt b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandBolus.kt index 66c933aa16..4c9c16e338 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandBolus.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandBolus.kt @@ -4,12 +4,12 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.DetailedBolusInfo import info.nightscout.androidaps.dialogs.BolusProgressDialog import info.nightscout.androidaps.interfaces.ActivePlugin -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.commands.Command import info.nightscout.implementation.R -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.LTag import javax.inject.Inject class CommandBolus( diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandCancelExtendedBolus.kt b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandCancelExtendedBolus.kt index 4a88bee589..5dfaf53912 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandCancelExtendedBolus.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandCancelExtendedBolus.kt @@ -5,7 +5,8 @@ import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.commands.Command import info.nightscout.implementation.R -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject class CommandCancelExtendedBolus constructor( diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandCancelTempBasal.kt b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandCancelTempBasal.kt index 41092b6311..04544af2af 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandCancelTempBasal.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandCancelTempBasal.kt @@ -5,7 +5,8 @@ import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.commands.Command import info.nightscout.implementation.R -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject class CommandCancelTempBasal( diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandCustomCommand.kt b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandCustomCommand.kt index 318131629e..9d4a1ee448 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandCustomCommand.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandCustomCommand.kt @@ -5,7 +5,8 @@ import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.commands.Command import info.nightscout.androidaps.queue.commands.CustomCommand -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject class CommandCustomCommand( diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandExtendedBolus.kt b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandExtendedBolus.kt index 62d7aef111..c6787b2733 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandExtendedBolus.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandExtendedBolus.kt @@ -5,7 +5,8 @@ import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.commands.Command import info.nightscout.implementation.R -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject class CommandExtendedBolus constructor( diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandLoadEvents.kt b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandLoadEvents.kt index a8f515370f..90ebb177f2 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandLoadEvents.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandLoadEvents.kt @@ -7,7 +7,8 @@ import info.nightscout.androidaps.interfaces.Diaconn import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.commands.Command import info.nightscout.implementation.R -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject class CommandLoadEvents( diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandLoadHistory.kt b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandLoadHistory.kt index 89939c2b4c..7ecbfa0c9c 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandLoadHistory.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandLoadHistory.kt @@ -7,7 +7,8 @@ import info.nightscout.androidaps.interfaces.Diaconn import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.commands.Command import info.nightscout.implementation.R -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject class CommandLoadHistory( diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandLoadTDDs.kt b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandLoadTDDs.kt index 138cebbfd6..96e74e39fa 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandLoadTDDs.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandLoadTDDs.kt @@ -5,7 +5,8 @@ import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.commands.Command import info.nightscout.implementation.R -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject class CommandLoadTDDs( diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandReadStatus.kt b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandReadStatus.kt index 8c709856e9..1f28e136b0 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandReadStatus.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandReadStatus.kt @@ -8,7 +8,8 @@ import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.commands.Command import info.nightscout.androidaps.utils.T import info.nightscout.implementation.R -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject class CommandReadStatus( diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandSMBBolus.kt b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandSMBBolus.kt index 8d1585c46d..058cd5db98 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandSMBBolus.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandSMBBolus.kt @@ -9,7 +9,8 @@ import info.nightscout.androidaps.queue.commands.Command import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.T import info.nightscout.implementation.R -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject class CommandSMBBolus( diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandSetProfile.kt b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandSetProfile.kt index ee9a44b921..c79a34925b 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandSetProfile.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandSetProfile.kt @@ -13,7 +13,8 @@ import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.commands.Command import info.nightscout.androidaps.utils.DateUtil import info.nightscout.implementation.R -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject class CommandSetProfile constructor( diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandSetUserSettings.kt b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandSetUserSettings.kt index 0881228712..36560afa6e 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandSetUserSettings.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandSetUserSettings.kt @@ -7,7 +7,8 @@ import info.nightscout.androidaps.interfaces.Diaconn import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.commands.Command import info.nightscout.implementation.R -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject class CommandSetUserSettings( diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandTempBasalAbsolute.kt b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandTempBasalAbsolute.kt index 3ac8bd25ab..76721e8225 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandTempBasalAbsolute.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandTempBasalAbsolute.kt @@ -7,7 +7,8 @@ import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.commands.Command import info.nightscout.implementation.R -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject class CommandTempBasalAbsolute( diff --git a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandTempBasalPercent.kt b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandTempBasalPercent.kt index 09351cf5b3..d6150d8267 100644 --- a/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandTempBasalPercent.kt +++ b/implementation/src/main/java/info/nightscout/implementation/queue/commands/CommandTempBasalPercent.kt @@ -7,7 +7,8 @@ import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.commands.Command import info.nightscout.implementation.R -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject class CommandTempBasalPercent( diff --git a/implementation/src/main/java/info/nightscout/implementation/stats/TddCalculatorImpl.kt b/implementation/src/main/java/info/nightscout/implementation/stats/TddCalculatorImpl.kt index 0c0c621a75..e06ea61c73 100644 --- a/implementation/src/main/java/info/nightscout/implementation/stats/TddCalculatorImpl.kt +++ b/implementation/src/main/java/info/nightscout/implementation/stats/TddCalculatorImpl.kt @@ -24,8 +24,9 @@ import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.MidnightTime import info.nightscout.androidaps.utils.T import info.nightscout.implementation.R -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import javax.inject.Inject import javax.inject.Singleton diff --git a/implementation/src/test/java/info/nightscout/androidaps/TestBase.kt b/implementation/src/test/java/info/nightscout/androidaps/TestBase.kt index 3d78d1b4f6..b4c68bf8b5 100644 --- a/implementation/src/test/java/info/nightscout/androidaps/TestBase.kt +++ b/implementation/src/test/java/info/nightscout/androidaps/TestBase.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps -import info.nightscout.shared.logging.AAPSLoggerTest -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.rx.TestAapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.shared.logging.AAPSLoggerTest import org.junit.Before import org.junit.Rule import org.mockito.Mockito diff --git a/implementation/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt b/implementation/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt index 0eb177fb7c..fca5f85d76 100644 --- a/implementation/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt +++ b/implementation/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt @@ -12,10 +12,10 @@ import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ProfileStore -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus import org.json.JSONObject import org.junit.Before import org.mockito.ArgumentMatchers.anyDouble diff --git a/implementation/src/test/java/info/nightscout/implementation/BolusTimerImplTest.kt b/implementation/src/test/java/info/nightscout/implementation/BolusTimerImplTest.kt index 11b81bc1c0..0fe77de71a 100644 --- a/implementation/src/test/java/info/nightscout/implementation/BolusTimerImplTest.kt +++ b/implementation/src/test/java/info/nightscout/implementation/BolusTimerImplTest.kt @@ -11,12 +11,12 @@ import info.nightscout.androidaps.interfaces.GlucoseUnit import info.nightscout.androidaps.interfaces.Loop import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.automation.AutomationPlugin import info.nightscout.automation.services.LocationServiceHelper import info.nightscout.automation.triggers.Trigger +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import org.junit.Assert import org.junit.Before diff --git a/implementation/src/test/java/info/nightscout/implementation/CarbTimerImplTest.kt b/implementation/src/test/java/info/nightscout/implementation/CarbTimerImplTest.kt index 60b49c4d97..127c8789d9 100644 --- a/implementation/src/test/java/info/nightscout/implementation/CarbTimerImplTest.kt +++ b/implementation/src/test/java/info/nightscout/implementation/CarbTimerImplTest.kt @@ -11,13 +11,13 @@ import info.nightscout.androidaps.interfaces.GlucoseUnit import info.nightscout.androidaps.interfaces.Loop import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.TimerUtil import info.nightscout.automation.AutomationPlugin import info.nightscout.automation.services.LocationServiceHelper import info.nightscout.automation.triggers.Trigger +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import org.junit.Assert import org.junit.Before diff --git a/implementation/src/test/java/info/nightscout/implementation/queue/CommandQueueImplementationTest.kt b/implementation/src/test/java/info/nightscout/implementation/queue/CommandQueueImplementationTest.kt index 8688ae5089..df3c6069d9 100644 --- a/implementation/src/test/java/info/nightscout/implementation/queue/CommandQueueImplementationTest.kt +++ b/implementation/src/test/java/info/nightscout/implementation/queue/CommandQueueImplementationTest.kt @@ -21,20 +21,20 @@ import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.commands.Command import info.nightscout.androidaps.queue.commands.CustomCommand import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.implementation.R import info.nightscout.implementation.queue.commands.CommandBolus import info.nightscout.implementation.queue.commands.CommandCustomCommand import info.nightscout.implementation.queue.commands.CommandExtendedBolus import info.nightscout.implementation.queue.commands.CommandLoadHistory import info.nightscout.implementation.queue.commands.CommandTempBasalPercent -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.core.Single import org.junit.Assert diff --git a/insight/build.gradle b/insight/build.gradle index e81e5f65b8..55d341a152 100644 --- a/insight/build.gradle +++ b/insight/build.gradle @@ -25,7 +25,8 @@ android { dependencies { implementation project(':core') - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') implementation project(':pump:pump-common') api "androidx.room:room-ktx:$room_version" diff --git a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/InsightAlertService.java b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/InsightAlertService.java index 5fccf13dd9..1929a5764b 100644 --- a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/InsightAlertService.java +++ b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/InsightAlertService.java @@ -22,8 +22,9 @@ import javax.inject.Inject; import dagger.android.DaggerService; import info.nightscout.androidaps.insight.R; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag +; import info.nightscout.androidaps.plugins.pump.insight.activities.InsightAlertActivity; import info.nightscout.androidaps.plugins.pump.insight.app_layer.remote_control.ConfirmAlertMessage; import info.nightscout.androidaps.plugins.pump.insight.app_layer.remote_control.SnoozeAlertMessage; diff --git a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightFragment.java b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightFragment.java index b591f2f4c2..ef3d24daba 100644 --- a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightFragment.java +++ b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightFragment.java @@ -22,7 +22,7 @@ import javax.inject.Inject; import dagger.android.support.DaggerFragment; import info.nightscout.androidaps.insight.R; import info.nightscout.androidaps.interfaces.CommandQueue; -import info.nightscout.androidaps.plugins.bus.RxBus; +import info.nightscout.rx.bus.RxBus; import info.nightscout.androidaps.plugins.pump.insight.app_layer.parameter_blocks.TBROverNotificationBlock; import info.nightscout.androidaps.plugins.pump.insight.descriptors.ActiveBasalRate; import info.nightscout.androidaps.plugins.pump.insight.descriptors.ActiveBolus; @@ -36,7 +36,7 @@ import info.nightscout.androidaps.utils.DateUtil; import info.nightscout.androidaps.utils.DecimalFormatter; import info.nightscout.androidaps.utils.FabricPrivacy; import info.nightscout.androidaps.interfaces.ResourceHelper; -import info.nightscout.androidaps.utils.rx.AapsSchedulers; +import info.nightscout.rx.AapsSchedulers; import io.reactivex.rxjava3.disposables.CompositeDisposable; public class LocalInsightFragment extends DaggerFragment implements View.OnClickListener { diff --git a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java index 8ef2bc3e8f..e13b9151a5 100644 --- a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java +++ b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/LocalInsightPlugin.java @@ -34,8 +34,8 @@ import info.nightscout.androidaps.data.DetailedBolusInfo; import info.nightscout.androidaps.interfaces.Insight; import info.nightscout.androidaps.interfaces.Profile; import info.nightscout.androidaps.data.PumpEnactResult; -import info.nightscout.androidaps.events.EventInitializationChanged; -import info.nightscout.androidaps.events.EventRefreshOverview; +import info.nightscout.rx.events.EventInitializationChanged; +import info.nightscout.rx.events.EventRefreshOverview; import info.nightscout.androidaps.insight.database.InsightBolusID; import info.nightscout.androidaps.insight.database.InsightDbHelper; import info.nightscout.androidaps.insight.database.InsightHistoryOffset; @@ -54,9 +54,10 @@ import info.nightscout.androidaps.interfaces.PumpDescription; import info.nightscout.androidaps.interfaces.PumpPluginBase; import info.nightscout.androidaps.interfaces.PumpSync; import info.nightscout.androidaps.interfaces.PumpSync.PumpState.TemporaryBasal; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.bus.RxBus; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag +; +import info.nightscout.rx.bus.RxBus; import info.nightscout.androidaps.plugins.common.ManufacturerType; import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; diff --git a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/connection_service/InsightConnectionService.java b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/connection_service/InsightConnectionService.java index d121480611..092e568bc6 100644 --- a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/connection_service/InsightConnectionService.java +++ b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/connection_service/InsightConnectionService.java @@ -89,8 +89,9 @@ import info.nightscout.androidaps.plugins.pump.insight.utils.PairingDataStorage; import info.nightscout.androidaps.plugins.pump.insight.utils.crypto.Cryptograph; import info.nightscout.androidaps.plugins.pump.insight.utils.crypto.DerivedKeys; import info.nightscout.androidaps.plugins.pump.insight.utils.crypto.KeyPair; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag +; import info.nightscout.shared.sharedPreferences.SP; public class InsightConnectionService extends DaggerService implements ConnectionEstablisher.Callback, InputStreamReader.Callback, OutputStreamWriter.Callback { diff --git a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/events/EventLocalInsightUpdateGUI.kt b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/events/EventLocalInsightUpdateGUI.kt index d89515fe56..b36ebb9f87 100644 --- a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/events/EventLocalInsightUpdateGUI.kt +++ b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/events/EventLocalInsightUpdateGUI.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.pump.insight.events -import info.nightscout.androidaps.events.EventUpdateGui +import info.nightscout.rx.events.EventUpdateGui class EventLocalInsightUpdateGUI : EventUpdateGui() diff --git a/openhumans/build.gradle b/openhumans/build.gradle index ead419045a..b163a0b21b 100644 --- a/openhumans/build.gradle +++ b/openhumans/build.gradle @@ -16,5 +16,6 @@ android { dependencies { implementation project(':core') implementation project(':database') - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') } \ No newline at end of file diff --git a/openhumans/src/main/java/info/nightscout/androidaps/plugin/general/openhumans/OpenHumansUploader.kt b/openhumans/src/main/java/info/nightscout/androidaps/plugin/general/openhumans/OpenHumansUploader.kt index f55c69216f..00a9440d3d 100644 --- a/openhumans/src/main/java/info/nightscout/androidaps/plugin/general/openhumans/OpenHumansUploader.kt +++ b/openhumans/src/main/java/info/nightscout/androidaps/plugin/general/openhumans/OpenHumansUploader.kt @@ -18,13 +18,13 @@ import info.nightscout.androidaps.events.EventPreferenceChange import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.androidaps.plugin.general.openhumans.delegates.OHAppIDDelegate import info.nightscout.androidaps.plugin.general.openhumans.delegates.OHCounterDelegate import info.nightscout.androidaps.plugin.general.openhumans.delegates.OHStateDelegate import info.nightscout.androidaps.plugin.general.openhumans.ui.OHFragment import info.nightscout.androidaps.plugin.general.openhumans.ui.OHLoginActivity -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.rx.bus.RxBus import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable diff --git a/openhumans/src/main/java/info/nightscout/androidaps/plugin/general/openhumans/OpenHumansWorker.kt b/openhumans/src/main/java/info/nightscout/androidaps/plugin/general/openhumans/OpenHumansWorker.kt index a3aa853141..9c9b41ec89 100644 --- a/openhumans/src/main/java/info/nightscout/androidaps/plugin/general/openhumans/OpenHumansWorker.kt +++ b/openhumans/src/main/java/info/nightscout/androidaps/plugin/general/openhumans/OpenHumansWorker.kt @@ -4,8 +4,9 @@ import android.content.Context import androidx.work.CoroutineWorker import androidx.work.WorkerParameters import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import javax.inject.Inject class OpenHumansWorker( diff --git a/plugins/build.gradle b/plugins/build.gradle index 2200db2aa1..8b37792c94 100644 --- a/plugins/build.gradle +++ b/plugins/build.gradle @@ -13,7 +13,8 @@ android { } dependencies { - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') implementation project(':database') implementation project(':graphview') implementation project(':core') diff --git a/plugins/src/main/java/info/nightscout/plugins/constraints/bgQualityCheck/BgQualityCheckPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/constraints/bgQualityCheck/BgQualityCheckPlugin.kt index dcbbd29554..41073537c1 100644 --- a/plugins/src/main/java/info/nightscout/plugins/constraints/bgQualityCheck/BgQualityCheckPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/constraints/bgQualityCheck/BgQualityCheckPlugin.kt @@ -8,15 +8,15 @@ import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventBucketedDataCreated import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.plugins.R -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject @@ -31,7 +31,8 @@ class BgQualityCheckPlugin @Inject constructor( rh: ResourceHelper, private val rxBus: RxBus, private val iobCobCalculator: IobCobCalculator, - private val aapsSchedulers: AapsSchedulers, + private val aapsSchedulers: + AapsSchedulers, private val fabricPrivacy: FabricPrivacy, private val dateUtil: DateUtil ) : PluginBase( diff --git a/plugins/src/main/java/info/nightscout/plugins/constraints/dstHelper/DstHelperPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/constraints/dstHelper/DstHelperPlugin.kt index 0ef063a691..7df92d2c54 100644 --- a/plugins/src/main/java/info/nightscout/plugins/constraints/dstHelper/DstHelperPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/constraints/dstHelper/DstHelperPlugin.kt @@ -12,8 +12,9 @@ import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.utils.T import info.nightscout.plugins.R -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import java.util.Calendar import javax.inject.Inject diff --git a/plugins/src/main/java/info/nightscout/plugins/constraints/phoneChecker/PhoneCheckerPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/constraints/phoneChecker/PhoneCheckerPlugin.kt index 5284948956..b27fe39aa4 100644 --- a/plugins/src/main/java/info/nightscout/plugins/constraints/phoneChecker/PhoneCheckerPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/constraints/phoneChecker/PhoneCheckerPlugin.kt @@ -10,7 +10,7 @@ import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.plugins.R -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLogger import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/src/main/java/info/nightscout/plugins/constraints/signatureVerifier/SignatureVerifierPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/constraints/signatureVerifier/SignatureVerifierPlugin.kt index e79301346c..6562898475 100644 --- a/plugins/src/main/java/info/nightscout/plugins/constraints/signatureVerifier/SignatureVerifierPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/constraints/signatureVerifier/SignatureVerifierPlugin.kt @@ -11,11 +11,11 @@ import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.plugins.R -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import org.spongycastle.util.encoders.Hex import java.io.ByteArrayOutputStream diff --git a/plugins/src/main/java/info/nightscout/plugins/constraints/storage/StorageConstraintPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/constraints/storage/StorageConstraintPlugin.kt index 8130725bd3..cd01f1778f 100644 --- a/plugins/src/main/java/info/nightscout/plugins/constraints/storage/StorageConstraintPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/constraints/storage/StorageConstraintPlugin.kt @@ -10,13 +10,13 @@ import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification -import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.plugins.R +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/src/main/java/info/nightscout/plugins/constraints/versionChecker/VersionCheckerPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/constraints/versionChecker/VersionCheckerPlugin.kt index 4ed4d60b8b..fde32fe206 100644 --- a/plugins/src/main/java/info/nightscout/plugins/constraints/versionChecker/VersionCheckerPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/constraints/versionChecker/VersionCheckerPlugin.kt @@ -1,15 +1,20 @@ package info.nightscout.plugins.constraints.versionChecker import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.interfaces.* -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.Config +import info.nightscout.androidaps.interfaces.Constraint +import info.nightscout.androidaps.interfaces.Constraints +import info.nightscout.androidaps.interfaces.PluginBase +import info.nightscout.androidaps.interfaces.PluginDescription +import info.nightscout.androidaps.interfaces.PluginType +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.constraints.versionChecker.VersionCheckerUtils import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.constraints.versionChecker.VersionCheckerUtils import info.nightscout.plugins.R -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import java.util.concurrent.TimeUnit import javax.inject.Inject diff --git a/plugins/src/main/java/info/nightscout/plugins/general/autotune/AutotuneFragment.kt b/plugins/src/main/java/info/nightscout/plugins/general/autotune/AutotuneFragment.kt index 83b49617ce..5ca5667830 100644 --- a/plugins/src/main/java/info/nightscout/plugins/general/autotune/AutotuneFragment.kt +++ b/plugins/src/main/java/info/nightscout/plugins/general/autotune/AutotuneFragment.kt @@ -34,19 +34,19 @@ import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ProfileStore import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.MidnightTime import info.nightscout.androidaps.utils.Round import info.nightscout.androidaps.utils.alertDialogs.OKDialog.showConfirmation -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.plugins.R import info.nightscout.plugins.databinding.AutotuneFragmentBinding import info.nightscout.plugins.general.autotune.data.ATProfile import info.nightscout.plugins.general.autotune.events.EventAutotuneUpdateGui import info.nightscout.plugins.profile.ProfilePlugin -import info.nightscout.androidaps.events.EventLocalProfileChanged +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventLocalProfileChanged import info.nightscout.shared.SafeParse import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable diff --git a/plugins/src/main/java/info/nightscout/plugins/general/autotune/AutotuneIob.kt b/plugins/src/main/java/info/nightscout/plugins/general/autotune/AutotuneIob.kt index a16f7d1cc1..756c99ef2f 100644 --- a/plugins/src/main/java/info/nightscout/plugins/general/autotune/AutotuneIob.kt +++ b/plugins/src/main/java/info/nightscout/plugins/general/autotune/AutotuneIob.kt @@ -22,8 +22,9 @@ import info.nightscout.androidaps.utils.Round import info.nightscout.androidaps.utils.T import info.nightscout.plugins.R import info.nightscout.plugins.general.autotune.data.ATProfile -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import org.json.JSONArray import org.json.JSONObject diff --git a/plugins/src/main/java/info/nightscout/plugins/general/autotune/AutotunePlugin.kt b/plugins/src/main/java/info/nightscout/plugins/general/autotune/AutotunePlugin.kt index 1172fea43c..a5085f3783 100644 --- a/plugins/src/main/java/info/nightscout/plugins/general/autotune/AutotunePlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/general/autotune/AutotunePlugin.kt @@ -19,7 +19,6 @@ import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ProfileStore import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.JsonHelper import info.nightscout.androidaps.utils.MidnightTime @@ -29,9 +28,10 @@ import info.nightscout.plugins.general.autotune.data.ATProfile import info.nightscout.plugins.general.autotune.data.PreppedGlucose import info.nightscout.plugins.general.autotune.events.EventAutotuneUpdateGui import info.nightscout.plugins.profile.ProfilePlugin -import info.nightscout.androidaps.events.EventLocalProfileChanged -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventLocalProfileChanged +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.json.JSONException import org.json.JSONObject diff --git a/plugins/src/main/java/info/nightscout/plugins/general/autotune/data/ATProfile.kt b/plugins/src/main/java/info/nightscout/plugins/general/autotune/data/ATProfile.kt index c5394c9312..46da8f29b3 100644 --- a/plugins/src/main/java/info/nightscout/plugins/general/autotune/data/ATProfile.kt +++ b/plugins/src/main/java/info/nightscout/plugins/general/autotune/data/ATProfile.kt @@ -16,10 +16,10 @@ import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ProfileStore import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.Round import info.nightscout.androidaps.utils.T +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.SafeParse import info.nightscout.shared.sharedPreferences.SP import org.json.JSONArray diff --git a/plugins/src/main/java/info/nightscout/plugins/general/autotune/events/EventAutotuneUpdateGui.kt b/plugins/src/main/java/info/nightscout/plugins/general/autotune/events/EventAutotuneUpdateGui.kt index 7adff76e9d..21ac5f8e1c 100644 --- a/plugins/src/main/java/info/nightscout/plugins/general/autotune/events/EventAutotuneUpdateGui.kt +++ b/plugins/src/main/java/info/nightscout/plugins/general/autotune/events/EventAutotuneUpdateGui.kt @@ -1,5 +1,5 @@ package info.nightscout.plugins.general.autotune.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventAutotuneUpdateGui : Event() \ No newline at end of file diff --git a/plugins/src/main/java/info/nightscout/plugins/general/food/FoodFragment.kt b/plugins/src/main/java/info/nightscout/plugins/general/food/FoodFragment.kt index 7756e897e4..e14263f65b 100644 --- a/plugins/src/main/java/info/nightscout/plugins/general/food/FoodFragment.kt +++ b/plugins/src/main/java/info/nightscout/plugins/general/food/FoodFragment.kt @@ -17,22 +17,22 @@ import info.nightscout.androidaps.database.entities.Food import info.nightscout.androidaps.database.entities.UserEntry.Action import info.nightscout.androidaps.database.entities.UserEntry.Sources import info.nightscout.androidaps.database.transactions.InvalidateFoodTransaction -import info.nightscout.androidaps.events.EventFoodDatabaseChanged import info.nightscout.androidaps.extensions.toVisibility import info.nightscout.androidaps.interfaces.ActivityNames import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.protection.ProtectionCheck -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.ui.UIRunnable import info.nightscout.plugins.R import info.nightscout.plugins.databinding.FoodFragmentBinding import info.nightscout.plugins.databinding.FoodItemBinding -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventFoodDatabaseChanged +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.Locale diff --git a/plugins/src/main/java/info/nightscout/plugins/general/food/FoodPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/general/food/FoodPlugin.kt index fcb69bbf65..6a98347060 100644 --- a/plugins/src/main/java/info/nightscout/plugins/general/food/FoodPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/general/food/FoodPlugin.kt @@ -12,12 +12,12 @@ import info.nightscout.androidaps.extensions.foodFromJson import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.JsonHelper -import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.plugins.R +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.json.JSONObject import javax.inject.Inject diff --git a/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/AuthRequest.kt b/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/AuthRequest.kt index b5fdecd49e..a4d19cdb93 100644 --- a/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/AuthRequest.kt +++ b/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/AuthRequest.kt @@ -7,13 +7,13 @@ import info.nightscout.androidaps.data.Sms import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.interfaces.SmsCommunicator -import info.nightscout.plugins.general.smsCommunicator.otp.OneTimePassword -import info.nightscout.plugins.general.smsCommunicator.otp.OneTimePasswordValidationResult import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.T import info.nightscout.plugins.R -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.plugins.general.smsCommunicator.otp.OneTimePassword +import info.nightscout.plugins.general.smsCommunicator.otp.OneTimePasswordValidationResult +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject class AuthRequest internal constructor( diff --git a/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorFragment.kt b/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorFragment.kt index ca957b1786..3e9107994f 100644 --- a/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorFragment.kt +++ b/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorFragment.kt @@ -7,13 +7,13 @@ import android.view.ViewGroup import dagger.android.support.DaggerFragment import info.nightscout.androidaps.data.Sms import info.nightscout.androidaps.interfaces.SmsCommunicator -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.HtmlHelper -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.plugins.databinding.SmscommunicatorFragmentBinding import info.nightscout.plugins.general.smsCommunicator.events.EventSmsCommunicatorUpdateGui +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.Collections diff --git a/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorPlugin.kt index 10e66853f5..7bc63f45ef 100644 --- a/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/SmsCommunicatorPlugin.kt @@ -25,9 +25,7 @@ import info.nightscout.androidaps.database.transactions.CancelCurrentOfflineEven import info.nightscout.androidaps.database.transactions.CancelCurrentTemporaryTargetIfAnyTransaction import info.nightscout.androidaps.database.transactions.InsertAndCancelCurrentOfflineEventTransaction import info.nightscout.androidaps.database.transactions.InsertAndCancelCurrentTemporaryTargetTransaction -import info.nightscout.androidaps.events.EventNSClientRestart import info.nightscout.androidaps.events.EventPreferenceChange -import info.nightscout.androidaps.events.EventRefreshOverview import info.nightscout.androidaps.extensions.valueToUnitsString import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.CommandQueue @@ -47,7 +45,6 @@ import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.interfaces.SmsCommunicator import info.nightscout.androidaps.interfaces.XDripBroadcast import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider @@ -57,14 +54,17 @@ import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference import info.nightscout.plugins.R import info.nightscout.plugins.general.smsCommunicator.events.EventSmsCommunicatorUpdateGui import info.nightscout.plugins.general.smsCommunicator.otp.OneTimePassword +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventNSClientRestart +import info.nightscout.rx.events.EventRefreshOverview +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.SafeParse -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/events/EventSmsCommunicatorUpdateGui.kt b/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/events/EventSmsCommunicatorUpdateGui.kt index 719303492b..962584cfdc 100644 --- a/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/events/EventSmsCommunicatorUpdateGui.kt +++ b/plugins/src/main/java/info/nightscout/plugins/general/smsCommunicator/events/EventSmsCommunicatorUpdateGui.kt @@ -1,5 +1,5 @@ package info.nightscout.plugins.general.smsCommunicator.events -import info.nightscout.androidaps.events.EventUpdateGui +import info.nightscout.rx.events.EventUpdateGui internal class EventSmsCommunicatorUpdateGui : EventUpdateGui() diff --git a/plugins/src/main/java/info/nightscout/plugins/general/themes/ThemeSwitcherPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/general/themes/ThemeSwitcherPlugin.kt index 26e70af0d2..9bf37c08b7 100644 --- a/plugins/src/main/java/info/nightscout/plugins/general/themes/ThemeSwitcherPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/general/themes/ThemeSwitcherPlugin.kt @@ -6,14 +6,14 @@ import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_NO import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_YES import dagger.android.HasAndroidInjector import info.nightscout.androidaps.events.EventPreferenceChange -import info.nightscout.androidaps.events.EventThemeSwitch import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginDescription import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.plugins.R -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventThemeSwitch +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import javax.inject.Inject diff --git a/plugins/src/main/java/info/nightscout/plugins/general/wear/events/EventWearUpdateGui.kt b/plugins/src/main/java/info/nightscout/plugins/general/wear/events/EventWearUpdateGui.kt index 4736566059..e7cb807f01 100644 --- a/plugins/src/main/java/info/nightscout/plugins/general/wear/events/EventWearUpdateGui.kt +++ b/plugins/src/main/java/info/nightscout/plugins/general/wear/events/EventWearUpdateGui.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.general.wear.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventWearUpdateGui : Event() \ No newline at end of file diff --git a/plugins/src/main/java/info/nightscout/plugins/general/xdripStatusline/StatusLinePlugin.kt b/plugins/src/main/java/info/nightscout/plugins/general/xdripStatusline/StatusLinePlugin.kt index 5b3fd72254..35227ac87d 100644 --- a/plugins/src/main/java/info/nightscout/plugins/general/xdripStatusline/StatusLinePlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/general/xdripStatusline/StatusLinePlugin.kt @@ -4,15 +4,29 @@ import android.content.Context import android.content.Intent import android.os.Bundle import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.events.* +import info.nightscout.androidaps.events.EventPreferenceChange import info.nightscout.androidaps.extensions.toStringShort -import info.nightscout.androidaps.interfaces.* -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.IobCobCalculator +import info.nightscout.androidaps.interfaces.Loop +import info.nightscout.androidaps.interfaces.PluginBase +import info.nightscout.androidaps.interfaces.PluginDescription +import info.nightscout.androidaps.interfaces.PluginType +import info.nightscout.androidaps.interfaces.Profile +import info.nightscout.androidaps.interfaces.ProfileFunction +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.plugins.R -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAppInitialized +import info.nightscout.rx.events.EventAutosensCalculationFinished +import info.nightscout.rx.events.EventConfigBuilderChange +import info.nightscout.rx.events.EventExtendedBolusChange +import info.nightscout.rx.events.EventRefreshOverview +import info.nightscout.rx.events.EventTempBasalChange +import info.nightscout.rx.events.EventTreatmentChange +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinLyumjevPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinLyumjevPlugin.kt index c297f74233..5def10483b 100644 --- a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinLyumjevPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinLyumjevPlugin.kt @@ -4,11 +4,11 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.HardLimits import info.nightscout.plugins.R +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import org.json.JSONObject import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefBasePlugin.kt b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefBasePlugin.kt index e6756ca712..91d221ec92 100644 --- a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefBasePlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefBasePlugin.kt @@ -1,17 +1,23 @@ package info.nightscout.plugins.insulin import dagger.android.HasAndroidInjector -import info.nightscout.plugins.R import info.nightscout.androidaps.data.Iob import info.nightscout.androidaps.database.embedments.InsulinConfiguration import info.nightscout.androidaps.database.entities.Bolus -import info.nightscout.androidaps.interfaces.* -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.Config +import info.nightscout.androidaps.interfaces.Insulin +import info.nightscout.androidaps.interfaces.PluginBase +import info.nightscout.androidaps.interfaces.PluginDescription +import info.nightscout.androidaps.interfaces.PluginType +import info.nightscout.androidaps.interfaces.ProfileFunction +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.utils.HardLimits import info.nightscout.androidaps.utils.T -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.plugins.R +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import kotlin.math.exp import kotlin.math.pow diff --git a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPlugin.kt index e14a2c8522..1eb5b1a8f9 100644 --- a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPlugin.kt @@ -1,16 +1,16 @@ package info.nightscout.plugins.insulin import dagger.android.HasAndroidInjector -import info.nightscout.plugins.R import info.nightscout.androidaps.extensions.putInt import info.nightscout.androidaps.extensions.storeInt import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.HardLimits +import info.nightscout.plugins.R +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import org.json.JSONObject import javax.inject.Inject diff --git a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPlugin.kt index 81bfaf25b5..7c3f7341f4 100644 --- a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPlugin.kt @@ -5,10 +5,10 @@ import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.HardLimits import info.nightscout.plugins.R -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import org.json.JSONObject import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPlugin.kt b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPlugin.kt index e11a36bdf9..5cb1f9f286 100644 --- a/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPlugin.kt @@ -5,10 +5,10 @@ import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.HardLimits import info.nightscout.plugins.R -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import org.json.JSONObject import javax.inject.Inject import javax.inject.Singleton diff --git a/plugins/src/main/java/info/nightscout/plugins/profile/ProfileFragment.kt b/plugins/src/main/java/info/nightscout/plugins/profile/ProfileFragment.kt index f6979d557a..ecfd9166b1 100644 --- a/plugins/src/main/java/info/nightscout/plugins/profile/ProfileFragment.kt +++ b/plugins/src/main/java/info/nightscout/plugins/profile/ProfileFragment.kt @@ -22,21 +22,21 @@ import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.HardLimits import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.protection.ProtectionCheck -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.plugins.R import info.nightscout.plugins.databinding.ProfileFragmentBinding -import info.nightscout.androidaps.events.EventLocalProfileChanged import info.nightscout.plugins.ui.TimeListEdit +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventLocalProfileChanged +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.SafeParse -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.math.RoundingMode diff --git a/plugins/src/main/java/info/nightscout/plugins/profile/ProfilePlugin.kt b/plugins/src/main/java/info/nightscout/plugins/profile/ProfilePlugin.kt index cf6856bfc0..68e12da3ac 100644 --- a/plugins/src/main/java/info/nightscout/plugins/profile/ProfilePlugin.kt +++ b/plugins/src/main/java/info/nightscout/plugins/profile/ProfilePlugin.kt @@ -10,8 +10,6 @@ import info.nightscout.androidaps.Constants import info.nightscout.androidaps.annotations.OpenForTesting import info.nightscout.androidaps.data.ProfileSealed import info.nightscout.androidaps.data.PureProfile -import info.nightscout.androidaps.events.EventLocalProfileChanged -import info.nightscout.androidaps.events.EventProfileStoreChanged import info.nightscout.androidaps.extensions.blockFromJsonArray import info.nightscout.androidaps.extensions.pureProfileFromJson import info.nightscout.androidaps.interfaces.ActivePlugin @@ -26,7 +24,6 @@ import info.nightscout.androidaps.interfaces.ProfileSource import info.nightscout.androidaps.interfaces.ProfileStore import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.interfaces.XDripBroadcast -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.DateUtil @@ -36,8 +33,11 @@ import info.nightscout.androidaps.utils.JsonHelper import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.plugins.R -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventLocalProfileChanged +import info.nightscout.rx.events.EventProfileStoreChanged +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.json.JSONArray import org.json.JSONException diff --git a/plugins/src/main/java/info/nightscout/plugins/ui/TimeListEdit.java b/plugins/src/main/java/info/nightscout/plugins/ui/TimeListEdit.java index c4f0ba9469..aa6cf35307 100644 --- a/plugins/src/main/java/info/nightscout/plugins/ui/TimeListEdit.java +++ b/plugins/src/main/java/info/nightscout/plugins/ui/TimeListEdit.java @@ -27,8 +27,8 @@ import java.util.List; import info.nightscout.androidaps.utils.DateUtil; import info.nightscout.androidaps.utils.ui.NumberPicker; import info.nightscout.plugins.R; +import info.nightscout.rx.logging.AAPSLogger; import info.nightscout.shared.SafeParse; -import info.nightscout.shared.logging.AAPSLogger; /** * Created by mike on 29.12.2016. diff --git a/plugins/src/test/java/info/nightscout/androidaps/TestBase.kt b/plugins/src/test/java/info/nightscout/androidaps/TestBase.kt index 3d78d1b4f6..b4c68bf8b5 100644 --- a/plugins/src/test/java/info/nightscout/androidaps/TestBase.kt +++ b/plugins/src/test/java/info/nightscout/androidaps/TestBase.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps -import info.nightscout.shared.logging.AAPSLoggerTest -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.rx.TestAapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.shared.logging.AAPSLoggerTest import org.junit.Before import org.junit.Rule import org.mockito.Mockito diff --git a/plugins/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt b/plugins/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt index 0eb177fb7c..fca5f85d76 100644 --- a/plugins/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt +++ b/plugins/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt @@ -12,10 +12,10 @@ import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ProfileStore -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus import org.json.JSONObject import org.junit.Before import org.mockito.ArgumentMatchers.anyDouble diff --git a/plugins/src/test/java/info/nightscout/plugins/constraints/bgQualityCheck/BgQualityCheckPluginTest.kt b/plugins/src/test/java/info/nightscout/plugins/constraints/bgQualityCheck/BgQualityCheckPluginTest.kt index 98ca921d72..6c995a118b 100644 --- a/plugins/src/test/java/info/nightscout/plugins/constraints/bgQualityCheck/BgQualityCheckPluginTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/constraints/bgQualityCheck/BgQualityCheckPluginTest.kt @@ -7,12 +7,12 @@ import info.nightscout.androidaps.database.entities.GlucoseValue import info.nightscout.androidaps.interfaces.Constraint import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensDataStore import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T import info.nightscout.plugins.R +import info.nightscout.rx.bus.RxBus import org.junit.Assert import org.junit.Before import org.junit.Test diff --git a/plugins/src/test/java/info/nightscout/plugins/constraints/signatureVerifier/SignatureVerifierPluginTest.kt b/plugins/src/test/java/info/nightscout/plugins/constraints/signatureVerifier/SignatureVerifierPluginTest.kt index e5855607a3..ea6e1920c3 100644 --- a/plugins/src/test/java/info/nightscout/plugins/constraints/signatureVerifier/SignatureVerifierPluginTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/constraints/signatureVerifier/SignatureVerifierPluginTest.kt @@ -4,8 +4,8 @@ import android.content.Context import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector import info.nightscout.androidaps.TestBase -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import org.junit.Assert import org.junit.Test diff --git a/plugins/src/test/java/info/nightscout/plugins/constraints/storage/StorageConstraintPluginTest.kt b/plugins/src/test/java/info/nightscout/plugins/constraints/storage/StorageConstraintPluginTest.kt index c472773af8..ae25e436af 100644 --- a/plugins/src/test/java/info/nightscout/plugins/constraints/storage/StorageConstraintPluginTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/constraints/storage/StorageConstraintPluginTest.kt @@ -5,8 +5,8 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.TestBase import info.nightscout.androidaps.interfaces.Constraint import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import org.junit.Assert import org.junit.Before import org.junit.Test diff --git a/plugins/src/test/java/info/nightscout/plugins/general/autotune/AutotunePrepTest.kt b/plugins/src/test/java/info/nightscout/plugins/general/autotune/AutotunePrepTest.kt index 7c287045d4..c7c98c3e0d 100644 --- a/plugins/src/test/java/info/nightscout/plugins/general/autotune/AutotunePrepTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/general/autotune/AutotunePrepTest.kt @@ -21,7 +21,7 @@ import info.nightscout.androidaps.utils.T import info.nightscout.plugins.R import info.nightscout.plugins.general.autotune.data.ATProfile import info.nightscout.plugins.general.autotune.data.PreppedGlucose -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import org.json.JSONArray import org.json.JSONObject diff --git a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinLyumjevPluginTest.kt b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinLyumjevPluginTest.kt index 409ac5c3eb..1496ef2fe4 100644 --- a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinLyumjevPluginTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinLyumjevPluginTest.kt @@ -6,10 +6,10 @@ import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.HardLimits import info.nightscout.plugins.R -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Rule diff --git a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefBasePluginTest.kt b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefBasePluginTest.kt index 16801b1c5e..fb40c87216 100644 --- a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefBasePluginTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefBasePluginTest.kt @@ -8,9 +8,9 @@ import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.HardLimits -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import org.json.JSONObject import org.junit.Assert import org.junit.Before diff --git a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPluginTest.kt b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPluginTest.kt index d2877bc236..bc6bed979f 100644 --- a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPluginTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPluginTest.kt @@ -7,9 +7,9 @@ import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.HardLimits import info.nightscout.plugins.R +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import org.junit.Assert.assertEquals import org.junit.Before diff --git a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPluginTest.kt b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPluginTest.kt index 5b256ff367..e119efb6b6 100644 --- a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPluginTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPluginTest.kt @@ -6,10 +6,10 @@ import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.HardLimits import info.nightscout.plugins.R -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Rule diff --git a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPluginTest.kt b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPluginTest.kt index afffc35b21..f1bee37c73 100644 --- a/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPluginTest.kt +++ b/plugins/src/test/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPluginTest.kt @@ -6,10 +6,10 @@ import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Insulin import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.HardLimits import info.nightscout.plugins.R -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Rule diff --git a/pump/combo/build.gradle b/pump/combo/build.gradle index 4d81e1672a..5f505c6b16 100644 --- a/pump/combo/build.gradle +++ b/pump/combo/build.gradle @@ -15,5 +15,6 @@ android { dependencies { implementation project(':libraries') implementation project(':core') - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') } \ No newline at end of file diff --git a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ComboFragment.kt b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ComboFragment.kt index 726b169505..a496f0cb73 100644 --- a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ComboFragment.kt +++ b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ComboFragment.kt @@ -12,7 +12,7 @@ import info.nightscout.androidaps.combo.R import info.nightscout.androidaps.combo.databinding.CombopumpFragmentBinding import info.nightscout.androidaps.extensions.runOnUiThread import info.nightscout.androidaps.interfaces.CommandQueue -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.pump.combo.data.ComboErrorUtil import info.nightscout.androidaps.plugins.pump.combo.data.ComboErrorUtil.DisplayType import info.nightscout.androidaps.plugins.pump.combo.events.EventComboPumpUpdateGUI @@ -21,8 +21,8 @@ import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.events.EventQueueChanged import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ComboPlugin.java b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ComboPlugin.java index bc40358970..4aa0cea4f4 100644 --- a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ComboPlugin.java +++ b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ComboPlugin.java @@ -24,8 +24,6 @@ import dagger.android.HasAndroidInjector; import info.nightscout.androidaps.combo.R; import info.nightscout.androidaps.data.DetailedBolusInfo; import info.nightscout.androidaps.data.PumpEnactResult; -import info.nightscout.androidaps.events.EventInitializationChanged; -import info.nightscout.androidaps.events.EventRefreshOverview; import info.nightscout.androidaps.extensions.PumpStateExtensionKt; import info.nightscout.androidaps.interfaces.CommandQueue; import info.nightscout.androidaps.interfaces.Constraint; @@ -39,7 +37,6 @@ import info.nightscout.androidaps.interfaces.PumpDescription; import info.nightscout.androidaps.interfaces.PumpPluginBase; import info.nightscout.androidaps.interfaces.PumpSync; import info.nightscout.androidaps.interfaces.ResourceHelper; -import info.nightscout.androidaps.plugins.bus.RxBus; import info.nightscout.androidaps.plugins.common.ManufacturerType; import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; @@ -62,8 +59,11 @@ import info.nightscout.androidaps.plugins.pump.common.defs.PumpType; import info.nightscout.androidaps.utils.DateUtil; import info.nightscout.androidaps.utils.InstanceId; import info.nightscout.androidaps.utils.T; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.bus.RxBus; +import info.nightscout.rx.events.EventInitializationChanged; +import info.nightscout.rx.events.EventRefreshOverview; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import info.nightscout.shared.sharedPreferences.SP; /** diff --git a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/events/EventComboPumpUpdateGUI.kt b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/events/EventComboPumpUpdateGUI.kt index 604b55cd25..f1132704b1 100644 --- a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/events/EventComboPumpUpdateGUI.kt +++ b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/events/EventComboPumpUpdateGUI.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.pump.combo.events -import info.nightscout.androidaps.events.EventUpdateGui +import info.nightscout.rx.events.EventUpdateGui class EventComboPumpUpdateGUI : EventUpdateGui() \ No newline at end of file diff --git a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/RuffyScripter.java b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/RuffyScripter.java index 565cf66f70..18b6e9cc3d 100644 --- a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/RuffyScripter.java +++ b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/RuffyScripter.java @@ -41,8 +41,8 @@ import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.Read import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.SetBasalProfileCommand; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.SetTbrCommand; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistoryRequest; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; /** * Provides scripting 'runtime' and operations. consider moving operations into a separate diff --git a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/BolusCommand.java b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/BolusCommand.java index 1e0105f094..6d97d62228 100644 --- a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/BolusCommand.java +++ b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/BolusCommand.java @@ -21,8 +21,8 @@ import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BolusProgress import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpWarningCodes; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.RuffyScripter; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.WarningOrErrorCode; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; public class BolusCommand extends BaseCommand { diff --git a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/CancelTbrCommand.java b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/CancelTbrCommand.java index 02b23f971a..9faa7a135a 100644 --- a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/CancelTbrCommand.java +++ b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/CancelTbrCommand.java @@ -6,8 +6,8 @@ import org.monkey.d.ruffy.ruffy.driver.display.MenuType; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpWarningCodes; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; public class CancelTbrCommand extends BaseCommand { private final AAPSLogger aapsLogger; diff --git a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/ReadBasalProfileCommand.java b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/ReadBasalProfileCommand.java index 09d528099d..7d8a721d00 100644 --- a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/ReadBasalProfileCommand.java +++ b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/ReadBasalProfileCommand.java @@ -11,8 +11,8 @@ import java.util.Arrays; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BasalProfile; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; public class ReadBasalProfileCommand extends BaseCommand { private final AAPSLogger aapsLogger; diff --git a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/ReadHistoryCommand.java b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/ReadHistoryCommand.java index b5dfb4044d..61dbdf292f 100644 --- a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/ReadHistoryCommand.java +++ b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/ReadHistoryCommand.java @@ -16,8 +16,8 @@ import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpH import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistoryRequest; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Tbr; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Tdd; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; public class ReadHistoryCommand extends BaseCommand { private final AAPSLogger aapsLogger; diff --git a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/ReadQuickInfoCommand.java b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/ReadQuickInfoCommand.java index f3b19be8bc..870f64e28e 100644 --- a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/ReadQuickInfoCommand.java +++ b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/ReadQuickInfoCommand.java @@ -11,8 +11,8 @@ import java.util.List; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Bolus; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistory; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; public class ReadQuickInfoCommand extends BaseCommand { private final AAPSLogger aapsLogger; diff --git a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/SetBasalProfileCommand.java b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/SetBasalProfileCommand.java index 343c694ced..53954cba9f 100644 --- a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/SetBasalProfileCommand.java +++ b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/SetBasalProfileCommand.java @@ -14,8 +14,8 @@ import java.util.List; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BasalProfile; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; public class SetBasalProfileCommand extends BaseCommand { private final AAPSLogger aapsLogger; diff --git a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/SetTbrCommand.java b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/SetTbrCommand.java index 367367497d..820fa56b48 100644 --- a/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/SetTbrCommand.java +++ b/pump/combo/src/main/java/info/nightscout/androidaps/plugins/pump/combo/ruffyscripter/commands/SetTbrCommand.java @@ -15,8 +15,8 @@ import java.util.Objects; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpWarningCodes; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.WarningOrErrorCode; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; public class SetTbrCommand extends BaseCommand { private final AAPSLogger aapsLogger; diff --git a/pump/combo/src/test/java/info/nightscout/androidaps/plugins/pump/combo/ComboPluginTest.kt b/pump/combo/src/test/java/info/nightscout/androidaps/plugins/pump/combo/ComboPluginTest.kt index cbf204c960..18aa351c7b 100644 --- a/pump/combo/src/test/java/info/nightscout/androidaps/plugins/pump/combo/ComboPluginTest.kt +++ b/pump/combo/src/test/java/info/nightscout/androidaps/plugins/pump/combo/ComboPluginTest.kt @@ -7,11 +7,10 @@ import info.nightscout.androidaps.TestBase import info.nightscout.androidaps.combo.R import info.nightscout.androidaps.data.PumpEnactResult import info.nightscout.androidaps.interfaces.* -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.RuffyScripter import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Bolus import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import org.junit.Assert import org.junit.Before diff --git a/pump/combo/src/test/java/info/nightscout/androidaps/plugins/pump/combo/TestBase.kt b/pump/combo/src/test/java/info/nightscout/androidaps/plugins/pump/combo/TestBase.kt index 57aca0507a..e4d3c51234 100644 --- a/pump/combo/src/test/java/info/nightscout/androidaps/plugins/pump/combo/TestBase.kt +++ b/pump/combo/src/test/java/info/nightscout/androidaps/plugins/pump/combo/TestBase.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps -import info.nightscout.shared.logging.AAPSLoggerTest -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.rx.TestAapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.shared.logging.AAPSLoggerTest import org.junit.Before import org.junit.Rule import org.mockito.Mockito diff --git a/pump/dana/build.gradle b/pump/dana/build.gradle index 4ca6452d9f..d028827598 100644 --- a/pump/dana/build.gradle +++ b/pump/dana/build.gradle @@ -25,7 +25,8 @@ android { dependencies { implementation project(':libraries') implementation project(':core') - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') api "androidx.room:room-ktx:$room_version" api "androidx.room:room-runtime:$room_version" diff --git a/pump/dana/src/main/java/info/nightscout/androidaps/dana/DanaFragment.kt b/pump/dana/src/main/java/info/nightscout/androidaps/dana/DanaFragment.kt index 010dbb445a..3a915472e2 100644 --- a/pump/dana/src/main/java/info/nightscout/androidaps/dana/DanaFragment.kt +++ b/pump/dana/src/main/java/info/nightscout/androidaps/dana/DanaFragment.kt @@ -15,31 +15,31 @@ import info.nightscout.androidaps.dana.activities.DanaUserOptionsActivity import info.nightscout.androidaps.dana.databinding.DanarFragmentBinding import info.nightscout.androidaps.dana.events.EventDanaRNewStatus import info.nightscout.androidaps.dialogs.ProfileViewerDialog -import info.nightscout.androidaps.events.EventExtendedBolusChange -import info.nightscout.androidaps.events.EventInitializationChanged import info.nightscout.androidaps.events.EventPumpStatusChanged -import info.nightscout.androidaps.events.EventTempBasalChange +import info.nightscout.androidaps.extensions.toVisibility import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.ActivityNames import info.nightscout.androidaps.interfaces.CommandQueue +import info.nightscout.androidaps.interfaces.Dana import info.nightscout.androidaps.interfaces.Pump -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.queue.events.EventQueueChanged import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.utils.userEntry.UserEntryMapper.Action -import info.nightscout.androidaps.utils.userEntry.UserEntryMapper.Sources import info.nightscout.androidaps.utils.WarnColors import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.extensions.toVisibility -import info.nightscout.androidaps.interfaces.ActivityNames -import info.nightscout.androidaps.interfaces.Dana -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.androidaps.utils.userEntry.UserEntryMapper.Action +import info.nightscout.androidaps.utils.userEntry.UserEntryMapper.Sources +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventExtendedBolusChange +import info.nightscout.rx.events.EventInitializationChanged +import info.nightscout.rx.events.EventTempBasalChange +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/pump/dana/src/main/java/info/nightscout/androidaps/dana/DanaPump.kt b/pump/dana/src/main/java/info/nightscout/androidaps/dana/DanaPump.kt index bb473f586b..e8758375e2 100644 --- a/pump/dana/src/main/java/info/nightscout/androidaps/dana/DanaPump.kt +++ b/pump/dana/src/main/java/info/nightscout/androidaps/dana/DanaPump.kt @@ -5,13 +5,13 @@ import info.nightscout.androidaps.Constants import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileStore import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.T +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.joda.time.DateTime import org.joda.time.DateTimeZone diff --git a/pump/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaHistoryActivity.kt b/pump/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaHistoryActivity.kt index d978b295cf..8e638cf33b 100644 --- a/pump/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaHistoryActivity.kt +++ b/pump/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaHistoryActivity.kt @@ -16,24 +16,22 @@ import info.nightscout.androidaps.dana.database.DanaHistoryRecord import info.nightscout.androidaps.dana.database.DanaHistoryRecordDao import info.nightscout.androidaps.dana.databinding.DanarHistoryActivityBinding import info.nightscout.androidaps.dana.databinding.DanarHistoryItemBinding -import info.nightscout.androidaps.events.EventDanaRSyncStatus import info.nightscout.androidaps.events.EventPumpStatusChanged import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.events.EventDanaRSyncStatus +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign -import java.util.* import javax.inject.Inject class DanaHistoryActivity : NoSplashAppCompatActivity() { diff --git a/pump/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaUserOptionsActivity.kt b/pump/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaUserOptionsActivity.kt index 2e217293d2..dba95d41e8 100644 --- a/pump/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaUserOptionsActivity.kt +++ b/pump/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaUserOptionsActivity.kt @@ -7,15 +7,15 @@ import info.nightscout.androidaps.activities.NoSplashAppCompatActivity import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.dana.R import info.nightscout.androidaps.dana.databinding.DanarUserOptionsActivityBinding -import info.nightscout.androidaps.events.EventInitializationChanged import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ActivityNames import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.events.EventInitializationChanged +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.text.DecimalFormat diff --git a/pump/dana/src/main/java/info/nightscout/androidaps/dana/events/EventDanaRNewStatus.kt b/pump/dana/src/main/java/info/nightscout/androidaps/dana/events/EventDanaRNewStatus.kt index f022e5b128..2471a59e66 100644 --- a/pump/dana/src/main/java/info/nightscout/androidaps/dana/events/EventDanaRNewStatus.kt +++ b/pump/dana/src/main/java/info/nightscout/androidaps/dana/events/EventDanaRNewStatus.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.dana.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventDanaRNewStatus : Event() diff --git a/pump/dana/src/test/java/info/nightscout/androidaps/TestBase.kt b/pump/dana/src/test/java/info/nightscout/androidaps/TestBase.kt index 3d78d1b4f6..b4c68bf8b5 100644 --- a/pump/dana/src/test/java/info/nightscout/androidaps/TestBase.kt +++ b/pump/dana/src/test/java/info/nightscout/androidaps/TestBase.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps -import info.nightscout.shared.logging.AAPSLoggerTest -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.rx.TestAapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.shared.logging.AAPSLoggerTest import org.junit.Before import org.junit.Rule import org.mockito.Mockito diff --git a/pump/dana/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt b/pump/dana/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt index 9f7ca05400..372a9ae90b 100644 --- a/pump/dana/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt +++ b/pump/dana/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt @@ -9,11 +9,11 @@ import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ProfileStore -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus import org.json.JSONObject import org.junit.Before import org.mockito.Mock diff --git a/pump/danar/build.gradle b/pump/danar/build.gradle index 9e4191877d..1133e24ce4 100644 --- a/pump/danar/build.gradle +++ b/pump/danar/build.gradle @@ -13,7 +13,8 @@ android { } dependencies { - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') implementation project(':core') implementation project(':pump:dana') } \ No newline at end of file diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/DanaRKoreanPlugin.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/DanaRKoreanPlugin.kt index e5d6e3ddfd..19e0d06456 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/DanaRKoreanPlugin.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/DanaRKoreanPlugin.kt @@ -12,21 +12,26 @@ import info.nightscout.androidaps.danar.AbstractDanaRPlugin import info.nightscout.androidaps.danar.R import info.nightscout.androidaps.data.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResult -import info.nightscout.androidaps.events.EventAppExit import info.nightscout.androidaps.events.EventPreferenceChange -import info.nightscout.androidaps.interfaces.* -import info.nightscout.androidaps.interfaces.PumpSync.TemporaryBasalType -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.CommandQueue +import info.nightscout.androidaps.interfaces.Constraint import info.nightscout.androidaps.interfaces.Constraints +import info.nightscout.androidaps.interfaces.PluginType +import info.nightscout.androidaps.interfaces.Profile +import info.nightscout.androidaps.interfaces.PumpSync +import info.nightscout.androidaps.interfaces.PumpSync.TemporaryBasalType +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.Round -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAppExit +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgCheckValue_k.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgCheckValue_k.kt index 10b44fc242..5f8f322d97 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgCheckValue_k.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgCheckValue_k.kt @@ -3,7 +3,8 @@ package info.nightscout.androidaps.danaRKorean.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danar.comm.MessageBase -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgCheckValue_k( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgInitConnStatusBasic_k.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgInitConnStatusBasic_k.kt index 8097707145..d712f57753 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgInitConnStatusBasic_k.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgInitConnStatusBasic_k.kt @@ -3,10 +3,10 @@ package info.nightscout.androidaps.danaRKorean.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.R import info.nightscout.androidaps.danar.comm.MessageBase -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification +import info.nightscout.rx.logging.LTag class MsgInitConnStatusBasic_k( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgInitConnStatusBolus_k.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgInitConnStatusBolus_k.kt index 015c7fb7f3..6a2cf180b6 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgInitConnStatusBolus_k.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgInitConnStatusBolus_k.kt @@ -3,10 +3,10 @@ package info.nightscout.androidaps.danaRKorean.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.R import info.nightscout.androidaps.danar.comm.MessageBase -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification +import info.nightscout.rx.logging.LTag class MsgInitConnStatusBolus_k( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgInitConnStatusTime_k.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgInitConnStatusTime_k.kt index 67b6f7a78d..d033dd4224 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgInitConnStatusTime_k.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgInitConnStatusTime_k.kt @@ -3,11 +3,11 @@ package info.nightscout.androidaps.danaRKorean.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.R import info.nightscout.androidaps.danar.comm.MessageBase -import info.nightscout.androidaps.events.EventRebuildTabs import info.nightscout.androidaps.interfaces.PluginType -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification +import info.nightscout.rx.events.EventRebuildTabs +import info.nightscout.rx.logging.LTag class MsgInitConnStatusTime_k( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgSettingBasalProfileAll_k.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgSettingBasalProfileAll_k.kt index 40376ff409..fe92b5103d 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgSettingBasalProfileAll_k.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgSettingBasalProfileAll_k.kt @@ -2,8 +2,8 @@ package info.nightscout.androidaps.danaRKorean.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.comm.MessageBase -import info.nightscout.shared.logging.LTag -import java.util.* +import info.nightscout.rx.logging.LTag +import java.util.Locale /** * Created by mike on 05.07.2016. diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgSettingBasal_k.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgSettingBasal_k.kt index d82af226a8..02a8b7afc8 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgSettingBasal_k.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgSettingBasal_k.kt @@ -2,8 +2,8 @@ package info.nightscout.androidaps.danaRKorean.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.comm.MessageBase -import info.nightscout.shared.logging.LTag -import java.util.* +import info.nightscout.rx.logging.LTag +import java.util.Locale class MsgSettingBasal_k( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgStatusBasic_k.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgStatusBasic_k.kt index 65f29325a5..d58c76b17b 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgStatusBasic_k.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgStatusBasic_k.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.danaRKorean.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.comm.MessageBase -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgStatusBasic_k( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgStatus_k.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgStatus_k.kt index 5e180cfdcc..3a5b7fe043 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgStatus_k.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/comm/MsgStatus_k.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.danaRKorean.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.comm.MessageBase -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgStatus_k( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/services/DanaRKoreanExecutionService.java b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/services/DanaRKoreanExecutionService.java index 1327d5aa85..2ec952dd19 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/services/DanaRKoreanExecutionService.java +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/services/DanaRKoreanExecutionService.java @@ -37,20 +37,16 @@ import info.nightscout.androidaps.danar.comm.MsgSettingShippingInfo; import info.nightscout.androidaps.danar.comm.MsgStatusBolusExtended; import info.nightscout.androidaps.danar.comm.MsgStatusTempBasal; import info.nightscout.androidaps.danar.services.AbstractDanaRExecutionService; -import info.nightscout.androidaps.interfaces.Constraints; -import info.nightscout.androidaps.interfaces.Profile; import info.nightscout.androidaps.data.PumpEnactResult; import info.nightscout.androidaps.dialogs.BolusProgressDialog; -import info.nightscout.androidaps.events.EventInitializationChanged; -import info.nightscout.androidaps.events.EventProfileSwitchChanged; import info.nightscout.androidaps.events.EventPumpStatusChanged; import info.nightscout.androidaps.interfaces.ActivePlugin; import info.nightscout.androidaps.interfaces.CommandQueue; +import info.nightscout.androidaps.interfaces.Constraints; +import info.nightscout.androidaps.interfaces.Profile; import info.nightscout.androidaps.interfaces.ProfileFunction; import info.nightscout.androidaps.interfaces.PumpSync; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.bus.RxBus; +import info.nightscout.androidaps.interfaces.ResourceHelper; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress; import info.nightscout.androidaps.plugins.general.overview.notifications.Notification; @@ -58,7 +54,11 @@ import info.nightscout.androidaps.plugins.pump.common.defs.PumpType; import info.nightscout.androidaps.queue.commands.Command; import info.nightscout.androidaps.utils.DateUtil; import info.nightscout.androidaps.utils.T; -import info.nightscout.androidaps.interfaces.ResourceHelper; +import info.nightscout.rx.bus.RxBus; +import info.nightscout.rx.events.EventInitializationChanged; +import info.nightscout.rx.events.EventProfileSwitchChanged; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; public class DanaRKoreanExecutionService extends AbstractDanaRExecutionService { @Inject AAPSLogger aapsLogger; diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java index 3bd6c48967..6e6ef7c41d 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java @@ -18,7 +18,6 @@ import info.nightscout.androidaps.danar.AbstractDanaRPlugin; import info.nightscout.androidaps.danar.R; import info.nightscout.androidaps.data.DetailedBolusInfo; import info.nightscout.androidaps.data.PumpEnactResult; -import info.nightscout.androidaps.events.EventAppExit; import info.nightscout.androidaps.interfaces.ActivePlugin; import info.nightscout.androidaps.interfaces.CommandQueue; import info.nightscout.androidaps.interfaces.Constraint; @@ -26,7 +25,6 @@ import info.nightscout.androidaps.interfaces.Constraints; import info.nightscout.androidaps.interfaces.Profile; import info.nightscout.androidaps.interfaces.PumpSync; import info.nightscout.androidaps.interfaces.ResourceHelper; -import info.nightscout.androidaps.plugins.bus.RxBus; import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress; import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage; import info.nightscout.androidaps.plugins.pump.common.bolusInfo.TemporaryBasalStorage; @@ -35,9 +33,11 @@ import info.nightscout.androidaps.utils.DateUtil; import info.nightscout.androidaps.utils.FabricPrivacy; import info.nightscout.androidaps.utils.Round; import info.nightscout.androidaps.utils.T; -import info.nightscout.androidaps.utils.rx.AapsSchedulers; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.AapsSchedulers; +import info.nightscout.rx.bus.RxBus; +import info.nightscout.rx.events.EventAppExit; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import info.nightscout.shared.sharedPreferences.SP; import io.reactivex.rxjava3.disposables.CompositeDisposable; diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgCheckValue_v2.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgCheckValue_v2.kt index 4a04364a2c..a78a231f4b 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgCheckValue_v2.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgCheckValue_v2.kt @@ -4,11 +4,11 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danar.R import info.nightscout.androidaps.danar.comm.MessageBase -import info.nightscout.androidaps.events.EventRebuildTabs import info.nightscout.androidaps.interfaces.PluginType -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification +import info.nightscout.rx.events.EventRebuildTabs +import info.nightscout.rx.logging.LTag class MsgCheckValue_v2( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgHistoryEventsV2.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgHistoryEventsV2.kt index 3e3f0b2b06..b95a2f85f0 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgHistoryEventsV2.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgHistoryEventsV2.kt @@ -5,10 +5,10 @@ import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danar.R import info.nightscout.androidaps.danar.comm.MessageBase import info.nightscout.androidaps.events.EventPumpStatusChanged -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.utils.T -import java.util.* +import info.nightscout.rx.logging.LTag +import java.util.GregorianCalendar class MsgHistoryEventsV2 constructor( injector: HasAndroidInjector, diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgSetAPSTempBasalStart_v2.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgSetAPSTempBasalStart_v2.kt index b89791cc54..34fdda4d31 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgSetAPSTempBasalStart_v2.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgSetAPSTempBasalStart_v2.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.danaRv2.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.comm.MessageBase -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + @Suppress("UNUSED_PARAMETER") class MsgSetAPSTempBasalStart_v2( diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgSetHistoryEntry_v2.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgSetHistoryEntry_v2.kt index 4520925e82..11ca0f16fc 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgSetHistoryEntry_v2.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgSetHistoryEntry_v2.kt @@ -2,8 +2,9 @@ package info.nightscout.androidaps.danaRv2.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.comm.MessageBase -import info.nightscout.shared.logging.LTag -import java.util.* +import info.nightscout.rx.logging.LTag +import java.util.Date +import java.util.GregorianCalendar class MsgSetHistoryEntry_v2( injector: HasAndroidInjector, diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgStatusAPS_v2.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgStatusAPS_v2.kt index a8f6d4ce7d..368f5a835a 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgStatusAPS_v2.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/comm/MsgStatusAPS_v2.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.danaRv2.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.comm.MessageBase -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgStatusAPS_v2( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/services/DanaRv2ExecutionService.java b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/services/DanaRv2ExecutionService.java index 6970322926..2e22bbd6ab 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/services/DanaRv2ExecutionService.java +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/services/DanaRv2ExecutionService.java @@ -51,8 +51,6 @@ import info.nightscout.androidaps.danar.comm.MsgStatusTempBasal; import info.nightscout.androidaps.danar.services.AbstractDanaRExecutionService; import info.nightscout.androidaps.data.PumpEnactResult; import info.nightscout.androidaps.dialogs.BolusProgressDialog; -import info.nightscout.androidaps.events.EventInitializationChanged; -import info.nightscout.androidaps.events.EventProfileSwitchChanged; import info.nightscout.androidaps.events.EventPumpStatusChanged; import info.nightscout.androidaps.interfaces.ActivePlugin; import info.nightscout.androidaps.interfaces.ActivityNames; @@ -62,7 +60,6 @@ import info.nightscout.androidaps.interfaces.ProfileFunction; import info.nightscout.androidaps.interfaces.Pump; import info.nightscout.androidaps.interfaces.PumpSync; import info.nightscout.androidaps.interfaces.ResourceHelper; -import info.nightscout.androidaps.plugins.bus.RxBus; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress; import info.nightscout.androidaps.plugins.general.overview.notifications.Notification; @@ -71,8 +68,11 @@ import info.nightscout.androidaps.queue.Callback; import info.nightscout.androidaps.queue.commands.Command; import info.nightscout.androidaps.utils.DateUtil; import info.nightscout.androidaps.utils.T; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.bus.RxBus; +import info.nightscout.rx.events.EventInitializationChanged; +import info.nightscout.rx.events.EventProfileSwitchChanged; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import info.nightscout.shared.sharedPreferences.SP; public class DanaRv2ExecutionService extends AbstractDanaRExecutionService { diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/AbstractDanaRPlugin.java b/pump/danar/src/main/java/info/nightscout/androidaps/danar/AbstractDanaRPlugin.java index 1be361b923..39d0e78af3 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/AbstractDanaRPlugin.java +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/AbstractDanaRPlugin.java @@ -11,7 +11,6 @@ import info.nightscout.androidaps.dana.DanaPump; import info.nightscout.androidaps.dana.comm.RecordTypes; import info.nightscout.androidaps.danar.services.AbstractDanaRExecutionService; import info.nightscout.androidaps.data.PumpEnactResult; -import info.nightscout.androidaps.events.EventConfigBuilderChange; import info.nightscout.androidaps.events.EventPreferenceChange; import info.nightscout.androidaps.extensions.PumpStateExtensionKt; import info.nightscout.androidaps.interfaces.ActivePlugin; @@ -27,7 +26,6 @@ import info.nightscout.androidaps.interfaces.PumpDescription; import info.nightscout.androidaps.interfaces.PumpPluginBase; import info.nightscout.androidaps.interfaces.PumpSync; import info.nightscout.androidaps.interfaces.ResourceHelper; -import info.nightscout.androidaps.plugins.bus.RxBus; import info.nightscout.androidaps.plugins.common.ManufacturerType; import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; @@ -35,9 +33,11 @@ import info.nightscout.androidaps.plugins.general.overview.notifications.Notific import info.nightscout.androidaps.utils.DateUtil; import info.nightscout.androidaps.utils.DecimalFormatter; import info.nightscout.androidaps.utils.Round; -import info.nightscout.androidaps.utils.rx.AapsSchedulers; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.AapsSchedulers; +import info.nightscout.rx.bus.RxBus; +import info.nightscout.rx.events.EventConfigBuilderChange; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import info.nightscout.shared.sharedPreferences.SP; import io.reactivex.rxjava3.disposables.CompositeDisposable; diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/DanaRPlugin.java b/pump/danar/src/main/java/info/nightscout/androidaps/danar/DanaRPlugin.java index bf86382b95..5f0731b39b 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/DanaRPlugin.java +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/DanaRPlugin.java @@ -16,7 +16,6 @@ import info.nightscout.androidaps.dana.DanaPump; import info.nightscout.androidaps.danar.services.DanaRExecutionService; import info.nightscout.androidaps.data.DetailedBolusInfo; import info.nightscout.androidaps.data.PumpEnactResult; -import info.nightscout.androidaps.events.EventAppExit; import info.nightscout.androidaps.events.EventPreferenceChange; import info.nightscout.androidaps.interfaces.ActivePlugin; import info.nightscout.androidaps.interfaces.CommandQueue; @@ -26,15 +25,16 @@ import info.nightscout.androidaps.interfaces.PluginType; import info.nightscout.androidaps.interfaces.Profile; import info.nightscout.androidaps.interfaces.PumpSync; import info.nightscout.androidaps.interfaces.ResourceHelper; -import info.nightscout.androidaps.plugins.bus.RxBus; import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress; import info.nightscout.androidaps.plugins.pump.common.defs.PumpType; import info.nightscout.androidaps.utils.DateUtil; import info.nightscout.androidaps.utils.FabricPrivacy; import info.nightscout.androidaps.utils.Round; -import info.nightscout.androidaps.utils.rx.AapsSchedulers; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.AapsSchedulers; +import info.nightscout.rx.bus.RxBus; +import info.nightscout.rx.events.EventAppExit; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import info.nightscout.shared.sharedPreferences.SP; import io.reactivex.rxjava3.disposables.CompositeDisposable; diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/SerialIOThread.java b/pump/danar/src/main/java/info/nightscout/androidaps/danar/SerialIOThread.java index 41da73946c..bd2cdb7168 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/SerialIOThread.java +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/SerialIOThread.java @@ -10,9 +10,9 @@ import java.io.OutputStream; import info.nightscout.androidaps.dana.DanaPump; import info.nightscout.androidaps.danar.comm.MessageBase; import info.nightscout.androidaps.danar.comm.MessageHashTableBase; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.utils.CRC; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; /** * Created by mike on 17.07.2016. diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MessageBase.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MessageBase.kt index c59a6d7889..554815e734 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MessageBase.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MessageBase.kt @@ -10,20 +10,21 @@ import info.nightscout.androidaps.danar.comm.MessageOriginalNames.getName import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.ConfigBuilder -import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.interfaces.Constraints +import info.nightscout.androidaps.interfaces.PumpSync +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage import info.nightscout.androidaps.plugins.pump.common.bolusInfo.TemporaryBasalStorage import info.nightscout.androidaps.utils.CRC.getCrc16 import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import org.joda.time.DateTime import org.joda.time.IllegalInstantException import java.nio.charset.StandardCharsets -import java.util.* +import java.util.Calendar +import java.util.GregorianCalendar import javax.inject.Inject /* diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgBolusProgress.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgBolusProgress.kt index a169b5a0fe..7bdf3c78dd 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgBolusProgress.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgBolusProgress.kt @@ -2,8 +2,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.R -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress +import info.nightscout.rx.logging.LTag import kotlin.math.min class MsgBolusProgress( diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgBolusStart.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgBolusStart.kt index 3be1ee030c..c58098684a 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgBolusStart.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgBolusStart.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.interfaces.Constraint -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgBolusStart( injector: HasAndroidInjector, diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgBolusStartWithSpeed.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgBolusStartWithSpeed.kt index 184ac266ae..e5fefdc791 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgBolusStartWithSpeed.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgBolusStartWithSpeed.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.interfaces.Constraint -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgBolusStartWithSpeed( injector: HasAndroidInjector, diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgBolusStop.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgBolusStop.kt index 1393a6319e..ded96cb4ba 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgBolusStop.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgBolusStop.kt @@ -2,8 +2,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.R -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress +import info.nightscout.rx.logging.LTag class MsgBolusStop( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgCheckValue.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgCheckValue.kt index 613549ebbf..3aef5c1e38 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgCheckValue.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgCheckValue.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.dana.DanaPump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgCheckValue( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgError.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgError.kt index fbbc7600f8..46f762f0b8 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgError.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgError.kt @@ -2,8 +2,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.R -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress +import info.nightscout.rx.logging.LTag class MsgError( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryAlarm.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryAlarm.kt index 726a2705f5..80489a8134 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryAlarm.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryAlarm.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgHistoryAlarm( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryAll.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryAll.kt index 8946d93d7d..5a83ae6159 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryAll.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryAll.kt @@ -3,9 +3,9 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.dana.comm.RecordTypes import info.nightscout.androidaps.dana.database.DanaHistoryRecord -import info.nightscout.androidaps.events.EventDanaRSyncStatus -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.utils.T +import info.nightscout.rx.events.EventDanaRSyncStatus +import info.nightscout.rx.logging.LTag open class MsgHistoryAll( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryAllDone.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryAllDone.kt index 41fc852480..55529da66c 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryAllDone.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryAllDone.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgHistoryAllDone( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryBasalHour.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryBasalHour.kt index 9167377efb..a8f0da1a20 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryBasalHour.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryBasalHour.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgHistoryBasalHour( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryBolus.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryBolus.kt index 1d67099a84..3ba91a0a75 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryBolus.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryBolus.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgHistoryBolus( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryCarbo.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryCarbo.kt index cdaa47e279..8613738b23 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryCarbo.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryCarbo.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgHistoryCarbo( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryDailyInsulin.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryDailyInsulin.kt index 9788da4e77..5f866146eb 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryDailyInsulin.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryDailyInsulin.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgHistoryDailyInsulin( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryDone.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryDone.kt index d9e705650d..1945c0a8c5 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryDone.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryDone.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgHistoryDone( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryError.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryError.kt index ba4aba7520..90a953adbd 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryError.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryError.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgHistoryError( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryGlucose.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryGlucose.kt index 8ae08e757a..af08085807 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryGlucose.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryGlucose.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgHistoryGlucose( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryNew.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryNew.kt index 2bca4a994d..559665fe11 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryNew.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryNew.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgHistoryNew( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryNewDone.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryNewDone.kt index 3897cb090d..116b3e04f8 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryNewDone.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryNewDone.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgHistoryNewDone( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryRefill.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryRefill.kt index dc87964c01..d5c597c9ce 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryRefill.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistoryRefill.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgHistoryRefill( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistorySuspend.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistorySuspend.kt index a739778eda..f81704d36e 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistorySuspend.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgHistorySuspend.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgHistorySuspend( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgInitConnStatusBasic.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgInitConnStatusBasic.kt index 53d45b38f1..57924b2432 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgInitConnStatusBasic.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgInitConnStatusBasic.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgInitConnStatusBasic( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgInitConnStatusBolus.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgInitConnStatusBolus.kt index ae2e2a0f14..0df624d6e2 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgInitConnStatusBolus.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgInitConnStatusBolus.kt @@ -2,10 +2,10 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.R -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification +import info.nightscout.rx.logging.LTag class MsgInitConnStatusBolus( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgInitConnStatusOption.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgInitConnStatusOption.kt index 40bbdbb4c3..76e400a6cf 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgInitConnStatusOption.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgInitConnStatusOption.kt @@ -2,10 +2,10 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.R -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification +import info.nightscout.rx.logging.LTag class MsgInitConnStatusOption( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgInitConnStatusTime.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgInitConnStatusTime.kt index 4da82df223..b6eb7083f1 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgInitConnStatusTime.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgInitConnStatusTime.kt @@ -2,11 +2,11 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.R -import info.nightscout.androidaps.events.EventRebuildTabs import info.nightscout.androidaps.interfaces.PluginType -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification +import info.nightscout.rx.events.EventRebuildTabs +import info.nightscout.rx.logging.LTag class MsgInitConnStatusTime( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgPCCommStart.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgPCCommStart.kt index 4e5c7881f0..c7a629c7d6 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgPCCommStart.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgPCCommStart.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgPCCommStart constructor( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgPCCommStop.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgPCCommStop.kt index 35eca2ee56..40b08fc27b 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgPCCommStop.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgPCCommStop.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgPCCommStop( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetActivateBasalProfile.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetActivateBasalProfile.kt index d86d212f7d..399c5f2ffd 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetActivateBasalProfile.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetActivateBasalProfile.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgSetActivateBasalProfile( injector: HasAndroidInjector, diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetBasalProfile.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetBasalProfile.kt index 40bf1582b2..b8df7c6a66 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetBasalProfile.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetBasalProfile.kt @@ -2,9 +2,9 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.R -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification +import info.nightscout.rx.logging.LTag class MsgSetBasalProfile( injector: HasAndroidInjector, diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetCarbsEntry.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetCarbsEntry.kt index 1c94f1fd03..ffb0301551 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetCarbsEntry.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetCarbsEntry.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag -import java.util.* +import info.nightscout.rx.logging.LTag +import java.util.Calendar class MsgSetCarbsEntry( injector: HasAndroidInjector, diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetExtendedBolusStart.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetExtendedBolusStart.kt index 16faf09825..ac9735ac6a 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetExtendedBolusStart.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetExtendedBolusStart.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.interfaces.Constraint -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgSetExtendedBolusStart( injector: HasAndroidInjector, diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetExtendedBolusStop.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetExtendedBolusStop.kt index 1cdf88cc59..8423bc45c9 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetExtendedBolusStop.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetExtendedBolusStop.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgSetExtendedBolusStop( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetSingleBasalProfile.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetSingleBasalProfile.kt index d0c4a2477e..992ab818db 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetSingleBasalProfile.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetSingleBasalProfile.kt @@ -2,9 +2,9 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.R -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification +import info.nightscout.rx.logging.LTag class MsgSetSingleBasalProfile( injector: HasAndroidInjector, diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetTempBasalStart.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetTempBasalStart.kt index e7c4324a47..50499526ad 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetTempBasalStart.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetTempBasalStart.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgSetTempBasalStart( injector: HasAndroidInjector, diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetTempBasalStop.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetTempBasalStop.kt index 42d40cbc82..6e2951518d 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetTempBasalStop.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetTempBasalStop.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgSetTempBasalStop( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetTime.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetTime.kt index aa938a46f5..bd98b2d6ae 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetTime.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetTime.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgSetTime( injector: HasAndroidInjector, diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetUserOptions.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetUserOptions.kt index dad025aac3..afde1356eb 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetUserOptions.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSetUserOptions.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgSetUserOptions( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingActiveProfile.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingActiveProfile.kt index e0a8847906..ad3215983b 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingActiveProfile.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingActiveProfile.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgSettingActiveProfile( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingBasal.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingBasal.kt index ce9ceb7c0f..2d3b90ab53 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingBasal.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingBasal.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag -import java.util.* +import info.nightscout.rx.logging.LTag +import java.util.Locale class MsgSettingBasal( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingBasalProfileAll.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingBasalProfileAll.kt index 68fc2d854a..36b610420e 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingBasalProfileAll.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingBasalProfileAll.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag -import java.util.* +import info.nightscout.rx.logging.LTag +import java.util.Locale /** * Created by mike on 05.07.2016. diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingGlucose.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingGlucose.kt index 48d81317c7..89f0fb65ce 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingGlucose.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingGlucose.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.dana.DanaPump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + /** * Created by mike on 05.07.2016. diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingMaxValues.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingMaxValues.kt index 09bf49c133..749ed9a9e4 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingMaxValues.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingMaxValues.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgSettingMaxValues( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingMeal.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingMeal.kt index a4961ca12d..80477946c1 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingMeal.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingMeal.kt @@ -2,10 +2,10 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danar.R -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification +import info.nightscout.rx.logging.LTag class MsgSettingMeal( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingProfileRatios.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingProfileRatios.kt index 2448b3fdd3..3698d1a48b 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingProfileRatios.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingProfileRatios.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.dana.DanaPump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgSettingProfileRatios( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingProfileRatiosAll.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingProfileRatiosAll.kt index 2b921da8ae..dccf7b9237 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingProfileRatiosAll.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingProfileRatiosAll.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.dana.DanaPump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgSettingProfileRatiosAll( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingPumpTime.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingPumpTime.kt index 31c3b121fa..71f5517662 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingPumpTime.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingPumpTime.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag import org.joda.time.DateTime -import java.util.* +import java.util.Date class MsgSettingPumpTime( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingShippingInfo.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingShippingInfo.kt index 38ff9b2fe4..eaed028223 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingShippingInfo.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingShippingInfo.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgSettingShippingInfo( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingUserOptions.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingUserOptions.kt index e8e602a338..5d61e76685 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingUserOptions.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgSettingUserOptions.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgSettingUserOptions( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatus.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatus.kt index dc96ebda6c..55941198a9 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatus.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatus.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgStatus( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatusBasic.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatusBasic.kt index ccc3f2f0c9..8320a7c03a 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatusBasic.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatusBasic.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgStatusBasic( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatusBolusExtended.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatusBolusExtended.kt index e086368a0f..ef288f8795 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatusBolusExtended.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatusBolusExtended.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.utils.T +import info.nightscout.rx.logging.LTag import kotlin.math.abs import kotlin.math.floor diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatusProfile.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatusProfile.kt index b6344791bf..9b352de990 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatusProfile.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatusProfile.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.dana.DanaPump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class MsgStatusProfile( injector: HasAndroidInjector diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatusTempBasal.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatusTempBasal.kt index 5314201e81..0f79a42c0c 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatusTempBasal.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/comm/MsgStatusTempBasal.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danar.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.utils.T +import info.nightscout.rx.logging.LTag import kotlin.math.abs import kotlin.math.floor diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/services/AbstractDanaRExecutionService.java b/pump/danar/src/main/java/info/nightscout/androidaps/danar/services/AbstractDanaRExecutionService.java index b582e829fd..dda4b6c543 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/services/AbstractDanaRExecutionService.java +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/services/AbstractDanaRExecutionService.java @@ -40,23 +40,23 @@ import info.nightscout.androidaps.danar.comm.MsgHistorySuspend; import info.nightscout.androidaps.danar.comm.MsgPCCommStart; import info.nightscout.androidaps.danar.comm.MsgPCCommStop; import info.nightscout.androidaps.data.PumpEnactResult; -import info.nightscout.androidaps.events.EventAppExit; -import info.nightscout.androidaps.events.EventBTChange; import info.nightscout.androidaps.events.EventPumpStatusChanged; import info.nightscout.androidaps.interfaces.ActivePlugin; import info.nightscout.androidaps.interfaces.Profile; import info.nightscout.androidaps.interfaces.PumpSync; import info.nightscout.androidaps.interfaces.ResourceHelper; -import info.nightscout.androidaps.plugins.bus.RxBus; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress; import info.nightscout.androidaps.plugins.general.overview.notifications.Notification; import info.nightscout.androidaps.utils.DateUtil; import info.nightscout.androidaps.utils.FabricPrivacy; import info.nightscout.androidaps.utils.ToastUtils; -import info.nightscout.androidaps.utils.rx.AapsSchedulers; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.AapsSchedulers; +import info.nightscout.rx.bus.RxBus; +import info.nightscout.rx.events.EventAppExit; +import info.nightscout.rx.events.EventBTChange; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import info.nightscout.shared.sharedPreferences.SP; import io.reactivex.rxjava3.disposables.CompositeDisposable; diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/services/DanaRExecutionService.java b/pump/danar/src/main/java/info/nightscout/androidaps/danar/services/DanaRExecutionService.java index e920f2205f..cde870add4 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/services/DanaRExecutionService.java +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/services/DanaRExecutionService.java @@ -44,25 +44,25 @@ import info.nightscout.androidaps.danar.comm.MsgStatus; import info.nightscout.androidaps.danar.comm.MsgStatusBasic; import info.nightscout.androidaps.danar.comm.MsgStatusBolusExtended; import info.nightscout.androidaps.danar.comm.MsgStatusTempBasal; -import info.nightscout.androidaps.interfaces.Profile; import info.nightscout.androidaps.data.PumpEnactResult; import info.nightscout.androidaps.dialogs.BolusProgressDialog; -import info.nightscout.androidaps.events.EventInitializationChanged; -import info.nightscout.androidaps.events.EventProfileSwitchChanged; import info.nightscout.androidaps.events.EventPumpStatusChanged; import info.nightscout.androidaps.interfaces.CommandQueue; +import info.nightscout.androidaps.interfaces.Profile; import info.nightscout.androidaps.interfaces.ProfileFunction; import info.nightscout.androidaps.interfaces.PumpSync; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.bus.RxBus; +import info.nightscout.androidaps.interfaces.ResourceHelper; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress; import info.nightscout.androidaps.plugins.general.overview.notifications.Notification; import info.nightscout.androidaps.plugins.pump.common.defs.PumpType; import info.nightscout.androidaps.queue.Callback; import info.nightscout.androidaps.queue.commands.Command; -import info.nightscout.androidaps.interfaces.ResourceHelper; +import info.nightscout.rx.bus.RxBus; +import info.nightscout.rx.events.EventInitializationChanged; +import info.nightscout.rx.events.EventProfileSwitchChanged; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import info.nightscout.shared.sharedPreferences.SP; public class DanaRExecutionService extends AbstractDanaRExecutionService { diff --git a/pump/danar/src/test/java/info/nightscout/androidaps/TestBase.kt b/pump/danar/src/test/java/info/nightscout/androidaps/TestBase.kt index 57aca0507a..e4d3c51234 100644 --- a/pump/danar/src/test/java/info/nightscout/androidaps/TestBase.kt +++ b/pump/danar/src/test/java/info/nightscout/androidaps/TestBase.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps -import info.nightscout.shared.logging.AAPSLoggerTest -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.rx.TestAapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.shared.logging.AAPSLoggerTest import org.junit.Before import org.junit.Rule import org.mockito.Mockito diff --git a/pump/danar/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt b/pump/danar/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt index 2f763bb49d..4f057d84a9 100644 --- a/pump/danar/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt +++ b/pump/danar/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt @@ -10,10 +10,10 @@ import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ProfileStore -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus import org.json.JSONObject import org.junit.Before import org.mockito.ArgumentMatchers.anyDouble diff --git a/pump/danar/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/DanaRTestBase.kt b/pump/danar/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/DanaRTestBase.kt index 98f0b9c7ea..ee4b61e091 100644 --- a/pump/danar/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/DanaRTestBase.kt +++ b/pump/danar/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/DanaRTestBase.kt @@ -13,20 +13,20 @@ import info.nightscout.androidaps.danar.comm.MessageBase import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.ConfigBuilder +import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.interfaces.Constraints +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import org.junit.Before import org.mockito.ArgumentMatchers import org.mockito.Mock -import org.mockito.Mockito.`when` import org.mockito.Mockito.anyBoolean import org.mockito.Mockito.doNothing +import org.mockito.Mockito.`when` open class DanaRTestBase : TestBase() { diff --git a/pump/danars/build.gradle b/pump/danars/build.gradle index 58e9e39714..71e20363e9 100644 --- a/pump/danars/build.gradle +++ b/pump/danars/build.gradle @@ -24,5 +24,6 @@ android { dependencies { implementation project(':core') implementation project(':pump:dana') - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') } \ No newline at end of file diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/DanaRSPlugin.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/DanaRSPlugin.kt index e7fdd5e579..16016d2838 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/DanaRSPlugin.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/DanaRSPlugin.kt @@ -15,16 +15,22 @@ import info.nightscout.androidaps.danars.events.EventDanaRSDeviceChange import info.nightscout.androidaps.danars.services.DanaRSService import info.nightscout.androidaps.data.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResult -import info.nightscout.androidaps.events.EventAppExit -import info.nightscout.androidaps.events.EventConfigBuilderChange import info.nightscout.androidaps.extensions.convertedToAbsolute import info.nightscout.androidaps.extensions.plannedRemainingMinutes -import info.nightscout.androidaps.interfaces.* -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.plugins.common.ManufacturerType +import info.nightscout.androidaps.interfaces.CommandQueue +import info.nightscout.androidaps.interfaces.Constraint import info.nightscout.androidaps.interfaces.Constraints +import info.nightscout.androidaps.interfaces.Dana +import info.nightscout.androidaps.interfaces.PluginDescription +import info.nightscout.androidaps.interfaces.PluginType +import info.nightscout.androidaps.interfaces.Profile +import info.nightscout.androidaps.interfaces.ProfileFunction +import info.nightscout.androidaps.interfaces.Pump +import info.nightscout.androidaps.interfaces.PumpDescription +import info.nightscout.androidaps.interfaces.PumpPluginBase +import info.nightscout.androidaps.interfaces.PumpSync +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.common.ManufacturerType import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress @@ -32,10 +38,18 @@ import info.nightscout.androidaps.plugins.general.overview.notifications.Notific import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage import info.nightscout.androidaps.plugins.pump.common.bolusInfo.TemporaryBasalStorage import info.nightscout.androidaps.plugins.pump.common.defs.PumpType -import info.nightscout.androidaps.utils.* +import info.nightscout.androidaps.utils.DateUtil +import info.nightscout.androidaps.utils.DecimalFormatter +import info.nightscout.androidaps.utils.FabricPrivacy +import info.nightscout.androidaps.utils.Round import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.androidaps.utils.ToastUtils +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAppExit +import info.nightscout.rx.events.EventConfigBuilderChange +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/activities/EnterPinActivity.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/activities/EnterPinActivity.kt index eca503acf5..a6ea3fd30d 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/activities/EnterPinActivity.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/activities/EnterPinActivity.kt @@ -8,14 +8,13 @@ import info.nightscout.androidaps.danars.R import info.nightscout.androidaps.danars.databinding.DanarsEnterPinActivityBinding import info.nightscout.androidaps.danars.services.BLEComm import info.nightscout.androidaps.events.EventPumpStatusChanged -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.extensions.hexStringToByteArray import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.extensions.hexStringToByteArray -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.sharedPreferences.SP import info.nightscout.androidaps.utils.textValidator.DefaultEditTextValidator import info.nightscout.androidaps.utils.textValidator.EditTextValidator +import info.nightscout.rx.AapsSchedulers +import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import javax.inject.Inject import kotlin.experimental.xor diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacket.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacket.kt index 1978e61ba0..4a84198bd2 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacket.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacket.kt @@ -2,8 +2,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danars.encryption.BleEncryption -import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.utils.DateUtil +import info.nightscout.rx.logging.AAPSLogger import org.joda.time.DateTime import org.joda.time.IllegalInstantException import java.nio.charset.StandardCharsets diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketAPSBasalSetTemporaryBasal.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketAPSBasalSetTemporaryBasal.kt index c19cd426ff..285402832b 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketAPSBasalSetTemporaryBasal.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketAPSBasalSetTemporaryBasal.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketAPSBasalSetTemporaryBasal( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketAPSHistoryEvents.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketAPSHistoryEvents.kt index 12e5fb594f..8f439820e3 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketAPSHistoryEvents.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketAPSHistoryEvents.kt @@ -7,12 +7,12 @@ import info.nightscout.androidaps.danars.encryption.BleEncryption import info.nightscout.androidaps.data.DetailedBolusInfo import info.nightscout.androidaps.events.EventPumpStatusChanged import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage import info.nightscout.androidaps.plugins.pump.common.bolusInfo.TemporaryBasalStorage import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.joda.time.DateTime import org.joda.time.DateTimeZone diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketAPSSetEventHistory.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketAPSSetEventHistory.kt index 1e201f3cfb..280615b6ce 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketAPSSetEventHistory.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketAPSSetEventHistory.kt @@ -3,7 +3,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.encryption.BleEncryption -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.joda.time.DateTime import org.joda.time.DateTimeZone import javax.inject.Inject diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalGetBasalRate.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalGetBasalRate.kt index 8a2f944c6f..4a7408d124 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalGetBasalRate.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalGetBasalRate.kt @@ -1,16 +1,16 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector +import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.R -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification -import info.nightscout.androidaps.dana.DanaPump -import info.nightscout.androidaps.danars.encryption.BleEncryption -import info.nightscout.androidaps.interfaces.ResourceHelper -import java.util.* +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.LTag +import java.util.Locale import javax.inject.Inject class DanaRSPacketBasalGetBasalRate( diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalGetProfileNumber.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalGetProfileNumber.kt index abc1fa70ba..5aaa172438 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalGetProfileNumber.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalGetProfileNumber.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag import javax.inject.Inject class DanaRSPacketBasalGetProfileNumber( diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetCancelTemporaryBasal.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetCancelTemporaryBasal.kt index 186914a254..7ca1c49fb5 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetCancelTemporaryBasal.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetCancelTemporaryBasal.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danars.encryption.BleEncryption -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class DanaRSPacketBasalSetCancelTemporaryBasal( injector: HasAndroidInjector diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetProfileBasalRate.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetProfileBasalRate.kt index 9df6dd24d0..d1d1f1e4fd 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetProfileBasalRate.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetProfileBasalRate.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketBasalSetProfileBasalRate( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetProfileNumber.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetProfileNumber.kt index 3d30b61df8..3cd6915fb4 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetProfileNumber.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetProfileNumber.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.danars.encryption.BleEncryption -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class DanaRSPacketBasalSetProfileNumber( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetSuspendOff.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetSuspendOff.kt index f0ffdb2ec8..fc1e0d358f 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetSuspendOff.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetSuspendOff.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketBasalSetSuspendOff( injector: HasAndroidInjector diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetSuspendOn.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetSuspendOn.kt index 3549970df2..6955b602db 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetSuspendOn.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetSuspendOn.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketBasalSetSuspendOn( injector: HasAndroidInjector diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetTemporaryBasal.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetTemporaryBasal.kt index 2d54dfaa9e..076be2541b 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetTemporaryBasal.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBasalSetTemporaryBasal.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag open class DanaRSPacketBasalSetTemporaryBasal( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGet24CIRCFArray.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGet24CIRCFArray.kt index b314156be3..83b892d866 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGet24CIRCFArray.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGet24CIRCFArray.kt @@ -3,7 +3,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.encryption.BleEncryption -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject class DanaRSPacketBolusGet24CIRCFArray( diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGetBolusOption.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGetBolusOption.kt index 26eedd9d47..301fe4308a 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGetBolusOption.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGetBolusOption.kt @@ -1,15 +1,15 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector +import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.R -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification -import info.nightscout.androidaps.dana.DanaPump -import info.nightscout.androidaps.danars.encryption.BleEncryption -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.LTag import javax.inject.Inject class DanaRSPacketBolusGetBolusOption( diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGetCIRCFArray.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGetCIRCFArray.kt index fe47f5515e..9158bd9da1 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGetCIRCFArray.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGetCIRCFArray.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag import javax.inject.Inject class DanaRSPacketBolusGetCIRCFArray( diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGetCalculationInformation.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGetCalculationInformation.kt index 892bc82b22..08f2b2add4 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGetCalculationInformation.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGetCalculationInformation.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag import javax.inject.Inject class DanaRSPacketBolusGetCalculationInformation( diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGetStepBolusInformation.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGetStepBolusInformation.kt index eed9113bd8..6224d85da0 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGetStepBolusInformation.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusGetStepBolusInformation.kt @@ -3,7 +3,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.encryption.BleEncryption -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.joda.time.DateTime import org.joda.time.DateTimeZone import javax.inject.Inject diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSet24CIRCFArray.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSet24CIRCFArray.kt index 4524155535..847840582e 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSet24CIRCFArray.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSet24CIRCFArray.kt @@ -5,7 +5,8 @@ import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.encryption.BleEncryption import info.nightscout.androidaps.interfaces.GlucoseUnit import info.nightscout.androidaps.interfaces.Profile -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject import kotlin.math.round diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetBolusOption.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetBolusOption.kt index a1c8ffac0a..e097bbf62b 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetBolusOption.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetBolusOption.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketBolusSetBolusOption( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetExtendedBolus.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetExtendedBolus.kt index fe402c3544..fa19c1cf8e 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetExtendedBolus.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetExtendedBolus.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketBolusSetExtendedBolus( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetExtendedBolusCancel.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetExtendedBolusCancel.kt index 7286dee126..94faa662b9 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetExtendedBolusCancel.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetExtendedBolusCancel.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketBolusSetExtendedBolusCancel( injector: HasAndroidInjector diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetStepBolusStart.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetStepBolusStart.kt index 14e84ac302..38611f78d4 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetStepBolusStart.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetStepBolusStart.kt @@ -1,11 +1,11 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.interfaces.Constraint -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.androidaps.interfaces.Constraint +import info.nightscout.androidaps.interfaces.Constraints +import info.nightscout.rx.logging.LTag import javax.inject.Inject class DanaRSPacketBolusSetStepBolusStart( diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetStepBolusStop.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetStepBolusStop.kt index 17ee4ca4c3..86444fd654 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetStepBolusStop.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketBolusSetStepBolusStop.kt @@ -1,13 +1,13 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.danars.R -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress import info.nightscout.androidaps.dana.DanaPump +import info.nightscout.androidaps.danars.R import info.nightscout.androidaps.danars.encryption.BleEncryption import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.LTag import javax.inject.Inject open class DanaRSPacketBolusSetStepBolusStop( diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketEtcKeepConnection.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketEtcKeepConnection.kt index 8e1e20724a..b3c65d3217 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketEtcKeepConnection.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketEtcKeepConnection.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketEtcKeepConnection( injector: HasAndroidInjector diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketEtcSetHistorySave.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketEtcSetHistorySave.kt index fa4c4ec319..fa103a851d 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketEtcSetHistorySave.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketEtcSetHistorySave.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketEtcSetHistorySave( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralGetPumpCheck.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralGetPumpCheck.kt index 160bbfa12c..03da7a7472 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralGetPumpCheck.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralGetPumpCheck.kt @@ -1,14 +1,14 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.danars.R -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification -import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.dana.DanaPump +import info.nightscout.androidaps.danars.R import info.nightscout.androidaps.danars.encryption.BleEncryption import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification +import info.nightscout.androidaps.plugins.general.overview.notifications.Notification +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.LTag import javax.inject.Inject class DanaRSPacketGeneralGetPumpCheck( diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralGetShippingInformation.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralGetShippingInformation.kt index ca009b5409..114aa66e28 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralGetShippingInformation.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralGetShippingInformation.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag import javax.inject.Inject class DanaRSPacketGeneralGetShippingInformation( diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralGetShippingVersion.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralGetShippingVersion.kt index 5cae2113f3..3a718f40d1 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralGetShippingVersion.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralGetShippingVersion.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag import java.nio.charset.Charset import javax.inject.Inject diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralGetUserTimeChangeFlag.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralGetUserTimeChangeFlag.kt index 6241fe5962..da516ea008 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralGetUserTimeChangeFlag.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralGetUserTimeChangeFlag.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketGeneralGetUserTimeChangeFlag( injector: HasAndroidInjector diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralInitialScreenInformation.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralInitialScreenInformation.kt index eb6cfbe8b2..264cc408aa 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralInitialScreenInformation.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralInitialScreenInformation.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag import javax.inject.Inject @Suppress("MemberVisibilityCanBePrivate") diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralSetHistoryUploadMode.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralSetHistoryUploadMode.kt index 2410a2b301..7c92263e1e 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralSetHistoryUploadMode.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralSetHistoryUploadMode.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketGeneralSetHistoryUploadMode( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralSetUserTimeChangeFlagClear.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralSetUserTimeChangeFlagClear.kt index 3e1ff8ec61..10070f9e92 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralSetUserTimeChangeFlagClear.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketGeneralSetUserTimeChangeFlagClear.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketGeneralSetUserTimeChangeFlagClear( injector: HasAndroidInjector diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistory.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistory.kt index a02d7fe05b..d82d78d4a2 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistory.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistory.kt @@ -5,13 +5,14 @@ import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.dana.comm.RecordTypes import info.nightscout.androidaps.dana.database.DanaHistoryRecord import info.nightscout.androidaps.dana.database.DanaHistoryRecordDao -import info.nightscout.androidaps.events.EventDanaRSyncStatus import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.T +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventDanaRSyncStatus +import info.nightscout.rx.logging.LTag import org.joda.time.DateTime -import java.util.* +import java.util.Calendar +import java.util.GregorianCalendar import javax.inject.Inject abstract class DanaRSPacketHistory( diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryAlarm.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryAlarm.kt index 897384638c..8fb64cd877 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryAlarm.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryAlarm.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketHistoryAlarm constructor( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryAllHistory.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryAllHistory.kt index 98a500d1fd..0401fa4cfc 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryAllHistory.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryAllHistory.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketHistoryAllHistory( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryBasal.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryBasal.kt index 35ec821e18..f1e82e0513 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryBasal.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryBasal.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketHistoryBasal constructor( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryBloodGlucose.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryBloodGlucose.kt index 2d88305f0a..72f9b9119e 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryBloodGlucose.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryBloodGlucose.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketHistoryBloodGlucose constructor( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryBolus.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryBolus.kt index 4b8be7b7d8..6f5f086c34 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryBolus.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryBolus.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketHistoryBolus constructor( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryCarbohydrate.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryCarbohydrate.kt index 61dac981fe..40e624a3d2 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryCarbohydrate.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryCarbohydrate.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketHistoryCarbohydrate constructor( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryDaily.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryDaily.kt index 87385248f8..22d4c54e41 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryDaily.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryDaily.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketHistoryDaily constructor( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryPrime.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryPrime.kt index 918a2f0d5b..c4651214f2 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryPrime.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryPrime.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketHistoryPrime constructor( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryRefill.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryRefill.kt index 8c92296ca6..eb38e0cefe 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryRefill.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryRefill.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketHistoryRefill constructor( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistorySuspend.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistorySuspend.kt index fb5f0cc2f6..95f5fce5ff 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistorySuspend.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistorySuspend.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketHistorySuspend constructor( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryTemporary.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryTemporary.kt index c3919b9b88..1600c1b9ed 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryTemporary.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketHistoryTemporary.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketHistoryTemporary( injector: HasAndroidInjector, diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketNotifyAlarm.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketNotifyAlarm.kt index d68e90f8ca..d9cc05b81d 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketNotifyAlarm.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketNotifyAlarm.kt @@ -5,11 +5,11 @@ import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.R import info.nightscout.androidaps.danars.encryption.BleEncryption import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.LTag import javax.inject.Inject class DanaRSPacketNotifyAlarm( diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketNotifyDeliveryComplete.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketNotifyDeliveryComplete.kt index b98ab5a35b..1195cd7f6f 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketNotifyDeliveryComplete.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketNotifyDeliveryComplete.kt @@ -1,13 +1,13 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.danars.R -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress import info.nightscout.androidaps.dana.DanaPump +import info.nightscout.androidaps.danars.R import info.nightscout.androidaps.danars.encryption.BleEncryption import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.LTag import javax.inject.Inject import kotlin.math.min diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketNotifyDeliveryRateDisplay.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketNotifyDeliveryRateDisplay.kt index 34408da245..faa1339187 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketNotifyDeliveryRateDisplay.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketNotifyDeliveryRateDisplay.kt @@ -1,13 +1,13 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.danars.R -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress import info.nightscout.androidaps.dana.DanaPump +import info.nightscout.androidaps.danars.R import info.nightscout.androidaps.danars.encryption.BleEncryption import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.LTag import javax.inject.Inject import kotlin.math.min diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketNotifyMissedBolusAlarm.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketNotifyMissedBolusAlarm.kt index 426b4a2e2b..70b1b65e0e 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketNotifyMissedBolusAlarm.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketNotifyMissedBolusAlarm.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketNotifyMissedBolusAlarm( injector: HasAndroidInjector diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionGetPumpTime.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionGetPumpTime.kt index b57f670cd6..0f03ad5d75 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionGetPumpTime.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionGetPumpTime.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag import org.joda.time.DateTime import javax.inject.Inject diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionGetPumpUTCAndTimeZone.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionGetPumpUTCAndTimeZone.kt index 806d4c89e9..a71a57149b 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionGetPumpUTCAndTimeZone.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionGetPumpUTCAndTimeZone.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag import org.joda.time.DateTime import javax.inject.Inject diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionGetUserOption.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionGetUserOption.kt index 0d0fe7bd4a..020a75bad6 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionGetUserOption.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionGetUserOption.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag import javax.inject.Inject class DanaRSPacketOptionGetUserOption( diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionSetPumpTime.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionSetPumpTime.kt index 326f614f9a..7e1f676cd6 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionSetPumpTime.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionSetPumpTime.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag import org.joda.time.DateTime class DanaRSPacketOptionSetPumpTime( diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionSetPumpUTCAndTimeZone.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionSetPumpUTCAndTimeZone.kt index 92f8d0b8ac..a5d0870b62 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionSetPumpUTCAndTimeZone.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionSetPumpUTCAndTimeZone.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag import org.joda.time.DateTime import org.joda.time.DateTimeZone diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionSetUserOption.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionSetUserOption.kt index ce0f7c8362..181c0cbb4b 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionSetUserOption.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketOptionSetUserOption.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag import javax.inject.Inject class DanaRSPacketOptionSetUserOption( diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketReviewBolusAvg.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketReviewBolusAvg.kt index 0f5939b0ca..0f633884e8 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketReviewBolusAvg.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketReviewBolusAvg.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag class DanaRSPacketReviewBolusAvg( injector: HasAndroidInjector diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketReviewGetPumpDecRatio.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketReviewGetPumpDecRatio.kt index 1afc26644c..159e92e194 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketReviewGetPumpDecRatio.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSPacketReviewGetPumpDecRatio.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.danars.comm import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.dana.DanaPump import info.nightscout.androidaps.danars.encryption.BleEncryption +import info.nightscout.rx.logging.LTag import javax.inject.Inject class DanaRSPacketReviewGetPumpDecRatio( diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/dialogs/PairingProgressDialog.java b/pump/danars/src/main/java/info/nightscout/androidaps/danars/dialogs/PairingProgressDialog.java index e54d3b2a3f..a2e326aeb2 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/dialogs/PairingProgressDialog.java +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/dialogs/PairingProgressDialog.java @@ -19,10 +19,10 @@ import info.nightscout.androidaps.danars.R; import info.nightscout.androidaps.danars.activities.PairingHelperActivity; import info.nightscout.androidaps.danars.databinding.DanarsPairingProgressDialogBinding; import info.nightscout.androidaps.danars.events.EventDanaRSPairingSuccess; -import info.nightscout.androidaps.plugins.bus.RxBus; -import info.nightscout.androidaps.utils.FabricPrivacy; import info.nightscout.androidaps.interfaces.ResourceHelper; -import info.nightscout.androidaps.utils.rx.AapsSchedulers; +import info.nightscout.androidaps.utils.FabricPrivacy; +import info.nightscout.rx.AapsSchedulers; +import info.nightscout.rx.bus.RxBus; import io.reactivex.rxjava3.disposables.CompositeDisposable; diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/events/EventDanaRSDeviceChange.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/events/EventDanaRSDeviceChange.kt index 3d7a0789d7..5636eb93e8 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/events/EventDanaRSDeviceChange.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/events/EventDanaRSDeviceChange.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.danars.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventDanaRSDeviceChange : Event() \ No newline at end of file diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/events/EventDanaRSPairingSuccess.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/events/EventDanaRSPairingSuccess.kt index 605bf347ea..98d9451c08 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/events/EventDanaRSPairingSuccess.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/events/EventDanaRSPairingSuccess.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.danars.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventDanaRSPairingSuccess : Event() diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/services/BLEComm.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/services/BLEComm.kt index 1da8076216..b5bd9d35c0 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/services/BLEComm.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/services/BLEComm.kt @@ -2,7 +2,15 @@ package info.nightscout.androidaps.danars.services import android.Manifest import android.annotation.SuppressLint -import android.bluetooth.* +import android.bluetooth.BluetoothAdapter +import android.bluetooth.BluetoothDevice +import android.bluetooth.BluetoothGatt +import android.bluetooth.BluetoothGattCallback +import android.bluetooth.BluetoothGattCharacteristic +import android.bluetooth.BluetoothGattDescriptor +import android.bluetooth.BluetoothGattService +import android.bluetooth.BluetoothManager +import android.bluetooth.BluetoothProfile import android.content.Context import android.content.Intent import android.content.pm.PackageManager @@ -27,17 +35,17 @@ import info.nightscout.androidaps.extensions.notify import info.nightscout.androidaps.extensions.waitMillis import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.ToastUtils -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP -import java.util.* +import java.util.UUID import java.util.concurrent.ScheduledFuture import javax.inject.Inject import javax.inject.Singleton diff --git a/pump/danars/src/main/java/info/nightscout/androidaps/danars/services/DanaRSService.kt b/pump/danars/src/main/java/info/nightscout/androidaps/danars/services/DanaRSService.kt index b17b6d8f74..c80797caa6 100644 --- a/pump/danars/src/main/java/info/nightscout/androidaps/danars/services/DanaRSService.kt +++ b/pump/danars/src/main/java/info/nightscout/androidaps/danars/services/DanaRSService.kt @@ -14,22 +14,58 @@ import info.nightscout.androidaps.dana.comm.RecordTypes import info.nightscout.androidaps.dana.events.EventDanaRNewStatus import info.nightscout.androidaps.danars.DanaRSPlugin import info.nightscout.androidaps.danars.R -import info.nightscout.androidaps.danars.comm.* +import info.nightscout.androidaps.danars.comm.DanaRSPacket +import info.nightscout.androidaps.danars.comm.DanaRSPacketAPSBasalSetTemporaryBasal +import info.nightscout.androidaps.danars.comm.DanaRSPacketAPSHistoryEvents +import info.nightscout.androidaps.danars.comm.DanaRSPacketAPSSetEventHistory +import info.nightscout.androidaps.danars.comm.DanaRSPacketBasalGetBasalRate +import info.nightscout.androidaps.danars.comm.DanaRSPacketBasalGetProfileNumber +import info.nightscout.androidaps.danars.comm.DanaRSPacketBasalSetCancelTemporaryBasal +import info.nightscout.androidaps.danars.comm.DanaRSPacketBasalSetProfileBasalRate +import info.nightscout.androidaps.danars.comm.DanaRSPacketBasalSetProfileNumber +import info.nightscout.androidaps.danars.comm.DanaRSPacketBasalSetTemporaryBasal +import info.nightscout.androidaps.danars.comm.DanaRSPacketBolusGet24CIRCFArray +import info.nightscout.androidaps.danars.comm.DanaRSPacketBolusGetBolusOption +import info.nightscout.androidaps.danars.comm.DanaRSPacketBolusGetCIRCFArray +import info.nightscout.androidaps.danars.comm.DanaRSPacketBolusGetCalculationInformation +import info.nightscout.androidaps.danars.comm.DanaRSPacketBolusGetStepBolusInformation +import info.nightscout.androidaps.danars.comm.DanaRSPacketBolusSet24CIRCFArray +import info.nightscout.androidaps.danars.comm.DanaRSPacketBolusSetExtendedBolus +import info.nightscout.androidaps.danars.comm.DanaRSPacketBolusSetExtendedBolusCancel +import info.nightscout.androidaps.danars.comm.DanaRSPacketBolusSetStepBolusStart +import info.nightscout.androidaps.danars.comm.DanaRSPacketBolusSetStepBolusStop +import info.nightscout.androidaps.danars.comm.DanaRSPacketEtcKeepConnection +import info.nightscout.androidaps.danars.comm.DanaRSPacketGeneralGetPumpCheck +import info.nightscout.androidaps.danars.comm.DanaRSPacketGeneralGetShippingInformation +import info.nightscout.androidaps.danars.comm.DanaRSPacketGeneralInitialScreenInformation +import info.nightscout.androidaps.danars.comm.DanaRSPacketGeneralSetHistoryUploadMode +import info.nightscout.androidaps.danars.comm.DanaRSPacketHistory +import info.nightscout.androidaps.danars.comm.DanaRSPacketHistoryAlarm +import info.nightscout.androidaps.danars.comm.DanaRSPacketHistoryBasal +import info.nightscout.androidaps.danars.comm.DanaRSPacketHistoryBloodGlucose +import info.nightscout.androidaps.danars.comm.DanaRSPacketHistoryBolus +import info.nightscout.androidaps.danars.comm.DanaRSPacketHistoryCarbohydrate +import info.nightscout.androidaps.danars.comm.DanaRSPacketHistoryDaily +import info.nightscout.androidaps.danars.comm.DanaRSPacketHistoryPrime +import info.nightscout.androidaps.danars.comm.DanaRSPacketHistoryRefill +import info.nightscout.androidaps.danars.comm.DanaRSPacketHistorySuspend +import info.nightscout.androidaps.danars.comm.DanaRSPacketOptionGetPumpTime +import info.nightscout.androidaps.danars.comm.DanaRSPacketOptionGetPumpUTCAndTimeZone +import info.nightscout.androidaps.danars.comm.DanaRSPacketOptionGetUserOption +import info.nightscout.androidaps.danars.comm.DanaRSPacketOptionSetPumpTime +import info.nightscout.androidaps.danars.comm.DanaRSPacketOptionSetPumpUTCAndTimeZone +import info.nightscout.androidaps.danars.comm.DanaRSPacketOptionSetUserOption import info.nightscout.androidaps.data.PumpEnactResult import info.nightscout.androidaps.dialogs.BolusProgressDialog -import info.nightscout.androidaps.events.EventAppExit -import info.nightscout.androidaps.events.EventInitializationChanged -import info.nightscout.androidaps.events.EventProfileSwitchChanged import info.nightscout.androidaps.events.EventPumpStatusChanged import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ActivityNames import info.nightscout.androidaps.interfaces.CommandQueue +import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress import info.nightscout.androidaps.plugins.general.overview.notifications.Notification @@ -38,9 +74,13 @@ import info.nightscout.androidaps.queue.commands.Command import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAppExit +import info.nightscout.rx.events.EventInitializationChanged +import info.nightscout.rx.events.EventProfileSwitchChanged +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/pump/danars/src/test/java/info/nightscout/androidaps/TestBase.kt b/pump/danars/src/test/java/info/nightscout/androidaps/TestBase.kt index 57aca0507a..e4d3c51234 100644 --- a/pump/danars/src/test/java/info/nightscout/androidaps/TestBase.kt +++ b/pump/danars/src/test/java/info/nightscout/androidaps/TestBase.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps -import info.nightscout.shared.logging.AAPSLoggerTest -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.rx.TestAapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.shared.logging.AAPSLoggerTest import org.junit.Before import org.junit.Rule import org.mockito.Mockito diff --git a/pump/danars/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt b/pump/danars/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt index d2b0723d59..3eb646de24 100644 --- a/pump/danars/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt +++ b/pump/danars/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt @@ -9,11 +9,11 @@ import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ProfileStore -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DefaultValueHelper import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus import org.json.JSONObject import org.junit.Before import org.mockito.Mock diff --git a/pump/diaconn/build.gradle b/pump/diaconn/build.gradle index 137f787732..c280447986 100644 --- a/pump/diaconn/build.gradle +++ b/pump/diaconn/build.gradle @@ -25,7 +25,8 @@ android { dependencies { implementation project(':libraries') implementation project(':core') - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') api "androidx.room:room-ktx:$room_version" api "androidx.room:room-runtime:$room_version" diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Fragment.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Fragment.kt index 1552ca7170..f578a67f88 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Fragment.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Fragment.kt @@ -13,24 +13,24 @@ import info.nightscout.androidaps.diaconn.activities.DiaconnG8HistoryActivity import info.nightscout.androidaps.diaconn.activities.DiaconnG8UserOptionsActivity import info.nightscout.androidaps.diaconn.databinding.DiaconnG8FragmentBinding import info.nightscout.androidaps.diaconn.events.EventDiaconnG8NewStatus -import info.nightscout.androidaps.events.EventExtendedBolusChange -import info.nightscout.androidaps.events.EventInitializationChanged import info.nightscout.androidaps.events.EventPumpStatusChanged -import info.nightscout.androidaps.events.EventTempBasalChange import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ActivityNames import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.Pump import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.queue.events.EventQueueChanged import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.WarnColors -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventExtendedBolusChange +import info.nightscout.rx.events.EventInitializationChanged +import info.nightscout.rx.events.EventTempBasalChange +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Plugin.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Plugin.kt index b86b17a8dd..4acb928f1d 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Plugin.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Plugin.kt @@ -13,14 +13,22 @@ import info.nightscout.androidaps.data.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResult import info.nightscout.androidaps.diaconn.events.EventDiaconnG8DeviceChange import info.nightscout.androidaps.diaconn.service.DiaconnG8Service -import info.nightscout.androidaps.events.EventAppExit -import info.nightscout.androidaps.events.EventConfigBuilderChange import info.nightscout.androidaps.extensions.convertedToAbsolute import info.nightscout.androidaps.extensions.plannedRemainingMinutes -import info.nightscout.androidaps.interfaces.* -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.plugins.common.ManufacturerType +import info.nightscout.androidaps.interfaces.CommandQueue +import info.nightscout.androidaps.interfaces.Constraint import info.nightscout.androidaps.interfaces.Constraints +import info.nightscout.androidaps.interfaces.Diaconn +import info.nightscout.androidaps.interfaces.PluginDescription +import info.nightscout.androidaps.interfaces.PluginType +import info.nightscout.androidaps.interfaces.Profile +import info.nightscout.androidaps.interfaces.ProfileFunction +import info.nightscout.androidaps.interfaces.Pump +import info.nightscout.androidaps.interfaces.PumpDescription +import info.nightscout.androidaps.interfaces.PumpPluginBase +import info.nightscout.androidaps.interfaces.PumpSync +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.common.ManufacturerType import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification @@ -30,11 +38,18 @@ import info.nightscout.androidaps.plugins.general.overview.notifications.Notific import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage import info.nightscout.androidaps.plugins.pump.common.bolusInfo.TemporaryBasalStorage import info.nightscout.androidaps.plugins.pump.common.defs.PumpType -import info.nightscout.androidaps.utils.* -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.androidaps.utils.DateUtil +import info.nightscout.androidaps.utils.DecimalFormatter +import info.nightscout.androidaps.utils.FabricPrivacy +import info.nightscout.androidaps.utils.Round +import info.nightscout.androidaps.utils.T +import info.nightscout.androidaps.utils.ToastUtils +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAppExit +import info.nightscout.rx.events.EventConfigBuilderChange +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import org.json.JSONException diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Pump.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Pump.kt index 386a9e5349..31edc759aa 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Pump.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/DiaconnG8Pump.kt @@ -2,12 +2,12 @@ package info.nightscout.androidaps.diaconn import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.T +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject import javax.inject.Singleton import kotlin.math.max diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/activities/DiaconnG8HistoryActivity.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/activities/DiaconnG8HistoryActivity.kt index 0ee0bc8e54..232acff3a7 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/activities/DiaconnG8HistoryActivity.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/activities/DiaconnG8HistoryActivity.kt @@ -19,16 +19,14 @@ import info.nightscout.androidaps.events.EventPumpStatusChanged import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign -import java.util.* import javax.inject.Inject class DiaconnG8HistoryActivity : NoSplashAppCompatActivity() { diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/activities/DiaconnG8UserOptionsActivity.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/activities/DiaconnG8UserOptionsActivity.kt index adb92d9317..c6f64c7ae0 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/activities/DiaconnG8UserOptionsActivity.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/activities/DiaconnG8UserOptionsActivity.kt @@ -15,7 +15,8 @@ import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.ToastUtils -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import java.text.DecimalFormat diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/api/DiaconnLogUploader.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/api/DiaconnLogUploader.kt index bcc35fcb18..c1a9e4093b 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/api/DiaconnLogUploader.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/api/DiaconnLogUploader.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.diaconn.api -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import retrofit2.Retrofit import retrofit2.converter.gson.GsonConverterFactory import javax.inject.Inject diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/events/EventDiaconnG8DeviceChange.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/events/EventDiaconnG8DeviceChange.kt index a4c565ec9d..ec92afce2c 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/events/EventDiaconnG8DeviceChange.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/events/EventDiaconnG8DeviceChange.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.diaconn.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventDiaconnG8DeviceChange : Event() \ No newline at end of file diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/events/EventDiaconnG8NewStatus.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/events/EventDiaconnG8NewStatus.kt index b275db0111..67dcc3fe6f 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/events/EventDiaconnG8NewStatus.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/events/EventDiaconnG8NewStatus.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.diaconn.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventDiaconnG8NewStatus : Event() diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/events/EventDiaconnG8PumpLogReset.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/events/EventDiaconnG8PumpLogReset.kt index 40d1b4a74c..7eabc12987 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/events/EventDiaconnG8PumpLogReset.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/events/EventDiaconnG8PumpLogReset.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.diaconn.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventDiaconnG8PumpLogReset : Event() diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppCancelSettingPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppCancelSettingPacket.kt index b7c81b2f39..ed4761445b 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppCancelSettingPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppCancelSettingPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppCancelSettingResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppCancelSettingResponsePacket.kt index 70ae0f6688..e07e823036 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppCancelSettingResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppCancelSettingResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppConfirmSettingPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppConfirmSettingPacket.kt index 98fadddfaf..3baf60cb30 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppConfirmSettingPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppConfirmSettingPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppConfirmSettingResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppConfirmSettingResponsePacket.kt index b4f5c87768..4fa448270c 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppConfirmSettingResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/AppConfirmSettingResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalLimitInquirePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalLimitInquirePacket.kt index c99c2ad1cb..6d16426dfa 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalLimitInquirePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalLimitInquirePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalLimitInquireResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalLimitInquireResponsePacket.kt index f0da17ea6c..4bc89075c6 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalLimitInquireResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalLimitInquireResponsePacket.kt @@ -5,7 +5,8 @@ import info.nightscout.androidaps.diaconn.DiaconnG8Pump import info.nightscout.androidaps.diaconn.R import info.nightscout.androidaps.diaconn.pumplog.PumplogUtil import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalPauseReportPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalPauseReportPacket.kt index 15d613341f..a0a9058471 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalPauseReportPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalPauseReportPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalPauseSettingPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalPauseSettingPacket.kt index 7a0053815f..1ce82317df 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalPauseSettingPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalPauseSettingPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalPauseSettingResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalPauseSettingResponsePacket.kt index 8c5f2d25a0..bc2c31f30d 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalPauseSettingResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalPauseSettingResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalSettingPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalSettingPacket.kt index fde046d594..eef3d6fa61 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalSettingPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalSettingPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalSettingReportPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalSettingReportPacket.kt index 8aab8f0316..9f2d01e2dc 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalSettingReportPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalSettingReportPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalSettingResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalSettingResponsePacket.kt index 1d2062ff00..9efb2339b9 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalSettingResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BasalSettingResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BatteryWarningReportPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BatteryWarningReportPacket.kt index e289c828d7..8708212795 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BatteryWarningReportPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BatteryWarningReportPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigAPSMainInfoInquirePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigAPSMainInfoInquirePacket.kt index 8ac136c95f..e9672e6e1a 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigAPSMainInfoInquirePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigAPSMainInfoInquirePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigAPSMainInfoInquireResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigAPSMainInfoInquireResponsePacket.kt index a209046b96..955f92b651 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigAPSMainInfoInquireResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigAPSMainInfoInquireResponsePacket.kt @@ -4,8 +4,8 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump import info.nightscout.androidaps.diaconn.R import info.nightscout.androidaps.diaconn.pumplog.PumplogUtil -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.joda.time.DateTime import javax.inject.Inject diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigLogInquirePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigLogInquirePacket.kt index 5279ceac04..0ccfb3170d 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigLogInquirePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigLogInquirePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigLogInquireResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigLogInquireResponsePacket.kt index d216f5eb0e..67ea80049c 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigLogInquireResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigLogInquireResponsePacket.kt @@ -1,7 +1,6 @@ package info.nightscout.androidaps.diaconn.packet import android.content.Context -import android.content.pm.PackageManager import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.DetailedBolusInfo import info.nightscout.androidaps.diaconn.DiaconnG8Pump @@ -46,12 +45,12 @@ import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.PumpDescription import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage import info.nightscout.androidaps.plugins.pump.common.bolusInfo.TemporaryBasalStorage import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.utils.T -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.apache.commons.lang3.time.DateUtils import org.joda.time.DateTime diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigMainInfoInquirePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigMainInfoInquirePacket.kt index 73b00e8473..3c3e3993fd 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigMainInfoInquirePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigMainInfoInquirePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigMainInfoInquireResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigMainInfoInquireResponsePacket.kt index 42c8146661..80f17adc73 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigMainInfoInquireResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BigMainInfoInquireResponsePacket.kt @@ -5,9 +5,9 @@ import info.nightscout.androidaps.diaconn.DiaconnG8Pump import info.nightscout.androidaps.diaconn.R import info.nightscout.androidaps.diaconn.pumplog.PumplogUtil import info.nightscout.androidaps.interfaces.PumpDescription -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.pump.common.defs.PumpType +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.joda.time.DateTime import javax.inject.Inject diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedInquirePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedInquirePacket.kt index 9648fb290f..6756ed6b25 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedInquirePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedInquirePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedInquireResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedInquireResponsePacket.kt index c62f246471..e4a01588fb 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedInquireResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedInquireResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedSettingPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedSettingPacket.kt index 90e6bddb77..75636a1c1b 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedSettingPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedSettingPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedSettingReportPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedSettingReportPacket.kt index 2164e195bf..26237fe150 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedSettingReportPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedSettingReportPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedSettingResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedSettingResponsePacket.kt index d052c705c5..704992b5af 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedSettingResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/BolusSpeedSettingResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/ConfirmReportPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/ConfirmReportPacket.kt index a29a23cee6..e531a563b8 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/ConfirmReportPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/ConfirmReportPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DiaconnG8Packet.java b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DiaconnG8Packet.java index 2c126760be..4eb1553dab 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DiaconnG8Packet.java +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DiaconnG8Packet.java @@ -6,9 +6,9 @@ import java.nio.ByteOrder; import javax.inject.Inject; import dagger.android.HasAndroidInjector; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.utils.DateUtil; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; public class DiaconnG8Packet { diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeInquirePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeInquirePacket.kt index 8699635771..5d5fab080d 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeInquirePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeInquirePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeInquireResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeInquireResponsePacket.kt index 6e318e3421..c226637d5a 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeInquireResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeInquireResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeoutSettingPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeoutSettingPacket.kt index 8f6e196dfb..8df56882c3 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeoutSettingPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeoutSettingPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeoutSettingResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeoutSettingResponsePacket.kt index 510a5c8bba..2d3e28338c 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeoutSettingResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/DisplayTimeoutSettingResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/IncarnationInquirePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/IncarnationInquirePacket.kt index ba8c061646..a7d33c257d 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/IncarnationInquirePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/IncarnationInquirePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/IncarnationInquireResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/IncarnationInquireResponsePacket.kt index 1571c53b44..672a282f91 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/IncarnationInquireResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/IncarnationInquireResponsePacket.kt @@ -2,8 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionBasalReportPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionBasalReportPacket.kt index aa3c9b8d31..c46a40d519 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionBasalReportPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionBasalReportPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionBasalSettingPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionBasalSettingPacket.kt index 04d83d3c79..0d1c1f2272 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionBasalSettingPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionBasalSettingPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionBasalSettingResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionBasalSettingResponsePacket.kt index 3db8b72d46..f4f7c0fed2 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionBasalSettingResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionBasalSettingResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionBlockReportPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionBlockReportPacket.kt index 9354ea9c39..9bf916ce06 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionBlockReportPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionBlockReportPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionCancelSettingPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionCancelSettingPacket.kt index c5c5a41adb..c5e2be1bc6 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionCancelSettingPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionCancelSettingPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionCancelSettingResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionCancelSettingResponsePacket.kt index 73d00210a0..5b60cc07b1 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionCancelSettingResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionCancelSettingResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionExtendedBolusResultReportPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionExtendedBolusResultReportPacket.kt index 19bdd92f46..d085f1dcba 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionExtendedBolusResultReportPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionExtendedBolusResultReportPacket.kt @@ -2,9 +2,9 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.LTag import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionExtendedBolusSettingPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionExtendedBolusSettingPacket.kt index 0788cb324b..4c801fdb6b 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionExtendedBolusSettingPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionExtendedBolusSettingPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionExtendedBolusSettingResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionExtendedBolusSettingResponsePacket.kt index 217d3a9de4..0e76d92638 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionExtendedBolusSettingResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionExtendedBolusSettingResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionMealSettingPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionMealSettingPacket.kt index 4379765b34..eb78fe6729 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionMealSettingPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionMealSettingPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionMealSettingResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionMealSettingResponsePacket.kt index ffbfcdc498..902174ddc9 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionMealSettingResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionMealSettingResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackInquirePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackInquirePacket.kt index 849ddca1e3..6f935dc43f 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackInquirePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackInquirePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackInquireResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackInquireResponsePacket.kt index b1cd785dd1..0fcf3b1dea 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackInquireResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackInquireResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackResultReportPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackResultReportPacket.kt index 8a9fde09c0..75f3da2f43 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackResultReportPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackResultReportPacket.kt @@ -2,9 +2,9 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.LTag import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackSettingPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackSettingPacket.kt index 78d3df21cb..335082f8f2 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackSettingPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackSettingPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackSettingResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackSettingResponsePacket.kt index bb9c1c71e9..f0c91fa1d1 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackSettingResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InjectionSnackSettingResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InsulinLackReportPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InsulinLackReportPacket.kt index 01ebebe764..8fb9789e70 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InsulinLackReportPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/InsulinLackReportPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageInquirePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageInquirePacket.kt index a7670a58c0..7e940c186d 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageInquirePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageInquirePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageInquireResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageInquireResponsePacket.kt index 48f631b608..6d13e58ecd 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageInquireResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageInquireResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageSettingPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageSettingPacket.kt index 2e9e45634c..7bfc645c36 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageSettingPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageSettingPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageSettingResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageSettingResponsePacket.kt index bcd0a63f85..f23e180c6e 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageSettingResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LanguageSettingResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LogStatusInquirePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LogStatusInquirePacket.kt index d1a3977f49..af12cf0ac6 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LogStatusInquirePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LogStatusInquirePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LogStatusInquireResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LogStatusInquireResponsePacket.kt index 8ab29c6e9d..d7d6b7989a 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LogStatusInquireResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/LogStatusInquireResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/RejectReportPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/RejectReportPacket.kt index b32f5b2d50..1ea35ca562 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/RejectReportPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/RejectReportPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SerialNumInquirePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SerialNumInquirePacket.kt index 0284c35029..a87fb6c078 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SerialNumInquirePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SerialNumInquirePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SerialNumInquireResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SerialNumInquireResponsePacket.kt index 76306e54fa..25c2cf5814 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SerialNumInquireResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SerialNumInquireResponsePacket.kt @@ -4,7 +4,8 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump import info.nightscout.androidaps.diaconn.R import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SneckLimitInquirePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SneckLimitInquirePacket.kt index 8f649c05b6..b986c5a320 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SneckLimitInquirePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SneckLimitInquirePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SneckLimitInquireResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SneckLimitInquireResponsePacket.kt index 4bead0560c..f7516b5a0b 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SneckLimitInquireResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SneckLimitInquireResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundInquirePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundInquirePacket.kt index 2aafb95756..0c97d4f38a 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundInquirePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundInquirePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundInquireResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundInquireResponsePacket.kt index f5a9992ba8..ea5a2561ec 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundInquireResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundInquireResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundSettingPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundSettingPacket.kt index 4a2b9009ea..fa755a47e9 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundSettingPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundSettingPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundSettingResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundSettingResponsePacket.kt index ff467be913..19a0d04eeb 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundSettingResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/SoundSettingResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalInquirePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalInquirePacket.kt index 3818b3e7fe..a72f7f46aa 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalInquirePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalInquirePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalInquireResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalInquireResponsePacket.kt index 7362a703f0..14793354d7 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalInquireResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalInquireResponsePacket.kt @@ -3,7 +3,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump import info.nightscout.androidaps.interfaces.ActivePlugin -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalReportPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalReportPacket.kt index 378453970b..8c322be8ad 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalReportPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalReportPacket.kt @@ -3,7 +3,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump import info.nightscout.androidaps.interfaces.ActivePlugin -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalSettingPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalSettingPacket.kt index b97994ae74..2906fd639f 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalSettingPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalSettingPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalSettingResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalSettingResponsePacket.kt index da7d8436ed..6f7be601dd 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalSettingResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TempBasalSettingResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeInquirePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeInquirePacket.kt index f75df00665..c3a259fb31 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeInquirePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeInquirePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeInquireResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeInquireResponsePacket.kt index a2f88429b5..12f0087861 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeInquireResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeInquireResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeReportPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeReportPacket.kt index a47cd32f6d..176a95bd45 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeReportPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeReportPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeSettingPacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeSettingPacket.kt index 63614b7053..4faed5e768 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeSettingPacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeSettingPacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import org.joda.time.DateTime import org.joda.time.DateTimeZone import javax.inject.Inject diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeSettingResponsePacket.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeSettingResponsePacket.kt index 8faed78409..53339d50a8 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeSettingResponsePacket.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/packet/TimeSettingResponsePacket.kt @@ -2,7 +2,8 @@ package info.nightscout.androidaps.diaconn.packet import dagger.android.HasAndroidInjector import info.nightscout.androidaps.diaconn.DiaconnG8Pump -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject /** diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/BLECommonService.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/BLECommonService.kt index 61165a6f60..19df038d07 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/BLECommonService.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/BLECommonService.kt @@ -30,10 +30,10 @@ import info.nightscout.androidaps.extensions.notify import info.nightscout.androidaps.extensions.waitMillis import info.nightscout.androidaps.interfaces.ActivityNames import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.ToastUtils -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import java.util.UUID import java.util.concurrent.ScheduledFuture import javax.inject.Inject diff --git a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/DiaconnG8Service.kt b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/DiaconnG8Service.kt index 4a1fa6dd66..f127f661df 100644 --- a/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/DiaconnG8Service.kt +++ b/pump/diaconn/src/main/java/info/nightscout/androidaps/diaconn/service/DiaconnG8Service.kt @@ -47,19 +47,15 @@ import info.nightscout.androidaps.diaconn.packet.TimeInquirePacket import info.nightscout.androidaps.diaconn.packet.TimeSettingPacket import info.nightscout.androidaps.diaconn.pumplog.PumplogUtil import info.nightscout.androidaps.dialogs.BolusProgressDialog -import info.nightscout.androidaps.events.EventAppExit -import info.nightscout.androidaps.events.EventInitializationChanged -import info.nightscout.androidaps.events.EventProfileSwitchChanged import info.nightscout.androidaps.events.EventPumpStatusChanged import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ActivityNames import info.nightscout.androidaps.interfaces.CommandQueue +import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.interfaces.Constraints import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress import info.nightscout.androidaps.plugins.general.overview.notifications.Notification @@ -69,9 +65,13 @@ import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.commands.Command import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAppExit +import info.nightscout.rx.events.EventInitializationChanged +import info.nightscout.rx.events.EventProfileSwitchChanged +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import org.joda.time.DateTime diff --git a/pump/eopatch/build.gradle b/pump/eopatch/build.gradle index 69c02c04f6..34029f9c87 100644 --- a/pump/eopatch/build.gradle +++ b/pump/eopatch/build.gradle @@ -20,7 +20,8 @@ dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation project(':pump:eopatch-core') implementation project(':libraries') - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') implementation project(':database') implementation project(':core') diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/EONotification.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/EONotification.kt index f2ab48588e..c6215600a4 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/EONotification.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/EONotification.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.eopatch -import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.plugins.general.overview.notifications.Notification +import info.nightscout.rx.logging.AAPSLogger import javax.inject.Inject class EONotification constructor() : Notification() { diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/EopatchPumpPlugin.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/EopatchPumpPlugin.kt index 91bf8122ca..8016a4495b 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/EopatchPumpPlugin.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/EopatchPumpPlugin.kt @@ -4,7 +4,6 @@ import android.os.SystemClock import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResult -import info.nightscout.androidaps.events.EventAppInitialized import info.nightscout.androidaps.events.EventPreferenceChange import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.PluginDescription @@ -15,7 +14,6 @@ import info.nightscout.androidaps.interfaces.PumpDescription import info.nightscout.androidaps.interfaces.PumpPluginBase import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.common.ManufacturerType import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType @@ -35,9 +33,11 @@ import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.TimeChangeType -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAppInitialized +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.functions.Consumer import io.reactivex.rxjava3.subjects.BehaviorSubject diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/RxAction.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/RxAction.kt index 5ec9fd146a..fded616a7f 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/RxAction.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/RxAction.kt @@ -3,8 +3,8 @@ package info.nightscout.androidaps.plugins.pump.eopatch import android.os.SystemClock -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger import io.reactivex.rxjava3.core.Scheduler import io.reactivex.rxjava3.core.Single import java.util.concurrent.TimeUnit diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/alarm/AlarmManager.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/alarm/AlarmManager.kt index 373189ff1a..7a3d1ee56b 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/alarm/AlarmManager.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/alarm/AlarmManager.kt @@ -6,7 +6,6 @@ import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.pump.common.defs.PumpType @@ -27,9 +26,10 @@ import info.nightscout.androidaps.plugins.pump.eopatch.ui.AlarmHelperActivity import info.nightscout.androidaps.plugins.pump.eopatch.vo.Alarms import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.core.Observable import io.reactivex.rxjava3.core.Single diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/alarm/AlarmProcess.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/alarm/AlarmProcess.kt index 95efd7050f..1a80d235a7 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/alarm/AlarmProcess.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/alarm/AlarmProcess.kt @@ -2,23 +2,50 @@ package info.nightscout.androidaps.plugins.pump.eopatch.alarm import android.content.Context import android.content.DialogInterface -import info.nightscout.androidaps.plugins.pump.eopatch.ui.EopatchActivity.Companion.createIntentForCheckConnection -import info.nightscout.androidaps.plugins.pump.eopatch.ui.EopatchActivity.Companion.createIntentForDiscarded -import info.nightscout.androidaps.plugins.pump.eopatch.ui.EopatchActivity.Companion.createIntentForCannulaInsertionError -import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPatchManager -import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.* import android.content.Intent -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.eopatch.R -import info.nightscout.androidaps.plugins.pump.eopatch.ui.EopatchActivity +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A002 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A003 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A004 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A005 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A007 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A016 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A018 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A019 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A020 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A022 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A023 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A034 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A041 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A042 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A043 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A044 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A106 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A107 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A108 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A116 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A117 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.A118 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.B000 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.B001 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.B003 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.B005 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.B006 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.B012 +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode.B018 +import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPatchManager import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BaseResponse import info.nightscout.androidaps.plugins.pump.eopatch.core.response.TemperatureResponse import info.nightscout.androidaps.plugins.pump.eopatch.event.EventDialog import info.nightscout.androidaps.plugins.pump.eopatch.event.EventProgressDialog import info.nightscout.androidaps.plugins.pump.eopatch.extension.takeOne +import info.nightscout.androidaps.plugins.pump.eopatch.ui.EopatchActivity +import info.nightscout.androidaps.plugins.pump.eopatch.ui.EopatchActivity.Companion.createIntentForCannulaInsertionError +import info.nightscout.androidaps.plugins.pump.eopatch.ui.EopatchActivity.Companion.createIntentForCheckConnection +import info.nightscout.androidaps.plugins.pump.eopatch.ui.EopatchActivity.Companion.createIntentForDiscarded import info.nightscout.androidaps.plugins.pump.eopatch.ui.dialogs.CommonDialog +import info.nightscout.rx.bus.RxBus import io.reactivex.rxjava3.core.Single -import java.lang.Exception import java.util.concurrent.Callable interface IAlarmProcess { diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/alarm/AlarmRegistry.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/alarm/AlarmRegistry.kt index dcd01a5d0f..ec936d866f 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/alarm/AlarmRegistry.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/alarm/AlarmRegistry.kt @@ -5,7 +5,6 @@ import android.app.AlarmManager.AlarmClockInfo import android.app.PendingIntent import android.content.Context import android.content.Intent -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.pump.eopatch.EoPatchRxBus @@ -15,8 +14,9 @@ import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPreferenceManager import info.nightscout.androidaps.plugins.pump.eopatch.code.PatchLifecycle import info.nightscout.androidaps.plugins.pump.eopatch.core.code.PatchAeCode import info.nightscout.androidaps.plugins.pump.eopatch.event.EventEoPatchAlarm -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import io.reactivex.rxjava3.core.Maybe import io.reactivex.rxjava3.core.Observable import io.reactivex.rxjava3.disposables.CompositeDisposable diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManager.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManager.java index 5bef9e5a6d..cd6cc4e48f 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManager.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManager.java @@ -9,15 +9,12 @@ import javax.inject.Inject; import javax.inject.Singleton; import info.nightscout.androidaps.data.DetailedBolusInfo; -import info.nightscout.androidaps.events.EventCustomActionsChanged; import info.nightscout.androidaps.events.EventPumpStatusChanged; -import info.nightscout.androidaps.events.EventRefreshOverview; import info.nightscout.androidaps.interfaces.ActivePlugin; import info.nightscout.androidaps.interfaces.CommandQueue; import info.nightscout.androidaps.interfaces.ProfileFunction; import info.nightscout.androidaps.interfaces.PumpSync; import info.nightscout.androidaps.interfaces.ResourceHelper; -import info.nightscout.androidaps.plugins.bus.RxBus; import info.nightscout.androidaps.plugins.pump.common.defs.PumpType; import info.nightscout.androidaps.plugins.pump.eopatch.R; import info.nightscout.androidaps.plugins.pump.eopatch.RxAction; @@ -49,8 +46,11 @@ import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchLifecycleEvent; import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchState; import info.nightscout.androidaps.plugins.pump.eopatch.vo.TempBasal; import info.nightscout.androidaps.utils.DateUtil; -import info.nightscout.androidaps.utils.rx.AapsSchedulers; -import info.nightscout.shared.logging.AAPSLogger; +import info.nightscout.rx.AapsSchedulers; +import info.nightscout.rx.bus.RxBus; +import info.nightscout.rx.events.EventCustomActionsChanged; +import info.nightscout.rx.events.EventRefreshOverview; +import info.nightscout.rx.logging.AAPSLogger; import info.nightscout.shared.sharedPreferences.SP; import io.reactivex.rxjava3.core.Maybe; import io.reactivex.rxjava3.core.Observable; diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManagerImpl.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManagerImpl.java index d83878593c..9254ef2358 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManagerImpl.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManagerImpl.java @@ -92,9 +92,9 @@ import info.nightscout.androidaps.plugins.pump.eopatch.vo.NormalBasal; import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchConfig; import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchState; import info.nightscout.androidaps.plugins.pump.eopatch.vo.TempBasal; -import info.nightscout.androidaps.utils.rx.AapsSchedulers; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.AapsSchedulers; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import info.nightscout.shared.sharedPreferences.SP; import io.reactivex.rxjava3.core.Observable; import io.reactivex.rxjava3.core.Scheduler; diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchStateManager.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchStateManager.java index a41131e4db..e66d357d7d 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchStateManager.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchStateManager.java @@ -6,18 +6,18 @@ import javax.inject.Inject; import javax.inject.Singleton; import info.nightscout.androidaps.interfaces.CommandQueue; -import info.nightscout.androidaps.utils.rx.AapsSchedulers; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.pump.eopatch.core.code.BolusType; import info.nightscout.androidaps.plugins.pump.eopatch.ble.task.FetchAlarmTask; import info.nightscout.androidaps.plugins.pump.eopatch.ble.task.InternalSuspendedTask; import info.nightscout.androidaps.plugins.pump.eopatch.ble.task.ReadBolusFinishTimeTask; import info.nightscout.androidaps.plugins.pump.eopatch.ble.task.ReadTempBasalFinishTimeTask; +import info.nightscout.androidaps.plugins.pump.eopatch.core.code.BolusType; import info.nightscout.androidaps.plugins.pump.eopatch.vo.BolusCurrent; import info.nightscout.androidaps.plugins.pump.eopatch.vo.NormalBasal; import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchState; import info.nightscout.androidaps.plugins.pump.eopatch.vo.TempBasal; +import info.nightscout.rx.AapsSchedulers; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Maybe; import io.reactivex.rxjava3.schedulers.Schedulers; diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PreferenceManager.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PreferenceManager.kt index 5ceeb6ce0c..28566d4e64 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PreferenceManager.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PreferenceManager.kt @@ -1,12 +1,18 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.eopatch.GsonHelper -import info.nightscout.androidaps.plugins.pump.eopatch.code.SettingKeys import info.nightscout.androidaps.plugins.pump.eopatch.code.PatchLifecycle -import info.nightscout.androidaps.plugins.pump.eopatch.vo.* +import info.nightscout.androidaps.plugins.pump.eopatch.code.SettingKeys +import info.nightscout.androidaps.plugins.pump.eopatch.vo.Alarms +import info.nightscout.androidaps.plugins.pump.eopatch.vo.BolusCurrent +import info.nightscout.androidaps.plugins.pump.eopatch.vo.NormalBasalManager +import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchConfig +import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchLifecycleEvent +import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchState +import info.nightscout.androidaps.plugins.pump.eopatch.vo.TempBasalManager +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.core.Observable import javax.inject.Inject diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/ActivateTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/ActivateTask.java index f476a0ad8f..cd36794939 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/ActivateTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/ActivateTask.java @@ -1,14 +1,13 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.SetKey; -import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BaseResponse; - import javax.inject.Inject; import javax.inject.Singleton; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.SetKey; +import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BaseResponse; import info.nightscout.androidaps.plugins.pump.eopatch.vo.NormalBasal; import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchLifecycleEvent; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; import io.reactivex.rxjava3.schedulers.Schedulers; diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/DeactivateTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/DeactivateTask.java index 9765550713..f16018c1b1 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/DeactivateTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/DeactivateTask.java @@ -12,8 +12,8 @@ import info.nightscout.androidaps.plugins.pump.eopatch.core.code.BolusType; import info.nightscout.androidaps.plugins.pump.eopatch.vo.BolusCurrent; import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchLifecycleEvent; import info.nightscout.androidaps.plugins.pump.eopatch.vo.TempBasal; -import info.nightscout.androidaps.utils.rx.AapsSchedulers; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.AapsSchedulers; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Observable; import io.reactivex.rxjava3.core.Single; diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/FetchAlarmTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/FetchAlarmTask.java index ba6f1aa217..513ef4cc7e 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/FetchAlarmTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/FetchAlarmTask.java @@ -1,16 +1,15 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.bus.RxBus; -import info.nightscout.androidaps.plugins.pump.eopatch.alarm.IAlarmRegistry; -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.GetErrorCodes; - import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.inject.Singleton; +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.IAlarmRegistry; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.GetErrorCodes; import info.nightscout.androidaps.plugins.pump.eopatch.core.response.AeCodeResponse; +import info.nightscout.rx.bus.RxBus; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/GetPatchInfoTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/GetPatchInfoTask.java index 15ee26f1c1..3d39730724 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/GetPatchInfoTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/GetPatchInfoTask.java @@ -1,6 +1,10 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; -import info.nightscout.shared.logging.LTag; +import java.util.Arrays; + +import javax.inject.Inject; +import javax.inject.Singleton; + import info.nightscout.androidaps.plugins.pump.eopatch.core.api.GetFirmwareVersion; import info.nightscout.androidaps.plugins.pump.eopatch.core.api.GetLOT; import info.nightscout.androidaps.plugins.pump.eopatch.core.api.GetModelName; @@ -15,12 +19,7 @@ import info.nightscout.androidaps.plugins.pump.eopatch.core.response.ModelNameRe import info.nightscout.androidaps.plugins.pump.eopatch.core.response.PumpDurationResponse; import info.nightscout.androidaps.plugins.pump.eopatch.core.response.SerialNumberResponse; import info.nightscout.androidaps.plugins.pump.eopatch.core.response.WakeUpTimeResponse; - -import java.util.Arrays; - -import javax.inject.Inject; -import javax.inject.Singleton; - +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; import io.reactivex.rxjava3.schedulers.Schedulers; diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/InfoReminderTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/InfoReminderTask.java index 15dfe2dbff..5561812f95 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/InfoReminderTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/InfoReminderTask.java @@ -1,15 +1,14 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPreferenceManager; -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.InfoReminderSet; -import info.nightscout.androidaps.plugins.pump.eopatch.core.response.PatchBooleanResponse; - import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.inject.Singleton; +import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPreferenceManager; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.InfoReminderSet; +import info.nightscout.androidaps.plugins.pump.eopatch.core.response.PatchBooleanResponse; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/InternalSuspendedTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/InternalSuspendedTask.java index 6ef7bd5b8b..3e82c2d3e9 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/InternalSuspendedTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/InternalSuspendedTask.java @@ -2,22 +2,21 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; import android.os.SystemClock; -import info.nightscout.androidaps.interfaces.PumpSync; -import info.nightscout.androidaps.logging.UserEntryLogger; -import info.nightscout.androidaps.utils.userEntry.UserEntryMapper; -import info.nightscout.shared.logging.LTag; import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.inject.Singleton; import info.nightscout.androidaps.interfaces.CommandQueue; -import info.nightscout.shared.logging.AAPSLogger; +import info.nightscout.androidaps.interfaces.PumpSync; +import info.nightscout.androidaps.logging.UserEntryLogger; import info.nightscout.androidaps.plugins.pump.eopatch.core.api.GetInternalSuspendTime; import info.nightscout.androidaps.plugins.pump.eopatch.core.response.PatchInternalSuspendTimeResponse; import info.nightscout.androidaps.queue.Callback; import info.nightscout.androidaps.queue.commands.Command; - +import info.nightscout.androidaps.utils.userEntry.UserEntryMapper; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Observable; import io.reactivex.rxjava3.core.Single; import io.reactivex.rxjava3.subjects.BehaviorSubject; diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/NeedleSensingTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/NeedleSensingTask.java index d9a1a7451a..818932fed2 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/NeedleSensingTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/NeedleSensingTask.java @@ -8,7 +8,7 @@ import info.nightscout.androidaps.plugins.pump.eopatch.alarm.IAlarmRegistry; import info.nightscout.androidaps.plugins.pump.eopatch.core.api.StartNeedleCheck; import info.nightscout.androidaps.plugins.pump.eopatch.core.api.UpdateConnection; import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchState; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/PauseBasalTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/PauseBasalTask.java index bdbd28b964..a2429f597d 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/PauseBasalTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/PauseBasalTask.java @@ -12,17 +12,17 @@ import javax.inject.Singleton; import info.nightscout.androidaps.interfaces.CommandQueue; import info.nightscout.androidaps.interfaces.PumpSync; import info.nightscout.androidaps.logging.UserEntryLogger; -import info.nightscout.androidaps.utils.userEntry.UserEntryMapper; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode; import info.nightscout.androidaps.plugins.pump.eopatch.alarm.IAlarmRegistry; import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPreferenceManager; -import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchState; import info.nightscout.androidaps.plugins.pump.eopatch.core.api.BasalPause; import info.nightscout.androidaps.plugins.pump.eopatch.core.response.PatchBooleanResponse; +import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchState; import info.nightscout.androidaps.queue.Callback; import info.nightscout.androidaps.queue.commands.Command; +import info.nightscout.androidaps.utils.userEntry.UserEntryMapper; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Observable; import io.reactivex.rxjava3.core.Single; import io.reactivex.rxjava3.subjects.BehaviorSubject; diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/PrimingTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/PrimingTask.java index f9e0014856..ae9a300e62 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/PrimingTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/PrimingTask.java @@ -6,10 +6,10 @@ import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.inject.Singleton; -import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.plugins.pump.eopatch.core.api.StartPriming; import info.nightscout.androidaps.plugins.pump.eopatch.core.api.UpdateConnection; import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchState; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Observable; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/ReadBolusFinishTimeTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/ReadBolusFinishTimeTask.java index 3e73ecd354..5c2a9d7640 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/ReadBolusFinishTimeTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/ReadBolusFinishTimeTask.java @@ -5,12 +5,12 @@ import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.inject.Singleton; -import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.plugins.pump.eopatch.core.api.BolusFinishTimeGet; -import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BolusFinishTimeResponse; import info.nightscout.androidaps.plugins.pump.eopatch.core.code.BolusType; +import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BolusFinishTimeResponse; import info.nightscout.androidaps.plugins.pump.eopatch.vo.BolusCurrent; import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchState; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/ReadTempBasalFinishTimeTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/ReadTempBasalFinishTimeTask.java index 21fa18feb3..bc9e238a28 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/ReadTempBasalFinishTimeTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/ReadTempBasalFinishTimeTask.java @@ -6,9 +6,9 @@ import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.inject.Singleton; -import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.plugins.pump.eopatch.core.api.TempBasalFinishTimeGet; import info.nightscout.androidaps.plugins.pump.eopatch.core.response.TempBasalFinishTimeResponse; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/ResumeBasalTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/ResumeBasalTask.java index 2a1d2f6870..8b61473a8b 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/ResumeBasalTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/ResumeBasalTask.java @@ -1,19 +1,15 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; -import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode; -import info.nightscout.androidaps.plugins.pump.eopatch.alarm.IAlarmRegistry; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.pump.eopatch.ble.PatchStateManager; -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.BasalResume; -import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BaseResponse; - -import java.sql.SQLException; - import javax.inject.Inject; import javax.inject.Singleton; +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode; +import info.nightscout.androidaps.plugins.pump.eopatch.alarm.IAlarmRegistry; +import info.nightscout.androidaps.plugins.pump.eopatch.ble.PatchStateManager; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.BasalResume; +import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BaseResponse; import info.nightscout.androidaps.plugins.pump.eopatch.core.response.PatchBooleanResponse; -import info.nightscout.androidaps.plugins.pump.eopatch.vo.NormalBasal; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/SelfTestTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/SelfTestTask.java index 05a990fe66..d74bb9f4b4 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/SelfTestTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/SelfTestTask.java @@ -1,19 +1,18 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.pump.eopatch.core.scan.PatchSelfTestResult; -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.GetGlobalTime; -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.GetTemperature; -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.GetVoltageLevelB4Priming; -import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BatteryVoltageLevelPairingResponse; -import info.nightscout.androidaps.plugins.pump.eopatch.core.response.GlobalTimeResponse; -import info.nightscout.androidaps.plugins.pump.eopatch.core.response.TemperatureResponse; - import java.util.Arrays; import javax.inject.Inject; import javax.inject.Singleton; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.GetGlobalTime; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.GetTemperature; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.GetVoltageLevelB4Priming; +import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BatteryVoltageLevelPairingResponse; +import info.nightscout.androidaps.plugins.pump.eopatch.core.response.GlobalTimeResponse; +import info.nightscout.androidaps.plugins.pump.eopatch.core.response.TemperatureResponse; +import info.nightscout.androidaps.plugins.pump.eopatch.core.scan.PatchSelfTestResult; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/SetGlobalTimeTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/SetGlobalTimeTask.java index cfbd3701e6..bda07a4160 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/SetGlobalTimeTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/SetGlobalTimeTask.java @@ -1,17 +1,16 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.GetGlobalTime; -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.SetGlobalTime; -import info.nightscout.androidaps.plugins.pump.eopatch.core.response.GlobalTimeResponse; -import info.nightscout.androidaps.plugins.pump.eopatch.core.response.PatchBooleanResponse; - import java.util.TimeZone; import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.inject.Singleton; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.GetGlobalTime; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.SetGlobalTime; +import info.nightscout.androidaps.plugins.pump.eopatch.core.response.GlobalTimeResponse; +import info.nightscout.androidaps.plugins.pump.eopatch.core.response.PatchBooleanResponse; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/SetLowReservoirTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/SetLowReservoirTask.java index ea719bface..4924054864 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/SetLowReservoirTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/SetLowReservoirTask.java @@ -1,15 +1,14 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPreferenceManager; -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.SetLowReservoirLevelAndExpireAlert; -import info.nightscout.androidaps.plugins.pump.eopatch.core.response.PatchBooleanResponse; - import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.inject.Singleton; +import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPreferenceManager; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.SetLowReservoirLevelAndExpireAlert; +import info.nightscout.androidaps.plugins.pump.eopatch.core.response.PatchBooleanResponse; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartBondTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartBondTask.java index 0924de25af..1e9dcbf241 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartBondTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartBondTask.java @@ -1,19 +1,18 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; -import android.bluetooth.BluetoothDevice; +import static info.nightscout.androidaps.plugins.pump.eopatch.core.api.StartBonding.OPTION_NUMERIC; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.StartBonding; +import android.bluetooth.BluetoothDevice; import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.inject.Singleton; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.StartBonding; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; -import static info.nightscout.androidaps.plugins.pump.eopatch.core.api.StartBonding.OPTION_NUMERIC; - @Singleton public class StartBondTask extends TaskBase { private final StartBonding START_BOND; diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartCalcBolusTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartCalcBolusTask.java index 022b9c9f8b..d27729eea5 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartCalcBolusTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartCalcBolusTask.java @@ -1,14 +1,12 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; -import info.nightscout.androidaps.data.DetailedBolusInfo; -import info.nightscout.shared.logging.LTag; - -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.BolusStart; - import javax.inject.Inject; import javax.inject.Singleton; +import info.nightscout.androidaps.data.DetailedBolusInfo; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.BolusStart; import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BolusResponse; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartNormalBasalTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartNormalBasalTask.java index 3adb07b441..ab3a1007ec 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartNormalBasalTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartNormalBasalTask.java @@ -7,8 +7,8 @@ import info.nightscout.androidaps.plugins.pump.eopatch.ble.PatchStateManager; import info.nightscout.androidaps.plugins.pump.eopatch.core.api.BasalScheduleSetBig; import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BasalScheduleSetResponse; import info.nightscout.androidaps.plugins.pump.eopatch.vo.NormalBasal; -import info.nightscout.androidaps.utils.rx.AapsSchedulers; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.AapsSchedulers; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartQuickBolusTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartQuickBolusTask.java index bf662cad68..483ef35cef 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartQuickBolusTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartQuickBolusTask.java @@ -1,16 +1,14 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.pump.eopatch.code.BolusExDuration; - -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.BolusStart; -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.ComboBolusStart; -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.ExtBolusStart; - import javax.inject.Inject; import javax.inject.Singleton; +import info.nightscout.androidaps.plugins.pump.eopatch.code.BolusExDuration; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.BolusStart; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.ComboBolusStart; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.ExtBolusStart; import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BolusResponse; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartTempBasalTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartTempBasalTask.java index e496d5e9f5..a311f8294a 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartTempBasalTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StartTempBasalTask.java @@ -7,8 +7,8 @@ import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPreferenceManager; import info.nightscout.androidaps.plugins.pump.eopatch.core.api.TempBasalScheduleStart; import info.nightscout.androidaps.plugins.pump.eopatch.core.response.TempBasalScheduleSetResponse; import info.nightscout.androidaps.plugins.pump.eopatch.vo.TempBasal; -import info.nightscout.androidaps.utils.rx.AapsSchedulers; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.AapsSchedulers; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopBasalTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopBasalTask.java index 20ddbfff38..87f8928f1a 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopBasalTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopBasalTask.java @@ -2,23 +2,22 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; import android.os.SystemClock; -import info.nightscout.androidaps.interfaces.PumpSync; -import info.nightscout.androidaps.logging.UserEntryLogger; -import info.nightscout.androidaps.utils.userEntry.UserEntryMapper; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPreferenceManager; -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.BasalStop; -import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BasalStopResponse; - import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.inject.Singleton; import info.nightscout.androidaps.interfaces.CommandQueue; -import info.nightscout.shared.logging.AAPSLogger; +import info.nightscout.androidaps.interfaces.PumpSync; +import info.nightscout.androidaps.logging.UserEntryLogger; +import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPreferenceManager; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.BasalStop; +import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BasalStopResponse; import info.nightscout.androidaps.queue.Callback; import info.nightscout.androidaps.queue.commands.Command; +import info.nightscout.androidaps.utils.userEntry.UserEntryMapper; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Observable; import io.reactivex.rxjava3.core.Single; import io.reactivex.rxjava3.subjects.BehaviorSubject; diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopComboBolusTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopComboBolusTask.java index 2e5393a0eb..86bd9f9c0d 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopComboBolusTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopComboBolusTask.java @@ -1,17 +1,16 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.pump.eopatch.core.define.IPatchConstant; -import info.nightscout.androidaps.plugins.pump.eopatch.core.code.PatchBleResultCode; -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.BolusStop; -import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BolusStopResponse; -import info.nightscout.androidaps.plugins.pump.eopatch.core.response.ComboBolusStopResponse; - import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.inject.Singleton; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.BolusStop; +import info.nightscout.androidaps.plugins.pump.eopatch.core.code.PatchBleResultCode; +import info.nightscout.androidaps.plugins.pump.eopatch.core.define.IPatchConstant; +import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BolusStopResponse; +import info.nightscout.androidaps.plugins.pump.eopatch.core.response.ComboBolusStopResponse; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopExtBolusTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopExtBolusTask.java index 079855197e..28c714271a 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopExtBolusTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopExtBolusTask.java @@ -1,15 +1,14 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.pump.eopatch.core.define.IPatchConstant; -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.BolusStop; -import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BolusStopResponse; - import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.inject.Singleton; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.BolusStop; +import info.nightscout.androidaps.plugins.pump.eopatch.core.define.IPatchConstant; +import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BolusStopResponse; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopNowBolusTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopNowBolusTask.java index fdb6b9d0f6..9a9c719d69 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopNowBolusTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopNowBolusTask.java @@ -8,8 +8,8 @@ import javax.inject.Singleton; import info.nightscout.androidaps.plugins.pump.eopatch.core.api.BolusStop; import info.nightscout.androidaps.plugins.pump.eopatch.core.define.IPatchConstant; import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BolusStopResponse; -import info.nightscout.androidaps.utils.rx.AapsSchedulers; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.AapsSchedulers; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopTempBasalTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopTempBasalTask.java index dfed1f1105..f19344de4b 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopTempBasalTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/StopTempBasalTask.java @@ -1,14 +1,13 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.pump.eopatch.core.api.TempBasalScheduleStop; -import info.nightscout.androidaps.plugins.pump.eopatch.core.response.PatchBooleanResponse; - import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.inject.Singleton; +import info.nightscout.androidaps.plugins.pump.eopatch.core.api.TempBasalScheduleStop; +import info.nightscout.androidaps.plugins.pump.eopatch.core.response.PatchBooleanResponse; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/TaskBase.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/TaskBase.java index 8e0e0d89d1..0e18290e7f 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/TaskBase.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/TaskBase.java @@ -1,19 +1,18 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; -import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPreferenceManager; -import info.nightscout.androidaps.plugins.pump.eopatch.core.scan.BleConnectionState; -import info.nightscout.androidaps.plugins.pump.eopatch.core.scan.IBleDevice; -import info.nightscout.androidaps.plugins.pump.eopatch.core.Patch; -import info.nightscout.androidaps.plugins.pump.eopatch.core.exception.NoActivatedPatchException; -import info.nightscout.androidaps.plugins.pump.eopatch.core.exception.PatchDisconnectedException; -import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BaseResponse; - import java.util.HashMap; import javax.inject.Inject; import javax.inject.Singleton; -import info.nightscout.shared.logging.AAPSLogger; +import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPreferenceManager; +import info.nightscout.androidaps.plugins.pump.eopatch.core.Patch; +import info.nightscout.androidaps.plugins.pump.eopatch.core.exception.NoActivatedPatchException; +import info.nightscout.androidaps.plugins.pump.eopatch.core.exception.PatchDisconnectedException; +import info.nightscout.androidaps.plugins.pump.eopatch.core.response.BaseResponse; +import info.nightscout.androidaps.plugins.pump.eopatch.core.scan.BleConnectionState; +import info.nightscout.androidaps.plugins.pump.eopatch.core.scan.IBleDevice; +import info.nightscout.rx.logging.AAPSLogger; import io.reactivex.rxjava3.core.Observable; import io.reactivex.rxjava3.disposables.Disposable; diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/TaskQueue.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/TaskQueue.java index c88f4f6a80..f11baed4bb 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/TaskQueue.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/TaskQueue.java @@ -7,9 +7,9 @@ import java.util.Queue; import javax.inject.Inject; import javax.inject.Singleton; -import info.nightscout.androidaps.utils.rx.AapsSchedulers; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.AapsSchedulers; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Observable; import io.reactivex.rxjava3.subjects.BehaviorSubject; diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/UpdateConnectionTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/UpdateConnectionTask.java index 311154a388..3215230257 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/UpdateConnectionTask.java +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/UpdateConnectionTask.java @@ -1,16 +1,15 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ble.task; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.pump.eopatch.ble.PatchStateManager; -import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchState; - import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.inject.Singleton; +import info.nightscout.androidaps.plugins.pump.eopatch.ble.PatchStateManager; import info.nightscout.androidaps.plugins.pump.eopatch.core.api.UpdateConnection; import info.nightscout.androidaps.plugins.pump.eopatch.core.response.UpdateConnectionResponse; +import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchState; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Single; @Singleton diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/event/EoPatchEvents.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/event/EoPatchEvents.kt index 409a4e6561..428bba7075 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/event/EoPatchEvents.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/event/EoPatchEvents.kt @@ -2,8 +2,8 @@ package info.nightscout.androidaps.plugins.pump.eopatch.event import androidx.annotation.StringRes import androidx.fragment.app.DialogFragment -import info.nightscout.androidaps.events.Event import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode +import info.nightscout.rx.events.Event class EventEoPatchAlarm(var alarmCodes: Set, var isFirst: Boolean = false) : Event() class EventDialog(val dialog: DialogFragment, val show: Boolean) : Event() diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/extension/ObservableExtension.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/extension/ObservableExtension.kt index 1bc6009797..56094cb569 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/extension/ObservableExtension.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/extension/ObservableExtension.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.plugins.pump.eopatch.extension -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.core.Observable import io.reactivex.rxjava3.disposables.Disposable diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/extension/SingleExtension.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/extension/SingleExtension.kt index fa028a7b7a..305fd0982e 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/extension/SingleExtension.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/extension/SingleExtension.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.plugins.pump.eopatch.extension -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers import io.reactivex.rxjava3.core.Single import io.reactivex.rxjava3.disposables.Disposable diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/AlarmHelperActivity.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/AlarmHelperActivity.kt index f9fb16935b..3fa5f1eedc 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/AlarmHelperActivity.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/AlarmHelperActivity.kt @@ -4,13 +4,13 @@ import android.os.Bundle import androidx.appcompat.app.AlertDialog import info.nightscout.androidaps.activities.DialogAppCompatActivity import info.nightscout.androidaps.core.R -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode import info.nightscout.androidaps.plugins.pump.eopatch.event.EventDialog import info.nightscout.androidaps.plugins.pump.eopatch.event.EventProgressDialog import info.nightscout.androidaps.plugins.pump.eopatch.ui.dialogs.AlarmDialog import info.nightscout.androidaps.plugins.pump.eopatch.ui.dialogs.ProgressDialogHelper -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import javax.inject.Inject diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/EoBaseActivity.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/EoBaseActivity.kt index ee6796531a..4a349c175e 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/EoBaseActivity.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/EoBaseActivity.kt @@ -10,7 +10,7 @@ import androidx.lifecycle.ViewModelProvider import info.nightscout.androidaps.activities.NoSplashAppCompatActivity import info.nightscout.androidaps.core.R import info.nightscout.androidaps.plugins.pump.eopatch.dagger.EopatchPluginQualifier -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers import io.reactivex.rxjava3.disposables.CompositeDisposable import javax.inject.Inject diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/EopatchOverviewFragment.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/EopatchOverviewFragment.kt index 3b4cd0986c..01c7832ecb 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/EopatchOverviewFragment.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/EopatchOverviewFragment.kt @@ -7,18 +7,18 @@ import androidx.activity.result.ActivityResultLauncher import androidx.activity.result.contract.ActivityResultContracts import androidx.lifecycle.ViewModelProvider import dagger.android.support.DaggerAppCompatActivity -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.eopatch.R -import info.nightscout.androidaps.plugins.pump.eopatch.core.code.BolusType -import info.nightscout.androidaps.plugins.pump.eopatch.code.PatchStep import info.nightscout.androidaps.plugins.pump.eopatch.code.EventType +import info.nightscout.androidaps.plugins.pump.eopatch.code.PatchStep +import info.nightscout.androidaps.plugins.pump.eopatch.core.code.BolusType import info.nightscout.androidaps.plugins.pump.eopatch.databinding.FragmentEopatchOverviewBinding import info.nightscout.androidaps.plugins.pump.eopatch.extension.takeOne import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchOverviewViewModel import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.AlertDialogHelper -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import io.reactivex.rxjava3.disposables.CompositeDisposable import javax.inject.Inject diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/dialogs/ActivationNotCompleteDialog.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/dialogs/ActivationNotCompleteDialog.kt index 78b70ccd4c..6af969105e 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/dialogs/ActivationNotCompleteDialog.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/dialogs/ActivationNotCompleteDialog.kt @@ -1,15 +1,19 @@ package info.nightscout.androidaps.plugins.pump.eopatch.ui.dialogs import android.os.Bundle -import android.view.* +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.view.Window +import android.view.WindowManager import dagger.android.support.DaggerDialogFragment -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.eopatch.bindingadapters.setOnSafeClickListener import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPatchManager import info.nightscout.androidaps.plugins.pump.eopatch.databinding.DialogCommonBinding import info.nightscout.androidaps.plugins.pump.eopatch.ui.DialogHelperActivity import info.nightscout.androidaps.plugins.pump.eopatch.ui.EopatchActivity +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import javax.inject.Inject class ActivationNotCompleteDialog : DaggerDialogFragment() { diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/dialogs/AlarmDialog.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/dialogs/AlarmDialog.kt index 19e08c53c3..83dcc69317 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/dialogs/AlarmDialog.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/dialogs/AlarmDialog.kt @@ -11,7 +11,6 @@ import android.view.Window import android.view.WindowManager import dagger.android.support.DaggerDialogFragment import info.nightscout.androidaps.core.R -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmCode import info.nightscout.androidaps.plugins.pump.eopatch.alarm.AlarmProcess import info.nightscout.androidaps.plugins.pump.eopatch.alarm.IAlarmProcess @@ -21,8 +20,9 @@ import info.nightscout.androidaps.plugins.pump.eopatch.databinding.DialogAlarmBi import info.nightscout.androidaps.plugins.pump.eopatch.ui.AlarmHelperActivity import info.nightscout.androidaps.services.AlarmSoundServiceHelper import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import io.reactivex.rxjava3.disposables.Disposable import javax.inject.Inject diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/dialogs/CommonDialog.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/dialogs/CommonDialog.kt index 2c2775e556..ad1725a7d4 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/dialogs/CommonDialog.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/dialogs/CommonDialog.kt @@ -4,10 +4,9 @@ import android.app.Dialog import android.content.DialogInterface import android.os.Bundle import dagger.android.support.DaggerDialogFragment -import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.plugins.pump.eopatch.R import info.nightscout.androidaps.utils.alertDialogs.AlertDialogHelper -import java.lang.IllegalStateException +import info.nightscout.rx.logging.AAPSLogger import javax.inject.Inject class CommonDialog : DaggerDialogFragment() { diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/viewmodel/EopatchOverviewViewModel.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/viewmodel/EopatchOverviewViewModel.kt index 91432fe7da..31998bea4c 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/viewmodel/EopatchOverviewViewModel.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/viewmodel/EopatchOverviewViewModel.kt @@ -5,6 +5,8 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.Transformations import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.PumpSync +import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.plugins.pump.eopatch.R import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPatchManager import info.nightscout.androidaps.plugins.pump.eopatch.ble.IPreferenceManager @@ -16,16 +18,14 @@ import info.nightscout.androidaps.plugins.pump.eopatch.ui.event.UIEvent import info.nightscout.androidaps.plugins.pump.eopatch.vo.Alarms import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchConfig import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchState -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.core.Observable import io.reactivex.rxjava3.disposables.Disposable -import java.util.* +import java.util.Calendar import java.util.concurrent.TimeUnit import javax.inject.Inject import kotlin.math.max diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/viewmodel/EopatchViewModel.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/viewmodel/EopatchViewModel.kt index 374aead3c5..0a1c000647 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/viewmodel/EopatchViewModel.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/viewmodel/EopatchViewModel.kt @@ -26,13 +26,29 @@ import info.nightscout.androidaps.plugins.pump.eopatch.extension.takeOne import info.nightscout.androidaps.plugins.pump.eopatch.ui.EoBaseNavigator import info.nightscout.androidaps.plugins.pump.eopatch.ui.event.SingleLiveEvent import info.nightscout.androidaps.plugins.pump.eopatch.ui.event.UIEvent -import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.* +import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.ACTIVATION_FAILED +import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.ACTIVATION_STARTED +import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.BONDING_FAILED +import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.BONDING_STARTED +import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.GET_PATCH_INFO_FAILED +import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.GET_PATCH_INFO_STARTED +import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.NEEDLE_SENSING_FAILED +import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.NEEDLE_SENSING_READY +import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.NEEDLE_SENSING_STARTED +import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.SAFETY_CHECK_FAILED +import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.SAFETY_CHECK_READY +import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.SAFETY_CHECK_STARTED +import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.SCAN_FAILED +import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.SCAN_STARTED +import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.SELF_TEST_FAILED +import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.SELF_TEST_STARTED +import info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel.SetupStep.WAKE_UP_READY import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchConfig import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchLifecycleEvent import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchState -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.core.Maybe import io.reactivex.rxjava3.core.Observable diff --git a/pump/medtronic/build.gradle b/pump/medtronic/build.gradle index 9d8ba7a41d..329e75473a 100644 --- a/pump/medtronic/build.gradle +++ b/pump/medtronic/build.gradle @@ -14,7 +14,8 @@ android { dependencies { implementation project(':libraries') - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') implementation project(':core') implementation project(':pump:pump-common') implementation project(':pump:rileylink') diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicFragment.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicFragment.kt index 84ac9a6138..4d469792b2 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicFragment.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicFragment.kt @@ -9,14 +9,11 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import dagger.android.support.DaggerFragment -import info.nightscout.androidaps.events.EventExtendedBolusChange import info.nightscout.androidaps.events.EventPumpStatusChanged -import info.nightscout.androidaps.events.EventTempBasalChange import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState import info.nightscout.androidaps.plugins.pump.common.events.EventRefreshButtonState import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange @@ -39,9 +36,12 @@ import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.WarnColors import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventExtendedBolusChange +import info.nightscout.rx.events.EventTempBasalChange +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt index 1aa1bfa19e..0c3553b231 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.kt @@ -9,10 +9,16 @@ import androidx.preference.Preference import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResult -import info.nightscout.androidaps.events.EventRefreshOverview -import info.nightscout.androidaps.interfaces.* +import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.ActivityNames +import info.nightscout.androidaps.interfaces.CommandQueue +import info.nightscout.androidaps.interfaces.PluginDescription +import info.nightscout.androidaps.interfaces.PluginType +import info.nightscout.androidaps.interfaces.Profile +import info.nightscout.androidaps.interfaces.Pump +import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.PumpSync.TemporaryBasalType -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.common.ManufacturerType import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType @@ -43,8 +49,13 @@ import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BasalProfile import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BasalProfile.Companion.getProfilesByHourToString import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BasalProfileEntry import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.TempBasalPair -import info.nightscout.androidaps.plugins.pump.medtronic.defs.* +import info.nightscout.androidaps.plugins.pump.medtronic.defs.BasalProfileStatus +import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicCommandType import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicCommandType.Companion.getSettings +import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicCustomActionType +import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicNotificationType +import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicStatusRefreshType +import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicUIResponseType import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus import info.nightscout.androidaps.plugins.pump.medtronic.events.EventMedtronicPumpConfigurationChanged import info.nightscout.androidaps.plugins.pump.medtronic.events.EventMedtronicPumpValuesChanged @@ -55,12 +66,16 @@ import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil.Comp import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.TimeChangeType -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventRefreshOverview +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.joda.time.LocalDateTime -import java.util.* +import java.util.Calendar +import java.util.GregorianCalendar +import java.util.Locale import javax.inject.Inject import javax.inject.Singleton import kotlin.math.abs diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicCommunicationManager.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicCommunicationManager.kt index f6cc8090b9..537bd763da 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicCommunicationManager.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicCommunicationManager.kt @@ -1,7 +1,6 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm import android.os.SystemClock -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager @@ -18,7 +17,13 @@ import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RawHistory import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.MedtronicPumpHistoryDecoder import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryResult -import info.nightscout.androidaps.plugins.pump.medtronic.comm.message.* +import info.nightscout.androidaps.plugins.pump.medtronic.comm.message.CarelinkLongMessageBody +import info.nightscout.androidaps.plugins.pump.medtronic.comm.message.CarelinkShortMessageBody +import info.nightscout.androidaps.plugins.pump.medtronic.comm.message.GetHistoryPageCarelinkMessageBody +import info.nightscout.androidaps.plugins.pump.medtronic.comm.message.MessageBody +import info.nightscout.androidaps.plugins.pump.medtronic.comm.message.PacketType +import info.nightscout.androidaps.plugins.pump.medtronic.comm.message.PumpAckMessageBody +import info.nightscout.androidaps.plugins.pump.medtronic.comm.message.PumpMessage import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BasalProfile import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BatteryStatusDTO import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.ClockDTO @@ -31,8 +36,11 @@ import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpSta import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil.Companion.createByteArray import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil.Companion.getByteArrayFromUnsignedShort +import info.nightscout.rx.logging.LTag import org.joda.time.LocalDateTime -import java.util.* +import java.util.Calendar +import java.util.GregorianCalendar +import java.util.Locale import javax.inject.Inject import javax.inject.Singleton diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicConverter.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicConverter.kt index 2994a42454..24d5a97115 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicConverter.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicConverter.kt @@ -1,7 +1,5 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil import info.nightscout.androidaps.plugins.pump.common.utils.StringUtil @@ -11,9 +9,11 @@ import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.PumpSettingDTO import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType import info.nightscout.androidaps.plugins.pump.medtronic.defs.PumpConfigurationGroup import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import org.joda.time.IllegalFieldValueException import org.joda.time.LocalDateTime -import java.util.* +import java.util.Locale import javax.inject.Inject import javax.inject.Singleton diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/MedtronicHistoryDecoder.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/MedtronicHistoryDecoder.kt index 2aac99ab1f..25da4499e1 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/MedtronicHistoryDecoder.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/MedtronicHistoryDecoder.kt @@ -1,10 +1,10 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm.history -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil import info.nightscout.androidaps.plugins.pump.common.utils.StringUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import org.apache.commons.lang3.StringUtils /** diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/RawHistoryPage.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/RawHistoryPage.kt index 4558375864..330ce83f70 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/RawHistoryPage.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/RawHistoryPage.kt @@ -1,11 +1,12 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm.history -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil import info.nightscout.androidaps.plugins.pump.common.utils.CRC import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil -import java.util.* +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag +import java.util.Arrays +import java.util.Locale /** * Created by geoff on 6/4/16. diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/cgms/MedtronicCGMSHistoryDecoder.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/cgms/MedtronicCGMSHistoryDecoder.kt index 6e2ac8ad59..146c4ed6d5 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/cgms/MedtronicCGMSHistoryDecoder.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/cgms/MedtronicCGMSHistoryDecoder.kt @@ -1,16 +1,16 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.cgms -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.MedtronicHistoryDecoder import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RecordDecodeStatus import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.cgms.CGMSHistoryEntryType.Companion.getByCode import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import okhttp3.internal.and import org.joda.time.LocalDateTime -import java.util.* +import java.util.Arrays /** * This file was taken from GGC - GNU Gluco Control (ggc.sourceforge.net), application for diabetes diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/MedtronicPumpHistoryDecoder.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/MedtronicPumpHistoryDecoder.kt index 38a2deb0ef..e8babfcbe1 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/MedtronicPumpHistoryDecoder.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/MedtronicPumpHistoryDecoder.kt @@ -1,7 +1,5 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.MedtronicHistoryDecoder @@ -15,7 +13,9 @@ import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.TempBasalPair import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType import info.nightscout.androidaps.plugins.pump.medtronic.defs.PumpBolusType import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil -import java.util.* +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag +import java.util.Locale import javax.inject.Inject import javax.inject.Singleton import kotlin.experimental.and diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/PumpHistoryResult.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/PumpHistoryResult.kt index 51d394b634..0f13f33875 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/PumpHistoryResult.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/history/pump/PumpHistoryResult.kt @@ -1,10 +1,9 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil -import java.util.* -import kotlin.collections.ArrayList +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag +import java.util.Collections /** * History page contains data, sorted from newest to oldest (0=newest..n=oldest) diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/message/PumpMessage.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/message/PumpMessage.kt index 5db80f93d7..9445ecda75 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/message/PumpMessage.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/message/PumpMessage.kt @@ -1,10 +1,10 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm.message -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RLMessage import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicCommandType +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import kotlin.math.min /** diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/ui/MedtronicUIComm.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/ui/MedtronicUIComm.kt index 5289b05c17..f89e52deeb 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/ui/MedtronicUIComm.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/ui/MedtronicUIComm.kt @@ -1,11 +1,11 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm.ui import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.pump.medtronic.comm.MedtronicCommunicationManager import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicCommandType import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject /** diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/ui/MedtronicUIPostprocessor.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/ui/MedtronicUIPostprocessor.kt index b92ce04b36..f9420e56ed 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/ui/MedtronicUIPostprocessor.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/ui/MedtronicUIPostprocessor.kt @@ -1,8 +1,6 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm.ui -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BasalProfile import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BatteryStatusDTO @@ -14,10 +12,13 @@ import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicNotificat import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicUIResponseType import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import org.joda.time.DateTimeZone import org.joda.time.Duration -import java.util.* +import java.util.Date +import java.util.Locale import javax.inject.Inject import javax.inject.Singleton diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/ui/MedtronicUITask.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/ui/MedtronicUITask.kt index 9ec397e08d..348d6acbf0 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/ui/MedtronicUITask.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/ui/MedtronicUITask.kt @@ -1,9 +1,6 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm.ui import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange import info.nightscout.androidaps.plugins.pump.medtronic.comm.MedtronicCommunicationManager @@ -15,8 +12,11 @@ import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicUIRespons import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus import info.nightscout.androidaps.plugins.pump.medtronic.events.EventMedtronicPumpValuesChanged import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import org.joda.time.LocalDateTime -import java.util.* +import java.util.Locale import javax.inject.Inject /** diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt index 09ebc9d5b7..a808b84b2d 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/MedtronicHistoryData.kt @@ -6,15 +6,14 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.DetailedBolusInfo import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntry import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntryBolus import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntryTBR +import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.common.utils.StringUtil import info.nightscout.androidaps.plugins.pump.medtronic.R @@ -22,18 +21,26 @@ import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.Medtr import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntryType import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryResult -import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.* +import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BasalProfile +import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BolusDTO +import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BolusWizardDTO +import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.ClockDTO +import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.DailyTotalsDTO +import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.TempBasalPair +import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.TempBasalProcessDTO import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType import info.nightscout.androidaps.plugins.pump.medtronic.defs.PumpBolusType import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicConst import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.apache.commons.lang3.StringUtils import org.joda.time.LocalDateTime -import java.util.* +import java.util.GregorianCalendar +import java.util.Locale import javax.inject.Inject import javax.inject.Singleton diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BasalProfile.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BasalProfile.kt index f2917b7423..dc22e76484 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BasalProfile.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BasalProfile.kt @@ -1,13 +1,13 @@ package info.nightscout.androidaps.plugins.pump.medtronic.data.dto import com.google.gson.annotations.Expose -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import org.joda.time.Instant -import java.util.* +import java.util.Locale /** * Created by geoff on 6/1/15. diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BasalProfileEntry.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BasalProfileEntry.kt index b1f642162a..f94fa7bb4f 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BasalProfileEntry.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/BasalProfileEntry.kt @@ -1,10 +1,10 @@ package info.nightscout.androidaps.plugins.pump.medtronic.data.dto -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import org.joda.time.LocalTime -import java.util.* +import java.util.Locale /** * Created by geoff on 6/1/15. diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/TempBasalPair.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/TempBasalPair.kt index 86fee76519..902e4f410e 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/TempBasalPair.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/TempBasalPair.kt @@ -1,11 +1,11 @@ package info.nightscout.androidaps.plugins.pump.medtronic.data.dto -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag import info.nightscout.androidaps.plugins.pump.common.defs.TempBasalPair import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil -import java.util.* +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag +import java.util.Locale /** * Created by geoff on 5/29/15. diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/TempBasalProcessDTO.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/TempBasalProcessDTO.kt index 29645b477b..9470e0978f 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/TempBasalProcessDTO.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/data/dto/TempBasalProcessDTO.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.plugins.pump.medtronic.data.dto -import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntryType +import info.nightscout.rx.logging.AAPSLogger class TempBasalProcessDTO constructor(var itemOne: PumpHistoryEntry, var aapsLogger: AAPSLogger, diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/driver/MedtronicPumpStatus.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/driver/MedtronicPumpStatus.kt index 82238a9e3f..3af51d4f59 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/driver/MedtronicPumpStatus.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/driver/MedtronicPumpStatus.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.medtronic.driver -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange @@ -12,9 +12,10 @@ import info.nightscout.androidaps.plugins.pump.medtronic.defs.BasalProfileStatus import info.nightscout.androidaps.plugins.pump.medtronic.defs.BatteryType import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicConst -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP -import java.util.* +import java.util.Calendar +import java.util.GregorianCalendar import javax.inject.Inject import javax.inject.Singleton diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/events/EventMedtronicPumpConfigurationChanged.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/events/EventMedtronicPumpConfigurationChanged.kt index 458c055454..3ecabd0c9a 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/events/EventMedtronicPumpConfigurationChanged.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/events/EventMedtronicPumpConfigurationChanged.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.pump.medtronic.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventMedtronicPumpConfigurationChanged : Event() diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/events/EventMedtronicPumpValuesChanged.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/events/EventMedtronicPumpValuesChanged.kt index b314b9db19..ff3a44507c 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/events/EventMedtronicPumpValuesChanged.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/events/EventMedtronicPumpValuesChanged.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.pump.medtronic.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventMedtronicPumpValuesChanged : Event() diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/service/RileyLinkMedtronicService.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/service/RileyLinkMedtronicService.kt index 4154965d3b..3e8b7024ba 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/service/RileyLinkMedtronicService.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/service/RileyLinkMedtronicService.kt @@ -19,7 +19,8 @@ import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceTyp import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicConst import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import javax.inject.Inject import javax.inject.Singleton diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/util/MedtronicUtil.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/util/MedtronicUtil.kt index 31a2e8c150..3853f29679 100644 --- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/util/MedtronicUtil.kt +++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/util/MedtronicUtil.kt @@ -1,9 +1,7 @@ package info.nightscout.androidaps.plugins.pump.medtronic.util import com.google.gson.GsonBuilder -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification @@ -18,11 +16,13 @@ import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicCommandTy import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicNotificationType import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus -import info.nightscout.androidaps.interfaces.ResourceHelper +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import org.joda.time.LocalTime import java.nio.ByteBuffer import java.nio.ByteOrder -import java.util.* +import java.util.Locale import javax.inject.Inject import javax.inject.Singleton import kotlin.experimental.or diff --git a/pump/medtronic/src/test/java/info/nightscout/androidaps/TestBase.kt b/pump/medtronic/src/test/java/info/nightscout/androidaps/TestBase.kt index fd598dcb63..827ea1de9d 100644 --- a/pump/medtronic/src/test/java/info/nightscout/androidaps/TestBase.kt +++ b/pump/medtronic/src/test/java/info/nightscout/androidaps/TestBase.kt @@ -5,7 +5,6 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil @@ -13,9 +12,10 @@ import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.Medtr import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntryType import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil -import info.nightscout.shared.logging.AAPSLoggerTest -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.rx.TestAapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.shared.logging.AAPSLoggerTest import info.nightscout.shared.sharedPreferences.SP import org.junit.Before import org.junit.Rule diff --git a/pump/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicHistoryDataUTest.kt b/pump/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicHistoryDataUTest.kt index 0557795620..e25d03f6e5 100644 --- a/pump/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicHistoryDataUTest.kt +++ b/pump/medtronic/src/test/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/MedtronicHistoryDataUTest.kt @@ -2,7 +2,6 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm import android.util.Log import info.nightscout.androidaps.TestBase -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RawHistoryPage import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.MedtronicPumpHistoryDecoder @@ -15,6 +14,7 @@ import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpSta import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.utils.rx.TestAapsSchedulers import info.nightscout.androidaps.utils.serialisation.SealedClassHelper.gson +import info.nightscout.rx.bus.RxBus import org.junit.Before import org.junit.Test diff --git a/pump/omnipod-common/build.gradle b/pump/omnipod-common/build.gradle index 83adbcfabc..88f2979c2b 100644 --- a/pump/omnipod-common/build.gradle +++ b/pump/omnipod-common/build.gradle @@ -16,5 +16,6 @@ android { dependencies { implementation project(':libraries') implementation project(':core') - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') } \ No newline at end of file diff --git a/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/viewmodel/action/InitializePodViewModel.kt b/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/viewmodel/action/InitializePodViewModel.kt index 1d8cf80069..8556486e3e 100644 --- a/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/viewmodel/action/InitializePodViewModel.kt +++ b/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/viewmodel/action/InitializePodViewModel.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.action import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger abstract class InitializePodViewModel( injector: HasAndroidInjector, diff --git a/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/viewmodel/action/InsertCannulaViewModel.kt b/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/viewmodel/action/InsertCannulaViewModel.kt index 9d05e9c85c..1d9bd6a383 100644 --- a/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/viewmodel/action/InsertCannulaViewModel.kt +++ b/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/viewmodel/action/InsertCannulaViewModel.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.action import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger abstract class InsertCannulaViewModel( injector: HasAndroidInjector, diff --git a/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/viewmodel/action/PodActivationActionViewModelBase.kt b/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/viewmodel/action/PodActivationActionViewModelBase.kt index 8946072a7c..35aa0de674 100644 --- a/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/viewmodel/action/PodActivationActionViewModelBase.kt +++ b/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/activation/viewmodel/action/PodActivationActionViewModelBase.kt @@ -2,8 +2,8 @@ package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activat import dagger.android.HasAndroidInjector import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.viewmodel.ActionViewModelBase -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger abstract class PodActivationActionViewModelBase( injector: HasAndroidInjector, diff --git a/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/common/viewmodel/ActionViewModelBase.kt b/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/common/viewmodel/ActionViewModelBase.kt index cc9e8d0de4..03412433e8 100644 --- a/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/common/viewmodel/ActionViewModelBase.kt +++ b/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/common/viewmodel/ActionViewModelBase.kt @@ -4,9 +4,10 @@ import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.PumpEnactResult -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import io.reactivex.rxjava3.core.Single import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/deactivation/viewmodel/action/DeactivatePodViewModel.kt b/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/deactivation/viewmodel/action/DeactivatePodViewModel.kt index 15f8b0ba43..e3d5af1e6b 100644 --- a/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/deactivation/viewmodel/action/DeactivatePodViewModel.kt +++ b/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/ui/wizard/deactivation/viewmodel/action/DeactivatePodViewModel.kt @@ -2,8 +2,8 @@ package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactiv import dagger.android.HasAndroidInjector import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.viewmodel.ActionViewModelBase -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger abstract class DeactivatePodViewModel( injector: HasAndroidInjector, diff --git a/pump/omnipod-dash/build.gradle b/pump/omnipod-dash/build.gradle index 2f8de56b0e..34fce83489 100644 --- a/pump/omnipod-dash/build.gradle +++ b/pump/omnipod-dash/build.gradle @@ -31,7 +31,8 @@ android { dependencies { implementation project(':database') - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') implementation project(':libraries') implementation project(':core') implementation project(':pump:pump-common') diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/EventOmnipodDashPumpValuesChanged.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/EventOmnipodDashPumpValuesChanged.kt index 7aa04163dd..8cf0e01c5a 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/EventOmnipodDashPumpValuesChanged.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/EventOmnipodDashPumpValuesChanged.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventOmnipodDashPumpValuesChanged : Event() diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt index 6c9b453bcb..314e6af0a3 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt @@ -8,9 +8,6 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResult import info.nightscout.androidaps.events.EventPreferenceChange -import info.nightscout.androidaps.events.EventProfileSwitchChanged -import info.nightscout.androidaps.events.EventRefreshOverview -import info.nightscout.androidaps.events.EventTempBasalChange import info.nightscout.androidaps.extensions.convertedToAbsolute import info.nightscout.androidaps.extensions.plannedRemainingMinutes import info.nightscout.androidaps.extensions.toStringFull @@ -25,7 +22,6 @@ import info.nightscout.androidaps.interfaces.PumpDescription import info.nightscout.androidaps.interfaces.PumpPluginBase import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.common.ManufacturerType import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType @@ -72,9 +68,13 @@ import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.Round import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.TimeChangeType -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventProfileSwitchChanged +import info.nightscout.rx.events.EventRefreshOverview +import info.nightscout.rx.events.EventTempBasalChange +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.core.Completable import io.reactivex.rxjava3.core.Single diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/di/OmnipodDashHistoryModule.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/di/OmnipodDashHistoryModule.kt index a4000d6680..b2454347c4 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/di/OmnipodDashHistoryModule.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/di/OmnipodDashHistoryModule.kt @@ -8,7 +8,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.DashHistory import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.database.DashHistoryDatabase import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.database.HistoryRecordDao import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.mapper.HistoryMapper -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLogger import javax.inject.Singleton @Module diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt index 38b059d096..ae594c5cd8 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt @@ -3,26 +3,52 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver import android.os.SystemClock import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.OmnipodDashBleManager import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.event.PodEvent -import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.* +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.DeactivateCommand +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.GetStatusCommand +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.GetVersionCommand import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.GetVersionCommand.Companion.DEFAULT_UNIQUE_ID -import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.* +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.ProgramAlertsCommand +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.ProgramBasalCommand +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.ProgramBeepsCommand +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.ProgramBolusCommand +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.ProgramTempBasalCommand +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.SetUniqueIdCommand +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.SilenceAlertsCommand +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.StopDeliveryCommand +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.SuspendDeliveryCommand +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.ActivationProgress +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.AlertConfiguration +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.AlertTrigger +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.AlertType +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.BasalProgram +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.BeepRepetitionType +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.BeepType +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants.Companion.MAX_POD_LIFETIME import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants.Companion.POD_EXPIRATION_ALERT_HOURS import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants.Companion.POD_EXPIRATION_ALERT_HOURS_DURATION import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants.Companion.POD_EXPIRATION_IMMINENT_ALERT_HOURS import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants.Companion.POD_PULSE_BOLUS_UNITS -import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.* +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodStatus +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.ProgramReminder +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.AlarmStatusResponse +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.DefaultStatusResponse +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.Response +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.ResponseType +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.SetUniqueIdResponse +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.VersionResponse import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager import info.nightscout.androidaps.utils.Round -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.core.Observable import io.reactivex.rxjava3.functions.Action import io.reactivex.rxjava3.functions.Consumer import java.time.Duration import java.time.ZonedDateTime -import java.util.* +import java.util.Date +import java.util.EnumSet import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit import javax.inject.Inject diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/OmnipodDashBleManagerImpl.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/OmnipodDashBleManagerImpl.kt index dc5da6d1f8..5460da9347 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/OmnipodDashBleManagerImpl.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/OmnipodDashBleManagerImpl.kt @@ -4,17 +4,34 @@ import android.bluetooth.BluetoothAdapter import android.bluetooth.BluetoothManager import android.content.Context import info.nightscout.androidaps.extensions.toHex -import info.nightscout.androidaps.plugins.pump.omnipod.dash.BuildConfig -import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.* +import info.nightscout.androidaps.interfaces.Config +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.BusyException +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.ConnectException +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.CouldNotSendCommandException +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.FailedToConnectException +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.NotConnectedException +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.SessionEstablishmentException import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.pair.LTKExchanger import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.scan.PodScanner -import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.* +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.CommandAckError +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.CommandReceiveError +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.CommandReceiveSuccess +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.CommandSendErrorConfirming +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.CommandSendErrorSending +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.CommandSendSuccess +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.Connected +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.Connection +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.ConnectionState +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.ConnectionWaitCondition +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.NotConnected +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.Session import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.event.PodEvent import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.base.Command import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.Response import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.core.Observable import java.util.concurrent.CountDownLatch import java.util.concurrent.atomic.AtomicBoolean @@ -26,7 +43,8 @@ import kotlin.reflect.KClass class OmnipodDashBleManagerImpl @Inject constructor( private val context: Context, private val aapsLogger: AAPSLogger, - private val podState: OmnipodDashPodStateManager + private val podState: OmnipodDashPodStateManager, + private val config: Config ) : OmnipodDashBleManager { private val busy = AtomicBoolean(false) @@ -124,7 +142,7 @@ class OmnipodDashBleManagerImpl @Inject constructor( val podDevice = bluetoothAdapter?.getRemoteDevice(podAddress) ?: throw ConnectException("Bluetooth not available") val conn = connection - ?: Connection(podDevice, aapsLogger, context, podState) + ?: Connection(podDevice, aapsLogger, config, context, podState) connection = conn if (conn.connectionState() is Connected && conn.session != null) { emitter.onNext(PodEvent.AlreadyConnected(podAddress)) @@ -203,7 +221,7 @@ class OmnipodDashBleManagerImpl @Inject constructor( emitter.onNext(PodEvent.BluetoothConnecting) val podDevice = adapter.getRemoteDevice(podAddress) - val conn = Connection(podDevice, aapsLogger, context, podState) + val conn = Connection(podDevice, aapsLogger, config, context, podState) connection = conn conn.connect(ConnectionWaitCondition(timeoutMs = 3 * Connection.BASE_CONNECT_TIMEOUT_MS)) emitter.onNext(PodEvent.BluetoothConnected(podAddress)) @@ -212,13 +230,14 @@ class OmnipodDashBleManagerImpl @Inject constructor( val mIO = conn.msgIO ?: throw ConnectException("Connection lost") val ltkExchanger = LTKExchanger( aapsLogger, + config, mIO, ids, ) val pairResult = ltkExchanger.negotiateLTK() emitter.onNext(PodEvent.Paired(ids.podId)) podState.updateFromPairing(ids.podId, pairResult) - if (BuildConfig.DEBUG) { + if (config.DEBUG) { aapsLogger.info(LTag.PUMPCOMM, "Got LTK: ${pairResult.ltk.toHex()}") } emitter.onNext(PodEvent.EstablishingSession) diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/ServiceDiscoverer.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/ServiceDiscoverer.kt index ca371fafac..f2d98ad24d 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/ServiceDiscoverer.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/ServiceDiscoverer.kt @@ -9,10 +9,10 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session. import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.Connection import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.Connection.Companion.STOP_CONNECTING_CHECK_INTERVAL_MS import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.ConnectionWaitCondition -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import java.math.BigInteger -import java.util.* +import java.util.UUID class ServiceDiscoverer( private val logger: AAPSLogger, diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/callbacks/BleCommCallbacks.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/callbacks/BleCommCallbacks.kt index 226fbe9dce..766c2cbd2b 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/callbacks/BleCommCallbacks.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/callbacks/BleCommCallbacks.kt @@ -9,9 +9,9 @@ import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.CharacteristicType.Companion.byValue import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.IncomingPackets import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.DisconnectHandler -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import java.util.* +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag +import java.util.UUID import java.util.concurrent.BlockingQueue import java.util.concurrent.CountDownLatch import java.util.concurrent.LinkedBlockingQueue diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/endecrypt/EnDecrypt.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/endecrypt/EnDecrypt.kt index 0bda5dff61..c7ed4bf60a 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/endecrypt/EnDecrypt.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/endecrypt/EnDecrypt.kt @@ -2,8 +2,9 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.endecry import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessagePacket -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import org.spongycastle.crypto.engines.AESEngine import org.spongycastle.crypto.modes.CCMBlockCipher import org.spongycastle.crypto.params.AEADParameters diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/BleIO.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/BleIO.kt index 5e1974ea51..a7b4f9eb77 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/BleIO.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/BleIO.kt @@ -10,9 +10,9 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.callback import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.callbacks.WriteConfirmationError import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.callbacks.WriteConfirmationSuccess import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command.BleCommandRTS -import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.* -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.ConnectException +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import java.util.concurrent.BlockingQueue import java.util.concurrent.TimeUnit diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/CmdBleIO.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/CmdBleIO.kt index a5fda80425..908ca6d8d6 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/CmdBleIO.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/CmdBleIO.kt @@ -6,7 +6,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.OmnipodD import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.callbacks.BleCommCallbacks import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command.BleCommand import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command.BleCommandHello -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLogger import java.util.concurrent.BlockingQueue sealed class BleConfirmResult diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/DataBleIO.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/DataBleIO.kt index 6fc46dbdc1..01ad81375c 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/DataBleIO.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/io/DataBleIO.kt @@ -3,7 +3,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io import android.bluetooth.BluetoothGatt import android.bluetooth.BluetoothGattCharacteristic import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.callbacks.BleCommCallbacks -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLogger import java.util.concurrent.BlockingQueue class DataBleIO( diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessageIO.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessageIO.kt index 7df5ede178..171d025af7 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessageIO.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/message/MessageIO.kt @@ -1,13 +1,27 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message import info.nightscout.androidaps.extensions.toHex -import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command.* -import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.* +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command.BleCommand +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command.BleCommandAbort +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command.BleCommandCTS +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command.BleCommandFail +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command.BleCommandNack +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command.BleCommandRTS +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command.BleCommandSuccess +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.BleConfirmError +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.BleConfirmIncorrectData +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.BleConfirmSuccess +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.BleSendErrorConfirming +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.BleSendErrorSending +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.BleSendResult +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.BleSendSuccess +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.CmdBleIO +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.DataBleIO import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.BlePacket import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.PayloadJoiner import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.PayloadSplitter -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag sealed class MessageSendResult object MessageSendSuccess : MessageSendResult() diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/KeyExchange.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/KeyExchange.kt index 04c6765b7a..a8703cfab9 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/KeyExchange.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/KeyExchange.kt @@ -1,18 +1,19 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.pair import info.nightscout.androidaps.extensions.toHex -import info.nightscout.androidaps.plugins.pump.omnipod.dash.BuildConfig +import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.RandomByteGenerator import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.X25519KeyGenerator -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import org.spongycastle.crypto.engines.AESEngine import org.spongycastle.crypto.macs.CMac import org.spongycastle.crypto.params.KeyParameter class KeyExchange( private val aapsLogger: AAPSLogger, + private val config: Config, private val x25519: X25519KeyGenerator, randomByteGenerator: RandomByteGenerator ) { @@ -86,7 +87,7 @@ class KeyExchange( pdmNonce aesCmac(confKey, podConfData, podConf) - if (BuildConfig.DEBUG) { + if (config.DEBUG) { aapsLogger.debug(LTag.PUMPBTCOMM, "pdmPrivate: ${pdmPrivate.toHex()}") aapsLogger.debug(LTag.PUMPBTCOMM, "pdmPublic: ${pdmPublic.toHex()}") aapsLogger.debug(LTag.PUMPBTCOMM, "podPublic: ${podPublic.toHex()}") diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/LTKExchanger.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/LTKExchanger.kt index fa28370161..7426d112f6 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/LTKExchanger.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/pair/LTKExchanger.kt @@ -2,6 +2,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.pair import info.nightscout.androidaps.extensions.hexStringToByteArray import info.nightscout.androidaps.extensions.toHex +import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Ids import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.PairingException @@ -11,16 +12,18 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message. import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.StringLengthPrefixEncoding.Companion.parseKeys import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.RandomByteGenerator import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.X25519KeyGenerator -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + internal class LTKExchanger( private val aapsLogger: AAPSLogger, + config: Config, private val msgIO: MessageIO, private val ids: Ids, ) { private val podAddress = Ids.notActivated() - private val keyExchange = KeyExchange(aapsLogger, X25519KeyGenerator(), RandomByteGenerator()) + private val keyExchange = KeyExchange(aapsLogger, config, X25519KeyGenerator(), RandomByteGenerator()) private var seq: Byte = 1 @Throws(PairingException::class) diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/scan/PodScanner.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/scan/PodScanner.kt index 1f60603742..854e514f2e 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/scan/PodScanner.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/scan/PodScanner.kt @@ -6,9 +6,9 @@ import android.bluetooth.le.ScanSettings import android.os.ParcelUuid import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.ScanException import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.ScanFailFoundTooManyException -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import java.util.* +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag +import java.util.Arrays class PodScanner(private val logger: AAPSLogger, private val bluetoothAdapter: BluetoothAdapter) { diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/scan/ScanCollector.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/scan/ScanCollector.kt index 7513ed0b66..7bbb617967 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/scan/ScanCollector.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/scan/ScanCollector.kt @@ -3,9 +3,9 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.scan import android.bluetooth.le.ScanCallback import android.bluetooth.le.ScanResult import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.ScanException -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import java.util.* +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag +import java.util.Collections import java.util.concurrent.ConcurrentHashMap class ScanCollector(private val logger: AAPSLogger, private val podID: Long) : ScanCallback() { diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Connection.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Connection.kt index 358c87a4c6..94ac634c28 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Connection.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Connection.kt @@ -8,7 +8,7 @@ import android.content.Context import android.os.SystemClock import info.nightscout.androidaps.Constants import info.nightscout.androidaps.extensions.toHex -import info.nightscout.androidaps.plugins.pump.omnipod.dash.BuildConfig +import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Ids import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.ServiceDiscoverer import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.callbacks.BleCommCallbacks @@ -21,9 +21,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.DataB import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.IncomingPackets import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageIO import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import java.lang.IllegalArgumentException +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import java.util.concurrent.CountDownLatch sealed class ConnectionState @@ -46,6 +45,7 @@ data class ConnectionWaitCondition(var timeoutMs: Long? = null, val stopConnecti class Connection( private val podDevice: BluetoothDevice, private val aapsLogger: AAPSLogger, + private val config: Config, private val context: Context, private val podState: OmnipodDashPodStateManager ) : DisconnectHandler { @@ -171,17 +171,17 @@ class Connection( fun establishSession(ltk: ByteArray, msgSeq: Byte, ids: Ids, eapSqn: ByteArray): EapSqn? { val mIO = msgIO ?: throw ConnectException("Connection lost") - val eapAkaExchanger = SessionEstablisher(aapsLogger, mIO, ltk, eapSqn, ids, msgSeq) + val eapAkaExchanger = SessionEstablisher(aapsLogger, config, mIO, ltk, eapSqn, ids, msgSeq) return when (val keys = eapAkaExchanger.negotiateSessionKeys()) { is SessionNegotiationResynchronization -> { - if (BuildConfig.DEBUG) { + if (config.DEBUG) { aapsLogger.info(LTag.PUMPCOMM, "EAP AKA resynchronization: ${keys.synchronizedEapSqn}") } keys.synchronizedEapSqn } is SessionKeys -> { - if (BuildConfig.DEBUG) { + if (config.DEBUG) { aapsLogger.info(LTag.PUMPCOMM, "CK: ${keys.ck.toHex()}") aapsLogger.info(LTag.PUMPCOMM, "msgSequenceNumber: ${keys.msgSequenceNumber}") aapsLogger.info(LTag.PUMPCOMM, "Nonce: ${keys.nonce}") diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapMessage.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapMessage.kt index 133c6a2ddb..d0266122f6 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapMessage.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/EapMessage.kt @@ -2,8 +2,9 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import java.nio.ByteBuffer enum class EapCode(val code: Byte) { diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Milenage.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Milenage.kt index d9fa77fd32..48de01938a 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Milenage.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Milenage.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session import info.nightscout.androidaps.extensions.toHex -import info.nightscout.androidaps.plugins.pump.omnipod.dash.BuildConfig -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.androidaps.interfaces.Config +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import org.spongycastle.util.encoders.Hex import java.security.SecureRandom import javax.crypto.Cipher @@ -11,6 +11,7 @@ import javax.crypto.spec.SecretKeySpec class Milenage( private val aapsLogger: AAPSLogger, + private val config: Config, private val k: ByteArray, val sqn: ByteArray, randParam: ByteArray? = null, @@ -103,7 +104,7 @@ class Milenage( val receivedMacS = auts.copyOfRange(6, 14) init { - if (BuildConfig.DEBUG) { + if (config.DEBUG) { aapsLogger.debug(LTag.PUMPBTCOMM, "Milenage K: ${k.toHex()}") aapsLogger.debug(LTag.PUMPBTCOMM, "Milenage RAND: ${rand.toHex()}") aapsLogger.debug(LTag.PUMPBTCOMM, "Milenage SQN: ${sqn.toHex()}") diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Session.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Session.kt index 5dcbabf3c7..f2ec5f561c 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Session.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/Session.kt @@ -4,13 +4,18 @@ import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Ids import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.endecrypt.EnDecrypt import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.CouldNotParseResponseException -import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.* +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageIO +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessagePacket +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageSendErrorConfirming +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageSendErrorSending +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageSendSuccess import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageType +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.StringLengthPrefixEncoding import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.StringLengthPrefixEncoding.Companion.parseKeys import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.base.Command import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.Response -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag sealed class CommandSendResult object CommandSendSuccess : CommandSendResult() diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/SessionEstablisher.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/SessionEstablisher.kt index 620aac32db..52987ef873 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/SessionEstablisher.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/comm/session/SessionEstablisher.kt @@ -1,6 +1,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session import info.nightscout.androidaps.extensions.toHex +import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Ids import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.endecrypt.Nonce import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.SessionEstablishmentException @@ -8,13 +9,14 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message. import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessagePacket import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageSendSuccess import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageType -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import java.security.SecureRandom -import java.util.* +import java.util.Random class SessionEstablisher( private val aapsLogger: AAPSLogger, + private val config: Config, private val msgIO: MessageIO, private val ltk: ByteArray, private val eapSqn: ByteArray, @@ -25,7 +27,7 @@ class SessionEstablisher( private val controllerIV = ByteArray(IV_SIZE) private var nodeIV = ByteArray(IV_SIZE) private val identifier = Random().nextInt().toByte() - private val milenage = Milenage(aapsLogger, ltk, eapSqn) + private val milenage = Milenage(aapsLogger, config, ltk, eapSqn) init { require(eapSqn.size == 6) { "EAP-SQN has to be 6 bytes long" } @@ -38,7 +40,7 @@ class SessionEstablisher( fun negotiateSessionKeys(): SessionNegotiationResponse { msgSeq++ - var challenge = eapAkaChallenge() + val challenge = eapAkaChallenge() val sendResult = msgIO.sendMessage(challenge) if (sendResult !is MessageSendSuccess) { throw SessionEstablishmentException("Could not send the EAP AKA challenge: $sendResult") @@ -55,7 +57,7 @@ class SessionEstablisher( } msgSeq++ - var success = eapSuccess() + val success = eapSuccess() msgIO.sendMessage(success) return SessionKeys( @@ -154,6 +156,7 @@ class SessionEstablisher( val auts = eapMsg.attributes[0] as EapAkaAttributeAuts val autsMilenage = Milenage( aapsLogger = aapsLogger, + config = config, k = ltk, sqn = eapSqn, randParam = milenage.rand, @@ -162,6 +165,7 @@ class SessionEstablisher( val newSqnMilenage = Milenage( aapsLogger = aapsLogger, + config = config, k = ltk, sqn = autsMilenage.synchronizationSqn, randParam = milenage.rand, @@ -183,7 +187,7 @@ class SessionEstablisher( val eapMsg = EapMessage( code = EapCode.SUCCESS, attributes = arrayOf(), - identifier = identifier.toByte() + identifier = identifier ) return MessagePacket( diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt index 3ab29d722e..94d457279c 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/pod/state/OmnipodDashPodStateManagerImpl.kt @@ -3,20 +3,27 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state import android.os.SystemClock import com.google.gson.Gson import info.nightscout.androidaps.data.DetailedBolusInfo -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.omnipod.dash.EventOmnipodDashPumpValuesChanged import info.nightscout.androidaps.plugins.pump.omnipod.dash.R import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Id import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.pair.PairResult import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.EapSqn -import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.* +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.ActivationProgress +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.AlarmType +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.AlertType +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.BasalProgram +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.DeliveryStatus +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodStatus +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.SoftwareVersion import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.AlarmStatusResponse import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.DefaultStatusResponse import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.SetUniqueIdResponse import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.VersionResponse import info.nightscout.androidaps.utils.Round -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.core.Completable import io.reactivex.rxjava3.core.Maybe @@ -27,7 +34,8 @@ import java.time.Instant import java.time.ZoneId import java.time.ZoneOffset import java.time.ZonedDateTime -import java.util.* +import java.util.EnumSet +import java.util.TimeZone import javax.inject.Inject import javax.inject.Singleton diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/history/DashHistory.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/history/DashHistory.kt index 2a69c98501..3fde3b3070 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/history/DashHistory.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/history/DashHistory.kt @@ -3,13 +3,23 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.history import info.nightscout.androidaps.plugins.pump.omnipod.common.definition.OmnipodCommandType import info.nightscout.androidaps.plugins.pump.omnipod.common.definition.OmnipodCommandType.SET_BOLUS import info.nightscout.androidaps.plugins.pump.omnipod.common.definition.OmnipodCommandType.SET_TEMPORARY_BASAL -import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.* -import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.* +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.CommandConfirmationDenied +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.CommandConfirmationSuccess +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.CommandSendingFailure +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.CommandSendingNotConfirmed +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.NoActiveCommand +import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager +import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.BasalValuesRecord +import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.BolusRecord +import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.HistoryRecord +import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.InitialResult +import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.ResolvedResult +import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.TempBasalRecord import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.database.HistoryRecordDao import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.database.HistoryRecordEntity import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.mapper.HistoryMapper -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import io.reactivex.rxjava3.core.Completable import io.reactivex.rxjava3.core.Single import java.lang.System.currentTimeMillis diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodHistoryActivity.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodHistoryActivity.kt index fcfd47b5dd..140d36479b 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodHistoryActivity.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodHistoryActivity.kt @@ -19,10 +19,16 @@ import info.nightscout.androidaps.plugins.pump.common.utils.ProfileUtil import info.nightscout.androidaps.plugins.pump.omnipod.common.definition.OmnipodCommandType import info.nightscout.androidaps.plugins.pump.omnipod.dash.R import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.DashHistory -import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.* -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.LTag -import java.util.* +import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.BasalValuesRecord +import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.BolusRecord +import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.HistoryRecord +import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.InitialResult +import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.ResolvedResult +import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.TempBasalRecord +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.LTag +import java.util.Calendar +import java.util.GregorianCalendar import javax.inject.Inject class DashPodHistoryActivity : NoSplashAppCompatActivity() { diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodManagementActivity.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodManagementActivity.kt index 82c0d2b802..3ebbc5c8c7 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodManagementActivity.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/DashPodManagementActivity.kt @@ -20,7 +20,7 @@ import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.events.EventQueueChanged import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/OmnipodDashOverviewFragment.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/OmnipodDashOverviewFragment.kt index 9c90531efb..73f76633c2 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/OmnipodDashOverviewFragment.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/OmnipodDashOverviewFragment.kt @@ -16,7 +16,6 @@ import info.nightscout.androidaps.interfaces.ActivityNames import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.pump.omnipod.common.databinding.OmnipodCommonOverviewButtonsBinding @@ -40,8 +39,9 @@ import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.protection.ProtectionCheck -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.ui.UIRunnable +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInitializePodViewModel.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInitializePodViewModel.kt index 18dca74640..63fb4d6072 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInitializePodViewModel.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInitializePodViewModel.kt @@ -14,9 +14,10 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.DashHistory import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.InitialResult import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.ResolvedResult import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.I8n -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.core.Single import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt index a3c478725f..62c932fc14 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt @@ -7,7 +7,6 @@ import info.nightscout.androidaps.data.PumpEnactResult import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.pump.common.defs.PumpType @@ -24,9 +23,10 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.Constants import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.I8n import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.mapProfileToBasalProgram import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.core.Single import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/deactivation/viewmodel/action/DashDeactivatePodViewModel.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/deactivation/viewmodel/action/DashDeactivatePodViewModel.kt index edda5f7429..8945e35ebb 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/deactivation/viewmodel/action/DashDeactivatePodViewModel.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/deactivation/viewmodel/action/DashDeactivatePodViewModel.kt @@ -4,7 +4,6 @@ import androidx.annotation.StringRes import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.PumpEnactResult import info.nightscout.androidaps.interfaces.CommandQueue -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.pump.omnipod.common.R @@ -12,8 +11,9 @@ import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.Comm import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.viewmodel.action.DeactivatePodViewModel import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager import info.nightscout.androidaps.queue.Callback -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger import io.reactivex.rxjava3.core.Single import javax.inject.Inject diff --git a/pump/omnipod-eros/build.gradle b/pump/omnipod-eros/build.gradle index 6b3756e762..177c839b0f 100644 --- a/pump/omnipod-eros/build.gradle +++ b/pump/omnipod-eros/build.gradle @@ -24,7 +24,8 @@ android { dependencies { implementation project(':database') - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') implementation project(':libraries') implementation project(':core') implementation project(':pump:pump-common') diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java index 2a72613ba8..c9f73dc12e 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java @@ -36,10 +36,7 @@ import javax.inject.Singleton; import dagger.android.HasAndroidInjector; import info.nightscout.androidaps.data.DetailedBolusInfo; import info.nightscout.androidaps.data.PumpEnactResult; -import info.nightscout.androidaps.events.EventAppExit; -import info.nightscout.androidaps.events.EventAppInitialized; import info.nightscout.androidaps.events.EventPreferenceChange; -import info.nightscout.androidaps.events.EventRefreshOverview; import info.nightscout.androidaps.interfaces.ActivePlugin; import info.nightscout.androidaps.interfaces.ActivityNames; import info.nightscout.androidaps.interfaces.CommandQueue; @@ -52,7 +49,6 @@ import info.nightscout.androidaps.interfaces.PumpDescription; import info.nightscout.androidaps.interfaces.PumpPluginBase; import info.nightscout.androidaps.interfaces.PumpSync; import info.nightscout.androidaps.interfaces.ResourceHelper; -import info.nightscout.androidaps.plugins.bus.RxBus; import info.nightscout.androidaps.plugins.common.ManufacturerType; import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType; import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification; @@ -92,7 +88,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.event.EventOmnipodEr import info.nightscout.androidaps.plugins.pump.omnipod.eros.event.EventOmnipodErosPumpValuesChanged; import info.nightscout.androidaps.plugins.pump.omnipod.eros.event.EventOmnipodErosTbrChanged; import info.nightscout.androidaps.plugins.pump.omnipod.eros.event.EventOmnipodErosUncertainTbrRecovered; -import info.nightscout.androidaps.plugins.pump.omnipod.eros.history.ErosHistory; import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodErosManager; import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandGetPodStatus; import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandReadPulseLog; @@ -109,9 +104,13 @@ import info.nightscout.androidaps.utils.FabricPrivacy; import info.nightscout.androidaps.utils.Round; import info.nightscout.androidaps.utils.T; import info.nightscout.androidaps.utils.TimeChangeType; -import info.nightscout.androidaps.utils.rx.AapsSchedulers; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.AapsSchedulers; +import info.nightscout.rx.bus.RxBus; +import info.nightscout.rx.events.EventAppExit; +import info.nightscout.rx.events.EventAppInitialized; +import info.nightscout.rx.events.EventRefreshOverview; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import info.nightscout.shared.sharedPreferences.SP; import io.reactivex.rxjava3.disposables.CompositeDisposable; @@ -661,7 +660,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements Pump, Riley // neither carbs nor bolus requested aapsLogger.error("deliverTreatment: Invalid input: neither carbs nor insulin are set in treatment"); return new PumpEnactResult(getInjector()).success(false).enacted(false).bolusDelivered(0d).carbsDelivered(0d) - .comment(info.nightscout.androidaps.core.R.string.invalidinput); + .comment(R.string.invalidinput); } else if (detailedBolusInfo.insulin > 0) { // bolus needed, ask pump to deliver it return deliverBolus(detailedBolusInfo); diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/communication/action/AssignAddressAction.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/communication/action/AssignAddressAction.java index 6ae931b5e1..4ac4a473bf 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/communication/action/AssignAddressAction.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/communication/action/AssignAddressAction.java @@ -5,7 +5,6 @@ import org.joda.time.DateTimeZone; import java.util.Collections; import java.util.Random; -import info.nightscout.shared.logging.AAPSLogger; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.OmnipodMessage; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command.AssignAddressCommand; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.VersionResponse; @@ -16,6 +15,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.Ill import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.IllegalVersionResponseTypeException; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.manager.ErosPodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.manager.OmnipodRileyLinkCommunicationManager; +import info.nightscout.rx.logging.AAPSLogger; public class AssignAddressAction implements OmnipodAction { private final ErosPodStateManager podStateManager; diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/communication/action/SetupPodAction.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/communication/action/SetupPodAction.java index 25a49bf505..9b1feeb80c 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/communication/action/SetupPodAction.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/communication/action/SetupPodAction.java @@ -4,7 +4,6 @@ import org.joda.time.DateTime; import java.util.Collections; -import info.nightscout.shared.logging.AAPSLogger; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.OmnipodMessage; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command.SetupPodCommand; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.VersionResponse; @@ -18,6 +17,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.Ill import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.IllegalVersionResponseTypeException; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.manager.ErosPodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.manager.OmnipodRileyLinkCommunicationManager; +import info.nightscout.rx.logging.AAPSLogger; public class SetupPodAction implements OmnipodAction { private final ErosPodStateManager podStateManager; diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/communication/message/OmnipodMessage.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/communication/message/OmnipodMessage.java index 9c35851006..d8437851b3 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/communication/message/OmnipodMessage.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/communication/message/OmnipodMessage.java @@ -4,8 +4,6 @@ import java.util.ArrayList; import java.util.EnumSet; import java.util.List; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command.CancelDeliveryCommand; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command.GetStatusCommand; @@ -17,6 +15,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.Po import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.CrcMismatchException; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.MessageDecodingException; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.NotEnoughDataException; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; public class OmnipodMessage { diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/manager/ErosPodStateManager.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/manager/ErosPodStateManager.java index caa6d72f4d..d49c868cc3 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/manager/ErosPodStateManager.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/manager/ErosPodStateManager.java @@ -19,8 +19,6 @@ import java.util.Objects; import java.util.Optional; import java.util.function.Supplier; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.OmnipodMessage; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.StatusUpdatableResponse; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo.PodInfoDetailedStatus; @@ -36,6 +34,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.Om import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BasalSchedule; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.util.TimeUtil; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; // TODO add nullchecks on some setters public abstract class ErosPodStateManager { diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/manager/OmnipodManager.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/manager/OmnipodManager.java index fceedb167a..f132dfd867 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/manager/OmnipodManager.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/driver/manager/OmnipodManager.java @@ -11,8 +11,6 @@ import java.util.concurrent.TimeUnit; import java.util.function.BiConsumer; import java.util.function.Supplier; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.action.AcknowledgeAlertsAction; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.action.AssignAddressAction; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.action.BolusAction; @@ -52,7 +50,9 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.Pod import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.PodProgressStatusVerificationFailedException; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.PrecedingCommandFailedUncertainlyException; import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.manager.OmnipodRileyLinkCommunicationManager; -import info.nightscout.androidaps.utils.rx.AapsSchedulers; +import info.nightscout.rx.AapsSchedulers; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import io.reactivex.rxjava3.core.Completable; import io.reactivex.rxjava3.core.Flowable; import io.reactivex.rxjava3.core.Single; diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosActiveAlertsChanged.kt b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosActiveAlertsChanged.kt index c159cc3331..0737d65302 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosActiveAlertsChanged.kt +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosActiveAlertsChanged.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.event -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event /** * Created by andy on 04.06.2018. diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosFaultEventChanged.kt b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosFaultEventChanged.kt index c7ed0d7304..3d6d93488c 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosFaultEventChanged.kt +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosFaultEventChanged.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.event -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event /** * Created by andy on 04.06.2018. diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosPumpValuesChanged.kt b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosPumpValuesChanged.kt index 05c8de7537..a61256b424 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosPumpValuesChanged.kt +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosPumpValuesChanged.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.event -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event /** * Created by andy on 04.06.2018. diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosTbrChanged.kt b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosTbrChanged.kt index 0350aa8377..c2c58ad4d1 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosTbrChanged.kt +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosTbrChanged.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.event -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event /** * Created by andy on 04.06.2018. diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosUncertainTbrRecovered.kt b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosUncertainTbrRecovered.kt index 1098c56da9..1fb54c13be 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosUncertainTbrRecovered.kt +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/event/EventOmnipodErosUncertainTbrRecovered.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.event -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event /** * Created by andy on 04.06.2018. diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsErosPodStateManager.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsErosPodStateManager.java index 92622268a0..a9f65dfdf7 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsErosPodStateManager.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsErosPodStateManager.java @@ -3,8 +3,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.manager; import javax.inject.Inject; import javax.inject.Singleton; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.androidaps.plugins.bus.RxBus; import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification; import info.nightscout.androidaps.plugins.general.overview.notifications.Notification; import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.OmnipodErosStorageKeys; @@ -13,6 +11,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.event.EventOmnipodEr import info.nightscout.androidaps.plugins.pump.omnipod.eros.event.EventOmnipodErosFaultEventChanged; import info.nightscout.androidaps.plugins.pump.omnipod.eros.event.EventOmnipodErosTbrChanged; import info.nightscout.androidaps.plugins.pump.omnipod.eros.event.EventOmnipodErosUncertainTbrRecovered; +import info.nightscout.rx.bus.RxBus; +import info.nightscout.rx.logging.AAPSLogger; import info.nightscout.shared.sharedPreferences.SP; @Singleton diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java index 2cba6243c3..56a687f02b 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsOmnipodErosManager.java @@ -16,14 +16,11 @@ import javax.inject.Singleton; import dagger.android.HasAndroidInjector; import info.nightscout.androidaps.data.DetailedBolusInfo; import info.nightscout.androidaps.data.PumpEnactResult; -import info.nightscout.androidaps.events.Event; -import info.nightscout.androidaps.events.EventRefreshOverview; import info.nightscout.androidaps.extensions.PumpStateExtensionKt; import info.nightscout.androidaps.interfaces.ActivityNames; import info.nightscout.androidaps.interfaces.Profile; import info.nightscout.androidaps.interfaces.PumpSync; import info.nightscout.androidaps.interfaces.ResourceHelper; -import info.nightscout.androidaps.plugins.bus.RxBus; import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress; @@ -78,9 +75,12 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.manager.Om import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.AapsOmnipodUtil; import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.OmnipodAlertUtil; import info.nightscout.androidaps.utils.T; -import info.nightscout.androidaps.utils.rx.AapsSchedulers; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.rx.AapsSchedulers; +import info.nightscout.rx.bus.RxBus; +import info.nightscout.rx.events.Event; +import info.nightscout.rx.events.EventRefreshOverview; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import info.nightscout.shared.sharedPreferences.SP; import io.reactivex.rxjava3.subjects.SingleSubject; diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/rileylink/manager/OmnipodRileyLinkCommunicationManager.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/rileylink/manager/OmnipodRileyLinkCommunicationManager.java index cf94851de7..676a9626bc 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/rileylink/manager/OmnipodRileyLinkCommunicationManager.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/rileylink/manager/OmnipodRileyLinkCommunicationManager.java @@ -8,7 +8,6 @@ import java.util.List; import javax.inject.Inject; import javax.inject.Singleton; -import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException; @@ -44,6 +43,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.Ril import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.RileyLinkUnexpectedException; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.RileyLinkUnreachableException; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.manager.ErosPodStateManager; +import info.nightscout.rx.logging.LTag; /** * Created by andy on 6/29/18. diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/rileylink/service/RileyLinkOmnipodService.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/rileylink/service/RileyLinkOmnipodService.java index c6a7d37063..8f7f9d3183 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/rileylink/service/RileyLinkOmnipodService.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/rileylink/service/RileyLinkOmnipodService.java @@ -9,7 +9,6 @@ import org.apache.commons.lang3.StringUtils; import javax.inject.Inject; -import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst; @@ -21,6 +20,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.OmnipodErosPumpPlugi import info.nightscout.androidaps.plugins.pump.omnipod.eros.R; import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.manager.OmnipodRileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.AapsOmnipodUtil; +import info.nightscout.rx.logging.LTag; /** diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodHistoryActivity.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodHistoryActivity.java index d795fc1455..530d2d0f2e 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodHistoryActivity.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodHistoryActivity.java @@ -23,19 +23,19 @@ import java.util.List; import javax.inject.Inject; import info.nightscout.androidaps.activities.NoSplashAppCompatActivity; -import info.nightscout.androidaps.plugins.pump.omnipod.eros.history.ErosHistory; -import info.nightscout.androidaps.plugins.pump.omnipod.eros.history.database.ErosHistoryRecordEntity; import info.nightscout.androidaps.interfaces.Profile; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; +import info.nightscout.androidaps.interfaces.ResourceHelper; import info.nightscout.androidaps.plugins.pump.common.defs.PumpHistoryEntryGroup; import info.nightscout.androidaps.plugins.pump.common.defs.PumpType; import info.nightscout.androidaps.plugins.pump.common.defs.TempBasalPair; import info.nightscout.androidaps.plugins.pump.common.utils.ProfileUtil; import info.nightscout.androidaps.plugins.pump.omnipod.eros.R; import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.PodHistoryEntryType; +import info.nightscout.androidaps.plugins.pump.omnipod.eros.history.ErosHistory; +import info.nightscout.androidaps.plugins.pump.omnipod.eros.history.database.ErosHistoryRecordEntity; import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.AapsOmnipodUtil; -import info.nightscout.androidaps.interfaces.ResourceHelper; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; public class ErosPodHistoryActivity extends NoSplashAppCompatActivity { diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodManagementActivity.kt b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodManagementActivity.kt index 3893b36eea..e91275e9be 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodManagementActivity.kt +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/ErosPodManagementActivity.kt @@ -32,8 +32,8 @@ import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.events.EventQueueChanged import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.ui.UIRunnable +import info.nightscout.rx.AapsSchedulers import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/OmnipodErosOverviewFragment.kt b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/OmnipodErosOverviewFragment.kt index f62e5c044c..507a8ccbdb 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/OmnipodErosOverviewFragment.kt +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/OmnipodErosOverviewFragment.kt @@ -15,7 +15,6 @@ import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ActivityNames import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange @@ -48,8 +47,9 @@ import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.protection.ProtectionCheck -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.ui.UIRunnable +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/activation/viewmodel/action/ErosInitializePodViewModel.kt b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/activation/viewmodel/action/ErosInitializePodViewModel.kt index 0d0e77c088..a31d927a27 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/activation/viewmodel/action/ErosInitializePodViewModel.kt +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/activation/viewmodel/action/ErosInitializePodViewModel.kt @@ -3,13 +3,13 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activatio import androidx.annotation.StringRes import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.PumpEnactResult -import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.action.InitializePodViewModel import info.nightscout.androidaps.plugins.pump.omnipod.eros.R import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.ActivationProgress import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsErosPodStateManager import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodErosManager -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger import io.reactivex.rxjava3.core.Single import javax.inject.Inject diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/activation/viewmodel/action/ErosInsertCannulaViewModel.kt b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/activation/viewmodel/action/ErosInsertCannulaViewModel.kt index bd58f2d84e..39261e5abf 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/activation/viewmodel/action/ErosInsertCannulaViewModel.kt +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/activation/viewmodel/action/ErosInsertCannulaViewModel.kt @@ -4,13 +4,13 @@ import androidx.annotation.StringRes import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.PumpEnactResult import info.nightscout.androidaps.interfaces.ProfileFunction -import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.action.InsertCannulaViewModel import info.nightscout.androidaps.plugins.pump.omnipod.eros.R import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.ActivationProgress import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsErosPodStateManager import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodErosManager -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger import io.reactivex.rxjava3.core.Single import javax.inject.Inject diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/deactivation/viewmodel/action/ErosDeactivatePodViewModel.kt b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/deactivation/viewmodel/action/ErosDeactivatePodViewModel.kt index 3733176cf6..019e53ae80 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/deactivation/viewmodel/action/ErosDeactivatePodViewModel.kt +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/ui/wizard/deactivation/viewmodel/action/ErosDeactivatePodViewModel.kt @@ -4,13 +4,13 @@ import androidx.annotation.StringRes import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.PumpEnactResult import info.nightscout.androidaps.interfaces.CommandQueue -import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.plugins.pump.omnipod.common.R import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandDeactivatePod import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.viewmodel.action.DeactivatePodViewModel import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodErosManager import info.nightscout.androidaps.queue.Callback -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger import io.reactivex.rxjava3.core.Single import javax.inject.Inject diff --git a/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/TestBase.kt b/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/TestBase.kt index 3d78d1b4f6..b4c68bf8b5 100644 --- a/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/TestBase.kt +++ b/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/TestBase.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps -import info.nightscout.shared.logging.AAPSLoggerTest -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.rx.TestAapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.shared.logging.AAPSLoggerTest import org.junit.Before import org.junit.Rule import org.mockito.Mockito diff --git a/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPluginTest.kt b/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPluginTest.kt index 46ce682b2b..5118c70129 100644 --- a/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPluginTest.kt +++ b/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPluginTest.kt @@ -10,12 +10,12 @@ import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.Profile import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.defs.TempBasalPair import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodErosManager import info.nightscout.androidaps.utils.rx.TestAapsSchedulers +import info.nightscout.rx.bus.RxBus import org.joda.time.DateTimeZone import org.joda.time.tz.UTCProvider import org.junit.Assert diff --git a/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsErosPodStateManagerTest.kt b/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsErosPodStateManagerTest.kt index 8c15bc9fa8..c1ae911d92 100644 --- a/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsErosPodStateManagerTest.kt +++ b/pump/omnipod-eros/src/test/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/manager/AapsErosPodStateManagerTest.kt @@ -1,10 +1,10 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.manager import info.nightscout.androidaps.TestBase -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.FirmwareVersion import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus import info.nightscout.androidaps.utils.rx.TestAapsSchedulers +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import org.joda.time.DateTime import org.joda.time.DateTimeUtils diff --git a/pump/pump-common/build.gradle b/pump/pump-common/build.gradle index b1802ccb8b..65880c9874 100644 --- a/pump/pump-common/build.gradle +++ b/pump/pump-common/build.gradle @@ -14,8 +14,8 @@ android { dependencies { implementation project(':core') - implementation project(':shared') - //implementation project(':database') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') implementation('com.thoughtworks.xstream:xstream:1.4.19') { exclude group: 'xmlpull', module: 'xmlpull' diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.kt index a302ffa3f5..198b4b7d6d 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/PumpPluginAbstract.kt @@ -8,29 +8,37 @@ import com.google.gson.GsonBuilder import dagger.android.HasAndroidInjector import info.nightscout.androidaps.data.DetailedBolusInfo import info.nightscout.androidaps.data.PumpEnactResult -import info.nightscout.androidaps.events.EventAppExit -import info.nightscout.androidaps.events.EventCustomActionsChanged import info.nightscout.androidaps.extensions.convertedToAbsolute import info.nightscout.androidaps.extensions.plannedRemainingMinutes import info.nightscout.androidaps.extensions.toStringFull -import info.nightscout.androidaps.interfaces.* +import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.CommandQueue +import info.nightscout.androidaps.interfaces.Constraints +import info.nightscout.androidaps.interfaces.PluginDescription +import info.nightscout.androidaps.interfaces.Profile +import info.nightscout.androidaps.interfaces.Pump +import info.nightscout.androidaps.interfaces.PumpDescription +import info.nightscout.androidaps.interfaces.PumpPluginBase +import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.PumpSync.TemporaryBasalType -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.common.ManufacturerType import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress import info.nightscout.androidaps.plugins.pump.common.data.PumpStatus import info.nightscout.androidaps.plugins.pump.common.defs.PumpDriverState import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntryCarbs +import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DecimalFormatter.to0Decimal import info.nightscout.androidaps.utils.DecimalFormatter.to2Decimal import info.nightscout.androidaps.utils.FabricPrivacy -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventAppExit +import info.nightscout.rx.events.EventCustomActionsChanged +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import io.reactivex.rxjava3.disposables.CompositeDisposable import org.json.JSONException diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BondStateReceiver.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BondStateReceiver.kt index 3105e3842c..025133ba71 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BondStateReceiver.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ble/BondStateReceiver.kt @@ -8,10 +8,10 @@ import com.google.gson.Gson import dagger.android.DaggerBroadcastReceiver import info.nightscout.androidaps.extensions.safeGetParcelableExtra import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.common.events.EventPumpConnectionParametersChanged -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/di/PumpCommonModule.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/di/PumpCommonModule.kt index 658579b280..e18c7070f6 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/di/PumpCommonModule.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/di/PumpCommonModule.kt @@ -3,8 +3,8 @@ package info.nightscout.androidaps.plugins.pump.common.di import dagger.Module import dagger.Provides import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import javax.inject.Singleton diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/ble/PumpBLESelectorAbstract.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/ble/PumpBLESelectorAbstract.kt index 872645fa30..5142254dc0 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/ble/PumpBLESelectorAbstract.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/driver/ble/PumpBLESelectorAbstract.kt @@ -5,12 +5,12 @@ import android.bluetooth.le.ScanFilter import android.bluetooth.le.ScanSettings import android.content.Context import android.widget.Toast -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.pump.common.R import info.nightscout.androidaps.plugins.pump.common.driver.PumpBLESelector -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP abstract class PumpBLESelectorAbstract constructor( diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventBondChanged.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventBondChanged.kt index 8e2c8b978c..2f22f9fe02 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventBondChanged.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventBondChanged.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.common.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventBondChanged( var connectionAddress: String, diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpChanged.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpChanged.kt index 36b1107882..dc4c2f1086 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpChanged.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpChanged.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.common.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventPumpChanged(var serialNumber: String, var connectionAddress: String, diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpConnectionParametersChanged.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpConnectionParametersChanged.kt index d6c5b1563a..55402e1467 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpConnectionParametersChanged.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpConnectionParametersChanged.kt @@ -1,6 +1,6 @@ package info.nightscout.androidaps.plugins.pump.common.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventPumpConnectionParametersChanged : Event() { } \ No newline at end of file diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpFragmentValuesChanged.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpFragmentValuesChanged.kt index fcb55dcd11..4e69bd8de5 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpFragmentValuesChanged.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventPumpFragmentValuesChanged.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.common.events -import info.nightscout.androidaps.events.Event import info.nightscout.androidaps.plugins.pump.common.defs.PumpUpdateFragmentType +import info.nightscout.rx.events.Event class EventPumpFragmentValuesChanged : Event { diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventRefreshButtonState.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventRefreshButtonState.kt index 54f4773141..401e40083f 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventRefreshButtonState.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/events/EventRefreshButtonState.kt @@ -1,5 +1,5 @@ package info.nightscout.androidaps.plugins.pump.common.events -import info.nightscout.androidaps.events.Event +import info.nightscout.rx.events.Event class EventRefreshButtonState (val newState : Boolean): Event() \ No newline at end of file diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpSyncStorage.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpSyncStorage.kt index 58c42cf577..a45ab5b8cf 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpSyncStorage.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpSyncStorage.kt @@ -4,8 +4,9 @@ import com.thoughtworks.xstream.XStream import com.thoughtworks.xstream.security.AnyTypePermission import info.nightscout.androidaps.data.DetailedBolusInfo import info.nightscout.androidaps.interfaces.PumpSync -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject import javax.inject.Singleton diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ui/PumpBLEConfigActivity.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ui/PumpBLEConfigActivity.kt index a2fab202c3..fadc2ff4cb 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ui/PumpBLEConfigActivity.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ui/PumpBLEConfigActivity.kt @@ -22,7 +22,7 @@ import android.widget.BaseAdapter import android.widget.TextView import dagger.android.support.DaggerAppCompatActivity import info.nightscout.androidaps.interfaces.ActivePlugin -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.pump.common.R import info.nightscout.androidaps.plugins.pump.common.ble.BlePreCheck import info.nightscout.androidaps.plugins.pump.common.databinding.PumpBleConfigActivityBinding @@ -30,9 +30,9 @@ import info.nightscout.androidaps.plugins.pump.common.driver.PumpBLESelector import info.nightscout.androidaps.plugins.pump.common.driver.PumpBLESelectorText import info.nightscout.androidaps.plugins.pump.common.driver.PumpDriverConfigurationCapable import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.apache.commons.lang3.StringUtils import javax.inject.Inject diff --git a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ui/PumpHistoryActivity.kt b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ui/PumpHistoryActivity.kt index a29cf41094..e262f9d3bd 100644 --- a/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ui/PumpHistoryActivity.kt +++ b/pump/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/ui/PumpHistoryActivity.kt @@ -13,6 +13,7 @@ import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import dagger.android.support.DaggerAppCompatActivity import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.pump.common.R import info.nightscout.androidaps.plugins.pump.common.databinding.PumpHistoryActivityBinding import info.nightscout.androidaps.plugins.pump.common.defs.PumpHistoryEntryGroup @@ -20,9 +21,8 @@ import info.nightscout.androidaps.plugins.pump.common.driver.PumpDriverConfigura import info.nightscout.androidaps.plugins.pump.common.driver.history.PumpHistoryDataProvider import info.nightscout.androidaps.plugins.pump.common.driver.history.PumpHistoryEntry import info.nightscout.androidaps.plugins.pump.common.driver.history.PumpHistoryText -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject class PumpHistoryActivity : DaggerAppCompatActivity() { diff --git a/pump/rileylink/build.gradle b/pump/rileylink/build.gradle index 33c437bb34..222096180d 100644 --- a/pump/rileylink/build.gradle +++ b/pump/rileylink/build.gradle @@ -13,7 +13,8 @@ android { } dependencies { - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') implementation project(':core') implementation project(':pump:pump-common') } diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/dialog/RileyLinkBLEConfigActivity.kt b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/dialog/RileyLinkBLEConfigActivity.kt index f2c80cc3c9..60bff894fa 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/dialog/RileyLinkBLEConfigActivity.kt +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/dialog/RileyLinkBLEConfigActivity.kt @@ -37,11 +37,11 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.Gatt import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.databinding.RileyLinkBleConfigActivityBinding import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkPumpDevice import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.apache.commons.lang3.StringUtils -import java.util.* +import java.util.Locale import javax.inject.Inject // IMPORTANT: This activity needs to be called from RileyLinkSelectPreference (see pref_medtronic.xml as example) diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/RileyLinkCommunicationManager.java b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/RileyLinkCommunicationManager.java index 1837bfce2e..dc3170fabc 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/RileyLinkCommunicationManager.java +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/RileyLinkCommunicationManager.java @@ -6,8 +6,6 @@ import javax.inject.Inject; import dagger.android.HasAndroidInjector; import info.nightscout.androidaps.interfaces.ActivePlugin; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RFSpy; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException; @@ -25,6 +23,8 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.WakeAndTuneTask; import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.androidaps.utils.Round; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import info.nightscout.shared.sharedPreferences.SP; /** diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/RileyLinkUtil.java b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/RileyLinkUtil.java index 8f478d36f2..22d4e26f04 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/RileyLinkUtil.java +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/RileyLinkUtil.java @@ -20,7 +20,7 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.enco import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkEncodingType; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.data.BleAdvertisedData; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.data.RLHistoryItem; -import info.nightscout.shared.logging.AAPSLogger; +import info.nightscout.rx.logging.AAPSLogger; /** * Created by andy on 17/05/2018. diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/RFSpy.java b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/RFSpy.java index 356628cce8..3e178b101b 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/RFSpy.java +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/RFSpy.java @@ -12,10 +12,7 @@ import javax.inject.Inject; import javax.inject.Singleton; import dagger.android.HasAndroidInjector; -import info.nightscout.androidaps.events.EventRefreshOverview; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; -import info.nightscout.androidaps.plugins.bus.RxBus; +import info.nightscout.androidaps.interfaces.ResourceHelper; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.R; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil; @@ -38,7 +35,10 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.Riley import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.androidaps.plugins.pump.common.utils.StringUtil; import info.nightscout.androidaps.plugins.pump.common.utils.ThreadUtil; -import info.nightscout.androidaps.interfaces.ResourceHelper; +import info.nightscout.rx.bus.RxBus; +import info.nightscout.rx.events.EventRefreshOverview; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; import info.nightscout.shared.sharedPreferences.SP; /** diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/RFSpyReader.kt b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/RFSpyReader.kt index 62abb3fd8e..c064653472 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/RFSpyReader.kt +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/RFSpyReader.kt @@ -6,9 +6,9 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.Rile import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.operations.BLECommOperationResult import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil import info.nightscout.androidaps.plugins.pump.common.utils.ThreadUtil -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import java.util.* +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag +import java.util.UUID import java.util.concurrent.Executors import java.util.concurrent.LinkedBlockingQueue import java.util.concurrent.Semaphore diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/RileyLinkBLE.kt b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/RileyLinkBLE.kt index bcb6630d9a..efd8b123fd 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/RileyLinkBLE.kt +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/RileyLinkBLE.kt @@ -1,7 +1,15 @@ package info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble import android.annotation.SuppressLint -import android.bluetooth.* +import android.bluetooth.BluetoothAdapter +import android.bluetooth.BluetoothDevice +import android.bluetooth.BluetoothGatt +import android.bluetooth.BluetoothGattCallback +import android.bluetooth.BluetoothGattCharacteristic +import android.bluetooth.BluetoothGattDescriptor +import android.bluetooth.BluetoothGattService +import android.bluetooth.BluetoothManager +import android.bluetooth.BluetoothProfile import android.content.Context import android.content.pm.PackageManager import android.os.Build @@ -22,11 +30,12 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLin import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil import info.nightscout.androidaps.plugins.pump.common.utils.ThreadUtil -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import org.apache.commons.lang3.StringUtils -import java.util.* +import java.util.Locale +import java.util.UUID import java.util.concurrent.Semaphore import javax.inject.Inject import javax.inject.Singleton diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/data/RadioResponse.java b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/data/RadioResponse.java index 5fc174cf97..c04163dcec 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/data/RadioResponse.java +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/data/RadioResponse.java @@ -5,8 +5,6 @@ import org.apache.commons.lang3.NotImplementedException; import javax.inject.Inject; import dagger.android.HasAndroidInjector; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.command.RileyLinkCommand; @@ -16,6 +14,8 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.Rile import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData; import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.androidaps.plugins.pump.common.utils.CRC; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; /** * Created by geoff on 5/30/16. diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/data/encoding/Encoding4b6bAbstract.java b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/data/encoding/Encoding4b6bAbstract.java index d45e9c456c..ddde11e6b5 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/data/encoding/Encoding4b6bAbstract.java +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/data/encoding/Encoding4b6bAbstract.java @@ -2,7 +2,7 @@ package info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.enc import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException; import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; -import info.nightscout.shared.logging.AAPSLogger; +import info.nightscout.rx.logging.AAPSLogger; /** diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/data/encoding/Encoding4b6bGeoff.java b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/data/encoding/Encoding4b6bGeoff.java index 3c4dffe31c..0b89d85a34 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/data/encoding/Encoding4b6bGeoff.java +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/data/encoding/Encoding4b6bGeoff.java @@ -7,7 +7,7 @@ import java.util.Locale; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkBLEError; import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; -import info.nightscout.shared.logging.AAPSLogger; +import info.nightscout.rx.logging.AAPSLogger; /** * Created by andy on 11/24/18. diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/device/OrangeLinkImpl.kt b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/device/OrangeLinkImpl.kt index 0f1ab68f74..fd4aa416cb 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/device/OrangeLinkImpl.kt +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/device/OrangeLinkImpl.kt @@ -15,10 +15,10 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.Gatt import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.operations.BLECommOperationResult import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP -import java.util.* +import java.util.UUID import javax.inject.Inject import javax.inject.Singleton diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/operations/CharacteristicReadOperation.java b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/operations/CharacteristicReadOperation.java index 9b96c498cc..5d6a70c592 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/operations/CharacteristicReadOperation.java +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/operations/CharacteristicReadOperation.java @@ -7,10 +7,10 @@ import android.os.SystemClock; import java.util.UUID; import java.util.concurrent.TimeUnit; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkBLE; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.GattAttributes; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; /** * Created by geoff on 5/26/16. diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/operations/CharacteristicWriteOperation.java b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/operations/CharacteristicWriteOperation.java index 802057c986..700019cde0 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/operations/CharacteristicWriteOperation.java +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/operations/CharacteristicWriteOperation.java @@ -7,10 +7,10 @@ import android.os.SystemClock; import java.util.UUID; import java.util.concurrent.TimeUnit; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkBLE; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.GattAttributes; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; /** * Created by geoff on 5/26/16. diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/operations/DescriptorWriteOperation.java b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/operations/DescriptorWriteOperation.java index 1df2cc0a58..68674f5a68 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/operations/DescriptorWriteOperation.java +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/operations/DescriptorWriteOperation.java @@ -7,9 +7,9 @@ import android.os.SystemClock; import java.util.UUID; import java.util.concurrent.TimeUnit; -import info.nightscout.shared.logging.AAPSLogger; -import info.nightscout.shared.logging.LTag; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkBLE; +import info.nightscout.rx.logging.AAPSLogger; +import info.nightscout.rx.logging.LTag; /** * Created by geoff on 5/26/16. diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/dialog/RileyLinkStatusGeneralFragment.kt b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/dialog/RileyLinkStatusGeneralFragment.kt index d9b6ee141c..6a3ac9e78a 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/dialog/RileyLinkStatusGeneralFragment.kt +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/dialog/RileyLinkStatusGeneralFragment.kt @@ -6,6 +6,7 @@ import android.view.View import android.view.ViewGroup import dagger.android.support.DaggerFragment import info.nightscout.androidaps.interfaces.ActivePlugin +import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.R import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.databinding.RileylinkStatusGeneralBinding import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkPumpDevice @@ -13,8 +14,7 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLin import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData import info.nightscout.androidaps.plugins.pump.common.utils.StringUtil import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import org.joda.time.LocalDateTime import javax.inject.Inject diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/RileyLinkBluetoothStateReceiver.kt b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/RileyLinkBluetoothStateReceiver.kt index 4c2fc19e16..fcab67901a 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/RileyLinkBluetoothStateReceiver.kt +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/RileyLinkBluetoothStateReceiver.kt @@ -6,9 +6,9 @@ import android.content.Intent import android.content.IntentFilter import dagger.android.DaggerBroadcastReceiver import info.nightscout.androidaps.interfaces.ActivePlugin -import info.nightscout.shared.logging.AAPSLogger import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil +import info.nightscout.rx.logging.AAPSLogger import javax.inject.Inject class RileyLinkBluetoothStateReceiver : DaggerBroadcastReceiver() { diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/RileyLinkBroadcastReceiver.kt b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/RileyLinkBroadcastReceiver.kt index ff9fca17f3..53830b8cf0 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/RileyLinkBroadcastReceiver.kt +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/RileyLinkBroadcastReceiver.kt @@ -19,8 +19,9 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.ServiceTask import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.ServiceTaskExecutor import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.WakeAndTuneTask -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/RileyLinkService.kt b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/RileyLinkService.kt index 9e5e10cd79..ebc8a04579 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/RileyLinkService.kt +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/RileyLinkService.kt @@ -8,7 +8,6 @@ import dagger.android.DaggerService import dagger.android.HasAndroidInjector import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ResourceHelper -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst @@ -18,10 +17,11 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLink import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkEncodingType import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkError import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkServiceState -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP -import java.util.* +import java.util.Locale import javax.inject.Inject /** diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/RileyLinkServiceData.kt b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/RileyLinkServiceData.kt index 39dcf629bb..f909b050ef 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/RileyLinkServiceData.kt +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/RileyLinkServiceData.kt @@ -1,6 +1,5 @@ package info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkFirmwareVersion @@ -9,9 +8,10 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.data.RLHistor import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkError import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkServiceState import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkTargetDevice -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import java.util.* +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag +import java.util.Locale import javax.inject.Inject import javax.inject.Singleton diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/DiscoverGattServicesTask.kt b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/DiscoverGattServicesTask.kt index e3d5a121b7..95585537b4 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/DiscoverGattServicesTask.kt +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/DiscoverGattServicesTask.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks import dagger.android.HasAndroidInjector -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLogger import javax.inject.Inject class DiscoverGattServicesTask(injector: HasAndroidInjector, private val needToConnect: Boolean = false) : ServiceTask(injector) { diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/InitializePumpManagerTask.kt b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/InitializePumpManagerTask.kt index cc7f946d74..ad33c6b150 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/InitializePumpManagerTask.kt +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/InitializePumpManagerTask.kt @@ -10,8 +10,9 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLin import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkServiceState import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData import info.nightscout.androidaps.utils.Round.isSame -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject import kotlin.math.roundToLong diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/ResetRileyLinkConfigurationTask.kt b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/ResetRileyLinkConfigurationTask.kt index c0d7e6e136..79b7377df4 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/ResetRileyLinkConfigurationTask.kt +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/ResetRileyLinkConfigurationTask.kt @@ -1,9 +1,9 @@ package info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.common.events.EventRefreshButtonState import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RFSpy +import info.nightscout.rx.bus.RxBus import javax.inject.Inject class ResetRileyLinkConfigurationTask(injector: HasAndroidInjector) : PumpTask(injector) { diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/ServiceTaskExecutor.kt b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/ServiceTaskExecutor.kt index f0623eaf92..03192e3667 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/ServiceTaskExecutor.kt +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/ServiceTaskExecutor.kt @@ -1,7 +1,8 @@ package info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import java.util.concurrent.LinkedBlockingQueue import java.util.concurrent.ThreadPoolExecutor import java.util.concurrent.TimeUnit diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/WakeAndTuneTask.kt b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/WakeAndTuneTask.kt index dfc3bcd91d..b5ec03a89c 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/WakeAndTuneTask.kt +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/service/tasks/WakeAndTuneTask.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.pump.common.events.EventRefreshButtonState +import info.nightscout.rx.bus.RxBus import javax.inject.Inject class WakeAndTuneTask(injector: HasAndroidInjector) : PumpTask(injector) { diff --git a/pump/rileylink/src/test/java/info/nightscout/androidaps/TestBase.kt b/pump/rileylink/src/test/java/info/nightscout/androidaps/TestBase.kt index 3d78d1b4f6..b4c68bf8b5 100644 --- a/pump/rileylink/src/test/java/info/nightscout/androidaps/TestBase.kt +++ b/pump/rileylink/src/test/java/info/nightscout/androidaps/TestBase.kt @@ -1,8 +1,8 @@ package info.nightscout.androidaps -import info.nightscout.shared.logging.AAPSLoggerTest -import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.rx.TestAapsSchedulers +import info.nightscout.rx.AapsSchedulers +import info.nightscout.shared.logging.AAPSLoggerTest import org.junit.Before import org.junit.Rule import org.mockito.Mockito diff --git a/settings.gradle b/settings.gradle index 9f13a169ad..ac368ddd8f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,7 +2,9 @@ include ':app' include ':wear' include ':database' include ':core' -include ':shared' +include ':app-wear-shared:rx' +include ':app-wear-shared:shared' +include ':app-wear-shared:shared-impl' include ':graphview' include ':libraries' include ':ui' diff --git a/shared/src/main/AndroidManifest.xml b/shared/src/main/AndroidManifest.xml deleted file mode 100644 index a5918e68ab..0000000000 --- a/shared/src/main/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/shared/src/main/java/info/nightscout/androidaps/events/EventMobileToWear.kt b/shared/src/main/java/info/nightscout/androidaps/events/EventMobileToWear.kt deleted file mode 100644 index c13bd0b2fe..0000000000 --- a/shared/src/main/java/info/nightscout/androidaps/events/EventMobileToWear.kt +++ /dev/null @@ -1,5 +0,0 @@ -package info.nightscout.androidaps.events - -import info.nightscout.shared.weardata.EventData - -class EventMobileToWear(val payload: EventData) : Event() \ No newline at end of file diff --git a/shared/src/main/java/info/nightscout/androidaps/events/EventWearToMobile.kt b/shared/src/main/java/info/nightscout/androidaps/events/EventWearToMobile.kt deleted file mode 100644 index 3967cebaa9..0000000000 --- a/shared/src/main/java/info/nightscout/androidaps/events/EventWearToMobile.kt +++ /dev/null @@ -1,5 +0,0 @@ -package info.nightscout.androidaps.events - -import info.nightscout.shared.weardata.EventData - -class EventWearToMobile(val payload: EventData) : Event() \ No newline at end of file diff --git a/ui/build.gradle b/ui/build.gradle index fa1df852f3..afb2dae005 100644 --- a/ui/build.gradle +++ b/ui/build.gradle @@ -15,7 +15,8 @@ android { dependencies { implementation project(':libraries') implementation project(':graphview') - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') implementation project(':database') implementation project(':core') } \ No newline at end of file diff --git a/ui/src/main/java/info/nightscout/ui/activities/StatsActivity.kt b/ui/src/main/java/info/nightscout/ui/activities/StatsActivity.kt index 0be7333f5d..3e4c485afe 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/StatsActivity.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/StatsActivity.kt @@ -12,7 +12,7 @@ import info.nightscout.androidaps.interfaces.stats.TirCalculator import info.nightscout.androidaps.logging.UserEntryLogger import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers import info.nightscout.ui.R import info.nightscout.ui.databinding.ActivityStatsBinding import info.nightscout.ui.utils.ActivityMonitor diff --git a/ui/src/main/java/info/nightscout/ui/activities/SurveyActivity.kt b/ui/src/main/java/info/nightscout/ui/activities/SurveyActivity.kt index a24a56d4b4..047da675af 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/SurveyActivity.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/SurveyActivity.kt @@ -13,7 +13,8 @@ import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.InstanceId import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.shared.SafeParse -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import info.nightscout.ui.R import info.nightscout.ui.databinding.ActivitySurveyBinding import info.nightscout.ui.defaultProfile.DefaultProfile diff --git a/ui/src/main/java/info/nightscout/ui/activities/TDDStatsActivity.kt b/ui/src/main/java/info/nightscout/ui/activities/TDDStatsActivity.kt index 1bc7133edf..9a15f76d77 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/TDDStatsActivity.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/TDDStatsActivity.kt @@ -18,7 +18,7 @@ import info.nightscout.androidaps.activities.NoSplashAppCompatActivity import info.nightscout.androidaps.core.R import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.database.entities.TotalDailyDose -import info.nightscout.androidaps.events.EventDanaRSyncStatus +import info.nightscout.rx.events.EventDanaRSyncStatus import info.nightscout.androidaps.events.EventPumpStatusChanged import info.nightscout.androidaps.extensions.total import info.nightscout.androidaps.interfaces.ActivePlugin @@ -28,7 +28,7 @@ import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers import info.nightscout.shared.SafeParse import info.nightscout.shared.sharedPreferences.SP import info.nightscout.ui.databinding.ActivityTddStatsBinding diff --git a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsBolusCarbsFragment.kt b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsBolusCarbsFragment.kt index 08f7ede24b..45d5b8b42d 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsBolusCarbsFragment.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsBolusCarbsFragment.kt @@ -27,9 +27,7 @@ import info.nightscout.androidaps.database.transactions.CutCarbsTransaction import info.nightscout.androidaps.database.transactions.InvalidateBolusCalculatorResultTransaction import info.nightscout.androidaps.database.transactions.InvalidateBolusTransaction import info.nightscout.androidaps.database.transactions.InvalidateCarbsTransaction -import info.nightscout.androidaps.events.EventNSClientRestart import info.nightscout.androidaps.events.EventNewHistoryData -import info.nightscout.androidaps.events.EventTreatmentChange import info.nightscout.androidaps.extensions.iobCalc import info.nightscout.androidaps.extensions.toVisibility import info.nightscout.androidaps.interfaces.ActivePlugin @@ -37,16 +35,18 @@ import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.utils.ActionModeHelper import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventNSClientRestart +import info.nightscout.rx.events.EventTreatmentChange +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import info.nightscout.ui.R import info.nightscout.ui.databinding.TreatmentsBolusCarbsFragmentBinding diff --git a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsCareportalFragment.kt b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsCareportalFragment.kt index 428f23b2ba..5cd53e36ca 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsCareportalFragment.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsCareportalFragment.kt @@ -17,18 +17,19 @@ import info.nightscout.androidaps.database.entities.UserEntry.Sources import info.nightscout.androidaps.database.entities.ValueWithUnit import info.nightscout.androidaps.database.transactions.InvalidateAAPSStartedTherapyEventTransaction import info.nightscout.androidaps.database.transactions.InvalidateTherapyEventTransaction -import info.nightscout.androidaps.events.EventNSClientRestart -import info.nightscout.androidaps.events.EventTherapyEventChange +import info.nightscout.rx.events.EventNSClientRestart +import info.nightscout.rx.events.EventTherapyEventChange import info.nightscout.androidaps.extensions.toVisibility import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.rx.bus.RxBus import info.nightscout.androidaps.utils.* import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import info.nightscout.ui.R import info.nightscout.ui.databinding.TreatmentsCareportalFragmentBinding diff --git a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsExtendedBolusesFragment.kt b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsExtendedBolusesFragment.kt index 5897973b58..13100ab5a2 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsExtendedBolusesFragment.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsExtendedBolusesFragment.kt @@ -18,7 +18,7 @@ import info.nightscout.androidaps.database.entities.UserEntry.Sources import info.nightscout.androidaps.database.entities.ValueWithUnit import info.nightscout.androidaps.database.interfaces.end import info.nightscout.androidaps.database.transactions.InvalidateExtendedBolusTransaction -import info.nightscout.androidaps.events.EventExtendedBolusChange +import info.nightscout.rx.events.EventExtendedBolusChange import info.nightscout.androidaps.extensions.iobCalc import info.nightscout.androidaps.extensions.isInProgress import info.nightscout.androidaps.extensions.toVisibility @@ -26,16 +26,17 @@ import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.rx.bus.RxBus import info.nightscout.androidaps.utils.ActionModeHelper import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.ui.R import info.nightscout.ui.databinding.TreatmentsExtendedbolusFragmentBinding import info.nightscout.ui.databinding.TreatmentsExtendedbolusItemBinding diff --git a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsProfileSwitchFragment.kt b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsProfileSwitchFragment.kt index 114b2517f0..f9d0688a2e 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsProfileSwitchFragment.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsProfileSwitchFragment.kt @@ -24,26 +24,27 @@ import info.nightscout.androidaps.database.entities.ValueWithUnit import info.nightscout.androidaps.database.transactions.InvalidateProfileSwitchTransaction import info.nightscout.androidaps.dialogs.ProfileViewerDialog import info.nightscout.androidaps.events.EventEffectiveProfileSwitchChanged -import info.nightscout.androidaps.events.EventLocalProfileChanged -import info.nightscout.androidaps.events.EventNSClientRestart import info.nightscout.androidaps.events.EventNewHistoryData -import info.nightscout.androidaps.events.EventProfileSwitchChanged +import info.nightscout.rx.events.EventLocalProfileChanged +import info.nightscout.rx.events.EventNSClientRestart +import info.nightscout.rx.events.EventProfileSwitchChanged import info.nightscout.androidaps.extensions.getCustomizedName import info.nightscout.androidaps.extensions.toVisibility import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.rx.bus.RxBus import info.nightscout.androidaps.utils.ActionModeHelper import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import info.nightscout.ui.R import info.nightscout.ui.activities.fragments.TreatmentsProfileSwitchFragment.RecyclerProfileViewAdapter.ProfileSwitchViewHolder diff --git a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsTempTargetFragment.kt b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsTempTargetFragment.kt index 4af017371f..d9645c9b6f 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsTempTargetFragment.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsTempTargetFragment.kt @@ -3,14 +3,18 @@ package info.nightscout.ui.activities.fragments import android.annotation.SuppressLint import android.os.Bundle import android.util.SparseArray -import android.view.* +import android.view.LayoutInflater +import android.view.Menu +import android.view.MenuInflater +import android.view.MenuItem +import android.view.View +import android.view.ViewGroup import androidx.core.util.forEach import androidx.core.view.MenuProvider import androidx.lifecycle.Lifecycle import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import dagger.android.support.DaggerFragment -import info.nightscout.ui.activities.fragments.TreatmentsTempTargetFragment.RecyclerViewAdapter.TempTargetsViewHolder import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.database.ValueWrapper import info.nightscout.androidaps.database.entities.TemporaryTarget @@ -20,10 +24,7 @@ import info.nightscout.androidaps.database.entities.ValueWithUnit import info.nightscout.androidaps.database.interfaces.end import info.nightscout.androidaps.database.transactions.InvalidateTemporaryTargetTransaction import info.nightscout.androidaps.events.EventEffectiveProfileSwitchChanged -import info.nightscout.androidaps.events.EventNSClientRestart import info.nightscout.androidaps.events.EventNewHistoryData -import info.nightscout.androidaps.events.EventProfileSwitchChanged -import info.nightscout.androidaps.events.EventTempTargetChange import info.nightscout.androidaps.extensions.friendlyDescription import info.nightscout.androidaps.extensions.highValueToUnitsToString import info.nightscout.androidaps.extensions.lowValueToUnitsToString @@ -32,14 +33,23 @@ import info.nightscout.androidaps.interfaces.BuildHelper import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.utils.* +import info.nightscout.androidaps.utils.ActionModeHelper +import info.nightscout.androidaps.utils.DateUtil +import info.nightscout.androidaps.utils.FabricPrivacy +import info.nightscout.androidaps.utils.T +import info.nightscout.androidaps.utils.ToastUtils +import info.nightscout.androidaps.utils.Translator import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventNSClientRestart +import info.nightscout.rx.events.EventProfileSwitchChanged +import info.nightscout.rx.events.EventTempTargetChange +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP import info.nightscout.ui.R +import info.nightscout.ui.activities.fragments.TreatmentsTempTargetFragment.RecyclerViewAdapter.TempTargetsViewHolder import info.nightscout.ui.databinding.TreatmentsTemptargetFragmentBinding import info.nightscout.ui.databinding.TreatmentsTemptargetItemBinding import io.reactivex.rxjava3.core.Completable diff --git a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsTemporaryBasalsFragment.kt b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsTemporaryBasalsFragment.kt index 35f7c97505..28ab1beabd 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsTemporaryBasalsFragment.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsTemporaryBasalsFragment.kt @@ -26,7 +26,7 @@ import info.nightscout.androidaps.database.entities.ValueWithUnit import info.nightscout.androidaps.database.interfaces.end import info.nightscout.androidaps.database.transactions.InvalidateExtendedBolusTransaction import info.nightscout.androidaps.database.transactions.InvalidateTemporaryBasalTransaction -import info.nightscout.androidaps.events.EventTempBasalChange +import info.nightscout.rx.events.EventTempBasalChange import info.nightscout.androidaps.extensions.iobCalc import info.nightscout.androidaps.extensions.toStringFull import info.nightscout.androidaps.extensions.toTemporaryBasal @@ -35,16 +35,17 @@ import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.rx.bus.RxBus import info.nightscout.androidaps.utils.ActionModeHelper import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.ui.R import info.nightscout.ui.activities.fragments.TreatmentsTemporaryBasalsFragment.RecyclerViewAdapter.TempBasalsViewHolder import info.nightscout.ui.databinding.TreatmentsTempbasalsFragmentBinding diff --git a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsUserEntryFragment.kt b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsUserEntryFragment.kt index 71b81e6f4c..5b9a32a9f2 100644 --- a/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsUserEntryFragment.kt +++ b/ui/src/main/java/info/nightscout/ui/activities/fragments/TreatmentsUserEntryFragment.kt @@ -22,13 +22,13 @@ import info.nightscout.androidaps.interfaces.ImportExportPrefs import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.logging.UserEntryLogger -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.rx.bus.RxBus import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers import info.nightscout.androidaps.utils.userEntry.UserEntryPresentationHelper import info.nightscout.ui.R import info.nightscout.ui.databinding.TreatmentsUserEntryFragmentBinding diff --git a/ui/src/main/java/info/nightscout/ui/dialogs/CarbsDialog.kt b/ui/src/main/java/info/nightscout/ui/dialogs/CarbsDialog.kt index 80b4bd6561..5b9b67873d 100644 --- a/ui/src/main/java/info/nightscout/ui/dialogs/CarbsDialog.kt +++ b/ui/src/main/java/info/nightscout/ui/dialogs/CarbsDialog.kt @@ -39,7 +39,8 @@ import info.nightscout.androidaps.utils.ToastUtils import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.BOLUS -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import info.nightscout.ui.R import info.nightscout.ui.databinding.DialogCarbsBinding import io.reactivex.rxjava3.disposables.CompositeDisposable diff --git a/ui/src/main/java/info/nightscout/ui/dialogs/CareDialog.kt b/ui/src/main/java/info/nightscout/ui/dialogs/CareDialog.kt index 4851e400f8..6a38278de7 100644 --- a/ui/src/main/java/info/nightscout/ui/dialogs/CareDialog.kt +++ b/ui/src/main/java/info/nightscout/ui/dialogs/CareDialog.kt @@ -28,7 +28,8 @@ import info.nightscout.androidaps.utils.HtmlHelper import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.Translator import info.nightscout.androidaps.utils.alertDialogs.OKDialog -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import info.nightscout.ui.R import info.nightscout.ui.databinding.DialogCareBinding import io.reactivex.rxjava3.disposables.CompositeDisposable diff --git a/ui/src/main/java/info/nightscout/ui/utils/ActivityMonitor.kt b/ui/src/main/java/info/nightscout/ui/utils/ActivityMonitor.kt index 88565f49a1..7ba31693c0 100644 --- a/ui/src/main/java/info/nightscout/ui/utils/ActivityMonitor.kt +++ b/ui/src/main/java/info/nightscout/ui/utils/ActivityMonitor.kt @@ -14,8 +14,9 @@ import info.nightscout.androidaps.interfaces.ResourceHelper import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.T import info.nightscout.shared.SafeParse -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import info.nightscout.ui.R import javax.inject.Inject diff --git a/ui/src/main/java/info/nightscout/ui/widget/Widget.kt b/ui/src/main/java/info/nightscout/ui/widget/Widget.kt index 2f38c2a08a..32f7f03de1 100644 --- a/ui/src/main/java/info/nightscout/ui/widget/Widget.kt +++ b/ui/src/main/java/info/nightscout/ui/widget/Widget.kt @@ -34,8 +34,9 @@ import info.nightscout.androidaps.interfaces.VariableSensitivityResult import info.nightscout.androidaps.plugins.general.overview.OverviewData import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import info.nightscout.ui.R import java.util.Locale diff --git a/ui/src/test/java/info/nightscout/androidaps/TestBase.kt b/ui/src/test/java/info/nightscout/androidaps/TestBase.kt index 3d78d1b4f6..4d1edc5cb6 100644 --- a/ui/src/test/java/info/nightscout/androidaps/TestBase.kt +++ b/ui/src/test/java/info/nightscout/androidaps/TestBase.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps import info.nightscout.shared.logging.AAPSLoggerTest -import info.nightscout.androidaps.utils.rx.AapsSchedulers +import info.nightscout.rx.AapsSchedulers import info.nightscout.androidaps.utils.rx.TestAapsSchedulers import org.junit.Before import org.junit.Rule diff --git a/ui/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt b/ui/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt index 0eb177fb7c..cd2f05f706 100644 --- a/ui/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt +++ b/ui/src/test/java/info/nightscout/androidaps/TestBaseWithProfile.kt @@ -12,7 +12,7 @@ import info.nightscout.androidaps.interfaces.Config import info.nightscout.androidaps.interfaces.IobCobCalculator import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.interfaces.ProfileStore -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.rx.bus.RxBus import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.interfaces.ResourceHelper diff --git a/wear/build.gradle b/wear/build.gradle index 60f43a20c3..3fede2268c 100644 --- a/wear/build.gradle +++ b/wear/build.gradle @@ -92,7 +92,9 @@ allprojects { dependencies { - implementation project(':shared') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') + implementation project(':app-wear-shared:shared-impl') implementation fileTree(include: ['*.jar'], dir: 'libs') diff --git a/wear/src/main/java/info/nightscout/androidaps/Aaps.kt b/wear/src/main/java/info/nightscout/androidaps/Aaps.kt index 1cb262ef6a..f2ae494a9a 100644 --- a/wear/src/main/java/info/nightscout/androidaps/Aaps.kt +++ b/wear/src/main/java/info/nightscout/androidaps/Aaps.kt @@ -12,9 +12,9 @@ import info.nightscout.androidaps.comm.DataLayerListenerServiceWear import info.nightscout.androidaps.comm.ExceptionHandlerWear import info.nightscout.androidaps.di.DaggerWearComponent import info.nightscout.androidaps.events.EventWearPreferenceChange -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag import javax.inject.Inject class Aaps : DaggerApplication(), OnSharedPreferenceChangeListener { diff --git a/wear/src/main/java/info/nightscout/androidaps/comm/DataHandlerWear.kt b/wear/src/main/java/info/nightscout/androidaps/comm/DataHandlerWear.kt index 321ccefeeb..3d968992e3 100644 --- a/wear/src/main/java/info/nightscout/androidaps/comm/DataHandlerWear.kt +++ b/wear/src/main/java/info/nightscout/androidaps/comm/DataHandlerWear.kt @@ -16,20 +16,20 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager import androidx.wear.tiles.TileService import com.google.android.gms.wearable.WearableListenerService import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventWearToMobile import info.nightscout.androidaps.interaction.WatchfaceConfigurationActivity import info.nightscout.androidaps.interaction.actions.AcceptActivity import info.nightscout.androidaps.interaction.actions.ProfileSwitchActivity import info.nightscout.androidaps.interaction.utils.Persistence -import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.tile.ActionsTileService import info.nightscout.androidaps.tile.QuickWizardTileService import info.nightscout.androidaps.tile.TempTargetTileService -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventWearToMobile +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag +import info.nightscout.rx.weardata.EventData import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.weardata.EventData import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/wear/src/main/java/info/nightscout/androidaps/comm/DataLayerListenerServiceWear.kt b/wear/src/main/java/info/nightscout/androidaps/comm/DataLayerListenerServiceWear.kt index e027d0fcbd..c16c02e53e 100644 --- a/wear/src/main/java/info/nightscout/androidaps/comm/DataLayerListenerServiceWear.kt +++ b/wear/src/main/java/info/nightscout/androidaps/comm/DataLayerListenerServiceWear.kt @@ -9,15 +9,16 @@ import com.google.android.gms.tasks.Tasks import com.google.android.gms.wearable.* import dagger.android.AndroidInjection import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventWearToMobile +import info.nightscout.rx.events.EventWearToMobile import info.nightscout.androidaps.interaction.utils.Persistence import info.nightscout.androidaps.interaction.utils.WearUtil -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.weardata.EventData +import info.nightscout.rx.weardata.EventData import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import kotlinx.coroutines.* diff --git a/wear/src/main/java/info/nightscout/androidaps/comm/ExceptionHandlerWear.kt b/wear/src/main/java/info/nightscout/androidaps/comm/ExceptionHandlerWear.kt index 4b6efdc21f..1f5442b321 100644 --- a/wear/src/main/java/info/nightscout/androidaps/comm/ExceptionHandlerWear.kt +++ b/wear/src/main/java/info/nightscout/androidaps/comm/ExceptionHandlerWear.kt @@ -2,9 +2,9 @@ package info.nightscout.androidaps.comm import android.os.Build import android.util.Log -import info.nightscout.androidaps.events.EventWearToMobile -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.shared.weardata.EventData +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.events.EventWearToMobile +import info.nightscout.rx.weardata.EventData import java.io.ByteArrayOutputStream import java.io.IOException import java.io.ObjectOutputStream diff --git a/wear/src/main/java/info/nightscout/androidaps/comm/IntentWearToMobile.kt b/wear/src/main/java/info/nightscout/androidaps/comm/IntentWearToMobile.kt index bea1f9a157..257c3b2579 100644 --- a/wear/src/main/java/info/nightscout/androidaps/comm/IntentWearToMobile.kt +++ b/wear/src/main/java/info/nightscout/androidaps/comm/IntentWearToMobile.kt @@ -3,7 +3,7 @@ package info.nightscout.androidaps.comm import android.content.Context import android.content.Intent import android.os.Bundle -import info.nightscout.shared.weardata.EventData +import info.nightscout.rx.weardata.EventData class IntentWearToMobile(context: Context, command: String) : Intent(context, DataLayerListenerServiceWear::class.java) { init { diff --git a/wear/src/main/java/info/nightscout/androidaps/complications/BaseComplicationProviderService.kt b/wear/src/main/java/info/nightscout/androidaps/complications/BaseComplicationProviderService.kt index fc5769c078..dd102d9fca 100644 --- a/wear/src/main/java/info/nightscout/androidaps/complications/BaseComplicationProviderService.kt +++ b/wear/src/main/java/info/nightscout/androidaps/complications/BaseComplicationProviderService.kt @@ -21,16 +21,17 @@ import info.nightscout.androidaps.comm.DataLayerListenerServiceWear.Companion.IN import info.nightscout.androidaps.complications.ComplicationTapBroadcastReceiver.Companion.getTapActionIntent import info.nightscout.androidaps.complications.ComplicationTapBroadcastReceiver.Companion.getTapWarningSinceIntent import info.nightscout.androidaps.data.RawDisplayData -import info.nightscout.androidaps.events.EventWearToMobile +import info.nightscout.rx.events.EventWearToMobile import info.nightscout.androidaps.interaction.utils.Constants import info.nightscout.androidaps.interaction.utils.DisplayFormat import info.nightscout.androidaps.interaction.utils.Inevitable import info.nightscout.androidaps.interaction.utils.Persistence import info.nightscout.androidaps.interaction.utils.WearUtil -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.shared.weardata.EventData.ActionResendData +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + +import info.nightscout.rx.weardata.EventData.ActionResendData import javax.inject.Inject /** diff --git a/wear/src/main/java/info/nightscout/androidaps/complications/BrCobIobComplication.kt b/wear/src/main/java/info/nightscout/androidaps/complications/BrCobIobComplication.kt index 3a6ee0716f..7ce5c183b8 100644 --- a/wear/src/main/java/info/nightscout/androidaps/complications/BrCobIobComplication.kt +++ b/wear/src/main/java/info/nightscout/androidaps/complications/BrCobIobComplication.kt @@ -9,7 +9,8 @@ import dagger.android.AndroidInjection import info.nightscout.androidaps.data.RawDisplayData import info.nightscout.androidaps.interaction.utils.DisplayFormat import info.nightscout.androidaps.interaction.utils.SmallestDoubleString -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import kotlin.math.max /* diff --git a/wear/src/main/java/info/nightscout/androidaps/complications/CobDetailedComplication.kt b/wear/src/main/java/info/nightscout/androidaps/complications/CobDetailedComplication.kt index 9228627720..734ec5e71d 100644 --- a/wear/src/main/java/info/nightscout/androidaps/complications/CobDetailedComplication.kt +++ b/wear/src/main/java/info/nightscout/androidaps/complications/CobDetailedComplication.kt @@ -6,7 +6,8 @@ import android.app.PendingIntent import android.support.wearable.complications.ComplicationData import android.support.wearable.complications.ComplicationText import info.nightscout.androidaps.data.RawDisplayData -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + /* * Created by dlvoy on 2019-11-12 diff --git a/wear/src/main/java/info/nightscout/androidaps/complications/CobIconComplication.kt b/wear/src/main/java/info/nightscout/androidaps/complications/CobIconComplication.kt index 9c38290f75..b68701a1b1 100644 --- a/wear/src/main/java/info/nightscout/androidaps/complications/CobIconComplication.kt +++ b/wear/src/main/java/info/nightscout/androidaps/complications/CobIconComplication.kt @@ -8,7 +8,8 @@ import android.support.wearable.complications.ComplicationData import android.support.wearable.complications.ComplicationText import info.nightscout.androidaps.R import info.nightscout.androidaps.data.RawDisplayData -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + /* * Created by dlvoy on 2019-11-12 diff --git a/wear/src/main/java/info/nightscout/androidaps/complications/CobIobComplication.kt b/wear/src/main/java/info/nightscout/androidaps/complications/CobIobComplication.kt index f4bf3ed413..054ee614bd 100644 --- a/wear/src/main/java/info/nightscout/androidaps/complications/CobIobComplication.kt +++ b/wear/src/main/java/info/nightscout/androidaps/complications/CobIobComplication.kt @@ -8,7 +8,8 @@ import android.support.wearable.complications.ComplicationText import info.nightscout.androidaps.data.RawDisplayData import info.nightscout.androidaps.interaction.utils.DisplayFormat import info.nightscout.androidaps.interaction.utils.SmallestDoubleString -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + /* * Created by dlvoy on 2019-11-12 diff --git a/wear/src/main/java/info/nightscout/androidaps/complications/ComplicationTapBroadcastReceiver.kt b/wear/src/main/java/info/nightscout/androidaps/complications/ComplicationTapBroadcastReceiver.kt index 876485cbcd..1355a5df13 100644 --- a/wear/src/main/java/info/nightscout/androidaps/complications/ComplicationTapBroadcastReceiver.kt +++ b/wear/src/main/java/info/nightscout/androidaps/complications/ComplicationTapBroadcastReceiver.kt @@ -19,8 +19,9 @@ import info.nightscout.androidaps.interaction.menus.StatusMenuActivity import info.nightscout.androidaps.interaction.utils.Constants import info.nightscout.androidaps.interaction.utils.DisplayFormat import info.nightscout.androidaps.interaction.utils.WearUtil -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject diff --git a/wear/src/main/java/info/nightscout/androidaps/complications/IobDetailedComplication.kt b/wear/src/main/java/info/nightscout/androidaps/complications/IobDetailedComplication.kt index bebb6887a1..3e9f70690b 100644 --- a/wear/src/main/java/info/nightscout/androidaps/complications/IobDetailedComplication.kt +++ b/wear/src/main/java/info/nightscout/androidaps/complications/IobDetailedComplication.kt @@ -6,7 +6,8 @@ import android.app.PendingIntent import android.support.wearable.complications.ComplicationData import android.support.wearable.complications.ComplicationText import info.nightscout.androidaps.data.RawDisplayData -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + /* * Created by dlvoy on 2019-11-12 diff --git a/wear/src/main/java/info/nightscout/androidaps/complications/IobIconComplication.kt b/wear/src/main/java/info/nightscout/androidaps/complications/IobIconComplication.kt index 50742e22d0..37b452e68e 100644 --- a/wear/src/main/java/info/nightscout/androidaps/complications/IobIconComplication.kt +++ b/wear/src/main/java/info/nightscout/androidaps/complications/IobIconComplication.kt @@ -10,7 +10,8 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.data.RawDisplayData import info.nightscout.androidaps.interaction.utils.DisplayFormat import info.nightscout.androidaps.interaction.utils.SmallestDoubleString -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + /* * Created by dlvoy on 2019-11-12 diff --git a/wear/src/main/java/info/nightscout/androidaps/complications/LongStatusComplication.kt b/wear/src/main/java/info/nightscout/androidaps/complications/LongStatusComplication.kt index 08832c50c2..fba6065461 100644 --- a/wear/src/main/java/info/nightscout/androidaps/complications/LongStatusComplication.kt +++ b/wear/src/main/java/info/nightscout/androidaps/complications/LongStatusComplication.kt @@ -7,7 +7,8 @@ import android.support.wearable.complications.ComplicationData import android.support.wearable.complications.ComplicationText import dagger.android.AndroidInjection import info.nightscout.androidaps.data.RawDisplayData -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + /* * Created by dlvoy on 2019-11-12 diff --git a/wear/src/main/java/info/nightscout/androidaps/complications/LongStatusFlippedComplication.kt b/wear/src/main/java/info/nightscout/androidaps/complications/LongStatusFlippedComplication.kt index f6bf913871..90c03f763f 100644 --- a/wear/src/main/java/info/nightscout/androidaps/complications/LongStatusFlippedComplication.kt +++ b/wear/src/main/java/info/nightscout/androidaps/complications/LongStatusFlippedComplication.kt @@ -7,7 +7,8 @@ import android.support.wearable.complications.ComplicationData import android.support.wearable.complications.ComplicationText import dagger.android.AndroidInjection import info.nightscout.androidaps.data.RawDisplayData -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + /* * Created by dlvoy on 2019-11-12 diff --git a/wear/src/main/java/info/nightscout/androidaps/complications/SgvComplication.kt b/wear/src/main/java/info/nightscout/androidaps/complications/SgvComplication.kt index b692eeb17d..271c2b0030 100644 --- a/wear/src/main/java/info/nightscout/androidaps/complications/SgvComplication.kt +++ b/wear/src/main/java/info/nightscout/androidaps/complications/SgvComplication.kt @@ -7,7 +7,8 @@ import android.support.wearable.complications.ComplicationData import android.support.wearable.complications.ComplicationText import dagger.android.AndroidInjection import info.nightscout.androidaps.data.RawDisplayData -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + /* * Created by dlvoy on 2019-11-12 diff --git a/wear/src/main/java/info/nightscout/androidaps/complications/UploaderBatteryComplication.kt b/wear/src/main/java/info/nightscout/androidaps/complications/UploaderBatteryComplication.kt index 6260b8d804..9e6a6c42a0 100644 --- a/wear/src/main/java/info/nightscout/androidaps/complications/UploaderBatteryComplication.kt +++ b/wear/src/main/java/info/nightscout/androidaps/complications/UploaderBatteryComplication.kt @@ -9,7 +9,8 @@ import android.support.wearable.complications.ComplicationText import androidx.annotation.DrawableRes import info.nightscout.androidaps.R import info.nightscout.androidaps.data.RawDisplayData -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import kotlin.math.floor import kotlin.math.max import kotlin.math.min diff --git a/wear/src/main/java/info/nightscout/androidaps/complications/WallpaperComplication.kt b/wear/src/main/java/info/nightscout/androidaps/complications/WallpaperComplication.kt index d9bb821a00..63172eb34f 100644 --- a/wear/src/main/java/info/nightscout/androidaps/complications/WallpaperComplication.kt +++ b/wear/src/main/java/info/nightscout/androidaps/complications/WallpaperComplication.kt @@ -10,7 +10,8 @@ import android.support.wearable.complications.ComplicationData import android.util.DisplayMetrics import android.view.WindowManager import info.nightscout.androidaps.data.RawDisplayData -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + import java.io.IOException /* diff --git a/wear/src/main/java/info/nightscout/androidaps/data/RawDisplayData.kt b/wear/src/main/java/info/nightscout/androidaps/data/RawDisplayData.kt index 471fc91b42..28107bf4b0 100644 --- a/wear/src/main/java/info/nightscout/androidaps/data/RawDisplayData.kt +++ b/wear/src/main/java/info/nightscout/androidaps/data/RawDisplayData.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.data import info.nightscout.androidaps.interaction.utils.Persistence -import info.nightscout.shared.weardata.EventData +import info.nightscout.rx.weardata.EventData /** * Holds bunch of data model variables and lists that arrive from phone app and are due to be diff --git a/wear/src/main/java/info/nightscout/androidaps/di/WearModule.kt b/wear/src/main/java/info/nightscout/androidaps/di/WearModule.kt index 4315149eb8..fb02384128 100644 --- a/wear/src/main/java/info/nightscout/androidaps/di/WearModule.kt +++ b/wear/src/main/java/info/nightscout/androidaps/di/WearModule.kt @@ -1,40 +1,26 @@ package info.nightscout.androidaps.di import android.content.Context -import androidx.preference.PreferenceManager import dagger.Binds import dagger.Module -import dagger.Provides import dagger.android.HasAndroidInjector import info.nightscout.androidaps.Aaps -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.androidaps.utils.rx.DefaultAapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.AAPSLoggerProduction -import info.nightscout.shared.logging.L -import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.sharedPreferences.SPImplementation -import javax.inject.Singleton +import info.nightscout.rx.di.RxModule +import info.nightscout.rx.di.SharedImplModule +import info.nightscout.shared.di.SharedModule @Suppress("unused") -@Module(includes = [ - WearModule.AppBindings::class, - WearActivitiesModule::class -]) +@Module( + includes = [ + WearModule.AppBindings::class, + WearActivitiesModule::class, + RxModule::class, + SharedModule::class, + SharedImplModule::class + ] +) open class WearModule { - @Provides - @Singleton - fun provideSharedPreferences(context: Context): SP = SPImplementation(PreferenceManager.getDefaultSharedPreferences(context), context) - - @Provides - @Singleton - fun provideAAPSLogger(l: L): AAPSLogger = AAPSLoggerProduction(l) - - @Provides - @Singleton - internal fun provideSchedulers(): AapsSchedulers = DefaultAapsSchedulers() - @Module interface AppBindings { diff --git a/wear/src/main/java/info/nightscout/androidaps/events/EventWearPreferenceChange.kt b/wear/src/main/java/info/nightscout/androidaps/events/EventWearPreferenceChange.kt index 51fe819340..11a5917a80 100644 --- a/wear/src/main/java/info/nightscout/androidaps/events/EventWearPreferenceChange.kt +++ b/wear/src/main/java/info/nightscout/androidaps/events/EventWearPreferenceChange.kt @@ -1,6 +1,7 @@ package info.nightscout.androidaps.events import android.content.Context +import info.nightscout.rx.events.Event @Suppress("unused") class EventWearPreferenceChange : Event { diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/ConfigurationActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/ConfigurationActivity.kt index 5c0cee4e8f..1aebe91433 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/ConfigurationActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/ConfigurationActivity.kt @@ -7,8 +7,9 @@ import android.view.ViewGroup import androidx.core.content.ContextCompat import dagger.android.AndroidInjection import info.nightscout.androidaps.R -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import javax.inject.Inject class ConfigurationActivity : WearPreferenceActivity() { diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/TileConfigurationActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/TileConfigurationActivity.kt index ccf19933fb..996834b682 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/TileConfigurationActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/TileConfigurationActivity.kt @@ -6,8 +6,9 @@ import androidx.wear.tiles.TileService import dagger.android.AndroidInjection import info.nightscout.androidaps.tile.ActionsTileService import info.nightscout.androidaps.tile.TempTargetTileService -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import preference.WearPreferenceActivity import javax.inject.Inject diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/BackgroundActionActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/BackgroundActionActivity.kt index 15afd34b46..42b9752ab9 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/BackgroundActionActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/BackgroundActionActivity.kt @@ -4,11 +4,12 @@ import android.os.Bundle import android.widget.Toast import dagger.android.DaggerActivity import info.nightscout.androidaps.comm.DataLayerListenerServiceWear -import info.nightscout.androidaps.events.EventWearToMobile -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag -import info.nightscout.shared.weardata.EventData +import info.nightscout.rx.events.EventWearToMobile +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + +import info.nightscout.rx.weardata.EventData import javax.inject.Inject class BackgroundActionActivity : DaggerActivity() { diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/BolusActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/BolusActivity.kt index 0b10ca6691..3b1fd60236 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/BolusActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/BolusActivity.kt @@ -8,12 +8,12 @@ import android.view.View import android.view.ViewGroup import android.widget.ImageView import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventWearToMobile +import info.nightscout.rx.events.EventWearToMobile import info.nightscout.androidaps.interaction.utils.EditPlusMinusViewAdapter import info.nightscout.androidaps.interaction.utils.PlusMinusEditText import info.nightscout.androidaps.nondeprecated.GridPagerAdapterNonDeprecated import info.nightscout.shared.SafeParse -import info.nightscout.shared.weardata.EventData.ActionBolusPreCheck +import info.nightscout.rx.weardata.EventData.ActionBolusPreCheck import java.text.DecimalFormat import kotlin.math.roundToInt diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/CarbActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/CarbActivity.kt index b2d3519ad3..16c5223d48 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/CarbActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/CarbActivity.kt @@ -8,12 +8,12 @@ import android.view.View import android.view.ViewGroup import android.widget.ImageView import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventWearToMobile +import info.nightscout.rx.events.EventWearToMobile import info.nightscout.androidaps.interaction.utils.EditPlusMinusViewAdapter import info.nightscout.androidaps.interaction.utils.PlusMinusEditText import info.nightscout.androidaps.nondeprecated.GridPagerAdapterNonDeprecated import info.nightscout.shared.SafeParse -import info.nightscout.shared.weardata.EventData.ActionECarbsPreCheck +import info.nightscout.rx.weardata.EventData.ActionECarbsPreCheck import java.text.DecimalFormat class CarbActivity : ViewSelectorActivity() { diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/ECarbActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/ECarbActivity.kt index f6518bd1d7..1f0e5221f2 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/ECarbActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/ECarbActivity.kt @@ -8,13 +8,13 @@ import android.view.View import android.view.ViewGroup import android.widget.ImageView import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventWearToMobile +import info.nightscout.rx.events.EventWearToMobile import info.nightscout.androidaps.interaction.utils.EditPlusMinusViewAdapter import info.nightscout.androidaps.interaction.utils.PlusMinusEditText import info.nightscout.androidaps.nondeprecated.GridPagerAdapterNonDeprecated import info.nightscout.shared.SafeParse.stringToDouble import info.nightscout.shared.SafeParse.stringToInt -import info.nightscout.shared.weardata.EventData.ActionECarbsPreCheck +import info.nightscout.rx.weardata.EventData.ActionECarbsPreCheck import java.text.DecimalFormat class ECarbActivity : ViewSelectorActivity() { diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/FillActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/FillActivity.kt index 392a098388..ba440364ff 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/FillActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/FillActivity.kt @@ -8,12 +8,12 @@ import android.view.View import android.view.ViewGroup import android.widget.ImageView import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventWearToMobile +import info.nightscout.rx.events.EventWearToMobile import info.nightscout.androidaps.interaction.utils.EditPlusMinusViewAdapter import info.nightscout.androidaps.interaction.utils.PlusMinusEditText import info.nightscout.androidaps.nondeprecated.GridPagerAdapterNonDeprecated import info.nightscout.shared.SafeParse.stringToDouble -import info.nightscout.shared.weardata.EventData.ActionFillPreCheck +import info.nightscout.rx.weardata.EventData.ActionFillPreCheck import java.text.DecimalFormat class FillActivity : ViewSelectorActivity() { diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/ProfileSwitchActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/ProfileSwitchActivity.kt index 2e41a7876c..7fca9cf20a 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/ProfileSwitchActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/ProfileSwitchActivity.kt @@ -8,12 +8,12 @@ import android.view.View import android.view.ViewGroup import android.widget.ImageView import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventWearToMobile +import info.nightscout.rx.events.EventWearToMobile import info.nightscout.androidaps.interaction.utils.EditPlusMinusViewAdapter import info.nightscout.androidaps.interaction.utils.PlusMinusEditText import info.nightscout.androidaps.nondeprecated.GridPagerAdapterNonDeprecated import info.nightscout.shared.SafeParse -import info.nightscout.shared.weardata.EventData.ActionProfileSwitchPreCheck +import info.nightscout.rx.weardata.EventData.ActionProfileSwitchPreCheck import java.text.DecimalFormat class ProfileSwitchActivity : ViewSelectorActivity() { diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/QuickSnoozeActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/QuickSnoozeActivity.kt index 11184a7e2a..7364404ecd 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/QuickSnoozeActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/QuickSnoozeActivity.kt @@ -7,10 +7,10 @@ import android.util.Log import android.widget.Toast import dagger.android.DaggerActivity import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventWearToMobile +import info.nightscout.rx.events.EventWearToMobile import info.nightscout.androidaps.extensions.safeGetPackageInfo -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.shared.weardata.EventData +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.weardata.EventData import javax.inject.Inject /** diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/TempTargetActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/TempTargetActivity.kt index ac7cb56373..55df3ce8cb 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/TempTargetActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/TempTargetActivity.kt @@ -8,12 +8,12 @@ import android.view.View import android.view.ViewGroup import android.widget.ImageView import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventWearToMobile +import info.nightscout.rx.events.EventWearToMobile import info.nightscout.androidaps.interaction.utils.EditPlusMinusViewAdapter import info.nightscout.androidaps.interaction.utils.PlusMinusEditText import info.nightscout.androidaps.nondeprecated.GridPagerAdapterNonDeprecated import info.nightscout.shared.SafeParse -import info.nightscout.shared.weardata.EventData.ActionTempTargetPreCheck +import info.nightscout.rx.weardata.EventData.ActionTempTargetPreCheck import java.text.DecimalFormat class TempTargetActivity : ViewSelectorActivity() { diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/TreatmentActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/TreatmentActivity.kt index d9a4491bbf..2031744bcb 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/TreatmentActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/TreatmentActivity.kt @@ -8,13 +8,13 @@ import android.view.View import android.view.ViewGroup import android.widget.ImageView import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventWearToMobile +import info.nightscout.rx.events.EventWearToMobile import info.nightscout.androidaps.interaction.utils.EditPlusMinusViewAdapter import info.nightscout.androidaps.interaction.utils.PlusMinusEditText import info.nightscout.androidaps.nondeprecated.GridPagerAdapterNonDeprecated import info.nightscout.shared.SafeParse.stringToDouble import info.nightscout.shared.SafeParse.stringToInt -import info.nightscout.shared.weardata.EventData.ActionBolusPreCheck +import info.nightscout.rx.weardata.EventData.ActionBolusPreCheck import java.text.DecimalFormat import kotlin.math.roundToInt diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/ViewSelectorActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/ViewSelectorActivity.kt index 5386492a3c..db5fcbe366 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/ViewSelectorActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/ViewSelectorActivity.kt @@ -14,7 +14,7 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.nondeprecated.DotsPageIndicatorNonDeprecated import info.nightscout.androidaps.nondeprecated.GridPagerAdapterNonDeprecated import info.nightscout.androidaps.nondeprecated.GridViewPagerNonDeprecated -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/WizardActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/WizardActivity.kt index 8f6ff9e949..714d5495b9 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/WizardActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/WizardActivity.kt @@ -8,12 +8,12 @@ import android.view.View import android.view.ViewGroup import android.widget.ImageView import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventWearToMobile +import info.nightscout.rx.events.EventWearToMobile import info.nightscout.androidaps.interaction.utils.EditPlusMinusViewAdapter import info.nightscout.androidaps.interaction.utils.PlusMinusEditText import info.nightscout.androidaps.nondeprecated.GridPagerAdapterNonDeprecated import info.nightscout.shared.SafeParse -import info.nightscout.shared.weardata.EventData.ActionWizardPreCheck +import info.nightscout.rx.weardata.EventData.ActionWizardPreCheck import java.text.DecimalFormat class WizardActivity : ViewSelectorActivity() { diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/menus/FillMenuActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/menus/FillMenuActivity.kt index 552f26f391..d6cf3a7981 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/menus/FillMenuActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/menus/FillMenuActivity.kt @@ -3,10 +3,10 @@ package info.nightscout.androidaps.interaction.menus import android.content.Intent import android.os.Bundle import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventWearToMobile +import info.nightscout.rx.events.EventWearToMobile import info.nightscout.androidaps.interaction.actions.FillActivity import info.nightscout.androidaps.interaction.utils.MenuListActivity -import info.nightscout.shared.weardata.EventData +import info.nightscout.rx.weardata.EventData class FillMenuActivity : MenuListActivity() { diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/menus/MainMenuActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/menus/MainMenuActivity.kt index 68ea46c780..d7a665b956 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/menus/MainMenuActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/menus/MainMenuActivity.kt @@ -3,15 +3,15 @@ package info.nightscout.androidaps.interaction.menus import android.content.Intent import android.os.Bundle import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventWearToMobile +import info.nightscout.rx.events.EventWearToMobile import info.nightscout.androidaps.interaction.WatchfaceConfigurationActivity import info.nightscout.androidaps.interaction.actions.ECarbActivity import info.nightscout.androidaps.interaction.actions.TempTargetActivity import info.nightscout.androidaps.interaction.actions.TreatmentActivity import info.nightscout.androidaps.interaction.actions.WizardActivity import info.nightscout.androidaps.interaction.utils.MenuListActivity -import info.nightscout.shared.weardata.EventData -import info.nightscout.shared.weardata.EventData.ActionResendData +import info.nightscout.rx.weardata.EventData +import info.nightscout.rx.weardata.EventData.ActionResendData class MainMenuActivity : MenuListActivity() { diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/menus/StatusMenuActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/menus/StatusMenuActivity.kt index c6705cedf3..1e8bc2087b 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/menus/StatusMenuActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/menus/StatusMenuActivity.kt @@ -2,11 +2,11 @@ package info.nightscout.androidaps.interaction.menus import android.os.Bundle import info.nightscout.androidaps.R -import info.nightscout.androidaps.events.EventWearToMobile +import info.nightscout.rx.events.EventWearToMobile import info.nightscout.androidaps.interaction.utils.MenuListActivity -import info.nightscout.shared.weardata.EventData.ActionLoopStatus -import info.nightscout.shared.weardata.EventData.ActionPumpStatus -import info.nightscout.shared.weardata.EventData.ActionTddStatus +import info.nightscout.rx.weardata.EventData.ActionLoopStatus +import info.nightscout.rx.weardata.EventData.ActionPumpStatus +import info.nightscout.rx.weardata.EventData.ActionTddStatus class StatusMenuActivity : MenuListActivity() { diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/utils/Inevitable.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/utils/Inevitable.kt index 410f358499..ba79093eb7 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/utils/Inevitable.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/utils/Inevitable.kt @@ -2,8 +2,9 @@ package info.nightscout.androidaps.interaction.utils import info.nightscout.androidaps.BuildConfig import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import java.util.concurrent.ConcurrentHashMap import javax.inject.Inject import javax.inject.Singleton diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/utils/MenuListActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/utils/MenuListActivity.kt index b299e4f96e..b68bfba2d6 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/utils/MenuListActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/utils/MenuListActivity.kt @@ -2,7 +2,7 @@ package info.nightscout.androidaps.interaction.utils import dagger.android.DaggerActivity import javax.inject.Inject -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.rx.bus.RxBus import info.nightscout.shared.sharedPreferences.SP import info.nightscout.androidaps.interaction.utils.MenuListActivity.MenuAdapter.ItemViewHolder import android.os.Bundle diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/utils/Persistence.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/utils/Persistence.kt index 96de0db6d9..a208a5978e 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/utils/Persistence.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/utils/Persistence.kt @@ -1,13 +1,14 @@ package info.nightscout.androidaps.interaction.utils import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.weardata.EventData -import info.nightscout.shared.weardata.EventData.Companion.deserialize -import info.nightscout.shared.weardata.EventData.SingleBg -import info.nightscout.shared.weardata.EventData.TreatmentData +import info.nightscout.rx.weardata.EventData +import info.nightscout.rx.weardata.EventData.Companion.deserialize +import info.nightscout.rx.weardata.EventData.SingleBg +import info.nightscout.rx.weardata.EventData.TreatmentData import javax.inject.Inject import javax.inject.Singleton diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/utils/WearUtil.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/utils/WearUtil.kt index 7509cfc0a5..de994607db 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/utils/WearUtil.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/utils/WearUtil.kt @@ -2,8 +2,9 @@ package info.nightscout.androidaps.interaction.utils import android.content.Context import android.os.PowerManager -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import javax.inject.Inject import javax.inject.Singleton diff --git a/wear/src/main/java/info/nightscout/androidaps/tile/TileBase.kt b/wear/src/main/java/info/nightscout/androidaps/tile/TileBase.kt index 4bf01205fe..f51ee13431 100644 --- a/wear/src/main/java/info/nightscout/androidaps/tile/TileBase.kt +++ b/wear/src/main/java/info/nightscout/androidaps/tile/TileBase.kt @@ -30,9 +30,9 @@ import com.google.common.util.concurrent.ListenableFuture import dagger.android.AndroidInjection import info.nightscout.androidaps.R import info.nightscout.androidaps.comm.DataLayerListenerServiceWear -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.weardata.EventData +import info.nightscout.rx.weardata.EventData import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Job diff --git a/wear/src/main/java/info/nightscout/androidaps/tile/source/ActionSource.kt b/wear/src/main/java/info/nightscout/androidaps/tile/source/ActionSource.kt index 49a8ac4199..9ccb0fc912 100644 --- a/wear/src/main/java/info/nightscout/androidaps/tile/source/ActionSource.kt +++ b/wear/src/main/java/info/nightscout/androidaps/tile/source/ActionSource.kt @@ -4,7 +4,7 @@ import android.content.Context import android.content.res.Resources import info.nightscout.androidaps.R import info.nightscout.androidaps.interaction.actions.* -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP import javax.inject.Inject import javax.inject.Singleton diff --git a/wear/src/main/java/info/nightscout/androidaps/tile/source/QuickWizardSource.kt b/wear/src/main/java/info/nightscout/androidaps/tile/source/QuickWizardSource.kt index 6982b2d0c2..705b4aab95 100644 --- a/wear/src/main/java/info/nightscout/androidaps/tile/source/QuickWizardSource.kt +++ b/wear/src/main/java/info/nightscout/androidaps/tile/source/QuickWizardSource.kt @@ -6,10 +6,11 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.interaction.actions.BackgroundActionActivity import info.nightscout.androidaps.tile.Action import info.nightscout.androidaps.tile.TileSource -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.weardata.EventData +import info.nightscout.rx.weardata.EventData import java.util.* import javax.inject.Inject import javax.inject.Singleton diff --git a/wear/src/main/java/info/nightscout/androidaps/tile/source/StaticTileSource.kt b/wear/src/main/java/info/nightscout/androidaps/tile/source/StaticTileSource.kt index 893bcf4c48..873772e21b 100644 --- a/wear/src/main/java/info/nightscout/androidaps/tile/source/StaticTileSource.kt +++ b/wear/src/main/java/info/nightscout/androidaps/tile/source/StaticTileSource.kt @@ -5,9 +5,9 @@ import android.content.res.Resources import androidx.annotation.DrawableRes import info.nightscout.androidaps.tile.Action import info.nightscout.androidaps.tile.TileSource -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.weardata.EventData import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.weardata.EventData abstract class StaticTileSource(val context: Context, val sp: SP, val aapsLogger: AAPSLogger) : TileSource { diff --git a/wear/src/main/java/info/nightscout/androidaps/tile/source/TempTargetSource.kt b/wear/src/main/java/info/nightscout/androidaps/tile/source/TempTargetSource.kt index ec9a64b50a..b22d180e52 100644 --- a/wear/src/main/java/info/nightscout/androidaps/tile/source/TempTargetSource.kt +++ b/wear/src/main/java/info/nightscout/androidaps/tile/source/TempTargetSource.kt @@ -5,9 +5,9 @@ import android.content.res.Resources import info.nightscout.androidaps.R import info.nightscout.androidaps.interaction.actions.BackgroundActionActivity import info.nightscout.androidaps.interaction.actions.TempTargetActivity -import info.nightscout.shared.logging.AAPSLogger +import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.weardata.EventData +import info.nightscout.rx.weardata.EventData import javax.inject.Inject import javax.inject.Singleton diff --git a/wear/src/main/java/info/nightscout/androidaps/watchfaces/CircleWatchface.kt b/wear/src/main/java/info/nightscout/androidaps/watchfaces/CircleWatchface.kt index d24c1826a2..40945bcc23 100644 --- a/wear/src/main/java/info/nightscout/androidaps/watchfaces/CircleWatchface.kt +++ b/wear/src/main/java/info/nightscout/androidaps/watchfaces/CircleWatchface.kt @@ -21,17 +21,18 @@ import com.ustwo.clockwise.wearable.WatchFace import dagger.android.AndroidInjection import info.nightscout.androidaps.R import info.nightscout.androidaps.data.RawDisplayData -import info.nightscout.androidaps.events.EventWearToMobile +import info.nightscout.rx.events.EventWearToMobile import info.nightscout.androidaps.interaction.menus.MainMenuActivity import info.nightscout.androidaps.interaction.utils.Persistence -import info.nightscout.androidaps.plugins.bus.RxBus -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.bus.RxBus +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.weardata.EventData -import info.nightscout.shared.weardata.EventData.ActionResendData -import info.nightscout.shared.weardata.EventData.SingleBg +import info.nightscout.rx.weardata.EventData +import info.nightscout.rx.weardata.EventData.ActionResendData +import info.nightscout.rx.weardata.EventData.SingleBg import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import java.util.* diff --git a/wear/src/main/java/info/nightscout/androidaps/watchfaces/DigitalStyleWatchface.kt b/wear/src/main/java/info/nightscout/androidaps/watchfaces/DigitalStyleWatchface.kt index d2aa2257fa..ef11f9d22a 100644 --- a/wear/src/main/java/info/nightscout/androidaps/watchfaces/DigitalStyleWatchface.kt +++ b/wear/src/main/java/info/nightscout/androidaps/watchfaces/DigitalStyleWatchface.kt @@ -14,7 +14,8 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.databinding.ActivityDigitalstyleBinding import info.nightscout.androidaps.extensions.toVisibility import info.nightscout.androidaps.watchfaces.utils.BaseWatchFace -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.logging.LTag + class DigitalStyleWatchface : BaseWatchFace() { diff --git a/wear/src/main/java/info/nightscout/androidaps/watchfaces/utils/BaseWatchFace.kt b/wear/src/main/java/info/nightscout/androidaps/watchfaces/utils/BaseWatchFace.kt index 68fa4fe519..b392b82a55 100644 --- a/wear/src/main/java/info/nightscout/androidaps/watchfaces/utils/BaseWatchFace.kt +++ b/wear/src/main/java/info/nightscout/androidaps/watchfaces/utils/BaseWatchFace.kt @@ -24,20 +24,21 @@ import dagger.android.AndroidInjection import info.nightscout.androidaps.R import info.nightscout.androidaps.data.RawDisplayData import info.nightscout.androidaps.events.EventWearPreferenceChange -import info.nightscout.androidaps.events.EventWearToMobile +import info.nightscout.rx.events.EventWearToMobile import info.nightscout.androidaps.extensions.toVisibility import info.nightscout.androidaps.extensions.toVisibilityKeepSpace import info.nightscout.androidaps.interaction.menus.MainMenuActivity import info.nightscout.androidaps.interaction.utils.Persistence import info.nightscout.androidaps.interaction.utils.WearUtil -import info.nightscout.androidaps.plugins.bus.RxBus +import info.nightscout.rx.bus.RxBus import info.nightscout.androidaps.utils.DateUtil -import info.nightscout.androidaps.utils.rx.AapsSchedulers -import info.nightscout.shared.logging.AAPSLogger -import info.nightscout.shared.logging.LTag +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.rx.logging.LTag + import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.weardata.EventData -import info.nightscout.shared.weardata.EventData.ActionResendData +import info.nightscout.rx.weardata.EventData +import info.nightscout.rx.weardata.EventData.ActionResendData import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.kotlin.plusAssign import javax.inject.Inject diff --git a/wear/src/main/java/info/nightscout/androidaps/watchfaces/utils/BgGraphBuilder.kt b/wear/src/main/java/info/nightscout/androidaps/watchfaces/utils/BgGraphBuilder.kt index 5cce0bf6c0..a504c1e367 100644 --- a/wear/src/main/java/info/nightscout/androidaps/watchfaces/utils/BgGraphBuilder.kt +++ b/wear/src/main/java/info/nightscout/androidaps/watchfaces/utils/BgGraphBuilder.kt @@ -4,9 +4,9 @@ import android.graphics.DashPathEffect import info.nightscout.androidaps.R import info.nightscout.androidaps.utils.DateUtil import info.nightscout.shared.sharedPreferences.SP -import info.nightscout.shared.weardata.EventData -import info.nightscout.shared.weardata.EventData.SingleBg -import info.nightscout.shared.weardata.EventData.TreatmentData.Basal +import info.nightscout.rx.weardata.EventData +import info.nightscout.rx.weardata.EventData.SingleBg +import info.nightscout.rx.weardata.EventData.TreatmentData.Basal import lecho.lib.hellocharts.model.Axis import lecho.lib.hellocharts.model.AxisValue import lecho.lib.hellocharts.model.Line diff --git a/wear/src/test/java/info/nightscout/androidaps/testing/mockers/RawDataMocker.kt b/wear/src/test/java/info/nightscout/androidaps/testing/mockers/RawDataMocker.kt index 035552d468..52a38c9516 100644 --- a/wear/src/test/java/info/nightscout/androidaps/testing/mockers/RawDataMocker.kt +++ b/wear/src/test/java/info/nightscout/androidaps/testing/mockers/RawDataMocker.kt @@ -3,8 +3,8 @@ package info.nightscout.androidaps.testing.mockers import info.nightscout.androidaps.data.RawDisplayData import info.nightscout.androidaps.interaction.utils.WearUtil import info.nightscout.shared.SafeParse.stringToDouble -import info.nightscout.shared.weardata.EventData -import info.nightscout.shared.weardata.EventData.SingleBg +import info.nightscout.rx.weardata.EventData +import info.nightscout.rx.weardata.EventData.SingleBg class RawDataMocker(wearUtil: WearUtil) {