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

Commit faf1344b authored by Jonathan Scott's avatar Jonathan Scott
Browse files

add missed flag for getAccountTypesWithManagementDisabledAsUser

Test: Manual
Fixes: 269582443
Change-Id: I8494908111fceff872e153f9c568f359e995d044
parent 3d23445c
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -13456,13 +13456,20 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
        if (!mHasFeature) {
            return null;
        }
        CallerIdentity caller;
        Preconditions.checkArgumentNonnegative(userId, "Invalid userId");
        final CallerIdentity caller = getCallerIdentity(callerPackageName);
        if (!hasPermission(MANAGE_DEVICE_POLICY_ACCOUNT_MANAGEMENT, caller.getPackageName(), userId)
        if (isPermissionCheckFlagEnabled()) {
            caller = getCallerIdentity(callerPackageName);
            if (!hasPermission(MANAGE_DEVICE_POLICY_ACCOUNT_MANAGEMENT,
                    caller.getPackageName(), userId)
                    && !hasFullCrossUsersPermission(caller, userId)) {
                throw new SecurityException("Caller does not have permission to call this on user: "
                        + userId);
            }
        } else {
            caller = getCallerIdentity();
            Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userId));
        }
        synchronized (getLockObject()) {
            final ArraySet<String> resultSet = new ArraySet<>();