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

Commit 5cfd3d8b authored by Nicolas Prevot's avatar Nicolas Prevot Committed by Android (Google) Code Review
Browse files

Merge "Avoid NullPointerException in enableSystemApp if the app is absent."

parents f54b42ea 637baaf0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -5071,6 +5071,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
            throws RemoteException {
        ApplicationInfo appInfo = pm.getApplicationInfo(packageName, GET_UNINSTALLED_PACKAGES,
                userId);
        if (appInfo == null) {
            throw new IllegalArgumentException("The application " + packageName +
                    " is not present on this device");
        }
        return (appInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0;
    }