Modern Apps git

← Modern-Apps.git

contacts: remove manual sync-to-watch from phone settings

Commit
33d38a099c6279aaeb89e29797b7ae69e05d07df
Author
Vayun Mathur <[email protected]>
When
2026-12-05 16:53 UTC (18 hours ago)
Parents
e0195ff
Phone-to-watch sync is now fully automatic over the Watch conduit (book changes, connect and scheduled triggers), so the Wear OS Watch section in phone Settings with its 'Sync to watch now' button is dead weight.

Remove the whole settings section (header, status row and button, plus the ad-hoc WearContactsSync it started just for that UI) and the wear_watch/sync_to_watch_now strings. The automatic WearContactsSync started from MainActivity is unchanged.

Verified: :contacts:lint :contacts:lintVitalRelease pass; :contacts:testDevUnitTest failures in DeepInteractionsPass2Test and InsertOrEditIntentActivityPass2Test also fail on clean origin/main; :contacts:metadata regenerated.

Diff

contacts/src/main/java/com/vayunmathur/contacts/ui/SettingsPage.kt
diff --git a/contacts/src/main/java/com/vayunmathur/contacts/ui/SettingsPage.kt b/contacts/src/main/java/com/vayunmathur/contacts/ui/SettingsPage.ktindex a95d6cc2fe..53ddbbccb1 100644--- a/contacts/src/main/java/com/vayunmathur/contacts/ui/SettingsPage.kt+++ b/contacts/src/main/java/com/vayunmathur/contacts/ui/SettingsPage.kt@@ -228,34 +228,6 @@ fun SettingsPage(viewModel: ContactViewModel, backStack: NavBackStack<Route>) {                 HorizontalDivider()             } -            item {-                Spacer(modifier = Modifier.height(16.dp))-                Text(-                    text = stringResource(R.string.wear_watch),-                    style = MaterialTheme.typography.titleMedium,-                    fontWeight = FontWeight.Bold,-                    modifier = Modifier.padding(bottom = 8.dp)-                )-                val wearSync = remember {-                    com.vayunmathur.contacts.sync.WearContactsSync(-                        context.applicationContext, coroutineScope,-                    )-                }-                androidx.compose.runtime.LaunchedEffect(wearSync) { wearSync.start() }-                val wearPresence by wearSync.presence.collectAsStateWithLifecycle()-                val wearState by wearSync.watchState.collectAsStateWithLifecycle()-                SettingsRow(-                    title = com.vayunmathur.library.wearlink.contacts.WearPresencePolicy.statusText(wearPresence, wearState),-                    supportingText = "Up to 1,000 contacts (favourites first) are kept on the watch for offline use.",-                    trailingContent = {-                        Button(onClick = { wearSync.publish(allContactsForExport) }) {-                            Text(stringResource(R.string.sync_to_watch_now))-                        }-                    },-                )-                HorizontalDivider()-            }-             item {                 Spacer(modifier = Modifier.height(16.dp))                 Text(
contacts/src/main/res/values/strings.xml
diff --git a/contacts/src/main/res/values/strings.xml b/contacts/src/main/res/values/strings.xmlindex dfbab28543..812456287e 100644--- a/contacts/src/main/res/values/strings.xml+++ b/contacts/src/main/res/values/strings.xml@@ -138,10 +138,6 @@     <string name="action_message">Message</string>     <!-- Quick action chip: video call contact. Noun/Verb. -->     <string name="action_video">Video</string>-    <!-- Settings section header for the Wear OS watch companion -->-    <string name="wear_watch">Wear OS Watch</string>-    <!-- Settings button: publish contacts snapshot to the watch now -->-    <string name="sync_to_watch_now">Sync to watch now</string>     <!-- Settings section header for calendar sync of birthdays -->     <string name="calendar_sync">Calendar Sync</string>     <!-- Settings row: toggle to show contact birthdays in calendar app -->