Merge "Don't hide the alternate bouncer on keyguardReset" into tm-qpr-dev
This commit is contained in:
@@ -733,7 +733,9 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|||||||
} else {
|
} else {
|
||||||
showBouncerOrKeyguard(hideBouncerWhenShowing);
|
showBouncerOrKeyguard(hideBouncerWhenShowing);
|
||||||
}
|
}
|
||||||
hideAlternateBouncer(false);
|
if (hideBouncerWhenShowing) {
|
||||||
|
hideAlternateBouncer(false);
|
||||||
|
}
|
||||||
mKeyguardUpdateManager.sendKeyguardReset();
|
mKeyguardUpdateManager.sendKeyguardReset();
|
||||||
updateStates();
|
updateStates();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -683,4 +683,30 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
|
|||||||
// the following call before registering centralSurfaces should NOT throw a NPE:
|
// the following call before registering centralSurfaces should NOT throw a NPE:
|
||||||
mStatusBarKeyguardViewManager.hideAlternateBouncer(true);
|
mStatusBarKeyguardViewManager.hideAlternateBouncer(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testResetHideBouncerWhenShowing_alternateBouncerHides() {
|
||||||
|
// GIVEN the keyguard is showing
|
||||||
|
reset(mAlternateBouncerInteractor);
|
||||||
|
when(mKeyguardStateController.isShowing()).thenReturn(true);
|
||||||
|
|
||||||
|
// WHEN SBKV is reset with hideBouncerWhenShowing=true
|
||||||
|
mStatusBarKeyguardViewManager.reset(true);
|
||||||
|
|
||||||
|
// THEN alternate bouncer is hidden
|
||||||
|
verify(mAlternateBouncerInteractor).hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testResetHideBouncerWhenShowingIsFalse_alternateBouncerHides() {
|
||||||
|
// GIVEN the keyguard is showing
|
||||||
|
reset(mAlternateBouncerInteractor);
|
||||||
|
when(mKeyguardStateController.isShowing()).thenReturn(true);
|
||||||
|
|
||||||
|
// WHEN SBKV is reset with hideBouncerWhenShowing=false
|
||||||
|
mStatusBarKeyguardViewManager.reset(false);
|
||||||
|
|
||||||
|
// THEN alternate bouncer is NOT hidden
|
||||||
|
verify(mAlternateBouncerInteractor, never()).hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user