From 8af852315494e13591fb8a01a4e29e522845b3be Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Thu, 3 Sep 2009 22:56:06 -0700 Subject: [PATCH] Fix crash related to long press of footer view in MessageList (2099784) Change-Id: I4be240096022ee69244532bbf876a47a520188bc --- src/com/android/email/activity/MessageList.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/android/email/activity/MessageList.java b/src/com/android/email/activity/MessageList.java index df0bd1c4c..067659aa6 100644 --- a/src/com/android/email/activity/MessageList.java +++ b/src/com/android/email/activity/MessageList.java @@ -383,12 +383,12 @@ public class MessageList extends ListActivity implements OnItemClickListener, On @Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo 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; + // There is no context menu for the list footer + if (info.targetView == mListFooterView) { + return; + } MessageListItem itemView = (MessageListItem) info.targetView; Cursor c = (Cursor) mListView.getItemAtPosition(info.position);