WearOS: fix all IWearableService stubs that blocked callers + TOS pairing gate#3286
Open
samuel-asleep wants to merge 1 commit intomicrog:masterfrom
Open
WearOS: fix all IWearableService stubs that blocked callers + TOS pairing gate#3286samuel-asleep wants to merge 1 commit intomicrog:masterfrom
samuel-asleep wants to merge 1 commit intomicrog:masterfrom
Conversation
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.
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
TermsOfServiceActivitysetResult(RESULT_CANCELED)→setResult(RESULT_OK)— the stub activity was aborting every pairing flow at the consent gateWearableServiceImpl— callback stubs"unimplemented"and returned without calling any callback now invoke the appropriate response:setCloudSyncSetting,sendRemoteCommand,clearStorage,endCall,acceptRingingCall,silenceRinger, ANCS methods,syncWifiCredentials→onStatus(SUCCESS)openChannel→onOpenChannelResponsecloseChannel/closeChannelWithError→onCloseChannelResponsegetChannelInputStream/getChannelOutputStream→ typed stream response callbackswriteChannelInputToFd/readChannelOutputFromFd→onChannelReceiveFileResponse/onChannelSendFileResponseputConnection(deprecated) → delegates tocreateConnection+onStatus(SUCCESS)WearableServiceImpl— functional implementationsgetCloudSyncOptInDone,getCloudSyncOptInStatus,getStorageInformation— were also silent; now return proper typed empty responsesgetAllCapabilities— now queries the node database and returns real capability data grouped by name instead of always returning an empty list"unimplemented Method:"log prefixes removed fromgetConnectedCapability,addLocalCapability,removeLocalCapability(these already had callback calls)WearableImplcloseConnection:sctisnullin client mode but was dereferenced unconditionallygetAllCapabilityInfos()backed by a newNodeDatabaseHelper.getAllCapabilityItems()SQL query that extracts capability names as the last path segment from/capabilities/…data itemsplay-services-wearable/coremanifestWearableService(BINDfilter) andWearableLocationService(MESSAGE_RECEIVEDfilter) declarations plusBLUETOOTH,BLUETOOTH_ADMIN,INTERNET,ACCESS_NETWORK_STATEpermissions — the library module previously declared nothingfixes #2444