From 6a1468d7f0261cbe4a7ad1fc852d7da704a7f3bd Mon Sep 17 00:00:00 2001 From: Abel Tesfaye Date: Fri, 30 Apr 2021 18:04:35 +0000 Subject: [PATCH] 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 --- .../com/android/server/attention/AttentionManagerService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/attention/AttentionManagerService.java b/services/core/java/com/android/server/attention/AttentionManagerService.java index f566080b3fca4..a1395890fd3cc 100644 --- a/services/core/java/com/android/server/attention/AttentionManagerService.java +++ b/services/core/java/com/android/server/attention/AttentionManagerService.java @@ -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; }