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

Commit 2ed9c200 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Add new signature-level permission to get details of tasks."

parents 2d373a18 8238e717
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -732,14 +732,22 @@
        android:description="@string/permdesc_expandStatusBar" />

    <!-- Allows an application to get information about the currently
         or recently running tasks: a thumbnail representation of the tasks,
         what activities are running in it, etc. -->
         or recently running tasks. -->
    <permission android:name="android.permission.GET_TASKS"
        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
        android:protectionLevel="dangerous"
        android:label="@string/permlab_getTasks"
        android:description="@string/permdesc_getTasks" />

    <!-- Allows an application to get full detailed information about
         recently running tasks, with full fidelity to the real state.
         @hide -->
    <permission android:name="android.permission.GET_DETAILED_TASKS"
        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
        android:protectionLevel="signature"
        android:label="@string/permlab_getDetailedTasks"
        android:description="@string/permdesc_getDetailedTasks" />

    <!-- Allows an application to change the Z-order of tasks -->
    <permission android:name="android.permission.REORDER_TASKS"
        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+7 −0
Original line number Diff line number Diff line
@@ -542,6 +542,13 @@
        information about currently and recently running tasks. Malicious apps may 
        discover private information about other apps.</string>

    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=50] -->
    <string name="permlab_getDetailedTasks">retrieve details of running apps</string>
    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=NONE] -->
    <string name="permdesc_getDetailedTasks">Allows the app to retrieve
        detailed information about currently and recently running tasks. Malicious apps may 
        discover private information about other apps.</string>

    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permlab_reorderTasks">reorder running apps</string>
    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@

    <!-- ActivityManager -->
    <uses-permission android:name="android.permission.GET_TASKS" />
    <uses-permission android:name="android.permission.GET_DETAILED_TASKS" />
    <uses-permission android:name="android.permission.REORDER_TASKS" />
    <uses-permission android:name="android.permission.REMOVE_TASKS" />
    <uses-permission android:name="android.permission.STOP_APP_SWITCHES" />
+6 −0
Original line number Diff line number Diff line
@@ -5489,6 +5489,9 @@ public final class ActivityManagerService extends ActivityManagerNative
        synchronized (this) {
            enforceCallingPermission(android.Manifest.permission.GET_TASKS,
                    "getRecentTasks()");
            final boolean detailed = checkCallingPermission(
                    android.Manifest.permission.GET_DETAILED_TASKS)
                    == PackageManager.PERMISSION_GRANTED;
            IPackageManager pm = AppGlobals.getPackageManager();
            
@@ -5517,6 +5520,9 @@ public final class ActivityManagerService extends ActivityManagerNative
                    rti.persistentId = tr.taskId;
                    rti.baseIntent = new Intent(
                            tr.intent != null ? tr.intent : tr.affinityIntent);
                    if (!detailed) {
                        rti.baseIntent.replaceExtras((Bundle)null);
                    }
                    rti.origActivity = tr.origActivity;
                    rti.description = tr.lastDescription;