Skip to content
Commit a256d31e authored by Jeongsik Mun's avatar Jeongsik Mun Committed by Patrick Baumann
Browse files

Introduce a new thread in system_server for the PermisisonController

FgThread could be blocked by lock contention for a while especially
during a new user creation. During this time, PermisisonPolicyService
synchronizes permissions and app ops in FgThread. Meanwhile,
PermissionController does async things for initialization. Both use
PackageManager a lot to get package info, which could result in lock
contention and blocking FgThread for a very short duration for each
call to PackageManager. It could delay the user creation or switching.

This CL adds a new thread for PermisisonPolicyService and
PermisisonController to avoid blocking FgThread by lock contention.

Bug: 165030092
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases -t \
      com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testPermissionGrant
Change-Id: I0b92f681b6fffee47d41473012a6187cd261c32a
parent b72545e7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment