Merge "Fix a bug where surface crashes when the enter animation starts while the exit animation has not yet finished" into ics-mr1
This commit is contained in:
@@ -2578,11 +2578,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
(win.mAppToken == null || !win.mAppToken.clientHidden)) {
|
||||
displayed = !win.isVisibleLw();
|
||||
if (win.mExiting) {
|
||||
win.mExiting = false;
|
||||
if (win.mAnimation != null) {
|
||||
win.mAnimation.cancel();
|
||||
win.mAnimation = null;
|
||||
}
|
||||
win.cancelExitAnimationForNextAnimationLocked();
|
||||
}
|
||||
if (win.mDestroying) {
|
||||
win.mDestroying = false;
|
||||
|
||||
@@ -596,6 +596,18 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Fix and call finishExit() instead of cancelExitAnimationForNextAnimationLocked()
|
||||
// for avoiding the code duplication.
|
||||
void cancelExitAnimationForNextAnimationLocked() {
|
||||
if (!mExiting) return;
|
||||
if (mAnimation != null) {
|
||||
mAnimation.cancel();
|
||||
mAnimation = null;
|
||||
destroySurfaceLocked();
|
||||
}
|
||||
mExiting = false;
|
||||
}
|
||||
|
||||
Surface createSurfaceLocked() {
|
||||
if (mSurface == null) {
|
||||
mReportDestroySurface = false;
|
||||
@@ -1742,4 +1754,4 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
||||
}
|
||||
return mStringNameCache;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user