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

Commit b9b94775 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: I91fc68ebf72114224c8e651261101ac14517ff86
parent a66c2f10
Loading
Loading
Loading
Loading
+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.