Merge "Don't dismiss split during enter if already visible" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1f23db5438
@@ -1502,6 +1502,10 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
// Legacy transition we need to create divider here, shell transition case we will
|
// Legacy transition we need to create divider here, shell transition case we will
|
||||||
// create it on #finishEnterSplitScreen
|
// create it on #finishEnterSplitScreen
|
||||||
mSplitLayout.init();
|
mSplitLayout.init();
|
||||||
|
} else {
|
||||||
|
// We handle split visibility itself on shell transition, but sometimes we didn't
|
||||||
|
// reset it correctly after dismiss by some reason, so just set invisible before active.
|
||||||
|
setSplitsVisible(false);
|
||||||
}
|
}
|
||||||
if (taskInfo != null) {
|
if (taskInfo != null) {
|
||||||
setSideStagePosition(startPosition, wct);
|
setSideStagePosition(startPosition, wct);
|
||||||
@@ -2642,11 +2646,11 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
|
|
||||||
if (mSplitTransitions.mPendingEnter.mExtraTransitType
|
if (mSplitTransitions.mPendingEnter.mExtraTransitType
|
||||||
== TRANSIT_SPLIT_SCREEN_OPEN_TO_SIDE) {
|
== TRANSIT_SPLIT_SCREEN_OPEN_TO_SIDE) {
|
||||||
|
// Open to side should only be used when split already active and foregorund.
|
||||||
if (mainChild == null && sideChild == null) {
|
if (mainChild == null && sideChild == null) {
|
||||||
Log.w(TAG, "Launched a task in split, but didn't receive any task in transition.");
|
Log.w(TAG, "Launched a task in split, but didn't receive any task in transition.");
|
||||||
mSplitTransitions.mPendingEnter.cancel((cancelWct, cancelT)
|
// This should happen when the target app is already on front, so just cancel.
|
||||||
-> prepareExitSplitScreen(STAGE_TYPE_UNDEFINED, cancelWct));
|
mSplitTransitions.mPendingEnter.cancel(null);
|
||||||
mSplitUnsupportedToast.show();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user