am 13ea79de: Merge "Volume: Separate tint colors for active vs inactive sliders." into mnc-dev

* commit '13ea79dea443831c1936f9ac47109144705149f6':
  Volume: Separate tint colors for active vs inactive sliders.
diff --git a/packages/SystemUI/res/layout/volume_dialog_row.xml b/packages/SystemUI/res/layout/volume_dialog_row.xml
index 53ae61b..d12bf5d 100644
--- a/packages/SystemUI/res/layout/volume_dialog_row.xml
+++ b/packages/SystemUI/res/layout/volume_dialog_row.xml
@@ -50,9 +50,7 @@
         android:layout_toEndOf="@id/volume_row_icon"
         android:layout_toStartOf="@+id/volume_settings_button"
         android:paddingEnd="8dp"
-        android:paddingStart="8dp"
-        android:progressTint="@android:color/white"
-        android:thumbTint="@android:color/white" />
+        android:paddingStart="8dp" />
 
     <com.android.keyguard.AlphaOptimizedImageButton
         android:id="@+id/volume_settings_button"
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index b47d81d..0dcbe88 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -142,4 +142,5 @@
     <color name="zen_introduction_message_background">#ff009688</color><!-- deep teal 500 -->
     <color name="volume_icon_color">#ffffffff</color>
     <color name="volume_settings_icon_color">#7fffffff</color>
+    <color name="volume_slider_inactive">#FFB0BEC5</color><!-- blue grey 200 -->
 </resources>
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
index 1e34663..4bc45df 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
@@ -26,6 +26,7 @@
 import android.app.Dialog;
 import android.app.KeyguardManager;
 import android.content.Context;
+import android.content.res.ColorStateList;
 import android.content.res.Resources;
 import android.graphics.Color;
 import android.graphics.PixelFormat;
@@ -107,6 +108,8 @@
     private final LayoutTransition mLayoutTransition;
     private final Object mSafetyWarningLock = new Object();
     private final Accessibility mAccessibility = new Accessibility();
+    private final ColorStateList mActiveSliderTint;
+    private final ColorStateList mInactiveSliderTint;
 
     private boolean mShowing;
     private boolean mExpanded;
@@ -152,6 +155,8 @@
         lp.gravity = Gravity.TOP;
         window.setAttributes(lp);
 
+        mActiveSliderTint = loadColorStateList(R.color.system_accent_color);
+        mInactiveSliderTint = loadColorStateList(R.color.volume_slider_inactive);
         mDialog.setContentView(R.layout.volume_dialog);
         mDialogView = (ViewGroup) mDialog.findViewById(R.id.volume_dialog);
         mDialogContentView = (ViewGroup) mDialog.findViewById(R.id.volume_dialog_content);
@@ -190,6 +195,10 @@
         controller.getState();
     }
 
+    private ColorStateList loadColorStateList(int colorResId) {
+        return ColorStateList.valueOf(mContext.getColor(colorResId));
+    }
+
     private void updateWindowWidthH() {
         final ViewGroup.LayoutParams lp = mDialogView.getLayoutParams();
         final DisplayMetrics dm = mContext.getResources().getDisplayMetrics();
@@ -524,6 +533,8 @@
             }
             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);
         }
     }