Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea62a122 authored by Lucas Dupin's avatar Lucas Dupin Committed by android-build-team Robot
Browse files

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
(cherry picked from commit fea9b86e)
parent 0962bde2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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