Merge "SIM - Resume view controller" into tm-dev am: 0063880229

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18321153

Change-Id: I2a312c1033a6bd16d0f0af052f2bfe6bb1ae185c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Matt Pietal
2022-05-12 12:58:47 +00:00
committed by Automerger Merge Worker
2 changed files with 19 additions and 0 deletions

View File

@@ -188,6 +188,10 @@ public class KeyguardBouncer {
}
if (mContainer.getVisibility() == View.VISIBLE || mShowingSoon) {
// Calls to reset must resume the ViewControllers when in fullscreen mode
if (needsFullscreenBouncer()) {
mKeyguardViewController.onResume();
}
return;
}

View File

@@ -475,4 +475,19 @@ public class KeyguardBouncerTest extends SysuiTestCase {
mBouncer.setExpansion(bouncerHideAmount);
verify(callback, never()).onExpansionChanged(bouncerHideAmount);
}
@Test
public void testOnResumeCalledForFullscreenBouncerOnSecondShow() {
// GIVEN a security mode which requires fullscreen bouncer
when(mKeyguardSecurityModel.getSecurityMode(anyInt()))
.thenReturn(KeyguardSecurityModel.SecurityMode.SimPin);
mBouncer.show(true);
// WHEN a second call to show occurs, the bouncer will already by visible
reset(mKeyguardHostViewController);
mBouncer.show(true);
// THEN ensure the ViewController is told to resume
verify(mKeyguardHostViewController).onResume();
}
}