From f975548f23d4202958b2d23296a3eda921e3f4ce Mon Sep 17 00:00:00 2001 From: Michal Brzezinski Date: Fri, 24 Mar 2023 16:51:47 +0000 Subject: [PATCH] Follow-up fixes to ag/21609953 - Window title seems to matter only for layout inspectors, all other windows in sysui also have non-resource name. Also checked that Talkback doesn't announce this title - Changed getColor(resource) to getColor(resource, theme) and passed theme (null would also work, it doesn't really matter for now) Bug: 268650355 Test: backlight dialog still works Change-Id: Id6660f5dcc7f9deea10033583e2b760d2a55bf3a --- .../keyboard/backlight/ui/view/KeyboardBacklightDialog.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/backlight/ui/view/KeyboardBacklightDialog.kt b/packages/SystemUI/src/com/android/systemui/keyboard/backlight/ui/view/KeyboardBacklightDialog.kt index a173f8b914db0..2ef5e19bf382c 100644 --- a/packages/SystemUI/src/com/android/systemui/keyboard/backlight/ui/view/KeyboardBacklightDialog.kt +++ b/packages/SystemUI/src/com/android/systemui/keyboard/backlight/ui/view/KeyboardBacklightDialog.kt @@ -90,9 +90,9 @@ class KeyboardBacklightDialog( private fun updateResources() { context.resources.apply { - filledRectangleColor = getColor(R.color.backlight_indicator_step_filled) - emptyRectangleColor = getColor(R.color.backlight_indicator_step_empty) - backgroundColor = getColor(R.color.backlight_indicator_background) + filledRectangleColor = getColor(R.color.backlight_indicator_step_filled, context.theme) + emptyRectangleColor = getColor(R.color.backlight_indicator_step_empty, context.theme) + backgroundColor = getColor(R.color.backlight_indicator_background, context.theme) rootProperties = RootProperties( cornerRadius = @@ -224,7 +224,6 @@ class KeyboardBacklightDialog( private fun setWindowTitle() { val attrs = window.attributes - // TODO(b/271796169): check if title needs to be a translatable resource. attrs.title = "KeyboardBacklightDialog" attrs?.y = dialogBottomMargin window.attributes = attrs