Skip to content
Commit 7c86b633 authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Add cache to AppOpsController

Reduces the Binder calls from AppOpsControllerImpl to
PackageManager#getPermissionFlags by caching calls for 10s (moltmann@
recommended this expiration time).

Also, modify AppOpsControllerImpl#notifySuscribers to use the bg Thread.

Currently calls to getPermissionFlags only happen in two functions:
* AppOpsControllerImpl#notifySuscribers
* AppOpsControllerImpl#getActiveAppOpsForUser

First one in only called from bg thread and second one is called from a
bg thread from PrivacyItemController.

In a future CL, this calling will be enforced at the entry point
(getActiveAppOpsForUser)

Test: atest PermissionFlagsCacheTest AppOpsControllerTest
Bug: 134687592

Change-Id: I6fa9e2d865bc295f6325935e2df574b8b758214a
parent 8b19acac
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