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

Commit 5ab98de3 authored by Eric Sandness's avatar Eric Sandness
Browse files

Permission Check For DPM.getPermittedAccessibilityServices

Require the callers of DPM.getPermittedAccessibilityServices(userId) to
hold the MANAGE_USERS permission.  The only known callers of this API
are settings apps that already hold this permission.

Bug: 62343414
Test: com.android.server.devicepolicy.DevicePolicyManagerTest
Test: com.google.android.gts.devicepolicy.DeviceOwnerTest
Test: Manually checked accessibility settings in DO and PO modes
Change-Id: I8ee3f876fcaffa63636645f0f59709cd147254ef
parent 219e1396
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6198,6 +6198,7 @@ public class DevicePolicyManager {
     * @hide
     */
     @SystemApi
     @RequiresPermission(android.Manifest.permission.MANAGE_USERS)
     public @Nullable List<String> getPermittedAccessibilityServices(int userId) {
        throwIfParentInstance("getPermittedAccessibilityServices");
        if (mService != null) {
+1 −0
Original line number Diff line number Diff line
@@ -8481,6 +8481,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
        if (!mHasFeature) {
            return null;
        }
        enforceManageUsers();
        synchronized (getLockObject()) {
            List<String> result = null;
            // If we have multiple profiles we return the intersection of the