summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/java/android/app/ActivityManager.java11
-rw-r--r--core/java/android/content/pm/IPackageManager.aidl2
-rw-r--r--core/res/AndroidManifest.xml19
-rw-r--r--core/tests/hosttests/test-apps/ExternalLocAllPermsTestApp/AndroidManifest.xml2
4 files changed, 21 insertions, 13 deletions
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index cd6088f..84a7f5d 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -931,7 +931,7 @@ public class ActivityManager {
* purposes of control flow will be incorrect.</p>
*
* @deprecated As of {@link android.os.Build.VERSION_CODES#L}, this method is
- * no longer available to third party applications: as the introduction of
+ * no longer available to third party applications: the introduction of
* document-centric recents means
* it can leak personal information to the caller. For backwards compatibility,
* it will still return a small subset of its data: at least the caller's
@@ -947,9 +947,6 @@ public class ActivityManager {
*
* @return Returns a list of RecentTaskInfo records describing each of
* the recent tasks.
- *
- * @throws SecurityException Throws SecurityException if the caller does
- * not hold the {@link android.Manifest.permission#GET_TASKS} permission.
*/
@Deprecated
public List<RecentTaskInfo> getRecentTasks(int maxNum, int flags)
@@ -976,9 +973,6 @@ public class ActivityManager {
* @return Returns a list of RecentTaskInfo records describing each of
* the recent tasks.
*
- * @throws SecurityException Throws SecurityException if the caller does
- * not hold the {@link android.Manifest.permission#GET_TASKS} or the
- * {@link android.Manifest.permission#INTERACT_ACROSS_USERS_FULL} permissions.
* @hide
*/
public List<RecentTaskInfo> getRecentTasksForUser(int maxNum, int flags, int userId)
@@ -1236,9 +1230,6 @@ public class ActivityManager {
*
* @return Returns a list of RunningTaskInfo records describing each of
* the running tasks.
- *
- * @throws SecurityException Throws SecurityException if the caller does
- * not hold the {@link android.Manifest.permission#GET_TASKS} permission.
*/
@Deprecated
public List<RunningTaskInfo> getRunningTasks(int maxNum)
diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl
index 6d9c58b..c37534a 100644
--- a/core/java/android/content/pm/IPackageManager.aidl
+++ b/core/java/android/content/pm/IPackageManager.aidl
@@ -111,6 +111,8 @@ interface IPackageManager {
int getFlagsForUid(int uid);
+ boolean isUidPrivileged(int uid);
+
String[] getAppOpPermissionPackages(String permissionName);
ResolveInfo resolveIntent(in Intent intent, String resolvedType, int flags, int userId);
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index c9a78fa..601924d 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1398,10 +1398,25 @@
android:description="@string/permgroupdesc_appInfo"
android:priority="220" />
- <!-- @SystemApi Allows an application to get information about the currently
- or recently running tasks. -->
+ <!-- @deprecated No longer enforced. -->
<permission android:name="android.permission.GET_TASKS"
android:permissionGroup="android.permission-group.APP_INFO"
+ android:protectionLevel="normal"
+ android:label="@string/permlab_getTasks"
+ android:description="@string/permdesc_getTasks" />
+
+ <!-- New version of GET_TASKS that apps can request, since GET_TASKS doesn't really
+ give access to task information. We need this new one because there are
+ many existing apps that use add libraries and such that have validation
+ code to ensure the app has requested the GET_TASKS permission by seeing
+ if it has been granted the permission... if it hasn't, it kills the app
+ with a message about being upset. So we need to have it continue to look
+ like the app is getting that permission, even though it will never be
+ checked, and new privileged apps can now request this one for real access.
+ @hide
+ @SystemApi -->
+ <permission android:name="android.permission.REAL_GET_TASKS"
+ android:permissionGroup="android.permission-group.APP_INFO"
android:protectionLevel="signature|system"
android:label="@string/permlab_getTasks"
android:description="@string/permdesc_getTasks" />
diff --git a/core/tests/hosttests/test-apps/ExternalLocAllPermsTestApp/AndroidManifest.xml b/core/tests/hosttests/test-apps/ExternalLocAllPermsTestApp/AndroidManifest.xml
index 0c502c0..0898fae 100644
--- a/core/tests/hosttests/test-apps/ExternalLocAllPermsTestApp/AndroidManifest.xml
+++ b/core/tests/hosttests/test-apps/ExternalLocAllPermsTestApp/AndroidManifest.xml
@@ -60,7 +60,7 @@
<uses-permission android:name="android.permission.FORCE_BACK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.GET_PACKAGE_SIZE" />
- <uses-permission android:name="android.permission.GET_TASKS" />
+ <uses-permission android:name="android.permission.REAL_GET_TASKS" />
<uses-permission android:name="android.permission.GLOBAL_SEARCH" />
<uses-permission android:name="android.permission.HARDWARE_TEST" />
<uses-permission android:name="android.permission.INJECT_EVENTS" />