filter.addAccountQueryParameterToUrl(uriBuilder); break;
protected void configureUri(CursorLoader loader, long directoryId, ContactListFilter filter) { Uri uri = Contacts.CONTENT_URI; if (filter != null && filter.filterType == ContactListFilter.FILTER_TYPE_SINGLE_CONTACT) { String lookupKey = getSelectedContactLookupKey(); if (lookupKey != null) { uri = Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey); } else { uri = ContentUris.withAppendedId(Contacts.CONTENT_URI, getSelectedContactId()); } } if (directoryId == Directory.DEFAULT && isSectionHeaderDisplayEnabled()) { uri = ContactListAdapter.buildSectionIndexerUri(uri); } // The "All accounts" filter is the same as the entire contents of Directory.DEFAULT if (filter != null && filter.filterType != ContactListFilter.FILTER_TYPE_CUSTOM && filter.filterType != ContactListFilter.FILTER_TYPE_SINGLE_CONTACT) { final Uri.Builder builder = uri.buildUpon(); builder.appendQueryParameter( ContactsContract.DIRECTORY_PARAM_KEY, String.valueOf(Directory.DEFAULT)); if (filter.filterType == ContactListFilter.FILTER_TYPE_ACCOUNT) { filter.addAccountQueryParameterToUrl(builder); } uri = builder.build(); } loader.setUri(uri); }