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

Commit 345d2bfc authored by Tyler Gunn's avatar Tyler Gunn Committed by Android (Google) Code Review
Browse files

Revert "Add work profile support for registering phone accounts ..."

Revert "Add work profile support for registering phone accounts ..."

Revert submission 20281770-telecomWorkProfileAccountRegistration

Reason for revert: As part of a chain of issues that caused b/258831395
Reverted Changes:
I51f8068eb:Add work profile support for registering phone acc...
Iccbf30712:Add work profile support for registering phone acc...

Change-Id: I39dce9a82eddef1c0757a61eff78a8327ee7b894
parent f5c29834
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -2467,9 +2467,7 @@ public class TelecomServiceImpl {

    private void enforceUserHandleMatchesCaller(PhoneAccountHandle accountHandle) {
        if (!Binder.getCallingUserHandle().equals(accountHandle.getUserHandle())) {
            // Enforce INTERACT_ACROSS_USERS if the calling user handle does not match
            // phoen account's user handle
            enforceInAppCrossUserPermission();
            throw new SecurityException("Calling UserHandle does not match PhoneAccountHandle's");
        }
    }

@@ -2488,12 +2486,6 @@ public class TelecomServiceImpl {
        }
    }

    private void enforceInAppCrossUserPermission() {
        mContext.enforceCallingOrSelfPermission(
                android.Manifest.permission.INTERACT_ACROSS_USERS, "Must be system or have"
                        + " INTERACT_ACROSS_USERS permission");
    }

    // to be used for TestApi methods that can only be called with SHELL UID.
    private void enforceShellOnly(int callingUid, String message) {
        if (callingUid == Process.SHELL_UID || callingUid == Process.ROOT_UID) {