Prevent the focus state from getting cleared
Before this CL, if the ViewRootImpl receives an input event after adding the window to display before performing its first traversal, mAttachInfo.mHasWindowFocus would be set to true in handleWindowFocusChanged called by deliverInputEvent. And then, when ViewRootImpl is performing its first traversal, mAttachInfo.mHasWindowFocus would be cleared, which would make the ViewRootImpl drop all the key events. This CL removes the redundant logic about clearing mAttachInfo.mHasWindowFocus during the first traversal. Bug: 119700105 Test: atest WindowFocusTests Change-Id: Ic35752f8e0d7cd7899f238e184bfbca3c8f7ad08
Loading
Please register or sign in to comment