Merge "Fix unexpectedly dismiss split by dragging the same app to the same side" into tm-qpr-dev
This commit is contained in:
@@ -456,8 +456,6 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
void startIntentLegacy(PendingIntent intent, Intent fillInIntent, @SplitPosition int position,
|
void startIntentLegacy(PendingIntent intent, Intent fillInIntent, @SplitPosition int position,
|
||||||
@Nullable Bundle options) {
|
@Nullable Bundle options) {
|
||||||
final boolean isEnteringSplit = !isSplitActive();
|
final boolean isEnteringSplit = !isSplitActive();
|
||||||
final WindowContainerTransaction evictWct = new WindowContainerTransaction();
|
|
||||||
prepareEvictChildTasks(position, evictWct);
|
|
||||||
|
|
||||||
LegacyTransitions.ILegacyTransition transition = new LegacyTransitions.ILegacyTransition() {
|
LegacyTransitions.ILegacyTransition transition = new LegacyTransitions.ILegacyTransition() {
|
||||||
@Override
|
@Override
|
||||||
@@ -465,7 +463,6 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
RemoteAnimationTarget[] wallpapers, RemoteAnimationTarget[] nonApps,
|
RemoteAnimationTarget[] wallpapers, RemoteAnimationTarget[] nonApps,
|
||||||
IRemoteAnimationFinishedCallback finishedCallback,
|
IRemoteAnimationFinishedCallback finishedCallback,
|
||||||
SurfaceControl.Transaction t) {
|
SurfaceControl.Transaction t) {
|
||||||
if (isEnteringSplit) {
|
|
||||||
boolean openingToSide = false;
|
boolean openingToSide = false;
|
||||||
if (apps != null) {
|
if (apps != null) {
|
||||||
for (int i = 0; i < apps.length; ++i) {
|
for (int i = 0; i < apps.length; ++i) {
|
||||||
@@ -476,12 +473,12 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!openingToSide) {
|
|
||||||
|
if (isEnteringSplit && !openingToSide) {
|
||||||
mMainExecutor.execute(() -> exitSplitScreen(
|
mMainExecutor.execute(() -> exitSplitScreen(
|
||||||
mSideStage.getChildCount() == 0 ? mMainStage : mSideStage,
|
mSideStage.getChildCount() == 0 ? mMainStage : mSideStage,
|
||||||
EXIT_REASON_UNKNOWN));
|
EXIT_REASON_UNKNOWN));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (apps != null) {
|
if (apps != null) {
|
||||||
for (int i = 0; i < apps.length; ++i) {
|
for (int i = 0; i < apps.length; ++i) {
|
||||||
@@ -500,8 +497,13 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!isEnteringSplit && openingToSide) {
|
||||||
|
final WindowContainerTransaction evictWct = new WindowContainerTransaction();
|
||||||
|
prepareEvictNonOpeningChildTasks(position, apps, evictWct);
|
||||||
mSyncQueue.queue(evictWct);
|
mSyncQueue.queue(evictWct);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
final WindowContainerTransaction wct = new WindowContainerTransaction();
|
final WindowContainerTransaction wct = new WindowContainerTransaction();
|
||||||
|
|||||||
Reference in New Issue
Block a user