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

Commit 20d27a0a authored by Eran Messeri's avatar Eran Messeri Committed by Android (Google) Code Review
Browse files

Merge "Remove more profile_owner policy refs"

parents 011ab237 f4250825
Loading
Loading
Loading
Loading
+190 −132

File changed.

Preview size limit exceeded, changes collapsed.

+2 −0
Original line number Original line Diff line number Diff line
@@ -5728,6 +5728,7 @@ public class DevicePolicyManagerTest extends DpmTestBase {
        // Device owner should be allowed to request Device ID attestation.
        // Device owner should be allowed to request Device ID attestation.
        dpms.enforceCallerCanRequestDeviceIdAttestation(dpms.getCallerIdentity(admin1));
        dpms.enforceCallerCanRequestDeviceIdAttestation(dpms.getCallerIdentity(admin1));


        mContext.binder.callingUid = DpmMockContext.ANOTHER_UID;
        // Another package must not be allowed to request Device ID attestation.
        // Another package must not be allowed to request Device ID attestation.
        assertExpectException(SecurityException.class, null,
        assertExpectException(SecurityException.class, null,
                () -> dpms.enforceCallerCanRequestDeviceIdAttestation(
                () -> dpms.enforceCallerCanRequestDeviceIdAttestation(
@@ -5757,6 +5758,7 @@ public class DevicePolicyManagerTest extends DpmTestBase {
        dpms.enforceCallerCanRequestDeviceIdAttestation(dpms.getCallerIdentity(admin1));
        dpms.enforceCallerCanRequestDeviceIdAttestation(dpms.getCallerIdentity(admin1));


        // But not another package.
        // But not another package.
        mContext.binder.callingUid = DpmMockContext.ANOTHER_UID;
        assertExpectException(SecurityException.class, null,
        assertExpectException(SecurityException.class, null,
                () -> dpms.enforceCallerCanRequestDeviceIdAttestation(
                () -> dpms.enforceCallerCanRequestDeviceIdAttestation(
                        dpms.getCallerIdentity(null, admin2.getPackageName())));
                        dpms.getCallerIdentity(null, admin2.getPackageName())));