Prevent modes dialog from updating on theme change
This is a workaround necessary because the background of the dialog (which we don't control) does not get updated when the theme changes. Since the composables do update, this leads to showing things like white text on a white background, which is especially bad since bedtime mode by default turns on dark theme when activated. Note that this only works if the composables use MaterialTheme.colorScheme to get the colors, so I had to update some components to use that instead of LocalAndroidColorScheme. However, the documentation of AndroidColorScheme points out that we should use MaterialTheme.colorScheme whenever possible instead, so this change should be safe (although unflagged). The dialog itself is flagged behind modes_ui. Fix: 364528021 Test: manually tested that toggling a mode that changes the theme doesn't make the dialog unreadable Flag: android.app.modes_ui Flag: EXEMPT trivial compose change Change-Id: I02f9868a210b1d8d7f57f89d35d8178acccd0e47
Loading
Please register or sign in to comment