From 1cffe778bda5387ae4e05d018f2c954a88b83042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Kozynski?= Date: Wed, 5 Jul 2023 14:47:22 -0400 Subject: [PATCH] Fix theme of BrightnessDialog Parent inheritance overrides dot inheritance. In order to have a dialog theme but also get QS colors, apply the theme (as fallback) for the dialog. Test: manual, open dialog from Settings Fixes: 289187620 Change-Id: Idf36d91005a50b95e502e8a208daf254aeaf4fb8 --- packages/SystemUI/AndroidManifest.xml | 2 +- packages/SystemUI/res/values/styles.xml | 3 ++- .../android/systemui/settings/brightness/BrightnessDialog.java | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml index 2913c169a0be3..4fd47232a0df1 100644 --- a/packages/SystemUI/AndroidManifest.xml +++ b/packages/SystemUI/AndroidManifest.xml @@ -865,7 +865,7 @@ @style/Control.MenuItem - diff --git a/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessDialog.java b/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessDialog.java index 8879501fa03d1..5199bd43f9829 100644 --- a/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessDialog.java +++ b/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessDialog.java @@ -84,6 +84,7 @@ public class BrightnessDialog extends Activity { window.getDecorView(); window.setLayout( WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT); + getTheme().applyStyle(R.style.Theme_SystemUI_QuickSettings, false); setContentView(R.layout.brightness_mirror_container); FrameLayout frame = findViewById(R.id.brightness_mirror_container);