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

Commit 21b6058f authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

Added isDockable field to RunningTaskInfo

Allows the caller to know if the task can go in the docked stack.

Bug: 26774816
Change-Id: I96fdf9b4df0ac87d84492e1504baac3ca0767d37
parent b9b16a74
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -1195,6 +1195,12 @@ public class ActivityManager {
         */
        public Rect bounds;

        /**
         * True if the task can go in the docked stack.
         * @hide
         */
        public boolean isDockable;

        public RecentTaskInfo() {
        }

@@ -1238,6 +1244,7 @@ public class ActivityManager {
            } else {
                dest.writeInt(0);
            }
            dest.writeInt(isDockable ? 1 : 0);
        }

        public void readFromParcel(Parcel source) {
@@ -1260,6 +1267,7 @@ public class ActivityManager {
            numActivities = source.readInt();
            bounds = source.readInt() > 0 ?
                    Rect.CREATOR.createFromParcel(source) : null;
            isDockable = source.readInt() == 1;
        }

        public static final Creator<RecentTaskInfo> CREATOR
@@ -1444,6 +1452,12 @@ public class ActivityManager {
         */
        public long lastActiveTime;

        /**
         * True if the task can go in the docked stack.
         * @hide
         */
        public boolean isDockable;

        public RunningTaskInfo() {
        }

+1 −0
Original line number Diff line number Diff line
@@ -8591,6 +8591,7 @@ public final class ActivityManagerService extends ActivityManagerNative
        if (tr.mBounds != null) {
            rti.bounds = new Rect(tr.mBounds);
        }
        rti.isDockable = tr.canGoInDockedStack();
        ActivityRecord base = null;
        ActivityRecord top = null;
+1 −0
Original line number Diff line number Diff line
@@ -4542,6 +4542,7 @@ final class ActivityStack {
            }
            ci.numActivities = numActivities;
            ci.numRunning = numRunning;
            ci.isDockable = task.canGoInDockedStack();
            list.add(ci);
        }
    }