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