wearable: restore ClientIdentity population in WearableLocationService#3478
Open
js360000 wants to merge 1 commit into
Open
wearable: restore ClientIdentity population in WearableLocationService#3478js360000 wants to merge 1 commit into
js360000 wants to merge 1 commit into
Conversation
`generateClientIdentity` has been returning `null` since the
`ClientIdentity` constructor was retired in favour of the
AutoSafeParcelable public-field layout. The callsite still wraps the
result into `request.clients`, so every per-client entry in the
forwarded `LocationRequestInternal` was a null reference — anything
downstream that branched on `client.uid` / `client.packageName`
silently lost the package association coming from the watch.
Restore the original behaviour against the current ClientIdentity:
- Look up the supplied package name via `PackageManager`, populate
`uid` and `packageName` from the resolved `ApplicationInfo`.
- On `NameNotFoundException`, fall back to the host process's own
UID/package (matching the historical fallback that was commented
out alongside the null return) and log a warning.
Touches one file, ~10 LOC of behavioural change. Non-overlapping with
the WearOS transport work in PR microg#3473 — that PR keeps the watch link
alive; this restores the per-client identity needed for the relayed
location requests to do anything useful once they arrive.
Relates to microg#2843
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
wearable: restore ClientIdentity population in WearableLocationService
generateClientIdentityhas been returningnullsince theClientIdentityconstructor was retired in favour of theAutoSafeParcelable public-field layout. The callsite still wraps the
result into
request.clients, so every per-client entry in theforwarded
LocationRequestInternalwas a null reference — anythingdownstream that branched on
client.uid/client.packageNamesilently lost the package association coming from the watch.
Restore the original behaviour against the current ClientIdentity:
PackageManager, populateuidandpackageNamefrom the resolvedApplicationInfo.NameNotFoundException, fall back to the host process's ownUID/package (matching the historical fallback that was commented
out alongside the null return) and log a warning.
Touches one file, ~10 LOC of behavioural change. Non-overlapping with
the WearOS transport work in PR #3473 — that PR keeps the watch link
alive; this restores the per-client identity needed for the relayed
location requests to do anything useful once they arrive.
Relates to #2843
Diff
Claim
/claim #2843