Fix 2283089 - ERD47B: Force Close of Launcher2 process when hitting Search button to invoke QSB
In this case, as opposed to what was happening in 1977685, the focused view wasn't the one that was directly removed, it was a child of the removed view.
This commit is contained in:
@@ -1407,8 +1407,8 @@ public final class ViewRoot extends Handler implements ViewParent,
|
||||
|
||||
// When in touch mode, focus points to the previously focused view,
|
||||
// which may have been removed from the view hierarchy. The following
|
||||
// line checks whether the view is still in the hierarchy
|
||||
if (focus == null || focus.getParent() == null) {
|
||||
// line checks whether the view is still in our hierarchy.
|
||||
if (focus == null || focus.mAttachInfo != mAttachInfo) {
|
||||
mRealFocusedView = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user