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

Commit c8aeef6a authored by Edman Anjos's avatar Edman Anjos
Browse files

Remove leftover DO/PO check in isPackageSuspended

We already check if the caller is a DO, PO, or a delegate in
enforceCanManageScope, the additional call to
getActiveAdminForCallerLocked makes this function inaccessible to
delegate applications and was removed.

Test: cts-tradefed run cts-dev --module CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegation
Change-Id: I5df0f19a017a3b6e130329940c79b12cbb95ec9e
parent c9c57d44
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -8192,7 +8192,6 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
            // Ensure the caller is a DO/PO or a package access delegate.
            // Ensure the caller is a DO/PO or a package access delegate.
            enforceCanManageScope(who, callerPackage, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER,
            enforceCanManageScope(who, callerPackage, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER,
                    DELEGATION_PACKAGE_ACCESS);
                    DELEGATION_PACKAGE_ACCESS);
            getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);


            long id = mInjector.binderClearCallingIdentity();
            long id = mInjector.binderClearCallingIdentity();
            try {
            try {