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

Skip to content
Commit 6777a92c authored by Rambo Wang's avatar Rambo Wang
Browse files

Optimize getCarrierServicePackageName in CarrierPrivilegesTracker

The original implementation will always query package manager
which is pretty heavy operation and prone to deadlock.

This CL optimizes the method with paths below:
- Return cache if present
- Perform light query on install packages for services only
- Perform original heavy query as before as the last resort

In majority of the cases, the cache is returned and this should
largely improve the performance of the method and reduce the
risk for deadlock or IPC thread blocking.

Bug: 217442920
Test: atest CarrierPrivilegesTrackerTest
Change-Id: I2163fac6c371a706e565050ea6ad066cbca8f588
Merged-In: I2163fac6c371a706e565050ea6ad066cbca8f588
(cherry picked from commit bcf5d849)
parent 89dabb58
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