Removed unused code
This commit is contained in:
parent
b3a83a720d
commit
fb62b0d90c
6 changed files with 3 additions and 43 deletions
|
@ -15,9 +15,7 @@ import info.nightscout.interfaces.notifications.Notification
|
|||
import info.nightscout.interfaces.plugin.PluginDescription
|
||||
import info.nightscout.interfaces.plugin.PluginType
|
||||
import info.nightscout.interfaces.profile.Profile
|
||||
import info.nightscout.interfaces.profile.ProfileFunction
|
||||
import info.nightscout.interfaces.pump.DetailedBolusInfo
|
||||
import info.nightscout.interfaces.pump.DetailedBolusInfoStorage
|
||||
import info.nightscout.interfaces.pump.Medtrum
|
||||
import info.nightscout.interfaces.pump.Pump
|
||||
import info.nightscout.interfaces.pump.PumpEnactResult
|
||||
|
@ -41,26 +39,20 @@ import info.nightscout.pump.medtrum.services.MedtrumService
|
|||
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.EventDismissNotification
|
||||
import info.nightscout.rx.events.EventOverviewBolusProgress
|
||||
import info.nightscout.rx.events.EventPreferenceChange
|
||||
import info.nightscout.rx.logging.AAPSLogger
|
||||
import info.nightscout.rx.logging.LTag
|
||||
import info.nightscout.shared.interfaces.ResourceHelper
|
||||
import info.nightscout.shared.sharedPreferences.SP
|
||||
import info.nightscout.shared.utils.DateUtil
|
||||
import info.nightscout.shared.utils.T
|
||||
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
||||
import io.reactivex.rxjava3.functions.Consumer
|
||||
import io.reactivex.rxjava3.kotlin.plusAssign
|
||||
import io.reactivex.rxjava3.subjects.BehaviorSubject
|
||||
import org.json.JSONException
|
||||
import org.json.JSONObject
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
import kotlin.math.abs
|
||||
import kotlin.math.round
|
||||
|
||||
@Singleton class MedtrumPlugin @Inject constructor(
|
||||
injector: HasAndroidInjector,
|
||||
|
@ -68,7 +60,6 @@ import kotlin.math.round
|
|||
rh: ResourceHelper,
|
||||
commandQueue: CommandQueue,
|
||||
private val constraintChecker: Constraints,
|
||||
private val sp: SP,
|
||||
private val aapsSchedulers: AapsSchedulers,
|
||||
private val rxBus: RxBus,
|
||||
private val context: Context,
|
||||
|
@ -76,7 +67,6 @@ import kotlin.math.round
|
|||
private val dateUtil: DateUtil,
|
||||
private val medtrumPump: MedtrumPump,
|
||||
private val uiInteraction: UiInteraction,
|
||||
private val profileFunction: ProfileFunction,
|
||||
private val pumpSync: PumpSync,
|
||||
private val temporaryBasalStorage: TemporaryBasalStorage
|
||||
) : PumpPluginBase(
|
||||
|
|
|
@ -20,7 +20,7 @@ class OnSafeClickListener(
|
|||
}
|
||||
}
|
||||
companion object {
|
||||
// 중복 클릭 방지 시간 설정
|
||||
// Set duplicate click prevention time
|
||||
private const val MIN_CLICK_INTERVAL: Long = 1000
|
||||
}
|
||||
}
|
|
@ -2,9 +2,6 @@ package info.nightscout.pump.medtrum.code
|
|||
|
||||
enum class EventType {
|
||||
CHANGE_PATCH_CLICKED,
|
||||
INVALID_BASAL_RATE,
|
||||
PROFILE_NOT_SET,
|
||||
FINISH_ACTIVITY,
|
||||
SHOW_DISCARD_DIALOG
|
||||
;
|
||||
}
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
package info.nightscout.pump.medtrum.events
|
||||
|
||||
import info.nightscout.rx.events.EventUpdateGui
|
||||
|
||||
class EventMedtrumPumpUpdateGui : EventUpdateGui()
|
|
@ -16,33 +16,19 @@ import android.bluetooth.le.ScanResult
|
|||
import android.bluetooth.le.ScanSettings
|
||||
import android.bluetooth.le.ScanFilter
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Build
|
||||
import android.os.Handler
|
||||
import android.os.HandlerThread
|
||||
import android.os.SystemClock
|
||||
import androidx.core.app.ActivityCompat
|
||||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.core.ui.toast.ToastUtils
|
||||
import info.nightscout.core.utils.notify
|
||||
import info.nightscout.core.utils.waitMillis
|
||||
import info.nightscout.interfaces.notifications.Notification
|
||||
import info.nightscout.interfaces.pump.PumpSync
|
||||
import info.nightscout.interfaces.ui.UiInteraction
|
||||
import info.nightscout.pump.medtrum.extension.toByteArray
|
||||
import info.nightscout.pump.medtrum.extension.toInt
|
||||
import info.nightscout.pump.medtrum.comm.WriteCommandPackets
|
||||
import info.nightscout.pump.medtrum.comm.ManufacturerData
|
||||
import info.nightscout.pump.medtrum.comm.ReadDataPacket
|
||||
import info.nightscout.rx.bus.RxBus
|
||||
import info.nightscout.rx.events.EventDismissNotification
|
||||
import info.nightscout.rx.events.EventPumpStatusChanged
|
||||
import info.nightscout.rx.logging.AAPSLogger
|
||||
import info.nightscout.rx.logging.LTag
|
||||
import info.nightscout.shared.interfaces.ResourceHelper
|
||||
import info.nightscout.shared.sharedPreferences.SP
|
||||
import info.nightscout.shared.utils.DateUtil
|
||||
import java.util.UUID
|
||||
import java.util.Arrays
|
||||
import javax.inject.Inject
|
||||
|
@ -59,15 +45,8 @@ interface BLECommCallback {
|
|||
|
||||
@Singleton
|
||||
class BLEComm @Inject internal constructor(
|
||||
private val injector: HasAndroidInjector,
|
||||
private val aapsLogger: AAPSLogger,
|
||||
private val rh: ResourceHelper,
|
||||
private val context: Context,
|
||||
private val rxBus: RxBus,
|
||||
private val sp: SP,
|
||||
private val pumpSync: PumpSync,
|
||||
private val dateUtil: DateUtil,
|
||||
private val uiInteraction: UiInteraction
|
||||
private val context: Context
|
||||
) {
|
||||
|
||||
companion object {
|
||||
|
@ -493,4 +472,4 @@ class BLEComm @Inject internal constructor(
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ import io.reactivex.rxjava3.disposables.CompositeDisposable
|
|||
import io.reactivex.rxjava3.kotlin.plusAssign
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.SupervisorJob
|
||||
import kotlinx.coroutines.cancel
|
||||
import kotlinx.coroutines.launch
|
||||
import javax.inject.Inject
|
||||
|
|
Loading…
Reference in a new issue