Fixing light border around sticky key indicator
The solution is to remove default background color coming from theme.
This background can't be set to surfaceInverse because theme will not reload color on device theme change. It's easier to just manage all colors in Compose
Fixes: 328050514
Flag: ACONFIG com.android.hardware.input.keyboard_a11y_sticky_keys_flag TRUNKFOOD
Test: see indicator with light device theme
Test: switch device theme while indicator is showing
Change-Id: I9df157bd3dc623b9c821a55030f9c815caac1ee2
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index f1d4d71..eab9e82 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -1572,4 +1572,8 @@
<style name="Theme.PrivacyDialog" parent="@style/Theme.SystemUI.Dialog">
<item name="android:colorBackground">?androidprv:attr/materialColorSurfaceContainer</item>
</style>
+
+ <style name="Theme.SystemUI.Dialog.StickyKeys" parent="@style/Theme.SystemUI.Dialog">
+ <item name="android:colorBackground">@color/transparent</item>
+ </style>
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/stickykeys/ui/StickyKeyDialogFactory.kt b/packages/SystemUI/src/com/android/systemui/keyboard/stickykeys/ui/StickyKeyDialogFactory.kt
index 3ed58a7..1a51b70 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/stickykeys/ui/StickyKeyDialogFactory.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/stickykeys/ui/StickyKeyDialogFactory.kt
@@ -45,7 +45,7 @@
}
private fun createStickyKeyIndicator(viewModel: StickyKeysIndicatorViewModel): Dialog {
- return ComponentDialog(context, R.style.Theme_SystemUI_Dialog).apply {
+ return ComponentDialog(context, R.style.Theme_SystemUI_Dialog_StickyKeys).apply {
// because we're requesting window feature it must be called before setting content
window?.setStickyKeyWindowAttributes()
setContentView(ComposeFacade.createStickyKeysIndicatorContent(context, viewModel))