Attempt to fix ANR's
There seems to be some cases where we change the app visibility but somehow we miss setting the client visiblity. This usually shouldn't happen: Client visibility gets set to visible already in AppWindowContainerController.setVisibility if the token is hidden or the activity is stopped. However, there seems to be some edge case where we don't update the client visibility to true. We started observing monkey ANR's with I8deb6a97ca1c3d8f4a70a6e045f45a6bc16604bb, but the idea of that CL was to only change the behavior when becoming invisible, i.e. defer client visibility until animation is done. This CL reverts the opposite path back to the original behavior when becoming visible, most probably fixing the client visibility / AWT.mHidden inconsistency. I'm not entirely sure why missing setting client visibility has caused ANR's, but seems likely given the ANR message: "Input dispatching timed out (Waiting because no window has focus but there is a focused application that may eventually add a window when it finishes starting up.)" And the client visibility / AWT.mHidden inconsistency is observed in the window manager dump during every single ANR. Test: go/wm-smoke Test: Hope for the best Change-Id: Ie0c51fa5f3347ba1a2a4652188265d8fb69e6e11 Fixes: 72160186
Loading
Please register or sign in to comment