Merge "Update correct split task Id to RecentsTaskController..." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d4464ea972
@@ -333,6 +333,12 @@ public class TaskInfo {
|
||||
*/
|
||||
public boolean isVisible;
|
||||
|
||||
/**
|
||||
* Whether this task is request visible.
|
||||
* @hide
|
||||
*/
|
||||
public boolean isVisibleRequested;
|
||||
|
||||
/**
|
||||
* Whether this task is sleeping due to sleeping display.
|
||||
* @hide
|
||||
@@ -518,6 +524,7 @@ public class TaskInfo {
|
||||
&& Objects.equals(taskDescription, that.taskDescription)
|
||||
&& isFocused == that.isFocused
|
||||
&& isVisible == that.isVisible
|
||||
&& isVisibleRequested == that.isVisibleRequested
|
||||
&& isSleeping == that.isSleeping
|
||||
&& Objects.equals(mTopActivityLocusId, that.mTopActivityLocusId)
|
||||
&& parentTaskId == that.parentTaskId
|
||||
@@ -591,6 +598,7 @@ public class TaskInfo {
|
||||
parentTaskId = source.readInt();
|
||||
isFocused = source.readBoolean();
|
||||
isVisible = source.readBoolean();
|
||||
isVisibleRequested = source.readBoolean();
|
||||
isSleeping = source.readBoolean();
|
||||
topActivityInSizeCompat = source.readBoolean();
|
||||
topActivityEligibleForLetterboxEducation = source.readBoolean();
|
||||
@@ -644,6 +652,7 @@ public class TaskInfo {
|
||||
dest.writeInt(parentTaskId);
|
||||
dest.writeBoolean(isFocused);
|
||||
dest.writeBoolean(isVisible);
|
||||
dest.writeBoolean(isVisibleRequested);
|
||||
dest.writeBoolean(isSleeping);
|
||||
dest.writeBoolean(topActivityInSizeCompat);
|
||||
dest.writeBoolean(topActivityEligibleForLetterboxEducation);
|
||||
@@ -687,6 +696,7 @@ public class TaskInfo {
|
||||
+ " parentTaskId=" + parentTaskId
|
||||
+ " isFocused=" + isFocused
|
||||
+ " isVisible=" + isVisible
|
||||
+ " isVisibleRequested=" + isVisibleRequested
|
||||
+ " isSleeping=" + isSleeping
|
||||
+ " topActivityInSizeCompat=" + topActivityInSizeCompat
|
||||
+ " topActivityEligibleForLetterboxEducation= "
|
||||
|
||||
@@ -1636,7 +1636,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
||||
mLogger.logSideStageAppChange(getSideStagePosition(), mSideStage.getTopChildTaskUid(),
|
||||
mSplitLayout.isLandscape());
|
||||
}
|
||||
if (present && visible) {
|
||||
if (present) {
|
||||
updateRecentTasksSplitPair();
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,8 @@ class StageTaskListener implements ShellTaskOrganizer.TaskListener {
|
||||
* Returns the top visible child task's id.
|
||||
*/
|
||||
int getTopVisibleChildTaskId() {
|
||||
final ActivityManager.RunningTaskInfo taskInfo = getChildTaskInfo(t -> t.isVisible);
|
||||
final ActivityManager.RunningTaskInfo taskInfo = getChildTaskInfo(t -> t.isVisible
|
||||
&& t.isVisibleRequested);
|
||||
return taskInfo != null ? taskInfo.taskId : INVALID_TASK_ID;
|
||||
}
|
||||
|
||||
@@ -183,7 +184,8 @@ class StageTaskListener implements ShellTaskOrganizer.TaskListener {
|
||||
final int taskId = taskInfo.taskId;
|
||||
mChildrenLeashes.put(taskId, leash);
|
||||
mChildrenTaskInfo.put(taskId, taskInfo);
|
||||
mCallbacks.onChildTaskStatusChanged(taskId, true /* present */, taskInfo.isVisible);
|
||||
mCallbacks.onChildTaskStatusChanged(taskId, true /* present */,
|
||||
taskInfo.isVisible && taskInfo.isVisibleRequested);
|
||||
if (ENABLE_SHELL_TRANSITIONS) {
|
||||
// Status is managed/synchronized by the transition lifecycle.
|
||||
return;
|
||||
@@ -223,7 +225,7 @@ class StageTaskListener implements ShellTaskOrganizer.TaskListener {
|
||||
}
|
||||
mChildrenTaskInfo.put(taskInfo.taskId, taskInfo);
|
||||
mCallbacks.onChildTaskStatusChanged(taskInfo.taskId, true /* present */,
|
||||
taskInfo.isVisible);
|
||||
taskInfo.isVisible && taskInfo.isVisibleRequested);
|
||||
if (!ENABLE_SHELL_TRANSITIONS) {
|
||||
updateChildTaskSurface(
|
||||
taskInfo, mChildrenLeashes.get(taskInfo.taskId), false /* firstAppeared */);
|
||||
|
||||
@@ -3443,6 +3443,7 @@ class Task extends TaskFragment {
|
||||
: INVALID_TASK_ID;
|
||||
info.isFocused = isFocused();
|
||||
info.isVisible = hasVisibleChildren();
|
||||
info.isVisibleRequested = isVisibleRequested();
|
||||
info.isSleeping = shouldSleepActivities();
|
||||
info.isLetterboxDoubleTapEnabled = top != null
|
||||
&& top.mLetterboxUiController.isLetterboxDoubleTapEducationEnabled();
|
||||
|
||||
Reference in New Issue
Block a user