Fix NPE in deferToPendingTransaction.
Just because a child window has a surface doesn't necessarily mean the parent window will have a surface. destroySurfaceLocked() only takes care of setting mAttachedHidden so the child surface will be invisible, but it may not be destroyed until a later point. Bug: 30813094 Change-Id: Idb1b03fd61a7537ebfe33bafc93f278c0e6751f4
This commit is contained in:
@@ -2066,7 +2066,8 @@ class WindowStateAnimator {
|
|||||||
if (time > mDeferTransactionTime + PENDING_TRANSACTION_FINISH_WAIT_TIME) {
|
if (time > mDeferTransactionTime + PENDING_TRANSACTION_FINISH_WAIT_TIME) {
|
||||||
mDeferTransactionTime = -1;
|
mDeferTransactionTime = -1;
|
||||||
mDeferTransactionUntilFrame = -1;
|
mDeferTransactionUntilFrame = -1;
|
||||||
} else {
|
} else if (mWin.mAttachedWindow != null &&
|
||||||
|
mWin.mAttachedWindow.mWinAnimator.hasSurface()) {
|
||||||
mSurfaceController.deferTransactionUntil(
|
mSurfaceController.deferTransactionUntil(
|
||||||
mWin.mAttachedWindow.mWinAnimator.mSurfaceController.getHandle(),
|
mWin.mAttachedWindow.mWinAnimator.mSurfaceController.getHandle(),
|
||||||
mDeferTransactionUntilFrame);
|
mDeferTransactionUntilFrame);
|
||||||
|
|||||||
Reference in New Issue
Block a user