summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2015-05-13 20:35:09 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-13 20:35:10 +0000
commit765e1592b15025d86b050e35519f975862582b8f (patch)
tree6b783a67444bd303e5c2f04dfdf9d895418471d2 /packages/SystemUI
parent131a19ee6f55d95d747d3d1ed62537b1db5a2e69 (diff)
parentecc80587a60c6a4d54905f910ce11abb991bd3ee (diff)
downloadframeworks_base-765e1592b15025d86b050e35519f975862582b8f.zip
frameworks_base-765e1592b15025d86b050e35519f975862582b8f.tar.gz
frameworks_base-765e1592b15025d86b050e35519f975862582b8f.tar.bz2
Merge "Volume: Use inactive slider tints when disabled." into mnc-dev
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
index 4bc45df..6e0ca3c 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
@@ -533,8 +533,7 @@ public class VolumeDialog {
}
Util.setVisOrInvis(row.settingsButton, false);
row.header.setAlpha(mExpanded && isActive ? 1 : 0.5f);
- row.slider.setProgressTintList(isActive ? mActiveSliderTint : mInactiveSliderTint);
- row.slider.setThumbTintList(isActive ? mActiveSliderTint : mInactiveSliderTint);
+ updateVolumeRowSliderTintH(row, isActive);
}
}
@@ -666,8 +665,18 @@ public class VolumeDialog {
updateVolumeRowSliderH(row, zenMuted);
}
+ private void updateVolumeRowSliderTintH(VolumeRow row, boolean isActive) {
+ final ColorStateList tint = isActive && row.slider.isEnabled() ? mActiveSliderTint
+ : mInactiveSliderTint;
+ if (tint == row.cachedSliderTint) return;
+ row.cachedSliderTint = tint;
+ row.slider.setProgressTintList(tint);
+ row.slider.setThumbTintList(tint);
+ }
+
private void updateVolumeRowSliderH(VolumeRow row, boolean zenMuted) {
row.slider.setEnabled(!zenMuted);
+ updateVolumeRowSliderTintH(row, row.stream == mActiveStream);
if (row.tracking) {
return; // don't update if user is sliding
}
@@ -1027,6 +1036,7 @@ public class VolumeDialog {
private int iconMuteRes;
private boolean important;
private int cachedIconRes;
+ private ColorStateList cachedSliderTint;
private int iconState; // from Events
private boolean cachedShowHeaders = VolumePrefs.DEFAULT_SHOW_HEADERS;
private int cachedExpandButtonRes;