summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/widget/AbsListView.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 5f60735..c7d0569 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -3351,6 +3351,14 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
mPositionScroller.stop();
}
+ if (!mIsAttached) {
+ // Something isn't right.
+ // Since we rely on being attached to get data set change notifications,
+ // don't risk doing anything where we might try to resync and find things
+ // in a bogus state.
+ return false;
+ }
+
if (mFastScroller != null) {
boolean intercepted = mFastScroller.onTouchEvent(ev);
if (intercepted) {
@@ -3846,6 +3854,14 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
mPositionScroller.stop();
}
+ if (!mIsAttached) {
+ // Something isn't right.
+ // Since we rely on being attached to get data set change notifications,
+ // don't risk doing anything where we might try to resync and find things
+ // in a bogus state.
+ return false;
+ }
+
if (mFastScroller != null) {
boolean intercepted = mFastScroller.onInterceptTouchEvent(ev);
if (intercepted) {