diff options
author | Brandon Maxwell <maxwelb@google.com> | 2015-11-19 17:32:13 -0800 |
---|---|---|
committer | Brandon Maxwell <maxwelb@google.com> | 2015-11-20 12:42:20 -0800 |
commit | 795946c8524ad73dfb1a26c204576d13eabfad20 (patch) | |
tree | e8c4afc3193ca74f2b6da2254fe6c608f0b9ccc7 /InCallUI | |
parent | 6a88bd1254cce257fa47b6a23bee0554b5c5b21d (diff) |
Changing to use compat classes for getColor calls
Bug: 25776171
Change-Id: I972ae0cc74044b53e178bfd9e4e1f230b2351d24
Diffstat (limited to 'InCallUI')
-rw-r--r-- | InCallUI/src/com/android/incallui/InCallPresenter.java | 4 | ||||
-rw-r--r-- | InCallUI/src/com/android/incallui/InCallUIMaterialColorMapUtils.java | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java index de563f5e7..33e4e5ace 100644 --- a/InCallUI/src/com/android/incallui/InCallPresenter.java +++ b/InCallUI/src/com/android/incallui/InCallPresenter.java @@ -1661,7 +1661,9 @@ public class InCallPresenter implements CallList.Listener, final Resources resources = mInCallActivity.getResources(); final int color; if (resources.getBoolean(R.bool.is_layout_landscape)) { - color = resources.getColor(R.color.statusbar_background_color, null); + // TODO use ResourcesCompat.getColor(Resources, int, Resources.Theme) when available + // {@link Resources#getColor(int)} used for compatibility + color = resources.getColor(R.color.statusbar_background_color); } else { color = mThemeColors.mSecondaryColor; } diff --git a/InCallUI/src/com/android/incallui/InCallUIMaterialColorMapUtils.java b/InCallUI/src/com/android/incallui/InCallUIMaterialColorMapUtils.java index d65580efe..44b035f30 100644 --- a/InCallUI/src/com/android/incallui/InCallUIMaterialColorMapUtils.java +++ b/InCallUI/src/com/android/incallui/InCallUIMaterialColorMapUtils.java @@ -44,9 +44,13 @@ public class InCallUIMaterialColorMapUtils extends MaterialColorMapUtils { return super.calculatePrimaryAndSecondaryColor(color); } + /** + * {@link Resources#getColor(int) used for compatibility + */ + @SuppressWarnings("deprecation") public static MaterialPalette getDefaultPrimaryAndSecondaryColors(Resources resources) { - final int primaryColor = resources.getColor(R.color.dialer_theme_color, null); - final int secondaryColor = resources.getColor(R.color.dialer_theme_color_dark, null); + final int primaryColor = resources.getColor(R.color.dialer_theme_color); + final int secondaryColor = resources.getColor(R.color.dialer_theme_color_dark); return new MaterialPalette(primaryColor, secondaryColor); } }
\ No newline at end of file |