Don't allow actions on empty sets

* Not sure how this could have happened, except possibly for some
  race condition
* Let's make sure it's impossible

Bug: 5032454
Change-Id: Ibd4de22dc5298fbaaf224cf4286f63bdc50aa7b9
This commit is contained in:
Marc Blank 2011-07-17 17:24:51 -07:00
parent 3793ec2463
commit 1d0609d386

View File

@ -1375,6 +1375,7 @@ public class MessageListFragment extends ListFragment
@Override
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
Set<Long> selectedConversations = mListAdapter.getSelectedSet();
if (selectedConversations.isEmpty()) return true;
switch (item.getItemId()) {
case R.id.mark_read:
// Note - marking as read does not trigger auto-advance.