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 | |
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')
21 files changed, 49 insertions, 54 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java index 9bb626d..2e95498 100755 --- a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java +++ b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java @@ -193,7 +193,7 @@ public class BatteryMeterView extends View implements DemoMode, TypedArray atts = context.obtainStyledAttributes(attrs, R.styleable.BatteryMeterView, defStyle, 0); final int frameColor = atts.getColor(R.styleable.BatteryMeterView_frameColor, - res.getColor(R.color.batterymeter_frame_color)); + context.getColor(R.color.batterymeter_frame_color)); TypedArray levels = res.obtainTypedArray(R.array.batterymeter_color_levels); TypedArray colors = res.obtainTypedArray(R.array.batterymeter_color_values); @@ -240,10 +240,10 @@ public class BatteryMeterView extends View implements DemoMode, mWarningTextPaint.setTypeface(font); mWarningTextPaint.setTextAlign(Paint.Align.CENTER); - mChargeColor = getResources().getColor(R.color.batterymeter_charge_color); + mChargeColor = context.getColor(R.color.batterymeter_charge_color); mBoltPaint = new Paint(Paint.ANTI_ALIAS_FLAG); - mBoltPaint.setColor(res.getColor(R.color.batterymeter_bolt_color)); + mBoltPaint.setColor(context.getColor(R.color.batterymeter_bolt_color)); mBoltPoints = loadBoltPoints(res); } diff --git a/packages/SystemUI/src/com/android/systemui/SearchPanelCircleView.java b/packages/SystemUI/src/com/android/systemui/SearchPanelCircleView.java index d8fb6da..f33e2b8 100644 --- a/packages/SystemUI/src/com/android/systemui/SearchPanelCircleView.java +++ b/packages/SystemUI/src/com/android/systemui/SearchPanelCircleView.java @@ -132,8 +132,8 @@ public class SearchPanelCircleView extends FrameLayout { mDisappearInterpolator = AnimationUtils.loadInterpolator(mContext, android.R.interpolator.fast_out_linear_in); mBackgroundPaint.setAntiAlias(true); - mBackgroundPaint.setColor(getResources().getColor(R.color.search_panel_circle_color)); - mRipplePaint.setColor(getResources().getColor(R.color.search_panel_ripple_color)); + mBackgroundPaint.setColor(context.getColor(R.color.search_panel_circle_color)); + mRipplePaint.setColor(context.getColor(R.color.search_panel_ripple_color)); mRipplePaint.setAntiAlias(true); } diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java index 63dd17f..af1f795 100644 --- a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java +++ b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java @@ -159,7 +159,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { .setContentText(mContext.getString(R.string.invalid_charger_text)) .setPriority(Notification.PRIORITY_MAX) .setVisibility(Notification.VISIBILITY_PUBLIC) - .setColor(mContext.getResources().getColor( + .setColor(mContext.getColor( com.android.internal.R.color.system_notification_accent_color)); final Notification n = nb.build(); if (n.headsUpContentView != null) { @@ -183,7 +183,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { .setDeleteIntent(pendingBroadcast(ACTION_DISMISSED_WARNING)) .setPriority(Notification.PRIORITY_MAX) .setVisibility(Notification.VISIBILITY_PUBLIC) - .setColor(mContext.getResources().getColor( + .setColor(mContext.getColor( com.android.internal.R.color.battery_saver_mode_color)); if (hasBatterySettings()) { nb.setContentIntent(pendingBroadcast(ACTION_SHOW_BATTERY_SETTINGS)); @@ -214,7 +214,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { .setOngoing(true) .setShowWhen(false) .setVisibility(Notification.VISIBILITY_PUBLIC) - .setColor(mContext.getResources().getColor( + .setColor(mContext.getColor( com.android.internal.R.color.battery_saver_mode_color)); addStopSaverAction(nb); if (hasSaverSettings()) { diff --git a/packages/SystemUI/src/com/android/systemui/qs/DataUsageGraph.java b/packages/SystemUI/src/com/android/systemui/qs/DataUsageGraph.java index d55ceaa..aff5d2b 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/DataUsageGraph.java +++ b/packages/SystemUI/src/com/android/systemui/qs/DataUsageGraph.java @@ -44,10 +44,10 @@ public class DataUsageGraph extends View { public DataUsageGraph(Context context, AttributeSet attrs) { super(context, attrs); final Resources res = context.getResources(); - mTrackColor = res.getColor(R.color.data_usage_graph_track); - mUsageColor = res.getColor(R.color.system_accent_color); - mOverlimitColor = res.getColor(R.color.system_warning_color); - mWarningColor = res.getColor(R.color.data_usage_graph_warning); + mTrackColor = context.getColor(R.color.data_usage_graph_track); + mUsageColor = context.getColor(R.color.system_accent_color); + mOverlimitColor = context.getColor(R.color.system_warning_color); + mWarningColor = context.getColor(R.color.data_usage_graph_warning); mMarkerWidth = res.getDimensionPixelSize(R.dimen.data_usage_graph_marker_width); } diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java b/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java index 16ae6b4..ec83ca7 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java @@ -88,7 +88,7 @@ public class QSTileView extends ViewGroup { addView(mIcon); mDivider = new View(mContext); - mDivider.setBackgroundColor(res.getColor(R.color.qs_tile_divider)); + mDivider.setBackgroundColor(context.getColor(R.color.qs_tile_divider)); final int dh = res.getDimensionPixelSize(R.dimen.qs_tile_divider_height); mDivider.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, dh)); addView(mDivider); @@ -138,8 +138,8 @@ public class QSTileView extends ViewGroup { mDualLabel = new QSDualTileLabel(mContext); mDualLabel.setId(android.R.id.title); mDualLabel.setBackgroundResource(R.drawable.btn_borderless_rect); - mDualLabel.setFirstLineCaret(res.getDrawable(R.drawable.qs_dual_tile_caret)); - mDualLabel.setTextColor(res.getColor(R.color.qs_tile_text)); + mDualLabel.setFirstLineCaret(mContext.getDrawable(R.drawable.qs_dual_tile_caret)); + mDualLabel.setTextColor(mContext.getColor(R.color.qs_tile_text)); mDualLabel.setPadding(0, mDualTileVerticalPaddingPx, 0, mDualTileVerticalPaddingPx); mDualLabel.setTypeface(CONDENSED); mDualLabel.setTextSize(TypedValue.COMPLEX_UNIT_PX, @@ -157,7 +157,7 @@ public class QSTileView extends ViewGroup { } else { mLabel = new TextView(mContext); mLabel.setId(android.R.id.title); - mLabel.setTextColor(res.getColor(R.color.qs_tile_text)); + mLabel.setTextColor(mContext.getColor(R.color.qs_tile_text)); mLabel.setGravity(Gravity.CENTER_HORIZONTAL); mLabel.setMinLines(2); mLabel.setPadding(0, 0, 0, 0); diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/DataUsageDetailView.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/DataUsageDetailView.java index eb816b7..d0ae383 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/DataUsageDetailView.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/DataUsageDetailView.java @@ -96,7 +96,7 @@ public class DataUsageDetailView extends LinearLayout { title.setText(titleId); final TextView usage = (TextView) findViewById(R.id.usage_text); usage.setText(formatBytes(bytes)); - usage.setTextColor(res.getColor(usageColor)); + usage.setTextColor(mContext.getColor(usageColor)); final DataUsageGraph graph = (DataUsageGraph) findViewById(R.id.usage_graph); graph.setLevels(info.limitLevel, info.warningLevel, info.usageLevel); final TextView carrier = (TextView) findViewById(R.id.usage_carrier_text); diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java index 1736c77..9263543 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java @@ -248,14 +248,11 @@ public class RecentsConfiguration { taskViewThumbnailAlpha = res.getFloat(R.dimen.recents_task_view_thumbnail_alpha); // Task bar colors - taskBarViewDefaultBackgroundColor = - res.getColor(R.color.recents_task_bar_default_background_color, null); - taskBarViewLightTextColor = - res.getColor(R.color.recents_task_bar_light_text_color, null); - taskBarViewDarkTextColor = - res.getColor(R.color.recents_task_bar_dark_text_color, null); - taskBarViewHighlightColor = - res.getColor(R.color.recents_task_bar_highlight_color, null); + taskBarViewDefaultBackgroundColor = context.getColor( + R.color.recents_task_bar_default_background_color); + taskBarViewLightTextColor = context.getColor(R.color.recents_task_bar_light_text_color); + taskBarViewDarkTextColor = context.getColor(R.color.recents_task_bar_dark_text_color); + taskBarViewHighlightColor = context.getColor(R.color.recents_task_bar_highlight_color); taskBarViewAffiliationColorMinAlpha = res.getFloat( R.dimen.recents_task_affiliation_color_min_alpha_percentage); diff --git a/packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java b/packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java index 502862e..cbf5c05 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java +++ b/packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java @@ -144,7 +144,7 @@ public class ScreenPinningRequest implements View.OnClickListener { boolean isLandscape = isLandscapePhone(mContext); inflateView(isLandscape); - int bgColor = mContext.getResources().getColor( + int bgColor = mContext.getColor( R.color.screen_pinning_request_window_bg); if (ActivityManager.isHighEndGfx()) { mLayout.setAlpha(0f); diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java index 1b71668..9d349ab 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java @@ -724,7 +724,7 @@ class GlobalScreenshot { .setVisibility(Notification.VISIBILITY_PUBLIC) // ok to show outside lockscreen .setCategory(Notification.CATEGORY_ERROR) .setAutoCancel(true) - .setColor(context.getResources().getColor( + .setColor(context.getColor( com.android.internal.R.color.system_notification_accent_color)); Notification n = new Notification.BigTextStyle(b) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java index 0e5fd94..c0b3a9b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java @@ -154,15 +154,15 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView mAppearAnimationFilter = new PorterDuffColorFilter(0, PorterDuff.Mode.SRC_ATOP); mRoundedRectCornerRadius = getResources().getDimensionPixelSize( R.dimen.notification_material_rounded_rect_radius); - mLegacyColor = getResources().getColor(R.color.notification_legacy_background_color); - mNormalColor = getResources().getColor(R.color.notification_material_background_color); - mLowPriorityColor = getResources().getColor( + mLegacyColor = context.getColor(R.color.notification_legacy_background_color); + mNormalColor = context.getColor(R.color.notification_material_background_color); + mLowPriorityColor = context.getColor( R.color.notification_material_background_low_priority_color); - mTintedRippleColor = context.getResources().getColor( + mTintedRippleColor = context.getColor( R.color.notification_ripple_tinted_color); - mLowPriorityRippleColor = context.getResources().getColor( + mLowPriorityRippleColor = context.getColor( R.color.notification_ripple_color_low_priority); - mNormalRippleColor = context.getResources().getColor( + mNormalRippleColor = context.getColor( R.color.notification_ripple_untinted_color); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index fab7409..55bdcac 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -661,7 +661,7 @@ public abstract class BaseStatusBar extends SystemUI implements .setContentText(mContext.getString(R.string.hidden_notifications_text)) .setPriority(Notification.PRIORITY_HIGH) .setOngoing(true) - .setColor(res.getColor(colorRes)) + .setColor(mContext.getColor(colorRes)) .setContentIntent(setupIntent) .addAction(R.drawable.ic_close, mContext.getString(R.string.hidden_notifications_cancel), @@ -789,7 +789,7 @@ public abstract class BaseStatusBar extends SystemUI implements final int color = sbn.getNotification().color; if (isMediaNotification(entry)) { entry.row.setTintColor(color == Notification.COLOR_DEFAULT - ? mContext.getResources().getColor( + ? mContext.getColor( R.color.notification_material_background_media_default_color) : color); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationOverflowIconsView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationOverflowIconsView.java index da8ef3e..88bb714 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationOverflowIconsView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationOverflowIconsView.java @@ -45,7 +45,7 @@ public class NotificationOverflowIconsView extends IconMerger { protected void onFinishInflate() { super.onFinishInflate(); mNotificationColorUtil = NotificationColorUtil.getInstance(getContext()); - mTintColor = getResources().getColor(R.color.keyguard_overflow_content_color); + mTintColor = getContext().getColor(R.color.keyguard_overflow_content_color); mIconSize = getResources().getDimensionPixelSize( com.android.internal.R.dimen.status_bar_icon_size); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationTemplateViewWrapper.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationTemplateViewWrapper.java index 59b62e5..0abf552 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationTemplateViewWrapper.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationTemplateViewWrapper.java @@ -60,7 +60,7 @@ public class NotificationTemplateViewWrapper extends NotificationViewWrapper { super(view); mIconDarkAlpha = ctx.getResources().getInteger(R.integer.doze_small_icon_alpha); mIconBackgroundDarkColor = - ctx.getResources().getColor(R.color.doze_small_icon_background_color); + ctx.getColor(R.color.doze_small_icon_background_color); mLinearOutSlowInInterpolator = AnimationUtils.loadInterpolator(ctx, android.R.interpolator.linear_out_slow_in); resolveViews(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java index d02cd17..e6847d8 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java @@ -55,7 +55,7 @@ public class StatusBarIconView extends AnimatedImageView { mSlot = slot; mNumberPain = new Paint(); mNumberPain.setTextAlign(Paint.Align.CENTER); - mNumberPain.setColor(res.getColor(R.drawable.notification_number_text_color)); + mNumberPain.setColor(context.getColor(R.drawable.notification_number_text_color)); mNumberPain.setAntiAlias(true); setNotification(notification); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java index 2d76645..1601b83 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java @@ -145,12 +145,12 @@ public class BarTransitions { mTransparent = 0x2f0000ff; mWarning = 0xffff0000; } else { - mOpaque = res.getColor(R.color.system_bar_background_opaque); - mSemiTransparent = res.getColor(R.color.system_bar_background_semi_transparent); - mTransparent = res.getColor(R.color.system_bar_background_transparent); - mWarning = res.getColor(com.android.internal.R.color.battery_saver_mode_color); + mOpaque = context.getColor(R.color.system_bar_background_opaque); + mSemiTransparent = context.getColor(R.color.system_bar_background_semi_transparent); + mTransparent = context.getColor(R.color.system_bar_background_transparent); + mWarning = context.getColor(com.android.internal.R.color.battery_saver_mode_color); } - mGradient = res.getDrawable(gradientResourceId); + mGradient = context.getDrawable(gradientResourceId); mInterpolator = new LinearInterpolator(); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index f3ec34a..2c389fb 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -535,8 +535,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, updateDisplaySize(); mScrimSrcModeEnabled = mContext.getResources().getBoolean( R.bool.config_status_bar_scrim_behind_use_src); - mLightModeIconColor = mContext.getResources().getColor(R.color.light_mode_icon_color, - mContext.getTheme()); + mLightModeIconColor = mContext.getColor(R.color.light_mode_icon_color); super.start(); // calls createAndAddWindows() @@ -613,7 +612,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, if (!ActivityManager.isHighEndGfx()) { mStatusBarWindow.setBackground(null); - mNotificationPanel.setBackground(new FastColorDrawable(context.getResources().getColor( + mNotificationPanel.setBackground(new FastColorDrawable(context.getColor( R.color.notification_panel_solid_background))); } if (ENABLE_HEADS_UP) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardUserSwitcherScrim.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardUserSwitcherScrim.java index 2d04d8e..353e07d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardUserSwitcherScrim.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardUserSwitcherScrim.java @@ -47,7 +47,7 @@ public class KeyguardUserSwitcherScrim extends Drawable public KeyguardUserSwitcherScrim(View host) { host.addOnLayoutChangeListener(this); - mDarkColor = host.getResources().getColor( + mDarkColor = host.getContext().getColor( R.color.keyguard_user_switcher_background_gradient_color); } diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java index f804736..5771d22 100644 --- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java +++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java @@ -327,7 +327,7 @@ public class StorageNotification extends SystemUI { pi = PendingIntent.getBroadcastAsUser(mContext, 0, intent, 0, UserHandle.CURRENT); } - mUsbStorageNotification.color = mContext.getResources().getColor( + mUsbStorageNotification.color = mContext.getColor( com.android.internal.R.color.system_notification_accent_color); mUsbStorageNotification.setLatestEventInfo(mContext, title, message, pi); mUsbStorageNotification.visibility = Notification.VISIBILITY_PUBLIC; @@ -422,7 +422,7 @@ public class StorageNotification extends SystemUI { } mMediaStorageNotification.icon = icon; - mMediaStorageNotification.color = mContext.getResources().getColor( + mMediaStorageNotification.color = mContext.getColor( com.android.internal.R.color.system_notification_accent_color); mMediaStorageNotification.setLatestEventInfo(mContext, title, message, pi); mMediaStorageNotification.visibility = Notification.VISIBILITY_PUBLIC; 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(); |