diff options
author | Dianne Hackborn <hackbod@google.com> | 2014-05-30 12:30:35 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2014-05-30 12:30:35 -0700 |
commit | a25a8b289bacce6dbaac2e71cd981d9eba06c959 (patch) | |
tree | 21692a5bbbef4031cd84280ec4e2571d4b8071f8 /core/java | |
parent | 8d07a14ee4cd47815ed42a86ce089c3de646658f (diff) | |
download | frameworks_base-a25a8b289bacce6dbaac2e71cd981d9eba06c959.zip frameworks_base-a25a8b289bacce6dbaac2e71cd981d9eba06c959.tar.gz frameworks_base-a25a8b289bacce6dbaac2e71cd981d9eba06c959.tar.bz2 |
Mark getRecentTasks() and getRunningTasks() as deprecated.
Change-Id: Idba79d7a4c0b9f0929f8dd27f25bd6aa548f5622
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/app/ActivityManager.java | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java index abcb0d0..788ac56 100644 --- a/core/java/android/app/ActivityManager.java +++ b/core/java/android/app/ActivityManager.java @@ -738,7 +738,7 @@ public class ActivityManager { public static final int RECENT_INCLUDE_PROFILES = 0x0004; /** - * Return a list of the tasks that the user has recently launched, with + * <p></p>Return a list of the tasks that the user has recently launched, with * the most recent being first and older ones after in order. * * <p><b>Note: this method is only intended for debugging and presenting @@ -750,6 +750,15 @@ public class ActivityManager { * same time, assumptions made about the meaning of the data here for * 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 + * 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 + * own tasks (though see {@link #getAppTasks()} for the correct supported + * way to retrieve that information), and possibly some other tasks + * such as home that are known to not be sensitive. + * * @param maxNum The maximum number of entries to return in the list. The * actual number returned may be smaller, depending on how many tasks the * user has started and the maximum number the system can remember. @@ -762,6 +771,7 @@ public class ActivityManager { * @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) throws SecurityException { try { @@ -946,6 +956,14 @@ public class ActivityManager { * same time, assumptions made about the meaning of the data here for * 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: the introduction of document-centric recents means + * it can leak person information to the caller. For backwards compatibility, + * it will still retu rn a small subset of its data: at least the caller's + * own tasks, and possibly some other tasks + * such as home that are known to not be sensitive. + * * @param maxNum The maximum number of entries to return in the list. The * actual number returned may be smaller, depending on how many tasks the * user has started. @@ -956,6 +974,7 @@ public class ActivityManager { * @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) throws SecurityException { try { |