From 7a56d1a4435ed1a552ff264b61b52b694a6e7ceb Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Fri, 4 Aug 2017 15:04:43 +0200 Subject: [PATCH] AOD: Fix navbar flicker when launching assistant When reset() gets called during unocclusion, we were hiding the keyguard even though it is still needed while dozing; instead, reset is now actually called after dozing finishes. Test: Trigger assistant from AOD; verify navigation bar buttons do not show Fixes: 64164106 Change-Id: Ic29cf40ade7d3cd492723a3f859f8a7734edad93 --- .../statusbar/phone/StatusBarKeyguardViewManager.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java index acf42785f8267..d24373343944f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -201,7 +201,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb */ public void reset(boolean hideBouncerWhenShowing) { if (mShowing) { - if (mOccluded) { + if (mOccluded && !mDozing) { mStatusBar.hideKeyguard(); mStatusBar.stopWaitingForKeyguardExit(); mBouncer.hide(false /* destroyView */); @@ -292,9 +292,12 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb } mStatusBarWindowManager.setKeyguardOccluded(occluded); - // If Keyguard is reshown, don't hide the bouncer as it might just have been requested by - // a FLAG_DISMISS_KEYGUARD_ACTIVITY. - reset(false /* hideBouncerWhenShowing*/); + // setDozing(false) will call reset once we stop dozing. + if (!mDozing) { + // If Keyguard is reshown, don't hide the bouncer as it might just have been requested + // by a FLAG_DISMISS_KEYGUARD_ACTIVITY. + reset(false /* hideBouncerWhenShowing*/); + } if (animate && !occluded && mShowing) { mStatusBar.animateKeyguardUnoccluding(); }