diff options
| author | 2017-06-24 00:55:46 +0000 | |
|---|---|---|
| committer | 2017-06-24 00:55:46 +0000 | |
| commit | ff122e750c90c5c076107a636f9529a5796677b6 (patch) | |
| tree | 9cabee1916c000b1b23929e20ba5e861a4949434 | |
| parent | 0dd8a3cd597ec3d0b208513a87ae1a4404354a45 (diff) | |
| parent | 9bf5c0c3e17595efafb14c850ae097756d0d2ae4 (diff) | |
Merge "Fixed an issue in the contrast calculation" into oc-dev
am: 9bf5c0c3e1
Change-Id: I9f1dc8c2c6d2ad461efc2722a5b1829f753dfcd4
| -rw-r--r-- | core/java/com/android/internal/util/NotificationColorUtil.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/com/android/internal/util/NotificationColorUtil.java b/core/java/com/android/internal/util/NotificationColorUtil.java index 1ba92bfb6a77..0c046a92020b 100644 --- a/core/java/com/android/internal/util/NotificationColorUtil.java +++ b/core/java/com/android/internal/util/NotificationColorUtil.java @@ -534,7 +534,7 @@ public class NotificationColorUtil { } public static boolean satisfiesTextContrast(int backgroundColor, int foregroundColor) { - return NotificationColorUtil.calculateContrast(backgroundColor, foregroundColor) >= 4.5; + return NotificationColorUtil.calculateContrast(foregroundColor, backgroundColor) >= 4.5; } /** @@ -613,7 +613,7 @@ public class NotificationColorUtil { */ public static double calculateContrast(@ColorInt int foreground, @ColorInt int background) { if (Color.alpha(background) != 255) { - throw new IllegalArgumentException("background can not be translucent: #" + Log.wtf(TAG, "background can not be translucent: #" + Integer.toHexString(background)); } if (Color.alpha(foreground) < 255) { |