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

Commit f8c07d68 authored by Russell Brenner's avatar Russell Brenner Committed by Android (Google) Code Review
Browse files

Merge "Add new permission for am.updateLockTaskPackages()" into nyc-dev

parents 3ccb3542 b3ad5676
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2984,6 +2984,11 @@
    <permission android:name="android.permission.BIND_VR_LISTENER_SERVICE"
        android:protectionLevel="signature" />

    <!-- Allows an application to whitelist tasks during lock task mode
         @hide <p>Not for use by third-party applications.</p> -->
    <permission android:name="android.permission.UPDATE_LOCK_TASK_PACKAGES"
        android:protectionLevel="signature|setup" />

    <application android:process="system"
                 android:persistent="true"
                 android:hasCode="false"
+2 −1
Original line number Diff line number Diff line
@@ -9827,7 +9827,8 @@ public final class ActivityManagerService extends ActivityManagerNative
    public void updateLockTaskPackages(int userId, String[] packages) {
        final int callingUid = Binder.getCallingUid();
        if (callingUid != 0 && callingUid != Process.SYSTEM_UID) {
            throw new SecurityException("updateLockTaskPackage called from non-system process");
            enforceCallingPermission(android.Manifest.permission.UPDATE_LOCK_TASK_PACKAGES,
                    "updateLockTaskPackages()");
        }
        synchronized (this) {
            if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK, "Whitelisting " + userId + ":" +