From 56a5f521314a80b0a6baab02159818f44c392c70 Mon Sep 17 00:00:00 2001 From: Josh Tsuji Date: Thu, 29 Jul 2021 16:47:37 -0400 Subject: [PATCH] Disable unlocked screen off if the display needs blanking. If the display needs blanking we can't even control the normal screen off, let alone the unlocked screen off (per the DozeParameters constructor). Bug: 193479273 Test: atest android.server.wm.KeyguardTests Change-Id: Idaa827fee826497d00ad908b10ad2142b922b780 --- .../com/android/systemui/statusbar/phone/DozeParameters.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java index 68024726c5dec..5a6db213d87f7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java @@ -231,7 +231,9 @@ public class DozeParameters implements TunerService.Tunable, * possible if AOD isn't even enabled or if the flag is disabled. */ public boolean canControlUnlockedScreenOff() { - return getAlwaysOn() && mFeatureFlags.useNewLockscreenAnimations(); + return getAlwaysOn() + && mFeatureFlags.useNewLockscreenAnimations() + && !getDisplayNeedsBlanking(); } private boolean getBoolean(String propName, int resId) {