Merge "Fix concurrent modify exception for A11y" am: 2dcd402cdc am: 0b6b68b0ae am: 6881bf4a6e

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1593751

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id80754eb08e878e16e1e1f9b738c0baf749d23aa
This commit is contained in:
Phil Weaver
2021-02-23 23:47:17 +00:00
committed by Automerger Merge Worker

View File

@@ -777,6 +777,10 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
// performs the current profile parent resolution.
final int resolvedUserId = mSecurityPolicy
.resolveCallingUserIdEnforcingPermissionsLocked(userId);
if (Binder.getCallingPid() == OWN_PROCESS_ID) {
return new ArrayList<>(getUserStateLocked(resolvedUserId).mInstalledServices);
}
return getUserStateLocked(resolvedUserId).mInstalledServices;
}
}