Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6f3615bd authored by Rambo Wang's avatar Rambo Wang
Browse files

CarrierPrivilegesTracker: support HSUM

This CL supports carrier privileges APIs for secondary users in HSUM. In
specific, the following APIs calls are replaced with the corresponding
*AsUser version with with current user:
- Context.registerReceiver
- PackageManager.getPackageInfo
- PackageManager.getInstalledPackages
- PackageManager.getPackageUid
- PackageManager.queryBroadcastReceivers
- PackageManager.queryIntentActivities
- PackageManager.queryIntentServices
- PackageManager.queryIntentContentProviders

The final effect is as below:
- On non-HSUM (e.g. phone devices), the behaior is unchanged, as Phone
  process runs in system user context which is the current user.
- On HSUM, secondary users (including Main) are able to get info exposed
  to them, as the usage of current user.

Bug: 328251947
Test: atest FrameworksTelephonyTests with feature both on and off
Test: Carrier Apps regression test on both phone (with HSUM/flag off) and
tablet (with HSUM/flag on)
Test: Telephony manual test on functions (Registration, activation,
call, message, data connection...) on both phone and tablet
Flag: com.android.internal.telephony.flags.support_carrier_services_for_hsum
Change-Id: I039d322cbf546460b35993da67022cbaaa26aaa3

Change-Id: Ieaa02ef560134c6335229a0084e948e7c59da9c7
parent 5b89b0ca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment