Address review comments

This commit is contained in:
Bart Sopers 2021-02-26 10:21:26 +01:00
parent 1a12d6cd9d
commit 04cd03f99f
3 changed files with 11 additions and 13 deletions

View file

@ -2,5 +2,4 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash
import info.nightscout.androidaps.events.Event
class EventOmnipodDashPumpValuesChanged : Event() {
}
class EventOmnipodDashPumpValuesChanged : Event()

View file

@ -1,14 +1,14 @@
package info.nightscout.androidaps.plugins.pump.omnipod.dash.dagger
import dagger.Binds
import dagger.Module
import dagger.Provides
import dagger.android.ContributesAndroidInjector
import info.nightscout.androidaps.plugins.pump.omnipod.common.dagger.ActivityScope
import info.nightscout.androidaps.plugins.pump.omnipod.common.dagger.OmnipodWizardModule
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.OmnipodDashManager
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.OmnipodDashManagerImpl
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.BleManager
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.OmnipodDashBleManager
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.OmnipodDashBleManagerImpl
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManagerImpl
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.DashPodManagementActivity
@ -37,15 +37,14 @@ abstract class OmnipodDashModule {
@ContributesAndroidInjector
abstract fun contributesOmnipodDashOverviewFragment(): OmnipodDashOverviewFragment
companion object {
// MANAGERS
@Provides
fun providesBleManager(bleManager: BleManager): OmnipodDashBleManager = bleManager
@Binds
abstract fun bindsOmnipodDashBleManagerImpl(bleManager: OmnipodDashBleManagerImpl): OmnipodDashBleManager
@Provides
fun providesPodStateManager(podStateManager: OmnipodDashPodStateManagerImpl): OmnipodDashPodStateManager = podStateManager
@Binds
abstract fun bindsOmnipodDashPodStateManagerImpl(podStateManager: OmnipodDashPodStateManagerImpl): OmnipodDashPodStateManager
@Provides
fun providesOmnipodManager(omnipodManager: OmnipodDashManagerImpl): OmnipodDashManager = omnipodManager
}
@Binds
abstract fun bindsOmnipodDashManagerImpl(omnipodManager: OmnipodDashManagerImpl): OmnipodDashManager
}

View file

@ -20,7 +20,7 @@ import javax.inject.Inject
import javax.inject.Singleton
@Singleton
class BleManager @Inject constructor(private val context: Context, private val aapsLogger: AAPSLogger) : OmnipodDashBleManager {
class OmnipodDashBleManagerImpl @Inject constructor(private val context: Context, private val aapsLogger: AAPSLogger) : OmnipodDashBleManager {
private val bluetoothManager: BluetoothManager = context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager
private val bluetoothAdapter: BluetoothAdapter = bluetoothManager.adapter