commit | c12e4603586f16d20e29e8e4a59ce6b64b716a37 | [log] [tgz] |
---|---|---|
author | Jerry Chang <chenghsiuchang@google.com> | Mon Dec 16 15:17:13 2019 +0800 |
committer | Jerry Chang <chenghsiuchang@google.com> | Mon Dec 16 18:04:28 2019 +0800 |
tree | 4fef1f4894678e123c649829b9bdf5b4ca548121 | |
parent | 247901bb4f97b7ecbc6da4995a520b54cf392612 [diff] |
Timeout aod wallpaper while docking Bug: 140915138 Test: atest SystemUITests:ScrimControllerTest Change-Id: I1b374f87d863ac0fdfb9dd9e6c0ebc4615a91e80
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java index 1454e25..b8aea9b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
@@ -360,7 +360,8 @@ return false; } - if (mState == ScrimState.AOD && mDozeParameters.getAlwaysOn()) { + if (mState == ScrimState.AOD + && (mDozeParameters.getAlwaysOn() || mDockManager.isDocked())) { return true; }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java index 4d6ff1f..008a349 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
@@ -760,6 +760,17 @@ } @Test + public void testWillHideDockedWallpaper() { + mAlwaysOnEnabled = false; + when(mDockManager.isDocked()).thenReturn(true); + mScrimController.setWallpaperSupportsAmbientMode(true); + + mScrimController.transitionTo(ScrimState.AOD); + + verify(mAlarmManager).setExact(anyInt(), anyLong(), any(), any(), any()); + } + + @Test public void testConservesExpansionOpacityAfterTransition() { mScrimController.transitionTo(ScrimState.UNLOCKED); mScrimController.setPanelExpansion(0.5f);