Merge "On occlusion: use AUTH_SCRIMMED scrim state" into tm-qpr-dev am: 64d3a0e656
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21911100 Change-Id: Ie580c9a787a3674793fde0e7dcf500453fd6374b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -3747,10 +3747,10 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
|
|||||||
|
|
||||||
boolean launchingAffordanceWithPreview = mLaunchingAffordance;
|
boolean launchingAffordanceWithPreview = mLaunchingAffordance;
|
||||||
mScrimController.setLaunchingAffordanceWithPreview(launchingAffordanceWithPreview);
|
mScrimController.setLaunchingAffordanceWithPreview(launchingAffordanceWithPreview);
|
||||||
|
|
||||||
if (mAlternateBouncerInteractor.isVisibleState()) {
|
if (mAlternateBouncerInteractor.isVisibleState()) {
|
||||||
if (mState == StatusBarState.SHADE || mState == StatusBarState.SHADE_LOCKED
|
if ((!isOccluded() || isPanelExpanded())
|
||||||
|| mTransitionToFullShadeProgress > 0f) {
|
&& (mState == StatusBarState.SHADE || mState == StatusBarState.SHADE_LOCKED
|
||||||
|
|| mTransitionToFullShadeProgress > 0f)) {
|
||||||
mScrimController.transitionTo(ScrimState.AUTH_SCRIMMED_SHADE);
|
mScrimController.transitionTo(ScrimState.AUTH_SCRIMMED_SHADE);
|
||||||
} else {
|
} else {
|
||||||
mScrimController.transitionTo(ScrimState.AUTH_SCRIMMED);
|
mScrimController.transitionTo(ScrimState.AUTH_SCRIMMED);
|
||||||
|
|||||||
@@ -1035,6 +1035,34 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
|
|||||||
verify(mStatusBarKeyguardViewManager).onKeyguardFadedAway();
|
verify(mStatusBarKeyguardViewManager).onKeyguardFadedAway();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testOccludingQSNotExpanded_transitionToAuthScrimmed() {
|
||||||
|
when(mAlternateBouncerInteractor.isVisibleState()).thenReturn(true);
|
||||||
|
|
||||||
|
// GIVEN device occluded and panel is NOT expanded
|
||||||
|
mCentralSurfaces.setBarStateForTest(SHADE); // occluding on LS has StatusBarState = SHADE
|
||||||
|
when(mKeyguardStateController.isOccluded()).thenReturn(true);
|
||||||
|
mCentralSurfaces.mPanelExpanded = false;
|
||||||
|
|
||||||
|
mCentralSurfaces.updateScrimController();
|
||||||
|
|
||||||
|
verify(mScrimController).transitionTo(eq(ScrimState.AUTH_SCRIMMED));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testOccludingQSExpanded_transitionToAuthScrimmedShade() {
|
||||||
|
when(mAlternateBouncerInteractor.isVisibleState()).thenReturn(true);
|
||||||
|
|
||||||
|
// GIVEN device occluded and qs IS expanded
|
||||||
|
mCentralSurfaces.setBarStateForTest(SHADE); // occluding on LS has StatusBarState = SHADE
|
||||||
|
when(mKeyguardStateController.isOccluded()).thenReturn(true);
|
||||||
|
mCentralSurfaces.mPanelExpanded = true;
|
||||||
|
|
||||||
|
mCentralSurfaces.updateScrimController();
|
||||||
|
|
||||||
|
verify(mScrimController).transitionTo(eq(ScrimState.AUTH_SCRIMMED_SHADE));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testShowKeyguardImplementation_setsState() {
|
public void testShowKeyguardImplementation_setsState() {
|
||||||
when(mLockscreenUserManager.getCurrentProfiles()).thenReturn(new SparseArray<>());
|
when(mLockscreenUserManager.getCurrentProfiles()).thenReturn(new SparseArray<>());
|
||||||
|
|||||||
Reference in New Issue
Block a user