From b71193bffc1d2ec60efd987300e2e85e678aa6f0 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Tue, 24 Nov 2009 18:34:42 -0500 Subject: 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. --- core/java/android/view/ViewRoot.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java index bef3e580a0c5..4e12250777d6 100644 --- a/core/java/android/view/ViewRoot.java +++ b/core/java/android/view/ViewRoot.java @@ -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; } -- cgit v1.2.3-59-g8ed1b