Loading core/java/com/android/internal/util/NotificationColorUtil.java +2 −2 Original line number Diff line number Diff line Loading @@ -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; } /** Loading Loading @@ -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) { Loading Loading
core/java/com/android/internal/util/NotificationColorUtil.java +2 −2 Original line number Diff line number Diff line Loading @@ -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; } /** Loading Loading @@ -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) { Loading