Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java +58 −25 Original line number Diff line number Diff line Loading @@ -28,10 +28,10 @@ import com.android.systemui.scrim.ScrimView; import com.android.systemui.shade.ui.ShadeColors; import com.android.systemui.statusbar.notification.stack.StackStateAnimator; import java.util.function.Supplier; import kotlinx.coroutines.ExperimentalCoroutinesApi; import java.util.function.Supplier; /** * Possible states of the ScrimController state machine. */ Loading Loading @@ -340,6 +340,17 @@ public enum ScrimState { DREAMING { @Override public void prepare(ScrimState previousState) { if (Flags.notificationShadeBlur()) { // Scrim parameters should match SHADE_LOCKED like other activities occluding // keyguard. mBehindTint = ShadeColors.shadePanel(mScrimBehind.getResources(), mIsBlurSupported.get()); mBehindAlpha = Color.alpha(mBehindTint) / 255.0f; mNotifTint = ShadeColors.notificationScrim(mScrimBehind.getResources(), mIsBlurSupported.get()); mNotifAlpha = Color.alpha(mNotifTint) / 255.0f; mFrontAlpha = 0.0f; } else { mFrontTint = Color.TRANSPARENT; mBehindTint = mBackgroundColor; mNotifTint = mClipQsScrim ? mBackgroundColor : Color.TRANSPARENT; Loading @@ -354,6 +365,7 @@ public enum ScrimState { updateScrimColor(mScrimBehind, 1f /* alpha */, mBackgroundColor); } } } }, /** Loading @@ -364,6 +376,15 @@ public enum ScrimState { GLANCEABLE_HUB { @Override public void prepare(ScrimState previousState) { if (Flags.notificationShadeBlur()) { // Scrim parameters should match KEYGUARD as we're showing on top of keyguard. mBehindTint = Color.TRANSPARENT; mNotifTint = ShadeColors.notificationScrim(mScrimBehind.getResources(), mIsBlurSupported.get()); mBehindAlpha = 0.0f; mNotifAlpha = 0.0f; mFrontAlpha = 0.0f; } else { // No scrims should be visible by default in this state. mBehindAlpha = 0; mNotifAlpha = 0; Loading @@ -373,6 +394,7 @@ public enum ScrimState { mBehindTint = mBackgroundColor; mNotifTint = mClipQsScrim ? mBackgroundColor : Color.TRANSPARENT; } } }, /** Loading @@ -386,6 +408,16 @@ public enum ScrimState { GLANCEABLE_HUB_OVER_DREAM { @Override public void prepare(ScrimState previousState) { if (Flags.notificationShadeBlur()) { // Scrim parameters should match DREAM as hub is showing while on top of the dream. mBehindTint = ShadeColors.shadePanel(mScrimBehind.getResources(), mIsBlurSupported.get()); mBehindAlpha = Color.alpha(mBehindTint) / 255.0f; mNotifTint = ShadeColors.notificationScrim(mScrimBehind.getResources(), mIsBlurSupported.get()); mNotifAlpha = Color.alpha(mNotifTint) / 255.0f; mFrontAlpha = 0.0f; } else { // No scrims should be visible by default in this state. mBehindAlpha = 0; mNotifAlpha = 0; Loading @@ -395,6 +427,7 @@ public enum ScrimState { mBehindTint = mBackgroundColor; mNotifTint = mClipQsScrim ? mBackgroundColor : Color.TRANSPARENT; } } }; boolean mBlankScreen = false; Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java +58 −25 Original line number Diff line number Diff line Loading @@ -28,10 +28,10 @@ import com.android.systemui.scrim.ScrimView; import com.android.systemui.shade.ui.ShadeColors; import com.android.systemui.statusbar.notification.stack.StackStateAnimator; import java.util.function.Supplier; import kotlinx.coroutines.ExperimentalCoroutinesApi; import java.util.function.Supplier; /** * Possible states of the ScrimController state machine. */ Loading Loading @@ -340,6 +340,17 @@ public enum ScrimState { DREAMING { @Override public void prepare(ScrimState previousState) { if (Flags.notificationShadeBlur()) { // Scrim parameters should match SHADE_LOCKED like other activities occluding // keyguard. mBehindTint = ShadeColors.shadePanel(mScrimBehind.getResources(), mIsBlurSupported.get()); mBehindAlpha = Color.alpha(mBehindTint) / 255.0f; mNotifTint = ShadeColors.notificationScrim(mScrimBehind.getResources(), mIsBlurSupported.get()); mNotifAlpha = Color.alpha(mNotifTint) / 255.0f; mFrontAlpha = 0.0f; } else { mFrontTint = Color.TRANSPARENT; mBehindTint = mBackgroundColor; mNotifTint = mClipQsScrim ? mBackgroundColor : Color.TRANSPARENT; Loading @@ -354,6 +365,7 @@ public enum ScrimState { updateScrimColor(mScrimBehind, 1f /* alpha */, mBackgroundColor); } } } }, /** Loading @@ -364,6 +376,15 @@ public enum ScrimState { GLANCEABLE_HUB { @Override public void prepare(ScrimState previousState) { if (Flags.notificationShadeBlur()) { // Scrim parameters should match KEYGUARD as we're showing on top of keyguard. mBehindTint = Color.TRANSPARENT; mNotifTint = ShadeColors.notificationScrim(mScrimBehind.getResources(), mIsBlurSupported.get()); mBehindAlpha = 0.0f; mNotifAlpha = 0.0f; mFrontAlpha = 0.0f; } else { // No scrims should be visible by default in this state. mBehindAlpha = 0; mNotifAlpha = 0; Loading @@ -373,6 +394,7 @@ public enum ScrimState { mBehindTint = mBackgroundColor; mNotifTint = mClipQsScrim ? mBackgroundColor : Color.TRANSPARENT; } } }, /** Loading @@ -386,6 +408,16 @@ public enum ScrimState { GLANCEABLE_HUB_OVER_DREAM { @Override public void prepare(ScrimState previousState) { if (Flags.notificationShadeBlur()) { // Scrim parameters should match DREAM as hub is showing while on top of the dream. mBehindTint = ShadeColors.shadePanel(mScrimBehind.getResources(), mIsBlurSupported.get()); mBehindAlpha = Color.alpha(mBehindTint) / 255.0f; mNotifTint = ShadeColors.notificationScrim(mScrimBehind.getResources(), mIsBlurSupported.get()); mNotifAlpha = Color.alpha(mNotifTint) / 255.0f; mFrontAlpha = 0.0f; } else { // No scrims should be visible by default in this state. mBehindAlpha = 0; mNotifAlpha = 0; Loading @@ -395,6 +427,7 @@ public enum ScrimState { mBehindTint = mBackgroundColor; mNotifTint = mClipQsScrim ? mBackgroundColor : Color.TRANSPARENT; } } }; boolean mBlankScreen = false; Loading