From fea9b86e9c419999f6e5f7b24712b145bbc9c1c8 Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Thu, 8 Aug 2019 16:58:50 -0700 Subject: Fade from black when reach Previously, we were fading from the previous state, which could be transparent. The screen would seem to flash if the wallpaper were light. Test: manual Fixes: 138097741 Change-Id: Ic86024b8970e01ed405e90bf12ef2dc27acf1c29 --- .../src/com/android/systemui/statusbar/phone/ScrimState.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java index c706062d3bb3..b45914b2e83d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java @@ -133,6 +133,12 @@ public enum ScrimState { mBlankScreen = mDisplayRequiresBlanking; mAnimationDuration = mWakeLockScreenSensorActive ? ScrimController.ANIMATION_DURATION_LONG : ScrimController.ANIMATION_DURATION; + + // Wake sensor will show the wallpaper, let's fade from black. Otherwise it will + // feel like the screen is flashing if the wallpaper is light. + if (mWakeLockScreenSensorActive && previousState == AOD) { + updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK); + } } @Override -- cgit v1.2.3-59-g8ed1b