diff options
author | Alan Viverette <alanv@google.com> | 2015-03-18 18:37:18 -0700 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2015-03-18 18:37:18 -0700 |
commit | 4a357cd2e55293402d7172766f7f9419815fc1e8 (patch) | |
tree | f2cedee7f41f48a8141a2798ca6100912553e4ef /packages/SystemUI/src/com/android/systemui/volume | |
parent | f2560e62cf26cae64f5751b0479743e09cb7bd7f (diff) | |
download | frameworks_base-4a357cd2e55293402d7172766f7f9419815fc1e8.zip frameworks_base-4a357cd2e55293402d7172766f7f9419815fc1e8.tar.gz frameworks_base-4a357cd2e55293402d7172766f7f9419815fc1e8.tar.bz2 |
Replace usages of deprecated Resources.getColor() and getColorStateList()
Change-Id: I8f64fe6c4c44a92ff6d07250223ba590a1d691b0
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/volume')
3 files changed, 4 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/volume/SegmentedButtons.java b/packages/SystemUI/src/com/android/systemui/volume/SegmentedButtons.java index 2f02f7c..5f5b881 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/SegmentedButtons.java +++ b/packages/SystemUI/src/com/android/systemui/volume/SegmentedButtons.java @@ -60,7 +60,7 @@ public class SegmentedButtons extends LinearLayout { final Object tag = c.getTag(); final boolean selected = Objects.equals(mSelectedValue, tag); c.setSelected(selected); - c.getCompoundDrawables()[1].setTint(mContext.getResources().getColor(selected + c.getCompoundDrawables()[1].setTint(mContext.getColor(selected ? R.color.segmented_button_selected : R.color.segmented_button_unselected)); } fireOnSelected(); diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java index 687452d..ac08904 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java @@ -330,7 +330,7 @@ public class VolumeUI extends SystemUI { PendingIntent.FLAG_UPDATE_CURRENT)) .setPriority(Notification.PRIORITY_MIN) .setVisibility(Notification.VISIBILITY_PUBLIC) - .setColor(mContext.getResources().getColor( + .setColor(mContext.getColor( com.android.internal.R.color.system_notification_accent_color)) .build()); } diff --git a/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java b/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java index 6cecc8f..878ab712 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java +++ b/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java @@ -124,9 +124,8 @@ public class ZenModePanel extends LinearLayout { mPrefs = new Prefs(); mInflater = LayoutInflater.from(mContext.getApplicationContext()); mIconPulser = new IconPulser(mContext); - final Resources res = mContext.getResources(); - mSubheadWarningColor = res.getColor(R.color.system_warning_color); - mSubheadColor = res.getColor(R.color.qs_subhead); + mSubheadWarningColor = context.getColor(R.color.system_warning_color); + mSubheadColor = context.getColor(R.color.qs_subhead); mInterpolator = AnimationUtils.loadInterpolator(mContext, com.android.internal.R.interpolator.fast_out_slow_in); mForeverId = Condition.newId(mContext).appendPath("forever").build(); |