Merge "Volume iconography update" into pi-dev
diff --git a/packages/SystemUI/res/drawable/ic_volume_accessibility.xml b/packages/SystemUI/res/drawable/ic_volume_accessibility.xml
index 88fb2d2..71376d5 100644
--- a/packages/SystemUI/res/drawable/ic_volume_accessibility.xml
+++ b/packages/SystemUI/res/drawable/ic_volume_accessibility.xml
@@ -15,8 +15,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="32dp"
- android:height="32dp"
+ android:width="24dp"
+ android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?android:attr/colorControlNormal">
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
index 00874e3..e801607 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
@@ -45,10 +45,8 @@
import android.graphics.Color;
import android.graphics.PixelFormat;
import android.graphics.drawable.ColorDrawable;
-import android.media.AudioAttributes;
import android.media.AudioManager;
import android.media.AudioSystem;
-import android.media.MediaPlayer;
import android.os.Debug;
import android.os.Handler;
import android.os.Looper;
@@ -132,8 +130,8 @@
private final AccessibilityManagerWrapper mAccessibilityMgr;
private final Object mSafetyWarningLock = new Object();
private final Accessibility mAccessibility = new Accessibility();
- private final ColorStateList mActiveSliderTint;
- private final ColorStateList mInactiveSliderTint;
+ private final ColorStateList mActiveTint;
+ private final ColorStateList mInactiveTint;
private final Vibrator mVibrator;
private boolean mShowing;
@@ -152,8 +150,8 @@
mController = Dependency.get(VolumeDialogController.class);
mKeyguard = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE);
mAccessibilityMgr = Dependency.get(AccessibilityManagerWrapper.class);
- mActiveSliderTint = ColorStateList.valueOf(Utils.getColorAccent(mContext));
- mInactiveSliderTint = loadColorStateList(R.color.volume_slider_inactive);
+ mActiveTint = ColorStateList.valueOf(Utils.getColorAccent(mContext));
+ mInactiveTint = loadColorStateList(R.color.volume_slider_inactive);
mDeviceProvisionedController = Dependency.get(DeviceProvisionedController.class);
mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
}
@@ -614,7 +612,7 @@
final boolean shouldBeVisible = shouldBeVisibleH(row, activeRow);
Util.setVisOrGone(row.view, shouldBeVisible);
if (row.view.isShown()) {
- updateVolumeRowSliderTintH(row, isActive);
+ updateVolumeRowTintH(row, isActive);
}
}
}
@@ -848,21 +846,22 @@
updateVolumeRowSliderH(row, enableSlider, vlevel);
}
- private void updateVolumeRowSliderTintH(VolumeRow row, boolean isActive) {
+ private void updateVolumeRowTintH(VolumeRow row, boolean isActive) {
if (isActive) {
row.slider.requestFocus();
}
- final ColorStateList tint = isActive && row.slider.isEnabled() ? mActiveSliderTint
- : mInactiveSliderTint;
- if (tint == row.cachedSliderTint) return;
- row.cachedSliderTint = tint;
+ final ColorStateList tint = isActive && row.slider.isEnabled() ? mActiveTint
+ : mInactiveTint;
+ if (tint == row.cachedTint) return;
row.slider.setProgressTintList(tint);
row.slider.setThumbTintList(tint);
+ row.icon.setImageTintList(tint);
+ row.cachedTint = tint;
}
private void updateVolumeRowSliderH(VolumeRow row, boolean enable, int vlevel) {
row.slider.setEnabled(enable);
- updateVolumeRowSliderTintH(row, row.stream == mActiveStream);
+ updateVolumeRowTintH(row, row.stream == mActiveStream);
if (row.tracking) {
return; // don't update if user is sliding
}
@@ -1234,7 +1233,7 @@
private int iconMuteRes;
private boolean important;
private boolean defaultStream;
- private ColorStateList cachedSliderTint;
+ private ColorStateList cachedTint;
private int iconState; // from Events
private ObjectAnimator anim; // slider progress animation for non-touch-related updates
private int animTargetProgress;