From eefcf273766fc6e627c3e1fbe2390606e22b0594 Mon Sep 17 00:00:00 2001 From: Marcelo Arteiro Date: Sun, 30 Apr 2023 17:43:19 +0000 Subject: [PATCH] Fixes again outlineVariant on DynamicColor This is the change has already been submited on ag/22619556 but was mistakenly overwritten by ag/22647904 Fix: 280128998 Fix: 277251682 Test: atest DeviceDefaultThemeTest Change-Id: I8f7e2d5bc1c01de1ace09a2ce859fd179d52a07e --- .../SystemUI/src/com/android/systemui/theme/DynamicColors.kt | 1 + .../com/android/systemui/theme/ThemeOverlayController.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/theme/DynamicColors.kt b/packages/SystemUI/src/com/android/systemui/theme/DynamicColors.kt index f0fa779ba0cfb..58f22466d44d8 100644 --- a/packages/SystemUI/src/com/android/systemui/theme/DynamicColors.kt +++ b/packages/SystemUI/src/com/android/systemui/theme/DynamicColors.kt @@ -51,6 +51,7 @@ class DynamicColors { Pair.create("surface_variant", MDC.surfaceVariant()), Pair.create("on_surface_variant", MDC.onSurfaceVariant()), Pair.create("outline", MDC.outline()), + Pair.create("outline_variant", MDC.outlineVariant()), Pair.create("error", MDC.error()), Pair.create("on_error", MDC.onError()), Pair.create("error_container", MDC.errorContainer()), diff --git a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java index 43d15bcc22b3f..4b73d6190d996 100644 --- a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java +++ b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java @@ -659,6 +659,10 @@ public class ThemeOverlayController implements CoreStartable, Dumpable { == mColorScheme.getNeutral1().getS500() && res.getColor(android.R.color.system_neutral2_500, theme) == mColorScheme.getNeutral2().getS500() + && res.getColor(android.R.color.system_outline_variant_dark, theme) + == MaterialDynamicColors.outlineVariant().getArgb(mDynamicSchemeDark) + && res.getColor(android.R.color.system_outline_variant_light, theme) + == MaterialDynamicColors.outlineVariant().getArgb(mDynamicSchemeLight) && res.getColor(android.R.color.system_primary_container_dark, theme) == MaterialDynamicColors.primaryContainer().getArgb(mDynamicSchemeDark) && res.getColor(android.R.color.system_primary_container_light, theme)