make wake event trigger a pulse
Test: manual
Test: atest ScrimControllerTest
Bug: 111405682
Bug: 111395593
Change-Id: I5a7b9024ecd5aea691ac5e3f23e70818186fc37c
diff --git a/core/java/com/android/internal/hardware/AmbientDisplayConfiguration.java b/core/java/com/android/internal/hardware/AmbientDisplayConfiguration.java
index d4c451e..78d366c 100644
--- a/core/java/com/android/internal/hardware/AmbientDisplayConfiguration.java
+++ b/core/java/com/android/internal/hardware/AmbientDisplayConfiguration.java
@@ -68,10 +68,10 @@
public boolean wakeLockScreenGestureEnabled(int user) {
return boolSettingDefaultOn(Settings.Secure.DOZE_WAKE_LOCK_SCREEN_GESTURE, user)
- && wakeLockScreenGestureAvailable();
+ && wakeScreenGestureAvailable();
}
- public boolean wakeLockScreenGestureAvailable() {
+ public boolean wakeScreenGestureAvailable() {
return mContext.getResources()
.getBoolean(R.bool.config_dozeWakeLockScreenSensorAvailable);
}
@@ -81,10 +81,6 @@
&& wakeScreenGestureAvailable();
}
- public boolean wakeScreenGestureAvailable() {
- return !TextUtils.isEmpty(wakeScreenSensorType());
- }
-
public String doubleTapSensorType() {
return mContext.getResources().getString(R.string.config_dozeDoubleTapSensorType);
}
@@ -93,10 +89,6 @@
return mContext.getResources().getString(R.string.config_dozeLongPressSensorType);
}
- public String wakeScreenSensorType() {
- return mContext.getResources().getString(R.string.config_dozeWakeScreenSensorType);
- }
-
public boolean pulseOnLongPressEnabled(int user) {
return pulseOnLongPressAvailable() && boolSettingDefaultOff(
Settings.Secure.DOZE_PULSE_ON_LONG_PRESS, user);
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 9f5eab5..cb4f416 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2160,9 +2160,6 @@
<!-- If the sensor that wakes up the lock screen is available or not. -->
<bool name="config_dozeWakeLockScreenSensorAvailable">false</bool>
- <!-- Type of the wake up sensor. Empty if not supported. -->
- <string name="config_dozeWakeScreenSensorType" translatable="false"></string>
-
<!-- Control whether the always on display mode is available. This should only be enabled on
devices where the display has been tuned to be power efficient in DOZE and/or DOZE_SUSPEND
states. -->
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index e5ff1aa..a4a97d3 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -3499,7 +3499,6 @@
<java-symbol type="integer" name="db_wal_truncate_size" />
<java-symbol type="integer" name="config_wakeUpDelayDoze" />
- <java-symbol type="string" name="config_dozeWakeScreenSensorType" />
<!-- For Bluetooth AbsoluteVolume -->
<java-symbol type="fraction" name="config_prescaleAbsoluteVolume_index1" />
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeLog.java b/packages/SystemUI/src/com/android/systemui/doze/DozeLog.java
index ab77e55..50003e3 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeLog.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeLog.java
@@ -35,7 +35,7 @@
private static final int SIZE = Build.IS_DEBUGGABLE ? 400 : 50;
static final SimpleDateFormat FORMAT = new SimpleDateFormat("MM-dd HH:mm:ss.SSS");
- private static final int REASONS = 8;
+ private static final int REASONS = 9;
public static final int PULSE_REASON_NONE = -1;
public static final int PULSE_REASON_INTENT = 0;
@@ -46,6 +46,7 @@
public static final int PULSE_REASON_SENSOR_LONG_PRESS = 5;
public static final int PULSE_REASON_DOCKING = 6;
public static final int REASON_SENSOR_WAKE_UP = 7;
+ public static final int PULSE_REASON_SENSOR_WAKE_LOCK_SCREEN = 8;
private static boolean sRegisterKeyguardCallback = true;
@@ -178,15 +179,6 @@
}
/**
- * Appends lock screen wake up event to the logs.
- * @param wake if we're waking up or sleeping.
- */
- public static void traceLockScreenWakeUp(boolean wake) {
- if (!ENABLED) return;
- log("wakeLockScreen " + wake);
- }
-
- /**
* Appends wake-display event to the logs.
* @param wake if we're waking up or sleeping.
*/
@@ -213,6 +205,7 @@
case PULSE_REASON_SENSOR_DOUBLE_TAP: return "doubletap";
case PULSE_REASON_SENSOR_LONG_PRESS: return "longpress";
case PULSE_REASON_DOCKING: return "docking";
+ case PULSE_REASON_SENSOR_WAKE_LOCK_SCREEN: return "wakelockscreen";
case REASON_SENSOR_WAKE_UP: return "wakeup";
default: throw new IllegalArgumentException("bad reason: " + pulseReason);
}
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java b/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java
index c2676d0..35b64ed 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java
@@ -17,6 +17,7 @@
package com.android.systemui.doze;
import static com.android.systemui.plugins.SensorManagerPlugin.Sensor.TYPE_WAKE_DISPLAY;
+import static com.android.systemui.plugins.SensorManagerPlugin.Sensor.TYPE_WAKE_LOCK_SCREEN;
import android.annotation.AnyThread;
import android.app.ActivityManager;
@@ -115,10 +116,17 @@
new PluginSensor(
new SensorManagerPlugin.Sensor(TYPE_WAKE_DISPLAY),
Settings.Secure.DOZE_WAKE_SCREEN_GESTURE,
- true /* configured */,
+ mConfig.wakeScreenGestureAvailable(),
DozeLog.REASON_SENSOR_WAKE_UP,
false /* reports touch coordinates */,
false /* touchscreen */),
+ new PluginSensor(
+ new SensorManagerPlugin.Sensor(TYPE_WAKE_LOCK_SCREEN),
+ Settings.Secure.DOZE_WAKE_LOCK_SCREEN_GESTURE,
+ mConfig.wakeScreenGestureAvailable(),
+ DozeLog.PULSE_REASON_SENSOR_WAKE_LOCK_SCREEN,
+ false /* reports touch coordinates */,
+ false /* touchscreen */),
};
mProxSensor = new ProxSensor(policy);
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java b/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
index 1e228f2..6a9b689 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
@@ -135,11 +135,12 @@
boolean isPickup = pulseReason == DozeLog.PULSE_REASON_SENSOR_PICKUP;
boolean isLongPress = pulseReason == DozeLog.PULSE_REASON_SENSOR_LONG_PRESS;
boolean isWakeDisplay = pulseReason == DozeLog.REASON_SENSOR_WAKE_UP;
+ boolean isWakeLockScreen = pulseReason == DozeLog.PULSE_REASON_SENSOR_WAKE_LOCK_SCREEN;
boolean wakeEvent = rawValues != null && rawValues.length > 0 && rawValues[0] != 0;
if (isWakeDisplay) {
onWakeScreen(wakeEvent);
- } else if (isLongPress) {
+ } else if (isLongPress || isWakeLockScreen) {
requestPulse(pulseReason, sensorPerformedProxCheck);
} else {
proximityCheckThenCall((result) -> {
@@ -156,7 +157,6 @@
mDozeHost.extendPulse();
}
}, sensorPerformedProxCheck, pulseReason);
- return;
}
if (isPickup) {
diff --git a/packages/SystemUI/src/com/android/systemui/doze/LockScreenWakeUpController.java b/packages/SystemUI/src/com/android/systemui/doze/LockScreenWakeUpController.java
deleted file mode 100644
index 70143e2..0000000
--- a/packages/SystemUI/src/com/android/systemui/doze/LockScreenWakeUpController.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.doze;
-
-import android.content.Context;
-import android.os.Handler;
-import android.os.PowerManager;
-import android.os.SystemClock;
-import android.os.UserHandle;
-import android.util.Log;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.hardware.AmbientDisplayConfiguration;
-import com.android.systemui.Dependency;
-import com.android.systemui.plugins.SensorManagerPlugin;
-import com.android.systemui.statusbar.StatusBarState;
-import com.android.systemui.statusbar.StatusBarStateController;
-import com.android.systemui.util.AsyncSensorManager;
-
-/**
- * Controller responsible for waking up or making the device sleep based on ambient sensors.
- */
-public class LockScreenWakeUpController implements StatusBarStateController.StateListener,
- SensorManagerPlugin.SensorEventListener {
-
- private static final String TAG = LockScreenWakeUpController.class.getSimpleName();
- private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
-
- private final AsyncSensorManager mAsyncSensorManager;
- private final SensorManagerPlugin.Sensor mSensor;
- private final AmbientDisplayConfiguration mAmbientConfiguration;
- private final PowerManager mPowerManager;
- private final DozeHost mDozeHost;
- private final Handler mHandler;
- private boolean mRegistered;
- private boolean mDozing;
-
- public LockScreenWakeUpController(Context context, DozeHost dozeHost) {
- this(Dependency.get(AsyncSensorManager.class),
- new SensorManagerPlugin.Sensor(SensorManagerPlugin.Sensor.TYPE_WAKE_LOCK_SCREEN),
- new AmbientDisplayConfiguration(context),
- context.getSystemService(PowerManager.class),
- dozeHost, Dependency.get(StatusBarStateController.class), new Handler());
- }
-
- @VisibleForTesting
- public LockScreenWakeUpController(AsyncSensorManager asyncSensorManager,
- SensorManagerPlugin.Sensor sensor, AmbientDisplayConfiguration ambientConfiguration,
- PowerManager powerManager, DozeHost dozeHost,
- StatusBarStateController statusBarStateController, Handler handler) {
- mAsyncSensorManager = asyncSensorManager;
- mSensor = sensor;
- mAmbientConfiguration = ambientConfiguration;
- mPowerManager = powerManager;
- mDozeHost = dozeHost;
- mHandler = handler;
- statusBarStateController.addCallback(this);
- }
-
- @Override
- public void onStateChanged(int newState) {
- boolean isLockScreen = newState == StatusBarState.KEYGUARD
- || newState == StatusBarState.SHADE_LOCKED;
-
- if (!mAmbientConfiguration.wakeLockScreenGestureEnabled(UserHandle.USER_CURRENT)) {
- if (mRegistered) {
- mAsyncSensorManager.unregisterPluginListener(mSensor, this);
- mRegistered = false;
- }
- return;
- }
-
- if (isLockScreen && !mRegistered) {
- mAsyncSensorManager.registerPluginListener(mSensor, this);
- mRegistered = true;
- } else if (!isLockScreen && mRegistered) {
- mAsyncSensorManager.unregisterPluginListener(mSensor, this);
- mRegistered = false;
- }
- }
-
- @Override
- public void onDozingChanged(boolean isDozing) {
- mDozing = isDozing;
- }
-
- @Override
- public void onSensorChanged(SensorManagerPlugin.SensorEvent event) {
- mHandler.post(()-> {
- float[] rawValues = event.getValues();
- boolean wakeEvent = rawValues != null && rawValues.length > 0 && rawValues[0] != 0;
-
- DozeLog.traceLockScreenWakeUp(wakeEvent);
- if (wakeEvent && mDozing) {
- if (DEBUG) Log.d(TAG, "Wake up.");
- mPowerManager.wakeUp(SystemClock.uptimeMillis(), "com.android.systemui:NODOZE");
- } else if (!wakeEvent && !mDozing) {
- if (DEBUG) Log.d(TAG, "Nap time.");
- mPowerManager.goToSleep(SystemClock.uptimeMillis(),
- PowerManager.GO_TO_SLEEP_REASON_SLEEP_BUTTON, 0);
- } else if (DEBUG) {
- Log.d(TAG, "Skip sensor event. Wake? " + wakeEvent + " dozing: " + mDozing);
- }
- });
- }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
index 92a9efe..6f2b63d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
@@ -158,8 +158,11 @@
* @return duration in millis.
*/
public long getWallpaperAodDuration() {
- return shouldControlScreenOff() ? DozeScreenState.ENTER_DOZE_HIDE_WALLPAPER_DELAY
- : mAlwaysOnPolicy.wallpaperVisibilityDuration;
+ if (mAmbientDisplayConfiguration.wakeLockScreenGestureEnabled(UserHandle.USER_CURRENT)
+ || shouldControlScreenOff()) {
+ return DozeScreenState.ENTER_DOZE_HIDE_WALLPAPER_DELAY;
+ }
+ return mAlwaysOnPolicy.wallpaperVisibilityDuration;
}
/**
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 6a4da98..e25c829 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
@@ -93,12 +93,12 @@
* A scrim varies its opacity based on a busyness factor, for example
* how many notifications are currently visible.
*/
- public static final float GRADIENT_SCRIM_ALPHA_BUSY = 0.70f;
+ public static final float GRADIENT_SCRIM_ALPHA_BUSY = 0.7f;
/**
- * A scrim varies its opacity based on a busyness factor, for example
- * how many notifications are currently visible.
+ * Scrim opacity when a wallpaper doesn't support ambient mode.
*/
- public static final float GRADIENT_SCRIM_DARK_KEYGUARD = 0.80f;
+ public static final float PULSING_WALLPAPER_SCRIM_ALPHA = 0.6f;
+
/**
* The most common scrim, the one under the keyguard.
*/
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
index 226665e..fb3c4aa 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
@@ -141,7 +141,8 @@
@Override
public float getBehindAlpha(float busyness) {
- return mWallpaperSupportsAmbientMode && !mHasBackdrop ? 0f : 1f;
+ return mWallpaperSupportsAmbientMode && !mHasBackdrop ? 0f
+ : ScrimController.PULSING_WALLPAPER_SCRIM_ALPHA;
}
},
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
index 40e2aae..cf12fc7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -148,7 +148,6 @@
import com.android.systemui.doze.DozeHost;
import com.android.systemui.doze.DozeLog;
import com.android.systemui.doze.DozeReceiver;
-import com.android.systemui.doze.LockScreenWakeUpController;
import com.android.systemui.fragments.ExtensionFragmentListener;
import com.android.systemui.fragments.FragmentHostManager;
import com.android.systemui.keyguard.KeyguardSliceProvider;
@@ -588,7 +587,6 @@
protected NotificationPresenter mPresenter;
private NotificationActivityStarter mNotificationActivityStarter;
private boolean mPulsing;
- private LockScreenWakeUpController mLockScreenWakeUpController;
@Override
public void onActiveStateChanged(int code, int uid, String packageName, boolean active) {
@@ -999,7 +997,6 @@
for (int i = 0; i < pattern.length; i++) {
mCameraLaunchGestureVibePattern[i] = pattern[i];
}
- mLockScreenWakeUpController = new LockScreenWakeUpController(mContext, mDozeServiceHost);
// receive broadcasts
IntentFilter filter = new IntentFilter();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/doze/LockScreenWakeUpControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/doze/LockScreenWakeUpControllerTest.java
deleted file mode 100644
index 8963b59..0000000
--- a/packages/SystemUI/tests/src/com/android/systemui/doze/LockScreenWakeUpControllerTest.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.doze;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.anyLong;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.os.Handler;
-import android.os.PowerManager;
-import android.support.test.filters.SmallTest;
-
-import com.android.internal.hardware.AmbientDisplayConfiguration;
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.plugins.SensorManagerPlugin;
-import com.android.systemui.statusbar.StatusBarState;
-import com.android.systemui.statusbar.StatusBarStateController;
-import com.android.systemui.util.AsyncSensorManager;
-
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-@RunWith(JUnit4.class)
-@SmallTest
-public class LockScreenWakeUpControllerTest extends SysuiTestCase {
-
- @Mock
- private AsyncSensorManager mAsyncSensorManager;
- @Mock
- private SensorManagerPlugin.Sensor mSensor;
- @Mock
- private AmbientDisplayConfiguration mAmbientDisplayConfiguration;
- @Mock
- private PowerManager mPowerManager;
- @Mock
- private DozeHost mDozeHost;
- @Mock
- private StatusBarStateController mStatusBarStateController;
- @Mock
- private Handler mHandler;
-
- private LockScreenWakeUpController mLockScreenWakeUpController;
-
- @Before
- public void setup() {
- MockitoAnnotations.initMocks(this);
- doAnswer(invocation -> {
- ((Runnable) invocation.getArgument(0)).run();
- return null;
- }).when(mHandler).post(any());
-
- mLockScreenWakeUpController = new LockScreenWakeUpController(mAsyncSensorManager, mSensor,
- mAmbientDisplayConfiguration, mPowerManager, mDozeHost, mStatusBarStateController,
- mHandler);
- }
-
- @Test
- public void testOnStateChanged_registersUnregistersListener() {
- when(mAmbientDisplayConfiguration.wakeLockScreenGestureEnabled(anyInt())).thenReturn(true);
- mLockScreenWakeUpController.onStateChanged(StatusBarState.KEYGUARD);
- mLockScreenWakeUpController.onStateChanged(StatusBarState.SHADE);
-
- verify(mAsyncSensorManager, times(1)).registerPluginListener(eq(mSensor),
- eq(mLockScreenWakeUpController));
-
- mLockScreenWakeUpController.onStateChanged(StatusBarState.SHADE);
- verify(mAsyncSensorManager).unregisterPluginListener(eq(mSensor),
- eq(mLockScreenWakeUpController));
- }
-
- @Test
- public void testOnStateChanged_disabledSensor() {
- when(mAmbientDisplayConfiguration.wakeLockScreenGestureEnabled(anyInt()))
- .thenReturn(false);
- mLockScreenWakeUpController.onStateChanged(StatusBarState.KEYGUARD);
- mLockScreenWakeUpController.onStateChanged(StatusBarState.SHADE);
-
- verify(mAsyncSensorManager, never()).registerPluginListener(eq(mSensor),
- eq(mLockScreenWakeUpController));
- }
-
- @Test
- public void testOnSensorChanged_postsToMainThread() {
- SensorManagerPlugin.SensorEvent event = new SensorManagerPlugin.SensorEvent(mSensor, 0);
- mLockScreenWakeUpController.onSensorChanged(event);
-
- verify(mHandler).post(any());
- }
-
- @Test
- public void testOnSensorChanged_wakeUpWhenDozing() {
- SensorManagerPlugin.SensorEvent event =
- new SensorManagerPlugin.SensorEvent(mSensor, 0, new float[] {1});
- mLockScreenWakeUpController.onSensorChanged(event);
- verify(mPowerManager, never()).wakeUp(anyLong(), any());
-
- mLockScreenWakeUpController.onDozingChanged(true);
- mLockScreenWakeUpController.onSensorChanged(event);
- verify(mPowerManager).wakeUp(anyLong(), any());
- }
-
- @Test
- public void testOnSensorChanged_sleepsWhenAwake() {
- boolean[] goToSleep = new boolean[] {false};
- doAnswer(invocation -> goToSleep[0] = true)
- .when(mPowerManager).goToSleep(anyLong(), anyInt(), anyInt());
- SensorManagerPlugin.SensorEvent event =
- new SensorManagerPlugin.SensorEvent(mSensor, 0, new float[] {0});
- mLockScreenWakeUpController.onDozingChanged(true);
- mLockScreenWakeUpController.onSensorChanged(event);
- Assert.assertFalse("goToSleep should have never been called.", goToSleep[0]);
-
- mLockScreenWakeUpController.onDozingChanged(false);
- mLockScreenWakeUpController.onSensorChanged(event);
- Assert.assertTrue("goToSleep should have been called.", goToSleep[0]);
- }
-}
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 0bc304e..146c5d6 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
@@ -220,9 +220,9 @@
mScrimController.transitionTo(ScrimState.PULSING);
mScrimController.finishAnimationsImmediately();
// Front scrim should be transparent
- // Back scrim should be visible with tint
+ // Back scrim should be semi-transparent so the user can see the wallpaper
// Pulse callback should have been invoked
- assertScrimVisibility(VISIBILITY_FULLY_TRANSPARENT, VISIBILITY_FULLY_OPAQUE);
+ assertScrimVisibility(VISIBILITY_FULLY_TRANSPARENT, VISIBILITY_SEMI_TRANSPARENT);
assertScrimTint(mScrimBehind, true /* tinted */);
}