summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRomain Guy <>2009-03-24 21:36:11 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-24 21:36:11 -0700
commit9ea028f1e4ebac559b360d56c9c0271ad19d6b0d (patch)
tree83d8265cc90baf7d2ce2a1493c8441343b03410a /core
parentba5aba22ab1e5522051d706474881cc763f2daa5 (diff)
downloadframeworks_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.java5
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);