summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Felka Chang <felkachang@google.com> 2019-05-29 02:51:15 +0800
committer Felka Chang <felkachang@google.com> 2019-05-29 19:41:49 +0800
commit97bc8d592f4c3d51affd214796442f8f04c2ecaf (patch)
tree6199384197e15a8fc4ac96c10f97b97c9df6c0bc
parent2cf040d6024c5e056c2ceba899e9ecdd3393f897 (diff)
Fix notification shade inefficient contrast
Because the color of the notification shade contains alpha channel, the colors in wallpaper blend with the color of the notification shade. After the blending with wallpaper colors and notification shade color, the contrast ratio between gear icon and the blending color is not enough. The solution is to use the solid color rather than the colors with the transparency. Light Theme: shade=#E8EAED gear=#5f6368 Dark Theme: shade=#202124 gear=#9aa0a6 Fixes: 124379911 Test: atest SystemUITests Change-Id: I0e436a1f6b5507c5083b4b1b9811166d0fb41da7
-rw-r--r--packages/SystemUI/res/values-night/colors.xml5
-rw-r--r--packages/SystemUI/res/values/colors.xml4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java9
3 files changed, 7 insertions, 11 deletions
diff --git a/packages/SystemUI/res/values-night/colors.xml b/packages/SystemUI/res/values-night/colors.xml
index dd3073fb5e65..c5f4052b0e89 100644
--- a/packages/SystemUI/res/values-night/colors.xml
+++ b/packages/SystemUI/res/values-night/colors.xml
@@ -31,7 +31,10 @@
<color name="notification_divider_color">#212121</color>
<!-- The background color of the notification shade -->
- <color name="notification_shade_background_color">#181818</color>
+ <color name="notification_shade_background_color">@color/GM2_grey_900</color>
+
+ <!-- The color of the gear shown behind a notification -->
+ <color name="notification_gear_color">@color/GM2_grey_500</color>
<!-- The color of the ripples on the untinted notifications -->
<color name="notification_ripple_untinted_color">#30ffffff</color>
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index 3f84b32ee0c2..088badcaf655 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -74,7 +74,7 @@
<color name="notification_divider_color">#FF616161</color>
<!-- The background color of the notification shade -->
- <color name="notification_shade_background_color">#ffeeeeee</color>
+ <color name="notification_shade_background_color">@color/GM2_grey_200</color>
<!-- The color of the ripples on the untinted notifications -->
<color name="notification_ripple_untinted_color">#28000000</color>
@@ -83,7 +83,7 @@
<color name="notification_ripple_tinted_color">#30ffffff</color>
<!-- The color of the gear shown behind a notification -->
- <color name="notification_gear_color">#ff757575</color>
+ <color name="notification_gear_color">@color/GM2_grey_700</color>
<!-- The color of the text inside a notification -->
<color name="notification_primary_text_color">@*android:color/notification_primary_text_color_light</color>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
index a517e760c8b4..e6f47315bf4c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
@@ -939,18 +939,11 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
return;
}
- float alpha =
- BACKGROUND_ALPHA_DIMMED + (1 - BACKGROUND_ALPHA_DIMMED) * (1.0f - mDimAmount);
- alpha *= 1f - mInterpolatedDarkAmount;
- // We need to manually blend in the background color.
- int scrimColor = mScrimController.getBackgroundColor();
- int awakeColor = ColorUtils.blendARGB(scrimColor, mBgColor, alpha);
-
// Interpolate between semi-transparent notification panel background color
// and white AOD separator.
float colorInterpolation = MathUtils.smoothStep(0.4f /* start */, 1f /* end */,
mLinearDarkAmount);
- int color = ColorUtils.blendARGB(awakeColor, Color.WHITE, colorInterpolation);
+ int color = ColorUtils.blendARGB(mBgColor, Color.WHITE, colorInterpolation);
if (mCachedBackgroundColor != color) {
mCachedBackgroundColor = color;