Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6466ca7e authored by Lucas Dupin's avatar Lucas Dupin Committed by Automerger Merge Worker
Browse files

Fix contrast levels of outline and outline_variant am: 35fff40d

parents 50d38eed 35fff40d
Loading
Loading
Loading
Loading
+227 −175

File changed.

Preview size limit exceeded, changes collapsed.

+2 −1
Original line number Original line Diff line number Diff line
@@ -18,10 +18,11 @@ package com.android.systemui.theme


import android.util.Pair
import android.util.Pair
import com.android.systemui.monet.dynamiccolor.DynamicColor
import com.android.systemui.monet.dynamiccolor.DynamicColor
import com.android.systemui.monet.dynamiccolor.MaterialDynamicColors as MDC
import com.android.systemui.monet.dynamiccolor.MaterialDynamicColors


class DynamicColors {
class DynamicColors {
    companion object {
    companion object {
        private val MDC = MaterialDynamicColors()
        @JvmField
        @JvmField
        val ALL_DYNAMIC_COLORS_MAPPED: List<Pair<String, DynamicColor>> =
        val ALL_DYNAMIC_COLORS_MAPPED: List<Pair<String, DynamicColor>> =
            arrayListOf(
            arrayListOf(
+6 −5
Original line number Original line Diff line number Diff line
@@ -659,6 +659,7 @@ public class ThemeOverlayController implements CoreStartable, Dumpable {
            Resources res = userHandle.isSystem()
            Resources res = userHandle.isSystem()
                    ? mResources : mContext.createContextAsUser(userHandle, 0).getResources();
                    ? mResources : mContext.createContextAsUser(userHandle, 0).getResources();
            Resources.Theme theme = mContext.getTheme();
            Resources.Theme theme = mContext.getTheme();
            MaterialDynamicColors dynamicColors = new MaterialDynamicColors();
            if (!(res.getColor(android.R.color.system_accent1_500, theme)
            if (!(res.getColor(android.R.color.system_accent1_500, theme)
                    == mColorScheme.getAccent1().getS500()
                    == mColorScheme.getAccent1().getS500()
                    && res.getColor(android.R.color.system_accent2_500, theme)
                    && res.getColor(android.R.color.system_accent2_500, theme)
@@ -670,15 +671,15 @@ public class ThemeOverlayController implements CoreStartable, Dumpable {
                    && res.getColor(android.R.color.system_neutral2_500, theme)
                    && res.getColor(android.R.color.system_neutral2_500, theme)
                    == mColorScheme.getNeutral2().getS500()
                    == mColorScheme.getNeutral2().getS500()
                    && res.getColor(android.R.color.system_outline_variant_dark, theme)
                    && res.getColor(android.R.color.system_outline_variant_dark, theme)
                    == MaterialDynamicColors.outlineVariant().getArgb(mDynamicSchemeDark)
                    == dynamicColors.outlineVariant().getArgb(mDynamicSchemeDark)
                    && res.getColor(android.R.color.system_outline_variant_light, theme)
                    && res.getColor(android.R.color.system_outline_variant_light, theme)
                    == MaterialDynamicColors.outlineVariant().getArgb(mDynamicSchemeLight)
                    == dynamicColors.outlineVariant().getArgb(mDynamicSchemeLight)
                    && res.getColor(android.R.color.system_primary_container_dark, theme)
                    && res.getColor(android.R.color.system_primary_container_dark, theme)
                    == MaterialDynamicColors.primaryContainer().getArgb(mDynamicSchemeDark)
                    == dynamicColors.primaryContainer().getArgb(mDynamicSchemeDark)
                    && res.getColor(android.R.color.system_primary_container_light, theme)
                    && res.getColor(android.R.color.system_primary_container_light, theme)
                    == MaterialDynamicColors.primaryContainer().getArgb(mDynamicSchemeLight)
                    == dynamicColors.primaryContainer().getArgb(mDynamicSchemeLight)
                    && res.getColor(android.R.color.system_primary_fixed, theme)
                    && res.getColor(android.R.color.system_primary_fixed, theme)
                    == MaterialDynamicColors.primaryFixed().getArgb(mDynamicSchemeLight))) {
                    == dynamicColors.primaryFixed().getArgb(mDynamicSchemeLight))) {
                return false;
                return false;
            }
            }
        }
        }