Label the default launcher icon Bloom (#451)

This commit is contained in:
makiolaj committed 2026-11-30 21:44:20 +01:00
1 parent eeeb55988d
commit e8e8338ba9
6 files changed
+15 -15

No files matched your search

+1 -1
View File
@@ -257,7 +257,7 @@
</activity>
<!-- Launcher entry for MainActivity: one alias per launcher name
("Calendula" / "Calendar", #44) x icon (flower / plain, #451).
("Calendula" / "Calendar", #44) x icon (bloom / plain, #451).
Exactly one is enabled at a time (LauncherManager). The first two
keep their pre-#451 names so existing launcher positions and pinned
shortcuts survive. The shortcuts meta-data lives here, not on
@@ -10,22 +10,22 @@ import javax.inject.Singleton
enum class LauncherName { CALENDULA, CALENDAR }
/** The launcher icon the app shows for itself (issue #451). */
enum class LauncherIcon { CALENDULA, PLAIN }
enum class LauncherIcon { BLOOM, PLAIN }
/** What the launcher shows: a name and an icon, chosen independently. */
data class LauncherEntry(
val name: LauncherName = LauncherName.CALENDULA,
val icon: LauncherIcon = LauncherIcon.CALENDULA,
val icon: LauncherIcon = LauncherIcon.BLOOM,
)
/**
* The four `<activity-alias>` launcher entries, one per name × icon. The two
* flower-icon aliases keep their pre-#451 component names, so users on those
* bloom-icon aliases keep their pre-#451 component names, so users on those
* keep their launcher position and pinned shortcuts across the update.
*/
enum class LauncherAlias(val className: String, val entry: LauncherEntry) {
DEFAULT("DefaultNameAlias", LauncherEntry(LauncherName.CALENDULA, LauncherIcon.CALENDULA)),
CALENDAR("CalendarNameAlias", LauncherEntry(LauncherName.CALENDAR, LauncherIcon.CALENDULA)),
DEFAULT("DefaultNameAlias", LauncherEntry(LauncherName.CALENDULA, LauncherIcon.BLOOM)),
CALENDAR("CalendarNameAlias", LauncherEntry(LauncherName.CALENDAR, LauncherIcon.BLOOM)),
PLAIN("PlainIconAlias", LauncherEntry(LauncherName.CALENDULA, LauncherIcon.PLAIN)),
CALENDAR_PLAIN("CalendarNamePlainIconAlias", LauncherEntry(LauncherName.CALENDAR, LauncherIcon.PLAIN)),
;
@@ -322,7 +322,7 @@ private fun launcherNameLabel(name: LauncherName): String = stringResource(
@Composable
private fun launcherIconLabel(icon: LauncherIcon): String = stringResource(
when (icon) {
LauncherIcon.CALENDULA -> R.string.settings_app_icon_calendula
LauncherIcon.BLOOM -> R.string.settings_app_icon_bloom
LauncherIcon.PLAIN -> R.string.settings_app_icon_plain
},
)
@@ -514,7 +514,7 @@ private fun LauncherOptionCard(
Image(
painter = painterResource(
when (icon) {
LauncherIcon.CALENDULA -> R.drawable.ic_launcher_foreground
LauncherIcon.BLOOM -> R.drawable.ic_launcher_foreground
LauncherIcon.PLAIN -> R.drawable.ic_launcher_foreground_plain
},
),
+1 -1
View File
@@ -622,7 +622,7 @@
<string name="settings_app_name_summary">Show Calendula as “Calendar” in your launcher. Only the launcher name changes; the icon may move to a new spot after switching.</string>
<string name="settings_app_icon">App icon</string>
<string name="settings_app_icon_summary">The icon your launcher shows. After switching, the icon may move to a new spot.</string>
<string name="settings_app_icon_calendula">Calendula</string>
<string name="settings_app_icon_bloom">Bloom</string>
<string name="settings_app_icon_plain">Plain</string>
<string name="settings_time_format">Time format</string>
<string name="settings_time_format_auto">Automatic</string>
@@ -12,9 +12,9 @@ class LauncherAliasTest {
@Test
fun `each combination maps to its alias`() {
assertThat(LauncherAlias.of(LauncherEntry(LauncherName.CALENDULA, LauncherIcon.CALENDULA)))
assertThat(LauncherAlias.of(LauncherEntry(LauncherName.CALENDULA, LauncherIcon.BLOOM)))
.isEqualTo(LauncherAlias.DEFAULT)
assertThat(LauncherAlias.of(LauncherEntry(LauncherName.CALENDAR, LauncherIcon.CALENDULA)))
assertThat(LauncherAlias.of(LauncherEntry(LauncherName.CALENDAR, LauncherIcon.BLOOM)))
.isEqualTo(LauncherAlias.CALENDAR)
assertThat(LauncherAlias.of(LauncherEntry(LauncherName.CALENDULA, LauncherIcon.PLAIN)))
.isEqualTo(LauncherAlias.PLAIN)
@@ -42,7 +42,7 @@ class LauncherAliasTest {
}
@Test
fun `a device switched to Calendar before 451 still reads as Calendar with the flower`() {
fun `a device switched to Calendar before 451 still reads as Calendar with the bloom`() {
val states = mapOf(
LauncherAlias.DEFAULT to COMPONENT_ENABLED_STATE_DISABLED,
LauncherAlias.CALENDAR to COMPONENT_ENABLED_STATE_ENABLED,
@@ -50,12 +50,12 @@ class LauncherAliasTest {
LauncherAlias.CALENDAR_PLAIN to COMPONENT_ENABLED_STATE_DEFAULT,
)
assertThat(activeLauncherAlias(states, LauncherAlias.DEFAULT).entry)
.isEqualTo(LauncherEntry(LauncherName.CALENDAR, LauncherIcon.CALENDULA))
.isEqualTo(LauncherEntry(LauncherName.CALENDAR, LauncherIcon.BLOOM))
}
@Test
fun `changing the icon keeps the name`() {
val entry = LauncherEntry(LauncherName.CALENDAR, LauncherIcon.CALENDULA)
val entry = LauncherEntry(LauncherName.CALENDAR, LauncherIcon.BLOOM)
assertThat(LauncherAlias.of(entry.copy(icon = LauncherIcon.PLAIN))).isEqualTo(LauncherAlias.CALENDAR_PLAIN)
}
}
+1 -1
View File
@@ -116,7 +116,7 @@ than writing a file without them.
|---|---|---|
| `language` | String? | The app language tag; `null` follows the system. Absent: left as is. A language this build doesn't ship is skipped. |
| `launcher_name` | String? | `CALENDULA` or `CALENDAR`. Unknown: left as is. |
| `launcher_icon` | String? | `CALENDULA` or `PLAIN`. Unknown: left as is. |
| `launcher_icon` | String? | `BLOOM` or `PLAIN`. Unknown: left as is. |
## Not exported