Merge "Update the timing of clearing SplitRequest" into tm-qpr-dev am: 1254c78a06
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22569796 Change-Id: I2a50a9fa3afa2f76c3743b8eea78fea2b5fbb9e3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -1090,7 +1090,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
private void onRemoteAnimationFinishedOrCancelled(WindowContainerTransaction evictWct) {
|
private void onRemoteAnimationFinishedOrCancelled(WindowContainerTransaction evictWct) {
|
||||||
mIsDividerRemoteAnimating = false;
|
mIsDividerRemoteAnimating = false;
|
||||||
mShouldUpdateRecents = true;
|
mShouldUpdateRecents = true;
|
||||||
mSplitRequest = null;
|
clearRequestIfPresented();
|
||||||
// If any stage has no child after animation finished, it means that split will display
|
// If any stage has no child after animation finished, it means that split will display
|
||||||
// nothing, such status will happen if task and intent is same app but not support
|
// nothing, such status will happen if task and intent is same app but not support
|
||||||
// multi-instance, we should exit split and expand that app as full screen.
|
// multi-instance, we should exit split and expand that app as full screen.
|
||||||
@@ -1110,7 +1110,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
private void onRemoteAnimationFinished(RemoteAnimationTarget[] apps) {
|
private void onRemoteAnimationFinished(RemoteAnimationTarget[] apps) {
|
||||||
mIsDividerRemoteAnimating = false;
|
mIsDividerRemoteAnimating = false;
|
||||||
mShouldUpdateRecents = true;
|
mShouldUpdateRecents = true;
|
||||||
mSplitRequest = null;
|
clearRequestIfPresented();
|
||||||
// If any stage has no child after finished animation, that side of the split will display
|
// If any stage has no child after finished animation, that side of the split will display
|
||||||
// nothing. This might happen if starting the same app on the both sides while not
|
// nothing. This might happen if starting the same app on the both sides while not
|
||||||
// supporting multi-instance. Exit the split screen and expand that app to full screen.
|
// supporting multi-instance. Exit the split screen and expand that app to full screen.
|
||||||
@@ -1383,6 +1383,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
});
|
});
|
||||||
mShouldUpdateRecents = false;
|
mShouldUpdateRecents = false;
|
||||||
mIsDividerRemoteAnimating = false;
|
mIsDividerRemoteAnimating = false;
|
||||||
|
mSplitRequest = null;
|
||||||
|
|
||||||
mSplitLayout.getInvisibleBounds(mTempRect1);
|
mSplitLayout.getInvisibleBounds(mTempRect1);
|
||||||
if (childrenToTop == null || childrenToTop.getTopVisibleChildTaskId() == INVALID_TASK_ID) {
|
if (childrenToTop == null || childrenToTop.getTopVisibleChildTaskId() == INVALID_TASK_ID) {
|
||||||
@@ -1475,6 +1476,13 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void clearRequestIfPresented() {
|
||||||
|
if (mSideStageListener.mVisible && mSideStageListener.mHasChildren
|
||||||
|
&& mMainStageListener.mVisible && mSideStageListener.mHasChildren) {
|
||||||
|
mSplitRequest = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether the split pair in the recent tasks list should be broken.
|
* Returns whether the split pair in the recent tasks list should be broken.
|
||||||
*/
|
*/
|
||||||
@@ -1853,6 +1861,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
true /* setReparentLeafTaskIfRelaunch */);
|
true /* setReparentLeafTaskIfRelaunch */);
|
||||||
setRootForceTranslucent(true, wct);
|
setRootForceTranslucent(true, wct);
|
||||||
} else {
|
} else {
|
||||||
|
clearRequestIfPresented();
|
||||||
wct.setReparentLeafTaskIfRelaunch(mRootTaskInfo.token,
|
wct.setReparentLeafTaskIfRelaunch(mRootTaskInfo.token,
|
||||||
false /* setReparentLeafTaskIfRelaunch */);
|
false /* setReparentLeafTaskIfRelaunch */);
|
||||||
setRootForceTranslucent(false, wct);
|
setRootForceTranslucent(false, wct);
|
||||||
@@ -2012,7 +2021,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
}
|
}
|
||||||
if (mMainStageListener.mHasChildren && mSideStageListener.mHasChildren) {
|
if (mMainStageListener.mHasChildren && mSideStageListener.mHasChildren) {
|
||||||
mShouldUpdateRecents = true;
|
mShouldUpdateRecents = true;
|
||||||
mSplitRequest = null;
|
clearRequestIfPresented();
|
||||||
updateRecentTasksSplitPair();
|
updateRecentTasksSplitPair();
|
||||||
|
|
||||||
if (!mLogger.hasStartedSession()) {
|
if (!mLogger.hasStartedSession()) {
|
||||||
@@ -2720,6 +2729,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
mShouldUpdateRecents = false;
|
mShouldUpdateRecents = false;
|
||||||
|
mSplitRequest = null;
|
||||||
|
|
||||||
// Update local states.
|
// Update local states.
|
||||||
setSplitsVisible(false);
|
setSplitsVisible(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user