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

Commit bf90f82c authored by Kholoud Mohamed's avatar Kholoud Mohamed Committed by Android (Google) Code Review
Browse files

Merge "Clear caller identity before calling dpm#getAccountTypesWithManagementDisabled" into udc-dev

parents d773fcca 0c4304ab
Loading
Loading
Loading
Loading
+17 −15
Original line number Diff line number Diff line
@@ -5912,6 +5912,7 @@ public class AccountManagerService
    }

    private boolean canUserModifyAccountsForType(int userId, String accountType, int callingUid) {
        return Binder.withCleanCallingIdentity(() -> {
            // the managing app can always modify accounts
            if (isProfileOwner(callingUid)) {
                return true;
@@ -5928,6 +5929,7 @@ public class AccountManagerService
                }
            }
            return true;
        });
    }

    private boolean isProfileOwner(int uid) {