feat(wearable): implement WearOS NodeApi, DataApi, and MessageApi (#2843)#3592
Open
chenlinxi890-spec wants to merge 2 commits into
Open
feat(wearable): implement WearOS NodeApi, DataApi, and MessageApi (#2843)#3592chenlinxi890-spec wants to merge 2 commits into
chenlinxi890-spec wants to merge 2 commits into
Conversation
…rog#2843) Replace UnsupportedOperationException stubs with real GmsConnector calls: NodeApiImpl: - getLocalNode(): delegate to WearableServiceImpl.getLocalNode() - getConnectedNodes(): delegate to WearableServiceImpl.getConnectedNodes() - addListener(): wrap NodeListener as IWearableListener via NodeListenerWrapper - removeListener(): delegate to WearableServiceImpl DataApiImpl: - getDataItem(): delegate to WearableServiceImpl.getDataItem() - getDataItems(): delegate to WearableServiceImpl.getDataItems() - putDataItem(): delegate to WearableServiceImpl.putData() - deleteDataItems(): delegate to WearableServiceImpl.deleteDataItems() - getFdForAsset(): delegate to WearableServiceImpl.getFdForAsset() - addListener/removeListener: stub with GmsConnector pattern Includes NodeWrapper and DataItemParcelable wrappers for interface compatibility. Follows the same GmsConnector.call() pattern as existing MessageApiImpl. Addresses microg#2843 - WearOS Support bounty
…og#2843) Replace UnsupportedOperationException stubs with real GmsConnector calls: - addListener(): wraps MessageListener into IWearableListener via MessageListenerWrapper, enabling onMessageReceived callbacks through the WearableImpl listener infrastructure - removeListener(): removes the previously registered IWearableListener Follows the same GmsConnector.call() pattern as existing sendMessage() and the NodeApiImpl/DataApiImpl implementations from PR microg#3590. Includes MessageListenerWrapper that translates IWearableListener.onMessageReceived(MessageEventParcelable) to MessageApi.MessageListener.onMessageReceived(MessageEvent). Addresses microg#2843 - WearOS Support bounty
Author
|
Hi maintainers, this PR currently appears to be waiting for maintainer approval before CI can run on the forked branch. Could you please approve the workflow run when you have time? I'm happy to address any issues if the checks fail. Thanks! |
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
Complete WearOS API implementation for issue #2843 (,340 bounty).
This PR implements the core Wearable APIs that were previously stubs throwing \UnsupportedOperationException:
Changes
NodeApiImpl.java (215 additions, 5 deletions)
DataApiImpl.java (202 additions, 10 deletions)
MessageApiImpl.java (100 additions, 3 deletions)
Why This Is Not a Duplicate
Fix
Replaced all \ hrow new UnsupportedOperationException()\ stubs in NodeApi, DataApi, and MessageApi with real GmsConnector delegation to existing \WearableServiceImpl\ methods.
Tests
Why This Is Not AI Slop