Revert "Apply front scrim to doze pulsing"

This reverts commit 84d6b0bfc3.

Reason for revert: This change does not cover state switching between AOD and PULSING.

Change-Id: I06b7375f57dd9035269563d9ae1476b8fc8f86f4
This commit is contained in:
Chris.CC Lee
2019-09-18 02:55:47 +00:00
parent 84d6b0bfc3
commit 463a52d59d
2 changed files with 4 additions and 15 deletions

View File

@@ -503,8 +503,8 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
* device is dozing when the light sensor is on.
*/
public void setAodFrontScrimAlpha(float alpha) {
if (((mState == ScrimState.AOD && mDozeParameters.getAlwaysOn())
|| mState == ScrimState.PULSING) && mInFrontAlpha != alpha) {
if (mState == ScrimState.AOD && mDozeParameters.getAlwaysOn()
&& mInFrontAlpha != alpha) {
mInFrontAlpha = alpha;
updateScrims();
}

View File

@@ -243,7 +243,7 @@ public class ScrimControllerTest extends SysuiTestCase {
}
@Test
public void transitionToPulsing_withFrontAlphaUpdates() {
public void transitionToPulsing() {
// Pre-condition
// Need to go to AoD first because PULSING doesn't change
// the back scrim opacity - otherwise it would hide AoD wallpapers.
@@ -267,22 +267,11 @@ public class ScrimControllerTest extends SysuiTestCase {
true /* behind */,
false /* bubble */);
// ... and when ambient goes dark, front scrim should be semi-transparent
mScrimController.setAodFrontScrimAlpha(0.5f);
mScrimController.finishAnimationsImmediately();
// Front scrim should be semi-transparent
assertScrimAlpha(SEMI_TRANSPARENT /* front */,
OPAQUE /* back */,
TRANSPARENT /* bubble */);
mScrimController.setWakeLockScreenSensorActive(true);
mScrimController.finishAnimationsImmediately();
assertScrimAlpha(SEMI_TRANSPARENT /* front */,
assertScrimAlpha(TRANSPARENT /* front */,
SEMI_TRANSPARENT /* back */,
TRANSPARENT /* bubble */);
// Reset value since enums are static.
mScrimController.setAodFrontScrimAlpha(0f);
}
@Test