Skip to content

Commit

Permalink
SystemUI: Fix an issue where jumping to black after screen turned on
Browse files Browse the repository at this point in the history
When press the power button several times, the screen will probabilistically jump from
the keyguard to the black screen after screen turned on. at this scene, previoud scrim
AOD state change triggered screen turned off is not performed until screen turned on.
Front ScrimView will display black color and covor keyguard in AOD state. so we can see
keyguard and then jump to black screen after screen turned on.

Ignore scrim AOD state change after screen turned on.

CRs-Fixed: 2342473
Change-Id: I7b206f0599420d2790b49f409a64fc264a4ecca0
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
  • Loading branch information
Yingren Wang authored and neobuddy89 committed Mar 9, 2019
1 parent 0bae031 commit 01c063e
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -5427,7 +5427,7 @@ public void removeCallback(@NonNull Callback callback) {

@Override
public void startDozing() {
if (!mDozingRequested) {
if (!mDozingRequested && !isScreenTurningOnOrOn()) {
mDozingRequested = true;
DozeLog.traceDozing(mContext, mDozing);
updateDozing();
Expand Down Expand Up @@ -5492,6 +5492,7 @@ public void stopDozing() {
DozeLog.traceDozing(mContext, mDozing);
mWakefulnessLifecycle.dispatchStartedWakingUp();
updateDozing();
updateScrimController();

if (isAmbientContainerAvailable()) {
((AmbientIndicationContainer)mAmbientIndicationContainer).setDozing(false);
Expand Down

0 comments on commit 01c063e

Please sign in to comment.