summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--InCallUI/src/com/android/incallui/InCallPresenter.java4
-rw-r--r--InCallUI/src/com/android/incallui/InCallUIMaterialColorMapUtils.java8
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