Protect against surfaceController and hasSurface getting out of sync.
WindowStateAnimator.mSurfaceController is set to null whenever a surface is destroyed and WindowState.mHasSurface is set to false shortly after that. However, it is possible for them to get out of sync in a couple of places due to exceptions or duplicate destroy. Consolidated the call to set WindowState.mHasSurface inside a finally block in WindowStateAnimator.destroySurface Also, cleaned up the code a little to that it is more obvious what is going on. Bug: 27235356 Change-Id: I7e6d0c1fb015531c393ac86dcaebebd134fad612
Loading
Please register or sign in to comment