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

Skip to content
Commit 72fe2e79 authored by Oliver Scott's avatar Oliver Scott Committed by Michael Bestas
Browse files

NetworkPolicyManagerService: Register broadcast receivers for PACKAGE_ADDED...

NetworkPolicyManagerService: Register broadcast receivers for PACKAGE_ADDED and UID_REMOVED on all users

The package and uid removed broadcast receivers are only registered in the primary user. Packages added and removed on secondary users are ignored.
This is unsafe given that new packages can be granted the uid and the old policy applied to it.
This addresses the problem by registering broadcast receivers for PACKAGE_ADDED and UID_REMOVED for all users.

Test:
1. Create a new user
2. Install a new app in the user
3. Apply background data restriction uid policy
4. adb shell cmd netpolicy list restrict-background-blacklist
5. Uninstall app
6. adb shell cmd netpolicy list restrict-background-blacklist

Change-Id: I8c87fcf0310fe1fc07095fdc599af10ba0a3d959
parent 33fc94d5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment