Merge changes I0ababa6b,I1a1ad69b into tm-dev am: 27a45d8ec3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18577092 Change-Id: I6daa729fb8d09005fa84ecbc54d450da257238f2 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -3505,11 +3505,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTrackingStopped(boolean expand) {
|
public void onTrackingStopped(boolean expand) {
|
||||||
if (mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED) {
|
|
||||||
if (!expand && !mKeyguardStateController.canDismissLockScreen()) {
|
|
||||||
mStatusBarKeyguardViewManager.showBouncer(false /* scrimmed */);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Figure out way to remove these.
|
// TODO: Figure out way to remove these.
|
||||||
|
|||||||
@@ -479,12 +479,12 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|||||||
if (mBouncer == null) {
|
if (mBouncer == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
mBouncer.hide(destroyView);
|
||||||
if (mShowing) {
|
if (mShowing) {
|
||||||
// If we were showing the bouncer and then aborting, we need to also clear out any
|
// If we were showing the bouncer and then aborting, we need to also clear out any
|
||||||
// potential actions unless we actually unlocked.
|
// potential actions unless we actually unlocked.
|
||||||
cancelPostAuthActions();
|
cancelPostAuthActions();
|
||||||
}
|
}
|
||||||
mBouncer.hide(destroyView);
|
|
||||||
cancelPendingWakeupAction();
|
cancelPendingWakeupAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -312,12 +312,27 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
|
|||||||
mStatusBarKeyguardViewManager.dismissWithAction(
|
mStatusBarKeyguardViewManager.dismissWithAction(
|
||||||
action, cancelAction, true /* afterKeyguardGone */);
|
action, cancelAction, true /* afterKeyguardGone */);
|
||||||
|
|
||||||
|
when(mBouncer.isShowing()).thenReturn(false);
|
||||||
mStatusBarKeyguardViewManager.hideBouncer(true);
|
mStatusBarKeyguardViewManager.hideBouncer(true);
|
||||||
mStatusBarKeyguardViewManager.hide(0, 30);
|
mStatusBarKeyguardViewManager.hide(0, 30);
|
||||||
verify(action, never()).onDismiss();
|
verify(action, never()).onDismiss();
|
||||||
verify(cancelAction).run();
|
verify(cancelAction).run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testHidingBouncer_cancelsGoneRunnable() {
|
||||||
|
OnDismissAction action = mock(OnDismissAction.class);
|
||||||
|
Runnable cancelAction = mock(Runnable.class);
|
||||||
|
mStatusBarKeyguardViewManager.dismissWithAction(
|
||||||
|
action, cancelAction, true /* afterKeyguardGone */);
|
||||||
|
|
||||||
|
when(mBouncer.isShowing()).thenReturn(false);
|
||||||
|
mStatusBarKeyguardViewManager.hideBouncer(true);
|
||||||
|
|
||||||
|
verify(action, never()).onDismiss();
|
||||||
|
verify(cancelAction).run();
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testHiding_doesntCancelWhenShowing() {
|
public void testHiding_doesntCancelWhenShowing() {
|
||||||
OnDismissAction action = mock(OnDismissAction.class);
|
OnDismissAction action = mock(OnDismissAction.class);
|
||||||
|
|||||||
Reference in New Issue
Block a user