Do not treat the dummy animation as an animation
The dummy animation is a place holder. When the task stack is being removed treating it as a true animation forced us through a path where we deferred the detachment and made a call to tmpRemoveWindows. Also replaced call to tmpRemoveWindows with a real remove windows call. The tmpRemoveWindows call does not clean up the Session and this leaves a surface on the screen. Fixes bug 15591610. Change-Id: I05f7bc276bfed2366bbcd8443c92a4bbbc8a4491
This commit is contained in:
@@ -154,7 +154,8 @@ public class TaskStack {
|
|||||||
for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) {
|
for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) {
|
||||||
final ArrayList<WindowState> windows = activities.get(activityNdx).allAppWindows;
|
final ArrayList<WindowState> windows = activities.get(activityNdx).allAppWindows;
|
||||||
for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) {
|
for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) {
|
||||||
if (windows.get(winNdx).mWinAnimator.isAnimating()) {
|
final WindowStateAnimator winAnimator = windows.get(winNdx).mWinAnimator;
|
||||||
|
if (winAnimator.isAnimating() && !winAnimator.isDummyAnimation()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -236,9 +237,22 @@ public class TaskStack {
|
|||||||
|
|
||||||
void detachDisplay() {
|
void detachDisplay() {
|
||||||
EventLog.writeEvent(EventLogTags.WM_STACK_REMOVED, mStackId);
|
EventLog.writeEvent(EventLogTags.WM_STACK_REMOVED, mStackId);
|
||||||
|
|
||||||
|
boolean doAnotherLayoutPass = false;
|
||||||
for (int taskNdx = mTasks.size() - 1; taskNdx >= 0; --taskNdx) {
|
for (int taskNdx = mTasks.size() - 1; taskNdx >= 0; --taskNdx) {
|
||||||
mService.tmpRemoveTaskWindowsLocked(mTasks.get(taskNdx));
|
final AppTokenList appWindowTokens = mTasks.get(taskNdx).mAppTokens;
|
||||||
|
for (int appNdx = appWindowTokens.size() - 1; appNdx >= 0; --appNdx) {
|
||||||
|
final WindowList appWindows = appWindowTokens.get(appNdx).allAppWindows;
|
||||||
|
for (int winNdx = appWindows.size() - 1; winNdx >= 0; --winNdx) {
|
||||||
|
mService.removeWindowInnerLocked(null, appWindows.get(winNdx));
|
||||||
|
doAnotherLayoutPass = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if (doAnotherLayoutPass) {
|
||||||
|
mService.requestTraversalLocked();
|
||||||
|
}
|
||||||
|
|
||||||
mAnimationBackgroundSurface.destroySurface();
|
mAnimationBackgroundSurface.destroySurface();
|
||||||
mAnimationBackgroundSurface = null;
|
mAnimationBackgroundSurface = null;
|
||||||
mDimLayer.destroySurface();
|
mDimLayer.destroySurface();
|
||||||
|
|||||||
@@ -2488,7 +2488,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
Binder.restoreCallingIdentity(origId);
|
Binder.restoreCallingIdentity(origId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeWindowInnerLocked(Session session, WindowState win) {
|
void removeWindowInnerLocked(Session session, WindowState win) {
|
||||||
if (win.mRemoved) {
|
if (win.mRemoved) {
|
||||||
// Nothing to do.
|
// Nothing to do.
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user