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

Skip to content
Commit fa97060c authored by Hai Zhang's avatar Hai Zhang
Browse files

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
parent 95eab8ae
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