Loading core/java/android/app/Notification.java +5 −5 Original line number Diff line number Diff line Loading @@ -2870,7 +2870,7 @@ public class Notification implements Parcelable contentView.setProgressBar( R.id.progress, mProgressMax, mProgress, mProgressIndeterminate); contentView.setProgressBackgroundTintList( R.id.progress, ColorStateList.valueOf(mContext.getResources().getColor( R.id.progress, ColorStateList.valueOf(mContext.getColor( R.color.notification_progress_background_color))); if (mColor != COLOR_DEFAULT) { ColorStateList colorStateList = ColorStateList.valueOf(mColor); Loading Loading @@ -3044,7 +3044,7 @@ public class Notification implements Parcelable private void processLegacyAction(Action action, RemoteViews button) { if (!isLegacy() || mColorUtil.isGrayscaleIcon(mContext, action.icon)) { button.setTextViewCompoundDrawablesRelativeColorFilter(R.id.action0, 0, mContext.getResources().getColor(R.color.notification_action_color_filter), mContext.getColor(R.color.notification_action_color_filter), PorterDuff.Mode.MULTIPLY); } } Loading Loading @@ -3142,7 +3142,7 @@ public class Notification implements Parcelable private int resolveColor() { if (mColor == COLOR_DEFAULT) { return mContext.getResources().getColor(R.color.notification_icon_bg_color); return mContext.getColor(R.color.notification_icon_bg_color); } return mColor; } Loading Loading @@ -4321,9 +4321,9 @@ public class Notification implements Parcelable * Applies the special text colors for media notifications to all text views. */ private void styleText(RemoteViews contentView) { int primaryColor = mBuilder.mContext.getResources().getColor( int primaryColor = mBuilder.mContext.getColor( R.color.notification_media_primary_color); int secondaryColor = mBuilder.mContext.getResources().getColor( int secondaryColor = mBuilder.mContext.getColor( R.color.notification_media_secondary_color); contentView.setTextColor(R.id.title, primaryColor); if (mBuilder.showsTimeOrChronometer()) { Loading core/java/android/content/res/Resources.java +2 −2 Original line number Diff line number Diff line Loading @@ -927,6 +927,7 @@ public class Resources { * @deprecated Use {@link #getColor(int, Theme)} instead. */ @ColorInt @Deprecated public int getColor(@ColorRes int id) throws NotFoundException { return getColor(id, null); } Loading Loading @@ -996,6 +997,7 @@ public class Resources { * @deprecated Use {@link #getColorStateList(int, Theme)} instead. */ @Nullable @Deprecated public ColorStateList getColorStateList(@ColorRes int id) throws NotFoundException { final ColorStateList csl = getColorStateList(id, null); if (csl != null && csl.canApplyTheme()) { Loading Loading @@ -1049,8 +1051,6 @@ public class Resources { return res; } /** * Return a boolean associated with a particular resource ID. This can be * used with any integral resource value, and will return true if it is Loading core/java/android/content/res/StringBlock.java +1 −1 Original line number Diff line number Diff line Loading @@ -328,7 +328,7 @@ final class StringBlock { String name = color.substring(1); int colorRes = res.getIdentifier(name, "color", "android"); if (colorRes != 0) { ColorStateList colors = res.getColorStateList(colorRes); ColorStateList colors = res.getColorStateList(colorRes, null); if (foreground) { return new TextAppearanceSpan(null, 0, 0, colors, null); } else { Loading core/java/android/text/Html.java +1 −1 Original line number Diff line number Diff line Loading @@ -672,7 +672,7 @@ class HtmlToSpannedConverter implements ContentHandler { String name = f.mColor.substring(1); int colorRes = res.getIdentifier(name, "color", "android"); if (colorRes != 0) { ColorStateList colors = res.getColorStateList(colorRes); ColorStateList colors = res.getColorStateList(colorRes, null); text.setSpan(new TextAppearanceSpan(null, 0, 0, colors, null), where, len, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); Loading core/java/android/view/PhoneWindow.java +4 −4 Original line number Diff line number Diff line Loading @@ -2981,8 +2981,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { if (mStatusGuard == null) { mStatusGuard = new View(mContext); mStatusGuard.setBackgroundColor(mContext.getResources() .getColor(R.color.input_method_navigation_guard)); mStatusGuard.setBackgroundColor(mContext.getColor( R.color.input_method_navigation_guard)); addView(mStatusGuard, indexOfChild(mStatusColorViewState.view), new LayoutParams(LayoutParams.MATCH_PARENT, mlp.topMargin, Gravity.START | Gravity.TOP)); Loading Loading @@ -3041,8 +3041,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { // position the navigation guard view, creating it if necessary if (mNavigationGuard == null) { mNavigationGuard = new View(mContext); mNavigationGuard.setBackgroundColor(mContext.getResources() .getColor(R.color.input_method_navigation_guard)); mNavigationGuard.setBackgroundColor(mContext.getColor( R.color.input_method_navigation_guard)); addView(mNavigationGuard, indexOfChild(mNavigationColorViewState.view), new LayoutParams(LayoutParams.MATCH_PARENT, insets.getSystemWindowInsetBottom(), Loading Loading
core/java/android/app/Notification.java +5 −5 Original line number Diff line number Diff line Loading @@ -2870,7 +2870,7 @@ public class Notification implements Parcelable contentView.setProgressBar( R.id.progress, mProgressMax, mProgress, mProgressIndeterminate); contentView.setProgressBackgroundTintList( R.id.progress, ColorStateList.valueOf(mContext.getResources().getColor( R.id.progress, ColorStateList.valueOf(mContext.getColor( R.color.notification_progress_background_color))); if (mColor != COLOR_DEFAULT) { ColorStateList colorStateList = ColorStateList.valueOf(mColor); Loading Loading @@ -3044,7 +3044,7 @@ public class Notification implements Parcelable private void processLegacyAction(Action action, RemoteViews button) { if (!isLegacy() || mColorUtil.isGrayscaleIcon(mContext, action.icon)) { button.setTextViewCompoundDrawablesRelativeColorFilter(R.id.action0, 0, mContext.getResources().getColor(R.color.notification_action_color_filter), mContext.getColor(R.color.notification_action_color_filter), PorterDuff.Mode.MULTIPLY); } } Loading Loading @@ -3142,7 +3142,7 @@ public class Notification implements Parcelable private int resolveColor() { if (mColor == COLOR_DEFAULT) { return mContext.getResources().getColor(R.color.notification_icon_bg_color); return mContext.getColor(R.color.notification_icon_bg_color); } return mColor; } Loading Loading @@ -4321,9 +4321,9 @@ public class Notification implements Parcelable * Applies the special text colors for media notifications to all text views. */ private void styleText(RemoteViews contentView) { int primaryColor = mBuilder.mContext.getResources().getColor( int primaryColor = mBuilder.mContext.getColor( R.color.notification_media_primary_color); int secondaryColor = mBuilder.mContext.getResources().getColor( int secondaryColor = mBuilder.mContext.getColor( R.color.notification_media_secondary_color); contentView.setTextColor(R.id.title, primaryColor); if (mBuilder.showsTimeOrChronometer()) { Loading
core/java/android/content/res/Resources.java +2 −2 Original line number Diff line number Diff line Loading @@ -927,6 +927,7 @@ public class Resources { * @deprecated Use {@link #getColor(int, Theme)} instead. */ @ColorInt @Deprecated public int getColor(@ColorRes int id) throws NotFoundException { return getColor(id, null); } Loading Loading @@ -996,6 +997,7 @@ public class Resources { * @deprecated Use {@link #getColorStateList(int, Theme)} instead. */ @Nullable @Deprecated public ColorStateList getColorStateList(@ColorRes int id) throws NotFoundException { final ColorStateList csl = getColorStateList(id, null); if (csl != null && csl.canApplyTheme()) { Loading Loading @@ -1049,8 +1051,6 @@ public class Resources { return res; } /** * Return a boolean associated with a particular resource ID. This can be * used with any integral resource value, and will return true if it is Loading
core/java/android/content/res/StringBlock.java +1 −1 Original line number Diff line number Diff line Loading @@ -328,7 +328,7 @@ final class StringBlock { String name = color.substring(1); int colorRes = res.getIdentifier(name, "color", "android"); if (colorRes != 0) { ColorStateList colors = res.getColorStateList(colorRes); ColorStateList colors = res.getColorStateList(colorRes, null); if (foreground) { return new TextAppearanceSpan(null, 0, 0, colors, null); } else { Loading
core/java/android/text/Html.java +1 −1 Original line number Diff line number Diff line Loading @@ -672,7 +672,7 @@ class HtmlToSpannedConverter implements ContentHandler { String name = f.mColor.substring(1); int colorRes = res.getIdentifier(name, "color", "android"); if (colorRes != 0) { ColorStateList colors = res.getColorStateList(colorRes); ColorStateList colors = res.getColorStateList(colorRes, null); text.setSpan(new TextAppearanceSpan(null, 0, 0, colors, null), where, len, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); Loading
core/java/android/view/PhoneWindow.java +4 −4 Original line number Diff line number Diff line Loading @@ -2981,8 +2981,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { if (mStatusGuard == null) { mStatusGuard = new View(mContext); mStatusGuard.setBackgroundColor(mContext.getResources() .getColor(R.color.input_method_navigation_guard)); mStatusGuard.setBackgroundColor(mContext.getColor( R.color.input_method_navigation_guard)); addView(mStatusGuard, indexOfChild(mStatusColorViewState.view), new LayoutParams(LayoutParams.MATCH_PARENT, mlp.topMargin, Gravity.START | Gravity.TOP)); Loading Loading @@ -3041,8 +3041,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { // position the navigation guard view, creating it if necessary if (mNavigationGuard == null) { mNavigationGuard = new View(mContext); mNavigationGuard.setBackgroundColor(mContext.getResources() .getColor(R.color.input_method_navigation_guard)); mNavigationGuard.setBackgroundColor(mContext.getColor( R.color.input_method_navigation_guard)); addView(mNavigationGuard, indexOfChild(mNavigationColorViewState.view), new LayoutParams(LayoutParams.MATCH_PARENT, insets.getSystemWindowInsetBottom(), Loading