am c4eb7f20: am 173cf896: am d2158666: am aec3ff1f: Merge "Only allow for targetted menu options if the cursor is ready" into ub-gmail-ur14-dev
* commit 'c4eb7f2004fae52b7035aa52eec7ad7a259c4879':
Only allow for targetted menu options if the cursor is ready
diff --git a/src/com/android/mail/ui/AbstractActivityController.java b/src/com/android/mail/ui/AbstractActivityController.java
index 9cf7e56..209c613 100644
--- a/src/com/android/mail/ui/AbstractActivityController.java
+++ b/src/com/android/mail/ui/AbstractActivityController.java
@@ -1531,9 +1531,11 @@
final UndoCallback undoCallback = getUndoCallbackForDestructiveActionsWithAutoAdvance(
id, mCurrentConversation);
- // Menu items that are targetted, only perform if there actually is a target.
+ // Menu items that are targetted, only perform if there actually is a target and the
+ // cursor is showing the target in the list.
boolean handled = false;
- if (target.size() > 0) {
+ if (target.size() > 0 &&
+ ConversationCursor.isCursorReadyToShow(getConversationListCursor())) {
handled = true;
if (id == R.id.archive) {
final boolean showDialog = (settings != null && settings.confirmArchive);