Skip to content

Comments

WearOS: fix all IWearableService stubs that blocked callers + TOS pairing gate#3286

Open
samuel-asleep wants to merge 1 commit intomicrog:masterfrom
samuel-asleep:wearOS-support
Open

WearOS: fix all IWearableService stubs that blocked callers + TOS pairing gate#3286
samuel-asleep wants to merge 1 commit intomicrog:masterfrom
samuel-asleep:wearOS-support

Conversation

@samuel-asleep
Copy link

WearOS companion apps (e.g. Galaxy Wearable) fail to pair with microG due to a combination of a TOS activity returning cancellation and ~20 AIDL service methods silently dropping calls without invoking any callback, leaving callers blocked indefinitely.

Changes

TermsOfServiceActivity

  • Changed setResult(RESULT_CANCELED)setResult(RESULT_OK) — the stub activity was aborting every pairing flow at the consent gate

WearableServiceImpl — callback stubs

  • All methods that logged "unimplemented" and returned without calling any callback now invoke the appropriate response:
    • setCloudSyncSetting, sendRemoteCommand, clearStorage, endCall, acceptRingingCall, silenceRinger, ANCS methods, syncWifiCredentialsonStatus(SUCCESS)
    • openChannelonOpenChannelResponse
    • closeChannel / closeChannelWithErroronCloseChannelResponse
    • getChannelInputStream / getChannelOutputStream → typed stream response callbacks
    • writeChannelInputToFd / readChannelOutputFromFdonChannelReceiveFileResponse / onChannelSendFileResponse
    • putConnection (deprecated) → delegates to createConnection + onStatus(SUCCESS)

WearableServiceImpl — functional implementations

  • getCloudSyncOptInDone, getCloudSyncOptInStatus, getStorageInformation — were also silent; now return proper typed empty responses
  • getAllCapabilities — now queries the node database and returns real capability data grouped by name instead of always returning an empty list
  • Stale "unimplemented Method:" log prefixes removed from getConnectedCapability, addLocalCapability, removeLocalCapability (these already had callback calls)

WearableImpl

  • Fixed NPE in closeConnection: sct is null in client mode but was dereferenced unconditionally
  • Added getAllCapabilityInfos() backed by a new NodeDatabaseHelper.getAllCapabilityItems() SQL query that extracts capability names as the last path segment from /capabilities/… data items

play-services-wearable/core manifest

  • Added WearableService (BIND filter) and WearableLocationService (MESSAGE_RECEIVED filter) declarations plus BLUETOOTH, BLUETOOTH_ADMIN, INTERNET, ACCESS_NETWORK_STATE permissions — the library module previously declared nothing

fixes #2444

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.

Cant set up Galaxy Watch with Samsung wearable due to missing google TOS screen

1 participant