Check battery optimization status before showing general battery saver prompt.

This commit is contained in:
Greyson Parrelli
2026-06-01 14:28:09 +00:00
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
}