Merge "Update correct split task Id to RecentsTaskController..." into udc-dev am: d4464ea972
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23599961 Change-Id: If402483e63d8b3ef82f80742b5e6d3199386b02d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -333,6 +333,12 @@ public class TaskInfo {
|
|||||||
*/
|
*/
|
||||||
public boolean isVisible;
|
public boolean isVisible;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether this task is request visible.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public boolean isVisibleRequested;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether this task is sleeping due to sleeping display.
|
* Whether this task is sleeping due to sleeping display.
|
||||||
* @hide
|
* @hide
|
||||||
@@ -518,6 +524,7 @@ public class TaskInfo {
|
|||||||
&& Objects.equals(taskDescription, that.taskDescription)
|
&& Objects.equals(taskDescription, that.taskDescription)
|
||||||
&& isFocused == that.isFocused
|
&& isFocused == that.isFocused
|
||||||
&& isVisible == that.isVisible
|
&& isVisible == that.isVisible
|
||||||
|
&& isVisibleRequested == that.isVisibleRequested
|
||||||
&& isSleeping == that.isSleeping
|
&& isSleeping == that.isSleeping
|
||||||
&& Objects.equals(mTopActivityLocusId, that.mTopActivityLocusId)
|
&& Objects.equals(mTopActivityLocusId, that.mTopActivityLocusId)
|
||||||
&& parentTaskId == that.parentTaskId
|
&& parentTaskId == that.parentTaskId
|
||||||
@@ -591,6 +598,7 @@ public class TaskInfo {
|
|||||||
parentTaskId = source.readInt();
|
parentTaskId = source.readInt();
|
||||||
isFocused = source.readBoolean();
|
isFocused = source.readBoolean();
|
||||||
isVisible = source.readBoolean();
|
isVisible = source.readBoolean();
|
||||||
|
isVisibleRequested = source.readBoolean();
|
||||||
isSleeping = source.readBoolean();
|
isSleeping = source.readBoolean();
|
||||||
topActivityInSizeCompat = source.readBoolean();
|
topActivityInSizeCompat = source.readBoolean();
|
||||||
topActivityEligibleForLetterboxEducation = source.readBoolean();
|
topActivityEligibleForLetterboxEducation = source.readBoolean();
|
||||||
@@ -644,6 +652,7 @@ public class TaskInfo {
|
|||||||
dest.writeInt(parentTaskId);
|
dest.writeInt(parentTaskId);
|
||||||
dest.writeBoolean(isFocused);
|
dest.writeBoolean(isFocused);
|
||||||
dest.writeBoolean(isVisible);
|
dest.writeBoolean(isVisible);
|
||||||
|
dest.writeBoolean(isVisibleRequested);
|
||||||
dest.writeBoolean(isSleeping);
|
dest.writeBoolean(isSleeping);
|
||||||
dest.writeBoolean(topActivityInSizeCompat);
|
dest.writeBoolean(topActivityInSizeCompat);
|
||||||
dest.writeBoolean(topActivityEligibleForLetterboxEducation);
|
dest.writeBoolean(topActivityEligibleForLetterboxEducation);
|
||||||
@@ -687,6 +696,7 @@ public class TaskInfo {
|
|||||||
+ " parentTaskId=" + parentTaskId
|
+ " parentTaskId=" + parentTaskId
|
||||||
+ " isFocused=" + isFocused
|
+ " isFocused=" + isFocused
|
||||||
+ " isVisible=" + isVisible
|
+ " isVisible=" + isVisible
|
||||||
|
+ " isVisibleRequested=" + isVisibleRequested
|
||||||
+ " isSleeping=" + isSleeping
|
+ " isSleeping=" + isSleeping
|
||||||
+ " topActivityInSizeCompat=" + topActivityInSizeCompat
|
+ " topActivityInSizeCompat=" + topActivityInSizeCompat
|
||||||
+ " topActivityEligibleForLetterboxEducation= "
|
+ " topActivityEligibleForLetterboxEducation= "
|
||||||
|
|||||||
@@ -1636,7 +1636,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
mLogger.logSideStageAppChange(getSideStagePosition(), mSideStage.getTopChildTaskUid(),
|
mLogger.logSideStageAppChange(getSideStagePosition(), mSideStage.getTopChildTaskUid(),
|
||||||
mSplitLayout.isLandscape());
|
mSplitLayout.isLandscape());
|
||||||
}
|
}
|
||||||
if (present && visible) {
|
if (present) {
|
||||||
updateRecentTasksSplitPair();
|
updateRecentTasksSplitPair();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -127,7 +127,8 @@ class StageTaskListener implements ShellTaskOrganizer.TaskListener {
|
|||||||
* Returns the top visible child task's id.
|
* Returns the top visible child task's id.
|
||||||
*/
|
*/
|
||||||
int getTopVisibleChildTaskId() {
|
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;
|
return taskInfo != null ? taskInfo.taskId : INVALID_TASK_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,7 +184,8 @@ class StageTaskListener implements ShellTaskOrganizer.TaskListener {
|
|||||||
final int taskId = taskInfo.taskId;
|
final int taskId = taskInfo.taskId;
|
||||||
mChildrenLeashes.put(taskId, leash);
|
mChildrenLeashes.put(taskId, leash);
|
||||||
mChildrenTaskInfo.put(taskId, taskInfo);
|
mChildrenTaskInfo.put(taskId, taskInfo);
|
||||||
mCallbacks.onChildTaskStatusChanged(taskId, true /* present */, taskInfo.isVisible);
|
mCallbacks.onChildTaskStatusChanged(taskId, true /* present */,
|
||||||
|
taskInfo.isVisible && taskInfo.isVisibleRequested);
|
||||||
if (ENABLE_SHELL_TRANSITIONS) {
|
if (ENABLE_SHELL_TRANSITIONS) {
|
||||||
// Status is managed/synchronized by the transition lifecycle.
|
// Status is managed/synchronized by the transition lifecycle.
|
||||||
return;
|
return;
|
||||||
@@ -223,7 +225,7 @@ class StageTaskListener implements ShellTaskOrganizer.TaskListener {
|
|||||||
}
|
}
|
||||||
mChildrenTaskInfo.put(taskInfo.taskId, taskInfo);
|
mChildrenTaskInfo.put(taskInfo.taskId, taskInfo);
|
||||||
mCallbacks.onChildTaskStatusChanged(taskInfo.taskId, true /* present */,
|
mCallbacks.onChildTaskStatusChanged(taskInfo.taskId, true /* present */,
|
||||||
taskInfo.isVisible);
|
taskInfo.isVisible && taskInfo.isVisibleRequested);
|
||||||
if (!ENABLE_SHELL_TRANSITIONS) {
|
if (!ENABLE_SHELL_TRANSITIONS) {
|
||||||
updateChildTaskSurface(
|
updateChildTaskSurface(
|
||||||
taskInfo, mChildrenLeashes.get(taskInfo.taskId), false /* firstAppeared */);
|
taskInfo, mChildrenLeashes.get(taskInfo.taskId), false /* firstAppeared */);
|
||||||
|
|||||||
@@ -3443,6 +3443,7 @@ class Task extends TaskFragment {
|
|||||||
: INVALID_TASK_ID;
|
: INVALID_TASK_ID;
|
||||||
info.isFocused = isFocused();
|
info.isFocused = isFocused();
|
||||||
info.isVisible = hasVisibleChildren();
|
info.isVisible = hasVisibleChildren();
|
||||||
|
info.isVisibleRequested = isVisibleRequested();
|
||||||
info.isSleeping = shouldSleepActivities();
|
info.isSleeping = shouldSleepActivities();
|
||||||
info.isLetterboxDoubleTapEnabled = top != null
|
info.isLetterboxDoubleTapEnabled = top != null
|
||||||
&& top.mLetterboxUiController.isLetterboxDoubleTapEducationEnabled();
|
&& top.mLetterboxUiController.isLetterboxDoubleTapEducationEnabled();
|
||||||
|
|||||||
Reference in New Issue
Block a user