Loading core/java/com/android/internal/colorextraction/types/Tonal.java +3 −5 Original line number Diff line number Diff line Loading @@ -51,10 +51,8 @@ public class Tonal implements ExtractionType { private static final boolean DEBUG = true; public static final int THRESHOLD_COLOR_LIGHT = 0xffe0e0e0; public static final int MAIN_COLOR_LIGHT = 0xffe0e0e0; public static final int THRESHOLD_COLOR_DARK = 0xff212121; public static final int MAIN_COLOR_DARK = 0xff000000; public static final int MAIN_COLOR_DARK = 0xff212121; private final TonalPalette mGreyPalette; private final ArrayList<TonalPalette> mTonalPalettes; Loading Loading @@ -197,12 +195,12 @@ public class Tonal implements ExtractionType { // light fallback or darker than our dark fallback. ColorUtils.colorToHSL(mainColor, mTmpHSL); final float mainLuminosity = mTmpHSL[2]; ColorUtils.colorToHSL(THRESHOLD_COLOR_LIGHT, mTmpHSL); ColorUtils.colorToHSL(MAIN_COLOR_LIGHT, mTmpHSL); final float lightLuminosity = mTmpHSL[2]; if (mainLuminosity > lightLuminosity) { return false; } ColorUtils.colorToHSL(THRESHOLD_COLOR_DARK, mTmpHSL); ColorUtils.colorToHSL(MAIN_COLOR_DARK, mTmpHSL); final float darkLuminosity = mTmpHSL[2]; if (mainLuminosity < darkLuminosity) { return false; Loading core/java/com/android/internal/util/ContrastColorUtil.java +1 −1 Original line number Diff line number Diff line Loading @@ -455,7 +455,7 @@ public class ContrastColorUtil { * Resolves {@param color} to an actual color if it is {@link Notification#COLOR_DEFAULT} */ public static int resolveColor(Context context, int color, boolean defaultBackgroundIsDark) { if (color == Notification.COLOR_DEFAULT) { if (color == Notification.COLOR_DEFAULT || defaultBackgroundIsDark) { int res = defaultBackgroundIsDark ? com.android.internal.R.color.notification_default_color_dark : com.android.internal.R.color.notification_default_color_light; Loading core/res/res/values-night/colors.xml +1 −1 Original line number Diff line number Diff line Loading @@ -27,5 +27,5 @@ <color name="notification_default_color_dark">#ddffffff</color> <!-- The background color of a notification card. --> <color name="notification_material_background_color">@*android:color/material_grey_900</color> <color name="notification_material_background_color">@color/black</color> </resources> No newline at end of file core/res/res/values-night/values.xml +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ <item name="alertDialogTheme">@style/Theme.DeviceDefault.Dialog.Alert</item> <!-- QS panel background --> <item name="colorBackgroundFloating">@color/material_grey_900</item> <item name="colorBackgroundFloating">@color/black</item> <!-- volume background --> <item name="panelColorBackground">@color/material_grey_800</item> Loading packages/SystemUI/res/values-night/colors.xml +2 −2 Original line number Diff line number Diff line Loading @@ -25,10 +25,10 @@ <color name="notification_legacy_background_color">@*android:color/notification_material_background_color</color> <!-- The color of the material notification background when dimmed --> <color name="notification_material_background_dimmed_color">#aa212121</color> <color name="notification_material_background_dimmed_color">#aa000000</color> <!-- The color of the dividing line between grouped notifications while . --> <color name="notification_divider_color">#000</color> <color name="notification_divider_color">#212121</color> <!-- The background color of the notification shade --> <color name="notification_shade_background_color">#181818</color> Loading Loading
core/java/com/android/internal/colorextraction/types/Tonal.java +3 −5 Original line number Diff line number Diff line Loading @@ -51,10 +51,8 @@ public class Tonal implements ExtractionType { private static final boolean DEBUG = true; public static final int THRESHOLD_COLOR_LIGHT = 0xffe0e0e0; public static final int MAIN_COLOR_LIGHT = 0xffe0e0e0; public static final int THRESHOLD_COLOR_DARK = 0xff212121; public static final int MAIN_COLOR_DARK = 0xff000000; public static final int MAIN_COLOR_DARK = 0xff212121; private final TonalPalette mGreyPalette; private final ArrayList<TonalPalette> mTonalPalettes; Loading Loading @@ -197,12 +195,12 @@ public class Tonal implements ExtractionType { // light fallback or darker than our dark fallback. ColorUtils.colorToHSL(mainColor, mTmpHSL); final float mainLuminosity = mTmpHSL[2]; ColorUtils.colorToHSL(THRESHOLD_COLOR_LIGHT, mTmpHSL); ColorUtils.colorToHSL(MAIN_COLOR_LIGHT, mTmpHSL); final float lightLuminosity = mTmpHSL[2]; if (mainLuminosity > lightLuminosity) { return false; } ColorUtils.colorToHSL(THRESHOLD_COLOR_DARK, mTmpHSL); ColorUtils.colorToHSL(MAIN_COLOR_DARK, mTmpHSL); final float darkLuminosity = mTmpHSL[2]; if (mainLuminosity < darkLuminosity) { return false; Loading
core/java/com/android/internal/util/ContrastColorUtil.java +1 −1 Original line number Diff line number Diff line Loading @@ -455,7 +455,7 @@ public class ContrastColorUtil { * Resolves {@param color} to an actual color if it is {@link Notification#COLOR_DEFAULT} */ public static int resolveColor(Context context, int color, boolean defaultBackgroundIsDark) { if (color == Notification.COLOR_DEFAULT) { if (color == Notification.COLOR_DEFAULT || defaultBackgroundIsDark) { int res = defaultBackgroundIsDark ? com.android.internal.R.color.notification_default_color_dark : com.android.internal.R.color.notification_default_color_light; Loading
core/res/res/values-night/colors.xml +1 −1 Original line number Diff line number Diff line Loading @@ -27,5 +27,5 @@ <color name="notification_default_color_dark">#ddffffff</color> <!-- The background color of a notification card. --> <color name="notification_material_background_color">@*android:color/material_grey_900</color> <color name="notification_material_background_color">@color/black</color> </resources> No newline at end of file
core/res/res/values-night/values.xml +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ <item name="alertDialogTheme">@style/Theme.DeviceDefault.Dialog.Alert</item> <!-- QS panel background --> <item name="colorBackgroundFloating">@color/material_grey_900</item> <item name="colorBackgroundFloating">@color/black</item> <!-- volume background --> <item name="panelColorBackground">@color/material_grey_800</item> Loading
packages/SystemUI/res/values-night/colors.xml +2 −2 Original line number Diff line number Diff line Loading @@ -25,10 +25,10 @@ <color name="notification_legacy_background_color">@*android:color/notification_material_background_color</color> <!-- The color of the material notification background when dimmed --> <color name="notification_material_background_dimmed_color">#aa212121</color> <color name="notification_material_background_dimmed_color">#aa000000</color> <!-- The color of the dividing line between grouped notifications while . --> <color name="notification_divider_color">#000</color> <color name="notification_divider_color">#212121</color> <!-- The background color of the notification shade --> <color name="notification_shade_background_color">#181818</color> Loading