Disallow attention check when power save mode is enabled

Test: locally by enabling power save mode and screen attention then checking attention is disabled

Bug: 186690152
Change-Id: Ib56ca385461857040042c9f041c1b3da69b6f347
This commit is contained in:
Abel Tesfaye
2021-04-30 18:04:35 +00:00
parent 31cb707f00
commit 6a1468d7f0

View File

@@ -257,8 +257,8 @@ public class AttentionManagerService extends SystemService {
return false;
}
// don't allow attention check in screen off state
if (!mPowerManager.isInteractive()) {
// don't allow attention check in screen off state or power save mode
if (!mPowerManager.isInteractive() || mPowerManager.isPowerSaveMode()) {
return false;
}