summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jorim Jaggi <jjaggi@google.com> 2016-08-04 13:55:39 +0200
committer Jorim Jaggi <jjaggi@google.com> 2016-08-04 14:16:44 +0200
commite93e6f9deb8d3c044d673ffb771b73b2346486a3 (patch)
tree117fd661bf0e6de9be3207434fd758daa7fa8984
parentc9682ab5b508a242f0d569857ee9f6a3b82578de (diff)
Fix flickering issues with FLAG_SHOW_WHEN_LOCKED and fingerprint wake
The whole sequence is different as Keyguard is occluded. Thus, we are not doing the normal keyguard exit sequence, but jump directly to dismissing the Keyguard. Normally the sequence is: - keyguardDone - notifyScreenTurningOn - startKeyguardExitAnim In the occluded case, it is: - keyguardDone - startKeyguardExitAnim - notifyScreenTurningOn Now, the following issues cause the flickering in the occluded case, which are normally not causing any breakage: - There was an issued with the draw callback not being reset and reused at the wrong time. - mWakeAndUnlocking was not cleared soon enough. This caused a timeout if notifyScreenTurningOn happens after starKeyguardExitAnim - We always need to wait for the Keyguard host window, as isForceHiding isn't set in this case Change-Id: Id8d0f9fec79ec63b36659513f97c724147c7521f Fixes: 30483392
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java3
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java3
2 files changed, 5 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index cfa4661d7a06..5f2e3d1d6605 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -1728,6 +1728,7 @@ public class KeyguardViewMediator extends SystemUI {
// this to our ViewRootImpl.
mStatusBarKeyguardViewManager.getViewRootImpl().setReportNextDraw();
notifyDrawn(mDrawnCallback);
+ mDrawnCallback = null;
}
// only play "unlock" noises if not on a call (since the incall UI
@@ -1736,6 +1737,7 @@ public class KeyguardViewMediator extends SystemUI {
playSounds(false);
}
+ mWakeAndUnlocking = false;
setShowingLocked(false);
mStatusBarKeyguardViewManager.hide(startTime, fadeoutDuration);
resetKeyguardDonePendingLocked();
@@ -1862,6 +1864,7 @@ public class KeyguardViewMediator extends SystemUI {
synchronized (this) {
if (DEBUG) Log.d(TAG, "handleNotifyScreenTurnedOff");
mStatusBarKeyguardViewManager.onScreenTurnedOff();
+ mDrawnCallback = null;
mWakeAndUnlocking = false;
}
}
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 6451c7492fa8..b4085f5177b4 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -11445,8 +11445,9 @@ public class WindowManagerService extends IWindowManager.Stub
for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) {
final WindowState win = windows.get(winNdx);
final boolean isForceHiding = mPolicy.isForceHiding(win.mAttrs);
+ final boolean keyguard = mPolicy.isKeyguardHostWindow(win.mAttrs);
if (win.isVisibleLw()
- && (win.mAppToken != null || isForceHiding)) {
+ && (win.mAppToken != null || isForceHiding || keyguard)) {
win.mWinAnimator.mDrawState = DRAW_PENDING;
// Force add to mResizingWindows.
win.mLastContentInsets.set(-1, -1, -1, -1);