Register broadcast receivers for PACKAGE_ADDED/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
Loading
Please register or sign in to comment