Show non deleted contact groups with at least one contact

This commit is contained in:
M66B 2019-09-01 10:26:37 +02:00
parent eaa327315a
commit d03969d23f
1 changed files with 6 additions and 3 deletions

View File

@ -3377,12 +3377,15 @@ public class FragmentCompose extends FragmentBase {
final Spinner spTarget = dview.findViewById(R.id.spTarget);
Cursor groups = getContext().getContentResolver().query(
ContactsContract.Groups.CONTENT_URI,
ContactsContract.Groups.CONTENT_SUMMARY_URI,
new String[]{
ContactsContract.Groups._ID,
ContactsContract.Groups.TITLE
ContactsContract.Groups.TITLE,
ContactsContract.Groups.SUMMARY_COUNT
},
ContactsContract.Groups.GROUP_VISIBLE + " = 1", null,
ContactsContract.Groups.DELETED + " = 0" +
" AND " + ContactsContract.Groups.SUMMARY_COUNT + " > 0",
null,
ContactsContract.Groups.TITLE
);