watch: label media controls launcher entry with its own icon
- Commit
377601eb67bdb93388c2534899ec3ef5db5c257e- Author
- Vayun Mathur <[email protected]>
- When
- 2026-12-06 16:38 UTC (1 hour ago)
- Parents
a4d7744
Owner feedback: the MediaControlsActivity launcher entry inside
:watch:wear inherited the Watch app name and icon, so the watch
launcher showed two indistinguishable Watch entries.
Give the activity its own identity without touching the conduit
app: android:label now points at the new dedicated
@string/media_controls_label ("Media controls", exactly), and
android:icon / android:roundIcon point at a new distinct adaptive
icon, @mipmap/ic_launcher_media_controls (+ round twin). Its
foreground is a hand-authored play_pause glyph (play triangle
beside pause bars) in the same 108dp / 960-viewport / wear-scale
adaptive-foreground format the generated launcher icons use; no
generated file was edited and the Watch app icon is not reused.
The application label/icon and WearMainActivity are unchanged,
and the phone-side :watch app is untouched (no changes under
watch/).
watch-wear/AGENTS.md now documents the labelled, distinctly
iconned launcher entry. No metadata regeneration: the only
tracked watch-wear listing shot is the status preview, there is
no launcher shot, and :watch:wear:metadata fails identically on
clean origin/main (pre-existing debug-variant mismatch, the same
root cause documented for :watch:wear:testDebugUnitTest in the
media-controls clone commit).
Verified: ./gradlew :watch:lint :watch:lintVitalRelease
:watch:testDevUnitTest :watch:wear:lintVitalRelease and
:watch:wear:assembleDev all pass; the merged manifest and the
dev APK (aapt2) show MediaControlsActivity with the new label
and icon resources while WearMainActivity still inherits the
Watch app label/icon.Diff
watch-wear/AGENTS.md
diff --git a/watch-wear/AGENTS.md b/watch-wear/AGENTS.mdindex 54385e589e..b986571ac1 100644--- a/watch-wear/AGENTS.md+++ b/watch-wear/AGENTS.md@@ -29,8 +29,10 @@ Every other watch app reaches the phone through `WearLinkClientNode`. - The status screen renders `ConduitRuntime.state` (link state, registered apps, per-app counters). - Media controls are a separate experience: `ui/MediaControlsActivity`- (own launcher + `MEDIA_CONTROLS` entry, never the conduit status- activity) renders phone sessions bridged by+ (own launcher labelled "Media controls" via+ `@string/media_controls_label` with its own play/pause adaptive icon+ `@mipmap/ic_launcher_media_controls`, plus the `MEDIA_CONTROLS`+ entry, never the conduit status activity) renders phone sessions bridged by `service/MediaControlsBridge` over conduit appId `mediacontrols` (shared types in `:library:wearlink` `mediacontrols/`) and sends transport/seek/volume ops back; rotary crown adjusts volume.
watch-wear/src/main/AndroidManifest.xml
diff --git a/watch-wear/src/main/AndroidManifest.xml b/watch-wear/src/main/AndroidManifest.xmlindex 41136e08f5..00c7bf08b5 100644--- a/watch-wear/src/main/AndroidManifest.xml+++ b/watch-wear/src/main/AndroidManifest.xml@@ -51,6 +51,9 @@ <activity android:name=".ui.MediaControlsActivity" android:exported="true"+ android:icon="@mipmap/ic_launcher_media_controls"+ android:label="@string/media_controls_label"+ android:roundIcon="@mipmap/ic_launcher_media_controls_round" android:taskAffinity=""> <intent-filter> <action android:name="android.intent.action.MAIN" />
watch-wear/src/main/res/drawable/ic_launcher_media_controls_foreground.xml
diff --git a/watch-wear/src/main/res/drawable/ic_launcher_media_controls_foreground.xml b/watch-wear/src/main/res/drawable/ic_launcher_media_controls_foreground.xmlnew file mode 100644index 0000000000..ec498182ec--- /dev/null+++ b/watch-wear/src/main/res/drawable/ic_launcher_media_controls_foreground.xml@@ -0,0 +1,22 @@+<?xml version="1.0" encoding="utf-8"?>+<!-- Media-controls launcher foreground: the play_pause Material Symbol+ (play triangle beside pause bars), wrapped in the same adaptive-icon+ foreground format the generated launcher icons use (108dp, 960+ viewport, wear scale 0.435 centred). Hand-authored for this secondary+ launcher entry only; the Watch app's generated ic_launcher foreground+ is untouched. -->+<vector xmlns:android="http://schemas.android.com/apk/res/android"+ android:width="108dp"+ android:height="108dp"+ android:viewportWidth="960"+ android:viewportHeight="960"+ android:tint="#000000">+ <group android:scaleX="0.435"+ android:scaleY="0.435"+ android:translateX="271.2"+ android:translateY="271.2">+ <path+ android:fillColor="@android:color/white"+ android:pathData="M200,648L200,312L440,480L200,648ZM520,640L520,320L600,320L600,640L520,640ZM680,640L680,320L760,320L760,640L680,640Z"/>+ </group>+</vector>
watch-wear/src/main/res/mipmap-anydpi-v26/ic_launcher_media_controls.xml
diff --git a/watch-wear/src/main/res/mipmap-anydpi-v26/ic_launcher_media_controls.xml b/watch-wear/src/main/res/mipmap-anydpi-v26/ic_launcher_media_controls.xmlnew file mode 100644index 0000000000..5a88e7c4cc--- /dev/null+++ b/watch-wear/src/main/res/mipmap-anydpi-v26/ic_launcher_media_controls.xml@@ -0,0 +1,6 @@+<?xml version="1.0" encoding="utf-8"?>+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">+ <background android:drawable="@color/ic_launcher_background"/>+ <foreground android:drawable="@drawable/ic_launcher_media_controls_foreground"/>+ <monochrome android:drawable="@drawable/ic_launcher_media_controls_foreground"/>+</adaptive-icon>
watch-wear/src/main/res/mipmap-anydpi-v26/ic_launcher_media_controls_round.xml
diff --git a/watch-wear/src/main/res/mipmap-anydpi-v26/ic_launcher_media_controls_round.xml b/watch-wear/src/main/res/mipmap-anydpi-v26/ic_launcher_media_controls_round.xmlnew file mode 100644index 0000000000..5a88e7c4cc--- /dev/null+++ b/watch-wear/src/main/res/mipmap-anydpi-v26/ic_launcher_media_controls_round.xml@@ -0,0 +1,6 @@+<?xml version="1.0" encoding="utf-8"?>+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">+ <background android:drawable="@color/ic_launcher_background"/>+ <foreground android:drawable="@drawable/ic_launcher_media_controls_foreground"/>+ <monochrome android:drawable="@drawable/ic_launcher_media_controls_foreground"/>+</adaptive-icon>
watch-wear/src/main/res/values/strings.xml
diff --git a/watch-wear/src/main/res/values/strings.xml b/watch-wear/src/main/res/values/strings.xmlindex d640a6cc65..0ffe031f5f 100644--- a/watch-wear/src/main/res/values/strings.xml+++ b/watch-wear/src/main/res/values/strings.xml@@ -5,6 +5,7 @@ <string name="no_apps">No app registered</string> <string name="app_traffic">%1$s: %2$d msgs, %3$d data</string> <string name="media_controls">Media controls</string>+ <string name="media_controls_label">Media controls</string> <string name="media_nothing">Nothing playing</string> <string name="media_grant_phone">Grant notification access in the Watch app on your phone</string> <string name="media_play">Play</string>