Merge change 27229 into eclair

* changes:
  Fix NPE issue in empty MessageList (fixes #2147432)
This commit is contained in:
Android (Google) Code Review 2009-09-27 14:20:48 -04:00
commit c6aaeb9942

View File

@ -359,7 +359,10 @@ public class MessageList extends ListActivity implements OnItemClickListener, On
mSavedItemPosition = getListView().getFirstVisiblePosition(); mSavedItemPosition = getListView().getFirstVisiblePosition();
if (mSavedItemPosition >= 0) { if (mSavedItemPosition >= 0) {
mSavedItemTop = 0; mSavedItemTop = 0;
mSavedItemTop = getListView().getChildAt(0).getTop(); View topChild = getListView().getChildAt(0);
if (topChild != null) {
mSavedItemTop = topChild.getTop();
}
} }
} }
} }