diff options
author | Romain Guy <> | 2009-03-24 21:36:11 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-24 21:36:11 -0700 |
commit | 9ea028f1e4ebac559b360d56c9c0271ad19d6b0d (patch) | |
tree | 83d8265cc90baf7d2ce2a1493c8441343b03410a /core | |
parent | ba5aba22ab1e5522051d706474881cc763f2daa5 (diff) | |
download | frameworks_base-9ea028f1e4ebac559b360d56c9c0271ad19d6b0d.zip frameworks_base-9ea028f1e4ebac559b360d56c9c0271ad19d6b0d.tar.gz frameworks_base-9ea028f1e4ebac559b360d56c9c0271ad19d6b0d.tar.bz2 |
Automated import from //branches/master/...@142130,142130
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/widget/ListView.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java index 4d5032e..7e30f7b 100644 --- a/core/java/android/widget/ListView.java +++ b/core/java/android/widget/ListView.java @@ -1393,6 +1393,11 @@ public class ListView extends AbsListView { resetList(); invokeOnItemScrollListener(); return; + } else if (mItemCount != mAdapter.getCount()) { + throw new IllegalStateException("The content of the adapter has changed but " + + "ListView did not receive a notification. Make sure the content of " + + "your adapter is not modified from a background thread, but only " + + "from the UI thread."); } setSelectedPositionInt(mNextSelectedPosition); |