mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-07-13 17:23:56 +01:00
Check battery optimization status before showing general battery saver prompt.
This commit is contained in:
committed by
Alex Hart
parent
b8c964846c
commit
9d3a51def2
@@ -68,7 +68,7 @@ class VitalsViewModel(private val context: Application) : AndroidViewModel(conte
|
||||
return@fromCallable State.PROMPT_SPECIFIC_BATTERY_SAVER_DIALOG
|
||||
}
|
||||
|
||||
if (havingDelayedNotifications && SlowNotificationHeuristics.shouldPromptBatterySaver()) {
|
||||
if (havingDelayedNotifications && SlowNotificationHeuristics.shouldPromptBatterySaver() && SlowNotificationHeuristics.isBatteryOptimizationsOn()) {
|
||||
return@fromCallable State.PROMPT_GENERAL_BATTERY_SAVER_DIALOG
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user