Ensure that disappear animation callback is run.

When we authenticate sim pin with a None security method, we are running
into an issue where we are not running the "keyguardDone" runnable when
the disappear animation completes. This is because when the sim state
changes, we tell the statusbarkeyguardviewmanager to reset. This hides
the bouncer and removes the disappear animation finish runnable. When we
tell the statusbarkeguardviewmanager to reset, we only want to reset if
we are not animating away.

Fixes: 288099374
Test: add a unit test
Test: unlock sim with none method.
Test: disable esim with none method.
Test: unlock sim with a pin method.
Test: disable esim with pin method.
Test: unlock pin method.
Change-Id: I52783d0a0d92dbec4dfcfe171df512ec347e4bef
This commit is contained in:
Aaron Liu
2023-06-21 12:32:55 -07:00
parent 4dd18983f0
commit ce4653f7af
2 changed files with 11 additions and 1 deletions

View File

@@ -703,7 +703,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
@Override
public void reset(boolean hideBouncerWhenShowing) {
if (mKeyguardStateController.isShowing()) {
if (mKeyguardStateController.isShowing() && !bouncerIsAnimatingAway()) {
final boolean isOccluded = mKeyguardStateController.isOccluded();
// Hide quick settings.
mShadeViewController.resetViews(/* animate= */ !isOccluded);

View File

@@ -736,6 +736,16 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
verify(mAlternateBouncerInteractor, never()).hide();
}
@Test
public void testResetBouncerAnimatingAway() {
reset(mPrimaryBouncerInteractor);
when(mPrimaryBouncerInteractor.isAnimatingAway()).thenReturn(true);
mStatusBarKeyguardViewManager.reset(true);
verify(mPrimaryBouncerInteractor, never()).hide();
}
@Test
public void handleDispatchTouchEvent_alternateBouncerNotVisible() {
mStatusBarKeyguardViewManager.addCallback(mCallback);