Merge "Update scrims when keyguard gets occluded" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cc4efe08de
@@ -896,6 +896,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
|
|||||||
|
|
||||||
public void setKeyguardOccluded(boolean keyguardOccluded) {
|
public void setKeyguardOccluded(boolean keyguardOccluded) {
|
||||||
mKeyguardOccluded = keyguardOccluded;
|
mKeyguardOccluded = keyguardOccluded;
|
||||||
|
updateScrims();
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface Callback {
|
public interface Callback {
|
||||||
|
|||||||
@@ -541,6 +541,18 @@ public class ScrimControllerTest extends SysuiTestCase {
|
|||||||
assertScrimVisibility(VISIBILITY_FULLY_TRANSPARENT, VISIBILITY_FULLY_OPAQUE);
|
assertScrimVisibility(VISIBILITY_FULLY_TRANSPARENT, VISIBILITY_FULLY_OPAQUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testHidesShowWhenLockedActivity_whenAlreadyInAod() {
|
||||||
|
mScrimController.setWallpaperSupportsAmbientMode(true);
|
||||||
|
mScrimController.transitionTo(ScrimState.AOD);
|
||||||
|
mScrimController.finishAnimationsImmediately();
|
||||||
|
assertScrimVisibility(VISIBILITY_FULLY_TRANSPARENT, VISIBILITY_FULLY_TRANSPARENT);
|
||||||
|
|
||||||
|
mScrimController.setKeyguardOccluded(true);
|
||||||
|
mScrimController.finishAnimationsImmediately();
|
||||||
|
assertScrimVisibility(VISIBILITY_FULLY_TRANSPARENT, VISIBILITY_FULLY_OPAQUE);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testEatsTouchEvent() {
|
public void testEatsTouchEvent() {
|
||||||
HashSet<ScrimState> eatsTouches =
|
HashSet<ScrimState> eatsTouches =
|
||||||
|
|||||||
Reference in New Issue
Block a user