Remove views from selected set.

The views were originally being used in the ConversationListFragment
to delete items. They are no longer being used now, but we still
maintain extensive maps and pass the collections around.  We can stop
doing this extra work.

This does not fix any bug, but the cleanup was found while
investigating the bug below.

Bug: 7067964 Gmail: archives wrong message

Change-Id: I2b7d387fe5ab078b2006f27cc8167b354d0bb1c8
diff --git a/src/com/android/mail/ui/AbstractActivityController.java b/src/com/android/mail/ui/AbstractActivityController.java
index 1facd29..ff608e0 100644
--- a/src/com/android/mail/ui/AbstractActivityController.java
+++ b/src/com/android/mail/ui/AbstractActivityController.java
@@ -1282,13 +1282,13 @@
             final ConfirmDialogFragment c = ConfirmDialogFragment.newInstance(message);
             c.displayDialog(mActivity.getFragmentManager());
         } else {
-            delete(0, target, null, getDeferredAction(actionId, target, false));
+            delete(0, target, getDeferredAction(actionId, target, false));
         }
     }
 
     @Override
     public void delete(final int actionId, final Collection<Conversation> target,
-            final Collection<ConversationItemView> targetViews, final DestructiveAction action) {
+            final DestructiveAction action) {
         // Order of events is critical! The Conversation View Fragment must be
         // notified of the next conversation with showConversation(next) *before* the
         // conversation list
@@ -1299,7 +1299,7 @@
         final Runnable operation = new Runnable() {
             @Override
             public void run() {
-                delete(actionId, target, targetViews, action);
+                delete(actionId, target, action);
             }
         };
 
@@ -1312,7 +1312,7 @@
         final ConversationListFragment convListFragment = getConversationListFragment();
         if (convListFragment != null) {
             LogUtils.d(LOG_TAG, "AAC.requestDelete: ListFragment is handling delete.");
-            convListFragment.requestDelete(actionId, target, targetViews, action);
+            convListFragment.requestDelete(actionId, target, action);
             return;
         }
         // No visible UI element handled it on our behalf. Perform the action
@@ -1320,12 +1320,6 @@
         action.performAction();
     }
 
-    @Override
-    public void delete(int actionId, final Collection<Conversation> target,
-            final DestructiveAction action) {
-        delete(actionId, target, null, action);
-    }
-
     /**
      * Requests that the action be performed and the UI state is updated to reflect the new change.
      * @param target
@@ -2666,7 +2660,7 @@
         // dragged/ dropped conversations.
         if (convListFragment != null) {
             LogUtils.d(LOG_TAG, "AAC.requestDelete: ListFragment is handling delete.");
-            convListFragment.requestDelete(R.id.change_folder, conversations, mSelectedSet.views(),
+            convListFragment.requestDelete(R.id.change_folder, conversations,
                     new DroppedInStarredAction(conversations, mFolder, folder));
             return;
         }
@@ -3181,15 +3175,11 @@
     @Override
     public void makeDialogListener (final int action, boolean isBatch) {
         final Collection<Conversation> target;
-        final Collection<ConversationItemView> views;
         if (isBatch) {
             target = mSelectedSet.values();
-            views = mSelectedSet.views();
         } else {
             LogUtils.d(LOG_TAG, "Will act upon %s", mCurrentConversation);
             target = Conversation.listOf(mCurrentConversation);
-            // When the current conversation is deleted, we don't need to update the views.
-            views = null;
         }
         final DestructiveAction destructiveAction = getDeferredAction(action, target, isBatch);
         mDialogAction = action;
@@ -3197,7 +3187,7 @@
         mDialogListener = new AlertDialog.OnClickListener() {
             @Override
             public void onClick(DialogInterface dialog, int which) {
-                delete(action, target, views, destructiveAction);
+                delete(action, target, destructiveAction);
                 // Afterwards, let's remove references to the listener and the action.
                 setListener(null, -1);
             }