+10
−1
core/java/android/os/UserManager.aidl
0 → 100644
+20
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Currently only device owner can set global user restrictions. With this CL ENSURE_VERIFY_APPS will be global no matter who enforces it, DO or PO. To make it possible for system apps to check who enforces a particular restriction in this case a new API method is added to UserManager: getUserRestrictionSources which returns a list of users who enforce the restriction. Bug:31000521 Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.UserRestrictionsTest (ag/1732744) Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/pm/UserRestrictionsUtilsTest.java Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceMigrationTest.java Test: installed M on a Nexus5x device, created a managed profile with some user restrictions, and checked that after upgrading M->O all restrictions are preserved and split correctly into base, global and local. Change-Id: I543d3ec9ef0cf2b730da6f7406021c0bba43b785