Fix bug 3367627 - spontaneous crash
Fix a little-traversed codepath that could cause some grief. Change-Id: I75e6931c3208a0f18b40446f23a2fdd5a0065ce8
This commit is contained in:
@@ -1095,9 +1095,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
|
||||
*/
|
||||
private boolean contentFits() {
|
||||
final int childCount = getChildCount();
|
||||
if (childCount != mItemCount) {
|
||||
return false;
|
||||
}
|
||||
if (childCount == 0) return true;
|
||||
if (childCount != mItemCount) return false;
|
||||
|
||||
return getChildAt(0).getTop() >= 0 && getChildAt(childCount - 1).getBottom() <= mBottom;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user