From 0ba5abfb2041141d64233196569818b9e927d3e8 Mon Sep 17 00:00:00 2001 From: Ats Jenk Date: Thu, 22 Sep 2022 11:49:53 -0700 Subject: [PATCH] Add information to Task model for desktop entry Desktop recents entry needs some extra information about a Task. Add support to populate this Bug: 244348395 Test: manual Change-Id: If358ea63dff0725f312672f5c247147c1e3cb9f9 --- .../systemui/shared/recents/model/Task.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/Task.java b/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/Task.java index 2111df501415f..647dd47159e08 100644 --- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/Task.java +++ b/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/Task.java @@ -27,6 +27,8 @@ import android.app.ActivityManager.TaskDescription; import android.app.TaskInfo; import android.content.ComponentName; import android.content.Intent; +import android.graphics.Point; +import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.os.Parcel; import android.os.Parcelable; @@ -233,17 +235,14 @@ public class Task { @ViewDebug.ExportedProperty(category="recents") public boolean isLocked; + public Point positionInParent; + + public Rect appBounds; + // Last snapshot data, only used for recent tasks public ActivityManager.RecentTaskInfo.PersistedTaskSnapshotData lastSnapshotData = new ActivityManager.RecentTaskInfo.PersistedTaskSnapshotData(); - /** - * Indicates that this task for the desktop tile in recents. - * - * Used when desktop mode feature is enabled. - */ - public boolean desktopTile; - public Task() { // Do nothing } @@ -274,7 +273,8 @@ public class Task { this(other.key, other.colorPrimary, other.colorBackground, other.isDockable, other.isLocked, other.taskDescription, other.topActivity); lastSnapshotData.set(other.lastSnapshotData); - desktopTile = other.desktopTile; + positionInParent = other.positionInParent; + appBounds = other.appBounds; } /**