diff options
Diffstat (limited to 'core/java/android/widget/AdapterView.java')
-rw-r--r-- | core/java/android/widget/AdapterView.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/widget/AdapterView.java b/core/java/android/widget/AdapterView.java index 5fa6e60..5e2394c 100644 --- a/core/java/android/widget/AdapterView.java +++ b/core/java/android/widget/AdapterView.java @@ -861,7 +861,8 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup { public void run() { mPendingSelectionNotifier = null; - if (mDataChanged) { + if (mDataChanged && getViewRootImpl() != null + && getViewRootImpl().isLayoutRequested()) { // Data has changed between when this SelectionNotifier was // posted and now. Postpone the notification until the next // layout is complete and we run checkSelectionChanged(). |