diff options
| author | Wale Ogunwale <ogunwale@google.com> | 2015-04-14 15:54:10 -0700 |
|---|---|---|
| committer | Wale Ogunwale <ogunwale@google.com> | 2015-04-16 11:14:46 -0700 |
| commit | 6035e0198ba510654b5d1f6b6a265a15b08576f8 (patch) | |
| tree | 53fda4160e34fda455589b132747bca1e5890a46 /core/java/android/app/ActivityManager.java | |
| parent | 3f2631f526d0a0ac0b57ac9f6d241bcc7aeb5f5b (diff) | |
| download | frameworks_base-6035e0198ba510654b5d1f6b6a265a15b08576f8.zip frameworks_base-6035e0198ba510654b5d1f6b6a265a15b08576f8.tar.gz frameworks_base-6035e0198ba510654b5d1f6b6a265a15b08576f8.tar.bz2 | |
Return more information when getAppTasks#getTaskInfo is called.
The RecentTaskInfo object returned when getAppTasks#getTaskInfo
is called now contains baseActivity, topActivity, and numActivities.
Bug: 18723935
Change-Id: Ifc0cd68a57ed2c0823c23ac8d27e3b6ea6bc95e2
Diffstat (limited to 'core/java/android/app/ActivityManager.java')
| -rw-r--r-- | core/java/android/app/ActivityManager.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java index 51ececc..134ecdd 100644 --- a/core/java/android/app/ActivityManager.java +++ b/core/java/android/app/ActivityManager.java @@ -862,6 +862,23 @@ public class ActivityManager { */ public int affiliatedTaskColor; + /** + * The component launched as the first activity in the task. + * This can be considered the "application" of this task. + */ + public ComponentName baseActivity; + + /** + * The activity component at the top of the history stack of the task. + * This is what the user is currently doing. + */ + public ComponentName topActivity; + + /** + * Number of activities in this task. + */ + public int numActivities; + public RecentTaskInfo() { } @@ -895,6 +912,9 @@ public class ActivityManager { dest.writeLong(lastActiveTime); dest.writeInt(affiliatedTaskId); dest.writeInt(affiliatedTaskColor); + ComponentName.writeToParcel(baseActivity, dest); + ComponentName.writeToParcel(topActivity, dest); + dest.writeInt(numActivities); } public void readFromParcel(Parcel source) { @@ -911,6 +931,9 @@ public class ActivityManager { lastActiveTime = source.readLong(); affiliatedTaskId = source.readInt(); affiliatedTaskColor = source.readInt(); + baseActivity = ComponentName.readFromParcel(source); + topActivity = ComponentName.readFromParcel(source); + numActivities = source.readInt(); } public static final Creator<RecentTaskInfo> CREATOR |
