Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +6 −2 Original line number Diff line number Diff line Loading @@ -159,6 +159,11 @@ public class KeyguardBouncer { */ public void onFullyShown() { mFalsingManager.onBouncerShown(); if (mKeyguardView == null) { Log.wtf(TAG, "onFullyShown when view was null"); } else { mKeyguardView.onResume(); } } /** Loading @@ -180,7 +185,6 @@ public class KeyguardBouncer { @Override public void run() { mRoot.setVisibility(View.VISIBLE); mKeyguardView.onResume(); showPromptReason(mBouncerPromptReason); final CharSequence customMessage = mCallback.consumeCustomMessage(); if (customMessage != null) { Loading Loading @@ -296,7 +300,7 @@ public class KeyguardBouncer { public boolean isShowing() { return (mShowingSoon || (mRoot != null && mRoot.getVisibility() == View.VISIBLE)) && mExpansion == 0; && mExpansion == 0 && !isAnimatingAway(); } /** Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +8 −13 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb protected boolean mFirstUpdate = true; protected boolean mLastShowing; protected boolean mLastOccluded; private boolean mLastTracking; private boolean mLastBouncerShowing; private boolean mLastBouncerDismissible; protected boolean mLastRemoteInputActive; Loading Loading @@ -152,28 +151,19 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb // • The user quickly taps on the display and we show "swipe up to unlock." // • Keyguard will be dismissed by an action. a.k.a: FLAG_DISMISS_KEYGUARD_ACTIVITY // • Full-screen user switcher is displayed. final boolean noLongerTracking = mLastTracking != tracking && !tracking; if (mOccluded || mNotificationPanelView.isUnlockHintRunning() || mBouncer.willDismissWithAction() || mStatusBar.isFullScreenUserSwitcherState()) { mBouncer.setExpansion(0); } else if (mShowing && mStatusBar.isKeyguardCurrentlySecure() && !mDozing) { mBouncer.setExpansion(expansion); if (expansion == 1) { mBouncer.onFullyHidden(); } else if (!mBouncer.isShowing() && !mBouncer.isAnimatingAway()) { if (expansion != 1 && tracking && !mBouncer.isShowing() && !mBouncer.isAnimatingAway()) { mBouncer.show(false /* resetSecuritySelection */, false /* animated */); } else if (noLongerTracking) { // Notify that falsing manager should stop its session when user stops touching, // even before the animation ends, to guarantee that we're not recording sensitive // data. mBouncer.onFullyShown(); } if (expansion == 0 || expansion == 1) { } else if (expansion == 0 || expansion == 1) { updateStates(); } } mLastTracking = tracking; } /** Loading Loading @@ -595,6 +585,11 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb if (bouncerShowing != mLastBouncerShowing || mFirstUpdate) { mStatusBarWindowManager.setBouncerShowing(bouncerShowing); mStatusBar.setBouncerShowing(bouncerShowing); if (bouncerShowing) { mBouncer.onFullyShown(); } else { mBouncer.onFullyHidden(); } } KeyguardUpdateMonitor updateMonitor = KeyguardUpdateMonitor.getInstance(mContext); Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java +8 −0 Original line number Diff line number Diff line Loading @@ -167,10 +167,18 @@ public class KeyguardBouncerTest extends SysuiTestCase { @Test public void testOnFullyShown_notifiesFalsingManager() { mBouncer.ensureView(); mBouncer.onFullyShown(); verify(mFalsingManager).onBouncerShown(); } @Test public void testOnFullyShown_notifiesKeyguardView() { mBouncer.ensureView(); mBouncer.onFullyShown(); verify(mKeyguardHostView).onResume(); } @Test public void testOnFullyHidden_notifiesFalsingManager() { mBouncer.onFullyHidden(); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +6 −2 Original line number Diff line number Diff line Loading @@ -159,6 +159,11 @@ public class KeyguardBouncer { */ public void onFullyShown() { mFalsingManager.onBouncerShown(); if (mKeyguardView == null) { Log.wtf(TAG, "onFullyShown when view was null"); } else { mKeyguardView.onResume(); } } /** Loading @@ -180,7 +185,6 @@ public class KeyguardBouncer { @Override public void run() { mRoot.setVisibility(View.VISIBLE); mKeyguardView.onResume(); showPromptReason(mBouncerPromptReason); final CharSequence customMessage = mCallback.consumeCustomMessage(); if (customMessage != null) { Loading Loading @@ -296,7 +300,7 @@ public class KeyguardBouncer { public boolean isShowing() { return (mShowingSoon || (mRoot != null && mRoot.getVisibility() == View.VISIBLE)) && mExpansion == 0; && mExpansion == 0 && !isAnimatingAway(); } /** Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +8 −13 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb protected boolean mFirstUpdate = true; protected boolean mLastShowing; protected boolean mLastOccluded; private boolean mLastTracking; private boolean mLastBouncerShowing; private boolean mLastBouncerDismissible; protected boolean mLastRemoteInputActive; Loading Loading @@ -152,28 +151,19 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb // • The user quickly taps on the display and we show "swipe up to unlock." // • Keyguard will be dismissed by an action. a.k.a: FLAG_DISMISS_KEYGUARD_ACTIVITY // • Full-screen user switcher is displayed. final boolean noLongerTracking = mLastTracking != tracking && !tracking; if (mOccluded || mNotificationPanelView.isUnlockHintRunning() || mBouncer.willDismissWithAction() || mStatusBar.isFullScreenUserSwitcherState()) { mBouncer.setExpansion(0); } else if (mShowing && mStatusBar.isKeyguardCurrentlySecure() && !mDozing) { mBouncer.setExpansion(expansion); if (expansion == 1) { mBouncer.onFullyHidden(); } else if (!mBouncer.isShowing() && !mBouncer.isAnimatingAway()) { if (expansion != 1 && tracking && !mBouncer.isShowing() && !mBouncer.isAnimatingAway()) { mBouncer.show(false /* resetSecuritySelection */, false /* animated */); } else if (noLongerTracking) { // Notify that falsing manager should stop its session when user stops touching, // even before the animation ends, to guarantee that we're not recording sensitive // data. mBouncer.onFullyShown(); } if (expansion == 0 || expansion == 1) { } else if (expansion == 0 || expansion == 1) { updateStates(); } } mLastTracking = tracking; } /** Loading Loading @@ -595,6 +585,11 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb if (bouncerShowing != mLastBouncerShowing || mFirstUpdate) { mStatusBarWindowManager.setBouncerShowing(bouncerShowing); mStatusBar.setBouncerShowing(bouncerShowing); if (bouncerShowing) { mBouncer.onFullyShown(); } else { mBouncer.onFullyHidden(); } } KeyguardUpdateMonitor updateMonitor = KeyguardUpdateMonitor.getInstance(mContext); Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java +8 −0 Original line number Diff line number Diff line Loading @@ -167,10 +167,18 @@ public class KeyguardBouncerTest extends SysuiTestCase { @Test public void testOnFullyShown_notifiesFalsingManager() { mBouncer.ensureView(); mBouncer.onFullyShown(); verify(mFalsingManager).onBouncerShown(); } @Test public void testOnFullyShown_notifiesKeyguardView() { mBouncer.ensureView(); mBouncer.onFullyShown(); verify(mKeyguardHostView).onResume(); } @Test public void testOnFullyHidden_notifiesFalsingManager() { mBouncer.onFullyHidden(); Loading