Optimized add|removeRestrictBackgroundWhitelistedUid().
The initial implementation of these methods was calling updateRulesForGlobalChangeLocked(), which is expensive. The new implementation is optimized by: - quitting earlier if there is no change - only calling setUidNetworkRules - only broadcasting a ACTION_RESTRICT_BACKGROUND_CHANGED it the status of the app changed. This change also removed the unnecessary onPackageRemovedAllUsers() callback (just onPackageRemoved() is enough). BUG: 26685616 Change-Id: If38b8b870e992c48e40b4362e8170c64ff8b2a9d
Loading
Please register or sign in to comment