Merge "Add a featureId to TaskInfo." into sc-v2-dev am: fd72fb48bf am: 67d3c5ff28
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080962 Change-Id: I2e8294ccd4f4839a6296766ec01583171950d74d
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package android.app;
|
||||
|
||||
import static android.app.ActivityTaskManager.INVALID_TASK_ID;
|
||||
import static android.window.DisplayAreaOrganizer.FEATURE_UNDEFINED;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
@@ -116,6 +117,12 @@ public class TaskInfo {
|
||||
*/
|
||||
public int displayId;
|
||||
|
||||
/**
|
||||
* The feature id of {@link com.android.server.wm.TaskDisplayArea} this task is associated with.
|
||||
* @hide
|
||||
*/
|
||||
public int displayAreaFeatureId = FEATURE_UNDEFINED;
|
||||
|
||||
/**
|
||||
* The recent activity values for the highest activity in the stack to have set the values.
|
||||
* {@link Activity#setTaskDescription(android.app.ActivityManager.TaskDescription)}.
|
||||
@@ -342,6 +349,7 @@ public class TaskInfo {
|
||||
return topActivityType == that.topActivityType
|
||||
&& isResizeable == that.isResizeable
|
||||
&& supportsMultiWindow == that.supportsMultiWindow
|
||||
&& displayAreaFeatureId == that.displayAreaFeatureId
|
||||
&& Objects.equals(positionInParent, that.positionInParent)
|
||||
&& Objects.equals(pictureInPictureParams, that.pictureInPictureParams)
|
||||
&& getWindowingMode() == that.getWindowingMode()
|
||||
@@ -406,6 +414,7 @@ public class TaskInfo {
|
||||
topActivityToken = source.readStrongBinder();
|
||||
topActivityInSizeCompat = source.readBoolean();
|
||||
mTopActivityLocusId = source.readTypedObject(LocusId.CREATOR);
|
||||
displayAreaFeatureId = source.readInt();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -445,6 +454,7 @@ public class TaskInfo {
|
||||
dest.writeStrongBinder(topActivityToken);
|
||||
dest.writeBoolean(topActivityInSizeCompat);
|
||||
dest.writeTypedObject(mTopActivityLocusId, flags);
|
||||
dest.writeInt(displayAreaFeatureId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -473,7 +483,8 @@ public class TaskInfo {
|
||||
+ " isSleeping=" + isSleeping
|
||||
+ " topActivityToken=" + topActivityToken
|
||||
+ " topActivityInSizeCompat=" + topActivityInSizeCompat
|
||||
+ " locusId= " + mTopActivityLocusId
|
||||
+ " locusId=" + mTopActivityLocusId
|
||||
+ " displayAreaFeatureId=" + displayAreaFeatureId
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3293,6 +3293,9 @@ class Task extends TaskFragment {
|
||||
info.userId = isLeafTask() ? mUserId : mCurrentUser;
|
||||
info.taskId = mTaskId;
|
||||
info.displayId = getDisplayId();
|
||||
if (tda != null) {
|
||||
info.displayAreaFeatureId = tda.mFeatureId;
|
||||
}
|
||||
info.isRunning = getTopNonFinishingActivity() != null;
|
||||
final Intent baseIntent = getBaseIntent();
|
||||
// Make a copy of base intent because this is like a snapshot info.
|
||||
|
||||
Reference in New Issue
Block a user