Skip to content

Conversation

@Ashutosh0x
Copy link

@Ashutosh0x Ashutosh0x commented Jan 26, 2026

Summary

This PR implements missing WearOS connection capability exchange logic in the wearable module. It addresses two critical issues that prevent stable WearOS pairing:

  1. Capability Persistence: Capabilities were lost on service restart
  2. Connection Sync: Newly connected peers did not receive existing local capabilities

Changes

Phase 1: Persistence & API

  • CapabilityManager:
    • Added loadCapabilities() in constructor to restore capabilities from the database on startup
    • Implemented getAllCapabilities() to retrieve all known local capabilities
  • WearableServiceImpl:
    • Implemented getAllCapabilities IPC method using the manager
    • Removed misleading 'unimplemented Method' logs for addLocalCapability/removeLocalCapability

Phase 2: Connection Sync

  • WearableImpl:
    • Modified onConnectReceived() to call syncToPeer() immediately after a new peer connects
    • This ensures all local data items (including capabilities stored as wear:/capabilities/... DataItems) are pushed to the newly connected watch

Testing

These changes should be tested with a WearOS emulator or physical watch to verify:

  • Capabilities persist across GmsCore restarts
  • getAllCapabilities() returns correct data
  • Watch receives phone capabilities immediately after connection

Related Issue

Part of the solution for #2843 (WearOS Support)

Please let me know if there are specific "gotchas" with the `SocketConnectionThread` I should be aware of before diving in.

Best regards,
[Your Name]
Copy link
Contributor

Choose a reason for hiding this comment

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

Best regards,
[Your Name]

peak comedy, definitely not AI generated

Copy link
Author

Choose a reason for hiding this comment

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

Best regards,
[Your Name]

peak comedy, definitely not AI generated

True 🙂i use High quality Ai model

Copy link
Contributor

@D3SOX D3SOX Jan 26, 2026

Choose a reason for hiding this comment

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

High quality Ai model

hahah omg.. AI can be such a helpful tool but this issue certainly requires a lot of experience with Java and Reverse Engineering on Android.

Yeah, it has gotten pretty good (especially with Opus 4.5) and can solve difficult problems but you need to provide good prompts and context to it. In this case actually testing how it works in Google Play Services and providing your findings. It's not going to figure this out on its own.

Copy link
Author

Choose a reason for hiding this comment

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

High quality Ai model

hahah omg.. AI can be such a helpful tool but this issue certainly requires a lot of experience with Java and Reverse Engineering.

Yeah, it has gotten pretty good (especially with Opus 4.5) and can solve difficult problems but you need to provide good prompts and context to it. In this case actually testing how it works in Google Play Services and providing your findings. It's not going to figure this out on its own.

i have all that experience and check my profile where i currently work

Copy link
Contributor

Choose a reason for hiding this comment

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

Your profile says nothing about it, it's all just empty words without any verifiable evidence.
You have a big badge "Stripe contributor" because you added one line in a types file. That already says a lot.

Copy link
Author

Choose a reason for hiding this comment

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

Your profile says nothing about it, it's all just empty words without any verifiable evidence. You have a big badge "Stripe contributor" because you added one line in a types file. That already says a lot.

so what you expect ?

Copy link
Author

Choose a reason for hiding this comment

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

Your profile says nothing about it, it's all just empty words without any verifiable evidence. You have a big badge "Stripe contributor" because you added one line in a types file. That already says a lot.

and also i too havent saw any android end to end project in your repos

Copy link
Contributor

@D3SOX D3SOX Jan 26, 2026

Choose a reason for hiding this comment

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

and also i too havent saw any android end to end project in your repos

hahaha why did I know that this response will come. you are so predictable.. xD what does any of this to do with my contributions? I never said I have expertise in this area lol

so what you expect ?

I expected seeing how you work with Java and any reverse engineering projects. But I haven't found anything.

Copy link
Author

Choose a reason for hiding this comment

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

and also i too havent saw any android end to end project in your repos

hahaha why did I know that this response will come. you are so predictable.. xD what does any of this to do with my contributions? I never said I have expertise in this area lol

so what you expect ?

I expected seeing how you work with Java and any reverse engineering projects. But I haven't found anything.

Please check out my AI Trip Planner project that I’ve been working on recently I think you’ll find it insightful and learn a lot from it. https://github.com/Ashutosh0x/Ai-Trip-Planner

@Ashutosh0x
Copy link
Author

Consolidated into PR #3255 which includes both the capability fixes and the TOS result fix.

@Ashutosh0x Ashutosh0x closed this Jan 26, 2026
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