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

Commit b64daad7 authored by Chad Brubaker's avatar Chad Brubaker
Browse files

Explicitly disallow Instant App admins

Instant Apps have no business being device admins, reject any attempt to
install one as an admin.

Bug: 33387067
Test: None currently -- Instant apps already cannot request becoming
device admin.

Change-Id: Ia1daaff659990ff25f16e8cbad240747b67242e2
parent b7fe1763
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3141,6 +3141,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
            throw new IllegalArgumentException("Only apps in internal storage can be active admin: "
                    + adminReceiver);
        }
        if (info.getActivityInfo().applicationInfo.isInstantApp()) {
            throw new IllegalArgumentException("Instant apps cannot be device admins: "
                    + adminReceiver);
        }
        synchronized (this) {
            long ident = mInjector.binderClearCallingIdentity();
            try {