Merge "Allow I/O wallpaper to use dark text mode." into sc-dev am: 284edfdcc6 am: 92b584d5fc

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14467777

Change-Id: Idd87d2caabd791607688442b6f1ada6b87b31759
This commit is contained in:
Lucas Dupin
2021-05-07 16:04:14 +00:00
committed by Automerger Merge Worker

View File

@@ -95,12 +95,12 @@ public final class WallpaperColors implements Parcelable {
private static final float MIN_COLOR_OCCURRENCE = 0.05f; private static final float MIN_COLOR_OCCURRENCE = 0.05f;
// Decides when dark theme is optimal for this wallpaper // Decides when dark theme is optimal for this wallpaper
private static final float DARK_THEME_MEAN_LUMINANCE = 0.25f; private static final float DARK_THEME_MEAN_LUMINANCE = 0.3f;
// Minimum mean luminosity that an image needs to have to support dark text // Minimum mean luminosity that an image needs to have to support dark text
private static final float BRIGHT_IMAGE_MEAN_LUMINANCE = 0.75f; private static final float BRIGHT_IMAGE_MEAN_LUMINANCE = 0.7f;
// We also check if the image has dark pixels in it, // We also check if the image has dark pixels in it,
// to avoid bright images with some dark spots. // to avoid bright images with some dark spots.
private static final float DARK_PIXEL_CONTRAST = 6f; private static final float DARK_PIXEL_CONTRAST = 5.5f;
private static final float MAX_DARK_AREA = 0.025f; private static final float MAX_DARK_AREA = 0.025f;
private final List<Color> mMainColors; private final List<Color> mMainColors;