make wake event trigger a pulse
Test: manual
Test: atest ScrimControllerTest
Bug: 111405682
Bug: 111395593
Change-Id: I5a7b9024ecd5aea691ac5e3f23e70818186fc37c
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();