Skip to content

Update speaker sample#1377

Merged
kul3r4 merged 3 commits into
android:mainfrom
kul3r4:update-speaker-sample
Jun 11, 2026
Merged

Update speaker sample#1377
kul3r4 merged 3 commits into
android:mainfrom
kul3r4:update-speaker-sample

Conversation

@kul3r4

@kul3r4 kul3r4 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Update speaker sample to Compose 1.6 and fix screenshots tests

@kul3r4 kul3r4 requested review from garanj and shumelchyk as code owners June 11, 2026 16:14

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the navigation in both the DataLayer Wearable app and the WearSpeakerSample app to the new Navigation 3 API, introducing Kotlin serialization for navigation keys. It also updates several dependencies and replaces Horologist's responsive column padding with minimumVerticalContentPadding on list items. Feedback is provided regarding the incorrect usage of minimumVerticalContentPadding on a non-interactive Text element in WearApp.kt, and the use of the deprecated RuntimeEnvironment.getApplication() in SpeakerPlayerScreenTest.kt which should be replaced with ApplicationProvider.getApplicationContext().

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

I am having trouble creating individual review comments. Click here to see my feedback.

DataLayer/Wearable/src/main/java/com/example/android/wearable/datalayer/WearApp.kt (186-190)

medium

Applying minimumVerticalContentPadding (with ButtonDefaults.minimumVerticalListContentPadding) to a non-interactive Text element is semantically incorrect. This modifier is designed to ensure interactive elements meet minimum touch target requirements (typically 48dp) on Wear OS. For static text, standard padding or spacers should be used instead to control spacing, or the modifier can be removed entirely if no extra padding is needed.

                        modifier = Modifier.fillMaxWidth(),

WearSpeakerSample/wear/src/test/java/com/example/android/wearable/speaker/SpeakerPlayerScreenTest.kt (59)

medium

Using RuntimeEnvironment.getApplication() is deprecated in Robolectric. It is recommended to use ApplicationProvider.getApplicationContext() from androidx.test.core.app instead to obtain the context in a modern and compatible way.

        val context = androidx.test.core.app.ApplicationProvider.getApplicationContext<android.content.Context>()
        val vibrator = context.getSystemService(android.content.Context.VIBRATOR_SERVICE) as android.os.Vibrator

@kul3r4 kul3r4 force-pushed the update-speaker-sample branch from 2bf7c68 to c0a1fa8 Compare June 11, 2026 16:35
@kul3r4 kul3r4 force-pushed the update-speaker-sample branch from ceff59e to 42e3846 Compare June 11, 2026 20:09
@kul3r4 kul3r4 merged commit 77eddfd into android:main Jun 11, 2026
10 checks passed
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