Hide select contacts option for empty group am: e6342c6ccc
am: 43c3131475

Change-Id: I372acbaf361bb1dd6744bf73f26e4fc639e2b7a5
diff --git a/src/com/android/contacts/list/GroupMemberPickerFragment.java b/src/com/android/contacts/list/GroupMemberPickerFragment.java
index c6f7493..a7e37d7 100644
--- a/src/com/android/contacts/list/GroupMemberPickerFragment.java
+++ b/src/com/android/contacts/list/GroupMemberPickerFragment.java
@@ -278,12 +278,13 @@
     @Override
     public void onPrepareOptionsMenu(Menu menu) {
         final ContactSelectionActivity activity = getContactSelectionActivity();
+        final boolean hasContacts = mContactIds == null ? false : mContactIds.size() > 0;
         final boolean isSearchMode = activity == null ? false : activity.isSearchMode();
         final boolean isSelectionMode = activity == null ? false : activity.isSelectionMode();
 
         // Added in ContactSelectionActivity but we must account for selection mode
         setVisible(menu, R.id.menu_search, !isSearchMode && !isSelectionMode);
-        setVisible(menu, R.id.menu_select, !isSearchMode && !isSelectionMode);
+        setVisible(menu, R.id.menu_select, hasContacts && !isSearchMode && !isSelectionMode);
     }
 
     private ContactSelectionActivity getContactSelectionActivity() {