remove automatic TZ change

This commit is contained in:
Andrei Vereha 2022-05-22 12:45:26 +02:00
parent 8b3c4c18c6
commit 3aaca99d7f
2 changed files with 1 additions and 36 deletions

View file

@ -1296,30 +1296,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
}
override fun timezoneOrDSTChanged(timeChangeType: TimeChangeType) {
val eventHandlingEnabled = sp.getBoolean(R.string.key_omnipod_common_time_change_event_enabled, false)
aapsLogger.info(
LTag.PUMP,
"Time, Date and/or TimeZone changed. [timeChangeType=" + timeChangeType.name + ", eventHandlingEnabled=" + eventHandlingEnabled + "]"
)
when {
!eventHandlingEnabled -> {
aapsLogger.info(LTag.PUMP, "Ignoring time change because automatic time handling is disabled in configuration")
return
}
timeChangeType == TimeChangeType.TimeChanged -> {
aapsLogger.info(LTag.PUMP, "Ignoring time change because it is not a DST or TZ change")
return
}
!podStateManager.isPodRunning -> {
aapsLogger.info(LTag.PUMP, "Ignoring time change because no Pod is active")
return
}
}
aapsLogger.info(LTag.PUMP, "Handling time change")
commandQueue.customCommand(CommandHandleTimeChange(false), null)
aapsLogger.info(LTag.PUMP, "Ignoring time change because automatic time handling is not implemented. timeChangeType=${timeChangeType.name}")
}
private fun executeProgrammingCommand(

View file

@ -99,16 +99,4 @@
android:title="@string/omnipod_common_preferences_notification_delivery_suspended_sound_enabled" />
</PreferenceCategory>
<PreferenceCategory
android:key="@string/key_common_preferences_category_other_settings"
android:title="@string/omnipod_common_preferences_category_other"
app:initialExpandedChildrenCount="0">
<SwitchPreference
android:defaultValue="true"
android:key="@string/key_omnipod_common_time_change_event_enabled"
android:title="@string/omnipod_common_preferences_time_change_enabled" />
</PreferenceCategory>
</androidx.preference.PreferenceScreen>