summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/ActivityManager.java
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2010-07-14 16:59:52 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-07-14 16:59:52 -0700
commit9d42c7f75cfd7544d6e3f253cedf9ac983fdc6b2 (patch)
treee5841a3c0ea2d040132177d3813965a1403f39ac /core/java/android/app/ActivityManager.java
parentccc77328da66436010f3bca000c4b4665270500a (diff)
parent0b2a6d0773211449fbde9d2706388714beeffebb (diff)
downloadframeworks_base-9d42c7f75cfd7544d6e3f253cedf9ac983fdc6b2.zip
frameworks_base-9d42c7f75cfd7544d6e3f253cedf9ac983fdc6b2.tar.gz
frameworks_base-9d42c7f75cfd7544d6e3f253cedf9ac983fdc6b2.tar.bz2
Merge "Fix 2797185: Re-enable thumbnail generation in framework" into gingerbread
Diffstat (limited to 'core/java/android/app/ActivityManager.java')
-rw-r--r--core/java/android/app/ActivityManager.java40
1 files changed, 35 insertions, 5 deletions
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index eb7520f..d66e98b 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -285,24 +285,54 @@ public class ActivityManager {
* @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.
- *
+ *
+ * @param flags Optional flags
+ * @param receiver Optional receiver for delayed thumbnails
+ *
* @return Returns a list of RunningTaskInfo records describing each of
* the running tasks.
*
+ * Some thumbnails may not be available at the time of this call. The optional
+ * receiver may be used to receive those thumbnails.
+ *
* @throws SecurityException Throws SecurityException if the caller does
* not hold the {@link android.Manifest.permission#GET_TASKS} permission.
+ *
+ * @hide
*/
- public List<RunningTaskInfo> getRunningTasks(int maxNum)
+ public List<RunningTaskInfo> getRunningTasks(int maxNum, int flags, IThumbnailReceiver receiver)
throws SecurityException {
try {
- return (List<RunningTaskInfo>)ActivityManagerNative.getDefault()
- .getTasks(maxNum, 0, null);
+ return ActivityManagerNative.getDefault().getTasks(maxNum, flags, receiver);
} catch (RemoteException e) {
// System dead, we will be dead too soon!
return null;
}
}
-
+
+ /**
+ * Return a list of the tasks that are currently running, with
+ * the most recent being first and older ones after in order. Note that
+ * "running" does not mean any of the task's code is currently loaded or
+ * activity -- the task may have been frozen by the system, so that it
+ * can be restarted in its previous state when next brought to the
+ * foreground.
+ *
+ * @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.
+ *
+ * @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.
+ */
+ public List<RunningTaskInfo> getRunningTasks(int maxNum)
+ throws SecurityException {
+ return getRunningTasks(maxNum, 0, null);
+ }
+
/**
* Information you can retrieve about a particular Service that is
* currently running in the system.