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

Commit 6d90fed0 authored by Craig Mautner's avatar Craig Mautner
Browse files

Add stackId to RecentTaskInfo

Necessary for multi-stack activity overview.

Fixes bug 9092356.

Change-Id: I3d51a7b5cbca6166017759401bb5d31b4ae96f07
parent 5404f9f1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2951,6 +2951,7 @@ package android.app {
    field public int id;
    field public android.content.ComponentName origActivity;
    field public int persistentId;
    field public int stackId;
  }
  public static class ActivityManager.RunningAppProcessInfo implements android.os.Parcelable {
+11 −2
Original line number Diff line number Diff line
@@ -453,13 +453,20 @@ public class ActivityManager {
         */
        public CharSequence description;

        /**
         * The id of the ActivityStack this Task was on most recently.
         */
        public int stackId;

        public RecentTaskInfo() {
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(id);
            dest.writeInt(persistentId);
@@ -472,6 +479,7 @@ public class ActivityManager {
            ComponentName.writeToParcel(origActivity, dest);
            TextUtils.writeToParcel(description, dest,
                    Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
            dest.writeInt(stackId);
        }

        public void readFromParcel(Parcel source) {
@@ -484,6 +492,7 @@ public class ActivityManager {
            }
            origActivity = ComponentName.readFromParcel(source);
            description = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source);
            stackId = source.readInt();
        }

        public static final Creator<RecentTaskInfo> CREATOR
+2 −1
Original line number Diff line number Diff line
@@ -6062,6 +6062,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                    }
                    rti.origActivity = tr.origActivity;
                    rti.description = tr.lastDescription;
                    rti.stackId = tr.stack.mStackId;
                    if ((flags&ActivityManager.RECENT_IGNORE_UNAVAILABLE) != 0) {
                        // Check whether this activity is currently available.