Skip to content

Conversation

@iusmac
Copy link
Owner

@iusmac iusmac commented Jan 10, 2026

Add a color palette to map SIM icon colors in light mode to dark mode as in SIM rename dialog within builtin Settings app.

Note that, Android 10/11 (SDK 29/30) didn't offer support for colors in dark mode, so we'd added them (material 300 code). Starting from Android 12 (SDK 31), we got support for colors in dark mode and a new color palette in SIM rename dialog within builtin Settings, but the Android OS framework still used the legacy colors until Android 14 (SDK 34), so we want to support them both.

Add a color palette to map SIM icon colors in light mode to dark mode as
in SIM rename dialog within builtin Settings app.

Note that, Android 10/11 (SDK 29/30) didn't offer support for colors in
dark mode, so we'd added them (material 300 code). Starting from Android
12 (SDK 31), we got support for colors in dark mode and a new color
palette in SIM rename dialog within builtin Settings, but the Android OS
framework still used the legacy colors until Android 14 (SDK 34), so we
want to support them both.
@iusmac iusmac force-pushed the feat-ui-sim-change-sim-icon-colors-in-dark-mode branch 8 times, most recently from bb21da1 to 51d1091 Compare January 11, 2026 17:21
@iusmac iusmac closed this Jan 11, 2026
@iusmac iusmac reopened this Jan 11, 2026
@iusmac iusmac force-pushed the feat-ui-sim-change-sim-icon-colors-in-dark-mode branch 3 times, most recently from 03c4822 to baafd68 Compare January 11, 2026 19:22
For better test robustness, it's better to rely on framework constants
than on our copy of the those constants.

Note that, now that we use Android OS internal sim_colors array, we need
to reorder our SIM color int array copy for SDK 34 (Android S+), so that
the int values match 1-1 in order for the tests to pass.
@iusmac iusmac force-pushed the feat-ui-sim-change-sim-icon-colors-in-dark-mode branch from baafd68 to fc438da Compare January 12, 2026 10:19
java.util.NoSuchElementException: Array is empty.
	at kotlin.collections.ArraysKt___ArraysKt.first(_Arrays.kt:1073)
	at com.github.iusmac.sevensim.ui.sim.SimListActivityTest$SimEntries.test should use dark sim color palette whenever possible(SimListActivityTest.kt:837)
@iusmac iusmac force-pushed the feat-ui-sim-change-sim-icon-colors-in-dark-mode branch from 5d6f89c to 713c682 Compare January 12, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants