diff options
| author | Bjorn Bringert <bringert@android.com> | 2011-08-01 13:39:30 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-08-01 13:39:30 -0700 |
| commit | dbe55b722cd2eac15167f29eb45a34cf01fefd14 (patch) | |
| tree | 94a34143685c900f6fd6e3f9f5ee6a0a925aea31 /core/java/android | |
| parent | 5c31583c53ca7308f4ee74c6edc7c7ff19809cce (diff) | |
| parent | 1ea6889136cdad8fc01de0665b3a16a4dcb259fe (diff) | |
Merge "Fix exception when a focused item is detached."
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/widget/ListView.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java index 1f29b1614006..946f009ce5ad 100644 --- a/core/java/android/widget/ListView.java +++ b/core/java/android/widget/ListView.java @@ -2428,7 +2428,7 @@ public class ListView extends AbsListView { if (mItemsCanFocus && (focusResult == null) && selectedView != null && selectedView.hasFocus()) { final View focused = selectedView.findFocus(); - if (distanceToView(focused) > 0) { + if (!isViewAncestorOf(focused, this) || distanceToView(focused) > 0) { focused.clearFocus(); } } |
