Skip to content

binder: Replace queryIntentServices() hack with SystemApis.createContextAsUser() #12280

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jdcormie
Copy link
Member

@jdcormie jdcormie commented Aug 16, 2025

createContextAsUser() wrapper makes the call to PackageManager's resolveService() look the same in both the same-user and cross-user cases.

This is how the Android team recommends accessing XXXAsUser() APIs in general (See b/72863821#4). Compare to CL/783600747.

We can also remove all the apologies for using reflection since SystemApis already explains all that.

jdcormie and others added 4 commits August 7, 2025 11:27
Use a createContextAsUser() wrapper to make the call to PackageManager's
resolveService() look the same in both the same-user and cross-user cases.

This is how the Android team recommends accessing XXXAsUser() APIs in
general (See b/72863821#4). Will convert bindServiceAsUser() too in a
follow up PR.
@jdcormie
Copy link
Member Author

@mikaylakonst As reviewer of CL/783600747, could you please have a look?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant