diff options
| author | 2011-01-13 22:21:15 -0800 | |
|---|---|---|
| committer | 2011-01-13 22:21:15 -0800 | |
| commit | 2421cd42292b3593716407847d2957f71c92c1fe (patch) | |
| tree | 9563de571051e450b1153c59e90b9166435988d6 | |
| parent | 84543705138ed67494b9ecd64fadf4ab0bf46a0e (diff) | |
| parent | 79303750df0e4d18f51f64c7ef3ca21fca893bbb (diff) | |
Merge "Fix bug 3352112 - crash in AbsListView.smoothScrollBy" into honeycomb
| -rw-r--r-- | core/java/android/widget/AbsListView.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index 2e38743b95b7..7631df49e6bb 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -4106,8 +4106,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te final int topLimit = getPaddingTop(); final int bottomLimit = getHeight() - getPaddingBottom(); - if (distance == 0 || - firstPos == INVALID_POSITION || + if (distance == 0 || mItemCount == 0 || childCount == 0 || (firstPos == 0 && getChildAt(0).getTop() == topLimit && distance < 0) || (lastPos == mItemCount - 1 && getChildAt(childCount - 1).getBottom() == bottomLimit && distance > 0)) { |