Skip to content
Commit 62b19914 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Speed up NetworkPolicy thread during user creation

Network Policy Manager makes a ton of calls to
UsageStats.isAppIdle, which in turn tries to get
the network scorer and results in a lot of calls to
PackageManager. Caching the network scorer reduces a
lot of the lock contention with PackageManager.

Also, caching calls to check for an app's internet
permission.

Handler for USER_ADDED broadcast reduced in wallclock
duration from 2+ seconds to 114ms.

Bug: 156582823
Test: atest UserLifecycleTests#createAndStartUser
Test: atest AppStandbyTests
Change-Id: I369f9c129ca8a13016e00b1bec2776111fa04513
parent cd259caf
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