Merge change 23939 into eclair

* changes:
  Fix crash related to long press of footer view in MessageList (2099784)
This commit is contained in:
Android (Google) Code Review 2009-09-04 16:15:48 -07:00
commit 5768ef614b

View File

@ -383,12 +383,12 @@ public class MessageList extends ListActivity implements OnItemClickListener, On
@Override @Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, v, menuInfo); super.onCreateContextMenu(menu, v, menuInfo);
// There is no context menu for the list footer
if (v == mListFooterView) {
return;
}
AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo; AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
// There is no context menu for the list footer
if (info.targetView == mListFooterView) {
return;
}
MessageListItem itemView = (MessageListItem) info.targetView; MessageListItem itemView = (MessageListItem) info.targetView;
Cursor c = (Cursor) mListView.getItemAtPosition(info.position); Cursor c = (Cursor) mListView.getItemAtPosition(info.position);