Merge pull request #1759 from avereha/avereha/tz-change

Dash: remove automatic tz change
This commit is contained in:
Milos Kozak 2022-05-22 15:15:30 +02:00 committed by GitHub
commit 1a2e846566
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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>