Merge "Revert "Clear transitions for app windows display change."" into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ea470ecb6f
@@ -1331,9 +1331,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
|
|||||||
if (prevDc == null || prevDc == mDisplayContent) {
|
if (prevDc == null || prevDc == mDisplayContent) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (prevDc.mChangingApps.contains(this)) {
|
||||||
prevDc.mOpeningApps.remove(this);
|
|
||||||
if (prevDc.mChangingApps.remove(this)) {
|
|
||||||
// This gets called *after* the AppWindowToken has been reparented to the new display.
|
// This gets called *after* the AppWindowToken has been reparented to the new display.
|
||||||
// That reparenting resulted in this window changing modes (eg. FREEFORM -> FULLSCREEN),
|
// That reparenting resulted in this window changing modes (eg. FREEFORM -> FULLSCREEN),
|
||||||
// so this token is now "frozen" while waiting for the animation to start on prevDc
|
// so this token is now "frozen" while waiting for the animation to start on prevDc
|
||||||
@@ -1342,8 +1340,6 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
|
|||||||
// so we need to cancel the change transition here.
|
// so we need to cancel the change transition here.
|
||||||
clearChangeLeash(getPendingTransaction(), true /* cancel */);
|
clearChangeLeash(getPendingTransaction(), true /* cancel */);
|
||||||
}
|
}
|
||||||
prevDc.mClosingApps.remove(this);
|
|
||||||
|
|
||||||
if (prevDc.mFocusedApp == this) {
|
if (prevDc.mFocusedApp == this) {
|
||||||
prevDc.setFocusedApp(null);
|
prevDc.setFocusedApp(null);
|
||||||
final TaskStack stack = dc.getTopStack();
|
final TaskStack stack = dc.getTopStack();
|
||||||
@@ -3229,6 +3225,16 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
|
|||||||
true /* topToBottom */);
|
true /* topToBottom */);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void removeFromPendingTransition() {
|
||||||
|
if (isWaitingForTransitionStart() && mDisplayContent != null) {
|
||||||
|
mDisplayContent.mOpeningApps.remove(this);
|
||||||
|
if (mDisplayContent.mChangingApps.remove(this)) {
|
||||||
|
clearChangeLeash(getPendingTransaction(), true /* cancel */);
|
||||||
|
}
|
||||||
|
mDisplayContent.mClosingApps.remove(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void updateColorTransform() {
|
private void updateColorTransform() {
|
||||||
if (mSurfaceControl != null && mLastAppSaturationInfo != null) {
|
if (mSurfaceControl != null && mLastAppSaturationInfo != null) {
|
||||||
getPendingTransaction().setColorTransform(mSurfaceControl,
|
getPendingTransaction().setColorTransform(mSurfaceControl,
|
||||||
|
|||||||
@@ -2377,6 +2377,9 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
|
|||||||
+ " to its current displayId=" + mDisplayId);
|
+ " to its current displayId=" + mDisplayId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clean up all pending transitions when stack reparent to another display.
|
||||||
|
stack.forAllAppWindows(AppWindowToken::removeFromPendingTransition);
|
||||||
|
|
||||||
prevDc.mTaskStackContainers.removeChild(stack);
|
prevDc.mTaskStackContainers.removeChild(stack);
|
||||||
mTaskStackContainers.addStackToDisplay(stack, onTop);
|
mTaskStackContainers.addStackToDisplay(stack, onTop);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user