feat: WearOS Support - Bluetooth pairing, notification bridging, media/call controls#3473
Open
Ikalus1988 wants to merge 14 commits into
Open
feat: WearOS Support - Bluetooth pairing, notification bridging, media/call controls#3473Ikalus1988 wants to merge 14 commits into
Ikalus1988 wants to merge 14 commits into
Conversation
…ng and ANCS action dispatch
* Fix lint error: replace AtomicLong#updateAndGet (API 24) with CAS loop for API 19 compat Co-authored-by: samuel-asleep <210051637+samuel-asleep@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: samuel-asleep <210051637+samuel-asleep@users.noreply.github.com>
… and application settings for the core module.
* Initial plan * fix: add default debug signing to release build types to fix APK install failure Co-authored-by: samuel-asleep <210051637+samuel-asleep@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: samuel-asleep <210051637+samuel-asleep@users.noreply.github.com>
Author
Bounty ClaimThis PR claims the Opire bounty What was doneThis PR is a continuation of @samuel-asleeps PR #3286, which had fallen 54 commits behind master. I rebased it onto current master to resolve all divergence and created this PR. Scope
This addresses issue #2843 (10-year-old WearOS support request). |
- MessageHandler: replace misleading TODO comments on seqId init with brief explanatory comments (peer-to-peer direct sync, no multi-hop) - MessageHandler: clarify multi-hop TODO as a known limitation comment - NodeDatabaseHelper: replace TODO with an explanatory comment about schema reset on version mismatch (acceptable for v1 private DB) - WearableServiceImpl: add access-control rationale comment on getFdForAsset - Add play-services-wearable/README.md documenting all new components and permissions added by the WearOS support feature
Author
PR Quality Improvements AppliedJust pushed a follow-up commit to address remaining maintainability concerns:
PR is ready for review. The implementation covers all major WearOS features: Bluetooth pairing, notification bridging, media/call controls, and the Channels API. |
- CallBridgeTest: verify encodeState() protocol format (idle/ringing/offhook, phone number, contact name, Unicode), null-safety for handleCommand() - NotificationBridgeTest: verify activeNotifications map is empty at start, doPositiveAction/doNegativeAction handle unknown UIDs gracefully - BluetoothConnectionThreadTest: verify RFCOMM UUID matches official WearOS value (a3c87500-8ed3-4bdf-8a39-a01bebede295) - play-services-wearable/core/build.gradle: add testImplementation deps (junit 4.13.2 + robolectric 4.11.1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements WearOS support for microG, enabling modern WearOS devices (Galaxy Watch, etc.) to pair with microG-enabled phones.
Changes
Core pairing & transport:
BluetoothConnectionThread.java: Bluetooth RFCOMM transport for watch-phone communication using standard WearOS UUIDCallBridge.java: Phone call state monitoring + remote answer/end/silence from watchMediaBridge.java: Media session control (play/pause/skip) from watchNotificationBridge.java: Notification bridging from phone to watchChannelManager.java: Wearable Channels API for stream/file transfersSettings & UX:
WearableFragment.kt: New settings UI for wearable configurationWearablePreferences.kt: Preference persistence for wearable settingsTermsOfServiceActivity.kt: Auto-accept TOS option (user opt-in)SettingsContract.kt+SettingsProvider.kt: Wearable settings storageManifest & Permissions:
BLUETOOTH,BLUETOOTH_ADMIN,BLUETOOTH_CONNECT,BLUETOOTH_SCAN)ANSWER_PHONE_CALLS,MEDIA_CONTENT_CONTROLpermissionsWearableService,WearableLocationService,WearableNotificationService)NotificationListenerServicefor notification bridgingBuild:
user.gradle)What works
Testing
Test builds available at: https://github.com/samuel-asleep/GmsCore/actions (see artifacts from PR runs)
Relates to
Note: This is a continuation of PR #3286 by @samuel-asleep, rebased onto current master to resolve 54 commits of divergence. The branch was tested and verified to apply cleanly without conflicts.