summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSungsoo Lim <sungsoo@google.com>2015-11-18 08:00:54 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-11-18 08:00:54 +0000
commit39d8fc9c5877d125c5ae6aeebcc038d129892a20 (patch)
tree16ea3cc499f8c9d41b67146ca01a9458d7f1a192
parent87db25fe874b9cd5863efe3633c7d8a801495bfb (diff)
parenta5acc84977ea7a13946a6bb974333a8986558c9b (diff)
downloadandroid_frameworks_support-39d8fc9c5877d125c5ae6aeebcc038d129892a20.tar.gz
android_frameworks_support-39d8fc9c5877d125c5ae6aeebcc038d129892a20.tar.bz2
android_frameworks_support-39d8fc9c5877d125c5ae6aeebcc038d129892a20.zip
Merge "MediaRouter: Fix for background colors of group volume controls" into mnc-ub-dev
-rw-r--r--v7/mediarouter/src/android/support/v7/app/MediaRouterThemeHelper.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/v7/mediarouter/src/android/support/v7/app/MediaRouterThemeHelper.java b/v7/mediarouter/src/android/support/v7/app/MediaRouterThemeHelper.java
index f5a258c261..bd5ae91c41 100644
--- a/v7/mediarouter/src/android/support/v7/app/MediaRouterThemeHelper.java
+++ b/v7/mediarouter/src/android/support/v7/app/MediaRouterThemeHelper.java
@@ -94,8 +94,9 @@ final class MediaRouterThemeHelper {
Context context, View mainControls, View groupControls, boolean hasGroup) {
int primaryColor = getThemeColor(context, R.attr.colorPrimary);
int primaryDarkColor = getThemeColor(context, R.attr.colorPrimaryDark);
- if (hasGroup && ColorUtils.calculateContrast(COLOR_WHITE_ON_DARK_BACKGROUND, primaryColor)
- < MIN_CONTRAST) {
+ int controllerColor = getControllerColor(context);
+ if (hasGroup && controllerColor == COLOR_DARK_ON_LIGHT_BACKGROUND
+ && ColorUtils.calculateContrast(controllerColor, primaryDarkColor) < MIN_CONTRAST) {
// Instead of showing dark controls in a possibly dark (i.e. the primary dark), model
// the white dialog and use the primary color for the group controls.
primaryDarkColor = primaryColor;