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
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user