summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jeff DeCew <jeffdq@google.com> 2021-03-05 09:35:09 -0500
committer Jeff DeCew <jeffdq@google.com> 2021-03-05 15:32:23 -0500
commit27127e1b7b5fbd3b0d1af1d72d5bf0603c9ed401 (patch)
treeacfef31cda8f772aa3f9331baaf343d2daed8794
parentc50c326cc44d442788f88bfae294dac8186e5045 (diff)
Fix dark mode progress bar background color
Fixes: 178062760 Test: visual inspection Change-Id: I933fcc27aea8731f10a0910da68c1f0c6fe035d5
-rw-r--r--core/java/android/app/Notification.java17
-rw-r--r--core/res/res/values/colors.xml2
2 files changed, 8 insertions, 11 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index bc24e9767944..96159568f8b4 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -5188,16 +5188,13 @@ public class Notification implements Parcelable
final boolean ind = ex.getBoolean(EXTRA_PROGRESS_INDETERMINATE);
if (!p.mHideProgress && (max != 0 || ind)) {
contentView.setViewVisibility(com.android.internal.R.id.progress, View.VISIBLE);
- contentView.setProgressBar(
- R.id.progress, max, progress, ind);
- contentView.setProgressBackgroundTintList(
- R.id.progress, ColorStateList.valueOf(mContext.getColor(
- R.color.notification_progress_background_color)));
- if (getRawColor(p) != COLOR_DEFAULT) {
- int color = getAccentColor(p);
- ColorStateList colorStateList = ColorStateList.valueOf(color);
- contentView.setProgressTintList(R.id.progress, colorStateList);
- contentView.setProgressIndeterminateTintList(R.id.progress, colorStateList);
+ contentView.setProgressBar(R.id.progress, max, progress, ind);
+ contentView.setProgressBackgroundTintList(R.id.progress,
+ mContext.getColorStateList(R.color.notification_progress_background_color));
+ if (mTintWithThemeAccent || getRawColor(p) != COLOR_DEFAULT) {
+ ColorStateList progressTint = ColorStateList.valueOf(getAccentColor(p));
+ contentView.setProgressTintList(R.id.progress, progressTint);
+ contentView.setProgressIndeterminateTintList(R.id.progress, progressTint);
}
return true;
} else {
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index d79c01faaa36..c00581f981af 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -151,7 +151,7 @@
<color name="notification_action_button_text_color">@color/notification_default_color</color>
- <color name="notification_progress_background_color">@color/secondary_text_material_light</color>
+ <color name="notification_progress_background_color">@color/notification_secondary_text_color_current</color>
<color name="notification_action_list">#ffeeeeee</color>