Loading packages/SystemUI/res/values/colors.xml +3 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,9 @@ <color name="status_bar_icons_hover_color_light">#38FFFFFF</color> <!-- 22% white --> <color name="status_bar_icons_hover_color_dark">#38000000</color> <!-- 22% black --> <!-- The dark background color behind the shade --> <color name="shade_scrim_background_dark">@*android:color/black</color> <!-- The color of the background in the separated list of the Global Actions menu --> <color name="global_actions_separated_background">#F5F5F5</color> Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java +29 −27 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.graphics.Color; import android.os.Trace; import com.android.systemui.dock.DockManager; import com.android.systemui.res.R; import com.android.systemui.scrim.ScrimView; import com.android.systemui.statusbar.notification.stack.StackStateAnimator; Loading @@ -39,8 +40,8 @@ public enum ScrimState { OFF { @Override public void prepare(ScrimState previousState) { mFrontTint = Color.BLACK; mBehindTint = Color.BLACK; mFrontTint = mBackgroundColor; mBehindTint = mBackgroundColor; mFrontAlpha = 1f; mBehindAlpha = 1f; Loading Loading @@ -74,15 +75,15 @@ public enum ScrimState { } else { mAnimationDuration = ScrimController.ANIMATION_DURATION; } mFrontTint = Color.BLACK; mBehindTint = Color.BLACK; mNotifTint = mClipQsScrim ? Color.BLACK : Color.TRANSPARENT; mFrontTint = mBackgroundColor; mBehindTint = mBackgroundColor; mNotifTint = mClipQsScrim ? mBackgroundColor : Color.TRANSPARENT; mFrontAlpha = 0; mBehindAlpha = mClipQsScrim ? 1 : mScrimBehindAlphaKeyguard; mNotifAlpha = mClipQsScrim ? mScrimBehindAlphaKeyguard : 0; if (mClipQsScrim) { updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK); updateScrimColor(mScrimBehind, 1f /* alpha */, mBackgroundColor); } } }, Loading @@ -93,10 +94,10 @@ public enum ScrimState { // notif scrim alpha values are determined by ScrimController#applyState // based on the shade expansion mFrontTint = Color.BLACK; mFrontTint = mBackgroundColor; mFrontAlpha = .66f; mBehindTint = Color.BLACK; mBehindTint = mBackgroundColor; mBehindAlpha = 1f; } }, Loading @@ -110,7 +111,7 @@ public enum ScrimState { mBehindTint = previousState.mBehindTint; mBehindAlpha = previousState.mBehindAlpha; mFrontTint = Color.BLACK; mFrontTint = mBackgroundColor; mFrontAlpha = .66f; } }, Loading @@ -122,7 +123,7 @@ public enum ScrimState { @Override public void prepare(ScrimState previousState) { mBehindAlpha = mClipQsScrim ? 1 : mDefaultScrimAlpha; mBehindTint = mClipQsScrim ? Color.BLACK : mSurfaceColor; mBehindTint = mClipQsScrim ? mBackgroundColor : mSurfaceColor; mNotifAlpha = mClipQsScrim ? mDefaultScrimAlpha : 0; mNotifTint = Color.TRANSPARENT; mFrontAlpha = 0f; Loading Loading @@ -154,10 +155,10 @@ public enum ScrimState { mBehindAlpha = mClipQsScrim ? 1 : mDefaultScrimAlpha; mNotifAlpha = 1f; mFrontAlpha = 0f; mBehindTint = mClipQsScrim ? Color.TRANSPARENT : Color.BLACK; mBehindTint = mClipQsScrim ? Color.TRANSPARENT : mBackgroundColor; if (mClipQsScrim) { updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK); updateScrimColor(mScrimBehind, 1f /* alpha */, mBackgroundColor); } } }, Loading @@ -184,11 +185,11 @@ public enum ScrimState { final boolean isDocked = mDockManager.isDocked(); mBlankScreen = mDisplayRequiresBlanking; mFrontTint = Color.BLACK; mFrontTint = mBackgroundColor; mFrontAlpha = (alwaysOnEnabled || isDocked || quickPickupEnabled) ? mAodFrontScrimAlpha : 1f; mBehindTint = Color.BLACK; mBehindTint = mBackgroundColor; mBehindAlpha = ScrimController.TRANSPARENT; mAnimationDuration = ScrimController.ANIMATION_DURATION_LONG; Loading Loading @@ -222,8 +223,8 @@ public enum ScrimState { @Override public void prepare(ScrimState previousState) { mFrontAlpha = mAodFrontScrimAlpha; mBehindTint = Color.BLACK; mFrontTint = Color.BLACK; mBehindTint = mBackgroundColor; mFrontTint = mBackgroundColor; mBlankScreen = mDisplayRequiresBlanking; mAnimationDuration = mWakeLockScreenSensorActive ? ScrimController.ANIMATION_DURATION_LONG : ScrimController.ANIMATION_DURATION; Loading @@ -245,7 +246,6 @@ public enum ScrimState { mBehindAlpha = mClipQsScrim ? 1 : 0; mNotifAlpha = 0; mFrontAlpha = 0; mAnimationDuration = mKeyguardFadingAway ? mKeyguardFadingAwayDuration : CentralSurfaces.FADE_KEYGUARD_DURATION; Loading @@ -259,22 +259,22 @@ public enum ScrimState { && !fromAod; mFrontTint = Color.TRANSPARENT; mBehindTint = Color.BLACK; mBehindTint = mBackgroundColor; mBlankScreen = false; if (mDisplayRequiresBlanking && previousState == ScrimState.AOD) { // Set all scrims black, before they fade transparent. updateScrimColor(mScrimInFront, 1f /* alpha */, Color.BLACK /* tint */); updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK /* tint */); updateScrimColor(mScrimInFront, 1f /* alpha */, mBackgroundColor /* tint */); updateScrimColor(mScrimBehind, 1f /* alpha */, mBackgroundColor /* tint */); // Scrims should still be black at the end of the transition. mFrontTint = Color.BLACK; mBehindTint = Color.BLACK; mFrontTint = mBackgroundColor; mBehindTint = mBackgroundColor; mBlankScreen = true; } if (mClipQsScrim) { updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK); updateScrimColor(mScrimBehind, 1f /* alpha */, mBackgroundColor); } } }, Loading @@ -283,8 +283,8 @@ public enum ScrimState { @Override public void prepare(ScrimState previousState) { mFrontTint = Color.TRANSPARENT; mBehindTint = Color.BLACK; mNotifTint = mClipQsScrim ? Color.BLACK : Color.TRANSPARENT; mBehindTint = mBackgroundColor; mNotifTint = mClipQsScrim ? mBackgroundColor : Color.TRANSPARENT; mFrontAlpha = 0; mBehindAlpha = mClipQsScrim ? 1 : 0; Loading @@ -293,7 +293,7 @@ public enum ScrimState { mBlankScreen = false; if (mClipQsScrim) { updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK); updateScrimColor(mScrimBehind, 1f /* alpha */, mBackgroundColor); } } }; Loading Loading @@ -327,9 +327,11 @@ public enum ScrimState { boolean mKeyguardFadingAway; long mKeyguardFadingAwayDuration; boolean mClipQsScrim; int mBackgroundColor; public void init(ScrimView scrimInFront, ScrimView scrimBehind, DozeParameters dozeParameters, DockManager dockManager) { mBackgroundColor = scrimBehind.getContext().getColor(R.color.shade_scrim_background_dark); mScrimInFront = scrimInFront; mScrimBehind = scrimBehind; Loading Loading
packages/SystemUI/res/values/colors.xml +3 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,9 @@ <color name="status_bar_icons_hover_color_light">#38FFFFFF</color> <!-- 22% white --> <color name="status_bar_icons_hover_color_dark">#38000000</color> <!-- 22% black --> <!-- The dark background color behind the shade --> <color name="shade_scrim_background_dark">@*android:color/black</color> <!-- The color of the background in the separated list of the Global Actions menu --> <color name="global_actions_separated_background">#F5F5F5</color> Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java +29 −27 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.graphics.Color; import android.os.Trace; import com.android.systemui.dock.DockManager; import com.android.systemui.res.R; import com.android.systemui.scrim.ScrimView; import com.android.systemui.statusbar.notification.stack.StackStateAnimator; Loading @@ -39,8 +40,8 @@ public enum ScrimState { OFF { @Override public void prepare(ScrimState previousState) { mFrontTint = Color.BLACK; mBehindTint = Color.BLACK; mFrontTint = mBackgroundColor; mBehindTint = mBackgroundColor; mFrontAlpha = 1f; mBehindAlpha = 1f; Loading Loading @@ -74,15 +75,15 @@ public enum ScrimState { } else { mAnimationDuration = ScrimController.ANIMATION_DURATION; } mFrontTint = Color.BLACK; mBehindTint = Color.BLACK; mNotifTint = mClipQsScrim ? Color.BLACK : Color.TRANSPARENT; mFrontTint = mBackgroundColor; mBehindTint = mBackgroundColor; mNotifTint = mClipQsScrim ? mBackgroundColor : Color.TRANSPARENT; mFrontAlpha = 0; mBehindAlpha = mClipQsScrim ? 1 : mScrimBehindAlphaKeyguard; mNotifAlpha = mClipQsScrim ? mScrimBehindAlphaKeyguard : 0; if (mClipQsScrim) { updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK); updateScrimColor(mScrimBehind, 1f /* alpha */, mBackgroundColor); } } }, Loading @@ -93,10 +94,10 @@ public enum ScrimState { // notif scrim alpha values are determined by ScrimController#applyState // based on the shade expansion mFrontTint = Color.BLACK; mFrontTint = mBackgroundColor; mFrontAlpha = .66f; mBehindTint = Color.BLACK; mBehindTint = mBackgroundColor; mBehindAlpha = 1f; } }, Loading @@ -110,7 +111,7 @@ public enum ScrimState { mBehindTint = previousState.mBehindTint; mBehindAlpha = previousState.mBehindAlpha; mFrontTint = Color.BLACK; mFrontTint = mBackgroundColor; mFrontAlpha = .66f; } }, Loading @@ -122,7 +123,7 @@ public enum ScrimState { @Override public void prepare(ScrimState previousState) { mBehindAlpha = mClipQsScrim ? 1 : mDefaultScrimAlpha; mBehindTint = mClipQsScrim ? Color.BLACK : mSurfaceColor; mBehindTint = mClipQsScrim ? mBackgroundColor : mSurfaceColor; mNotifAlpha = mClipQsScrim ? mDefaultScrimAlpha : 0; mNotifTint = Color.TRANSPARENT; mFrontAlpha = 0f; Loading Loading @@ -154,10 +155,10 @@ public enum ScrimState { mBehindAlpha = mClipQsScrim ? 1 : mDefaultScrimAlpha; mNotifAlpha = 1f; mFrontAlpha = 0f; mBehindTint = mClipQsScrim ? Color.TRANSPARENT : Color.BLACK; mBehindTint = mClipQsScrim ? Color.TRANSPARENT : mBackgroundColor; if (mClipQsScrim) { updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK); updateScrimColor(mScrimBehind, 1f /* alpha */, mBackgroundColor); } } }, Loading @@ -184,11 +185,11 @@ public enum ScrimState { final boolean isDocked = mDockManager.isDocked(); mBlankScreen = mDisplayRequiresBlanking; mFrontTint = Color.BLACK; mFrontTint = mBackgroundColor; mFrontAlpha = (alwaysOnEnabled || isDocked || quickPickupEnabled) ? mAodFrontScrimAlpha : 1f; mBehindTint = Color.BLACK; mBehindTint = mBackgroundColor; mBehindAlpha = ScrimController.TRANSPARENT; mAnimationDuration = ScrimController.ANIMATION_DURATION_LONG; Loading Loading @@ -222,8 +223,8 @@ public enum ScrimState { @Override public void prepare(ScrimState previousState) { mFrontAlpha = mAodFrontScrimAlpha; mBehindTint = Color.BLACK; mFrontTint = Color.BLACK; mBehindTint = mBackgroundColor; mFrontTint = mBackgroundColor; mBlankScreen = mDisplayRequiresBlanking; mAnimationDuration = mWakeLockScreenSensorActive ? ScrimController.ANIMATION_DURATION_LONG : ScrimController.ANIMATION_DURATION; Loading @@ -245,7 +246,6 @@ public enum ScrimState { mBehindAlpha = mClipQsScrim ? 1 : 0; mNotifAlpha = 0; mFrontAlpha = 0; mAnimationDuration = mKeyguardFadingAway ? mKeyguardFadingAwayDuration : CentralSurfaces.FADE_KEYGUARD_DURATION; Loading @@ -259,22 +259,22 @@ public enum ScrimState { && !fromAod; mFrontTint = Color.TRANSPARENT; mBehindTint = Color.BLACK; mBehindTint = mBackgroundColor; mBlankScreen = false; if (mDisplayRequiresBlanking && previousState == ScrimState.AOD) { // Set all scrims black, before they fade transparent. updateScrimColor(mScrimInFront, 1f /* alpha */, Color.BLACK /* tint */); updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK /* tint */); updateScrimColor(mScrimInFront, 1f /* alpha */, mBackgroundColor /* tint */); updateScrimColor(mScrimBehind, 1f /* alpha */, mBackgroundColor /* tint */); // Scrims should still be black at the end of the transition. mFrontTint = Color.BLACK; mBehindTint = Color.BLACK; mFrontTint = mBackgroundColor; mBehindTint = mBackgroundColor; mBlankScreen = true; } if (mClipQsScrim) { updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK); updateScrimColor(mScrimBehind, 1f /* alpha */, mBackgroundColor); } } }, Loading @@ -283,8 +283,8 @@ public enum ScrimState { @Override public void prepare(ScrimState previousState) { mFrontTint = Color.TRANSPARENT; mBehindTint = Color.BLACK; mNotifTint = mClipQsScrim ? Color.BLACK : Color.TRANSPARENT; mBehindTint = mBackgroundColor; mNotifTint = mClipQsScrim ? mBackgroundColor : Color.TRANSPARENT; mFrontAlpha = 0; mBehindAlpha = mClipQsScrim ? 1 : 0; Loading @@ -293,7 +293,7 @@ public enum ScrimState { mBlankScreen = false; if (mClipQsScrim) { updateScrimColor(mScrimBehind, 1f /* alpha */, Color.BLACK); updateScrimColor(mScrimBehind, 1f /* alpha */, mBackgroundColor); } } }; Loading Loading @@ -327,9 +327,11 @@ public enum ScrimState { boolean mKeyguardFadingAway; long mKeyguardFadingAwayDuration; boolean mClipQsScrim; int mBackgroundColor; public void init(ScrimView scrimInFront, ScrimView scrimBehind, DozeParameters dozeParameters, DockManager dockManager) { mBackgroundColor = scrimBehind.getContext().getColor(R.color.shade_scrim_background_dark); mScrimInFront = scrimInFront; mScrimBehind = scrimBehind; Loading