Files
frameworks_base/core/java/com/android
Hai Zhang fa97060c21 Throttle calls to grant default roles.
Package changes can be very frequent when for instance a new user is
created, and we used to re-run granting default roles every time a
package change is detected. In such cases the grant is inherently
async, so we can throttle it with a certain interval for better
performance.

This CL adds a throttled runnable and makes the async call in
RoleManagerService package change receiver throttled with an interval
of 1 second. The package hash computation is also moved to FgThread in
this case. The original blocking call in onStartUser() is not
affected and still runs on main thread.

Test: manual
Change-Id: I211ee3d4acbdf0662c6dfe4d67b35d253e12a472
2019-07-11 14:50:03 -07:00
..
2019-05-01 05:48:29 +00:00