Merge "Delay awaken from Dream to avoid wallpaper flickering." into tm-qpr-dev am: ec576c7a2a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19672387

Change-Id: I0183e67b201b50cea9773018f72108cd28ea35a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Xiaowen Lei
2022-08-22 23:22:54 +00:00
committed by Automerger Merge Worker
2 changed files with 13 additions and 5 deletions

View File

@@ -2383,10 +2383,10 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
private void handleHide() { private void handleHide() {
Trace.beginSection("KeyguardViewMediator#handleHide"); Trace.beginSection("KeyguardViewMediator#handleHide");
// It's possible that the device was unlocked in a dream state. It's time to wake up. // It's possible that the device was unlocked (via BOUNCER) while dozing. It's time to
if (mAodShowing || mDreamOverlayShowing) { // wake up.
PowerManager pm = mContext.getSystemService(PowerManager.class); if (mAodShowing) {
pm.wakeUp(SystemClock.uptimeMillis(), PowerManager.WAKE_REASON_GESTURE, mPM.wakeUp(SystemClock.uptimeMillis(), PowerManager.WAKE_REASON_GESTURE,
"com.android.systemui:BOUNCER_DOZING"); "com.android.systemui:BOUNCER_DOZING");
} }
@@ -2415,6 +2415,13 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
null /* nonApps */, null /* finishedCallback */); null /* nonApps */, null /* finishedCallback */);
}); });
} }
// It's possible that the device was unlocked (via BOUNCER or Fingerprint) while
// dreaming. It's time to wake up.
if (mDreamOverlayShowing) {
mPM.wakeUp(SystemClock.uptimeMillis(), PowerManager.WAKE_REASON_GESTURE,
"com.android.systemui:UNLOCK_DREAMING");
}
} }
Trace.endSection(); Trace.endSection();
} }

View File

@@ -512,7 +512,8 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
Trace.beginSection("MODE_WAKE_AND_UNLOCK"); Trace.beginSection("MODE_WAKE_AND_UNLOCK");
} else { } else {
Trace.beginSection("MODE_WAKE_AND_UNLOCK_FROM_DREAM"); Trace.beginSection("MODE_WAKE_AND_UNLOCK_FROM_DREAM");
mUpdateMonitor.awakenFromDream(); // Don't call awaken from Dream here. In order to avoid flickering, wait until
// later to awaken.
} }
mNotificationShadeWindowController.setNotificationShadeFocusable(false); mNotificationShadeWindowController.setNotificationShadeFocusable(false);
mKeyguardViewMediator.onWakeAndUnlocking(); mKeyguardViewMediator.onWakeAndUnlocking();