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

Skip to content
Commit 47585ba1 authored by Felipe Leme's avatar Felipe Leme
Browse files

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
parent b251a2f5
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