Merge "Import translations. DO NOT MERGE" into ub-contactsdialer-g-dev
diff --git a/src/com/android/contacts/common/list/FavoritesAndContactsLoader.java b/src/com/android/contacts/common/list/FavoritesAndContactsLoader.java
index d1ae911..11d19c0 100644
--- a/src/com/android/contacts/common/list/FavoritesAndContactsLoader.java
+++ b/src/com/android/contacts/common/list/FavoritesAndContactsLoader.java
@@ -115,8 +115,15 @@
}
private Cursor loadFavoritesContacts() {
+ final StringBuilder selection = new StringBuilder();
+ selection.append(Contacts.STARRED + "=?");
+ final ContactListFilter filter =
+ ContactListFilterController.getInstance(getContext()).getFilter();
+ if (filter != null && filter.filterType == ContactListFilter.FILTER_TYPE_CUSTOM) {
+ selection.append(" AND ").append(Contacts.IN_VISIBLE_GROUP + "=1");
+ }
return getContext().getContentResolver().query(
- Contacts.CONTENT_URI, mProjection, Contacts.STARRED + "=?", new String[]{"1"},
+ Contacts.CONTENT_URI, mProjection, selection.toString(), new String[]{"1"},
getSortOrder());
}
}