Home
last modified time | relevance | path

Searched refs:ContactsPreferences (Results 1 – 25 of 32) sorted by relevance

12

/packages/apps/ContactsCommon/tests/src/com/android/contacts/common/preference/
DContactsPreferencesTest.java43 private ContactsPreferences mContactsPreferences;
58 Mockito.when(mSharedPreferences.contains(ContactsPreferences.SORT_ORDER_KEY)) in setUp()
60 Mockito.when(mSharedPreferences.contains(ContactsPreferences.DISPLAY_ORDER_KEY)) in setUp()
63 mContactsPreferences = new ContactsPreferences(mContext); in setUp()
71 Assert.assertEquals(ContactsPreferences.SORT_ORDER_PRIMARY, in testGetSortOrderDefault()
79 Mockito.when(mSharedPreferences.getInt(Mockito.eq(ContactsPreferences.SORT_ORDER_KEY), in testGetSortOrder()
80 Mockito.anyInt())).thenReturn(ContactsPreferences.SORT_ORDER_PRIMARY); in testGetSortOrder()
81 Assert.assertEquals(ContactsPreferences.SORT_ORDER_PRIMARY, in testGetSortOrder()
90 Assert.assertEquals(ContactsPreferences.DISPLAY_ORDER_PRIMARY, in testGetDisplayOrderDefault()
98 Mockito.when(mSharedPreferences.getInt(Mockito.eq(ContactsPreferences.DISPLAY_ORDER_KEY), in testGetDisplayOrder()
[all …]
/packages/apps/ContactsCommon/src/com/android/contacts/common/preference/
DSortOrderPreference.java25 import com.android.contacts.common.preference.ContactsPreferences;
32 private ContactsPreferences mPreferences;
47 mPreferences = new ContactsPreferences(mContext); in prepare()
53 String.valueOf(ContactsPreferences.SORT_ORDER_PRIMARY), in prepare()
54 String.valueOf(ContactsPreferences.SORT_ORDER_ALTERNATIVE), in prepare()
67 case ContactsPreferences.SORT_ORDER_PRIMARY: in getSummary()
69 case ContactsPreferences.SORT_ORDER_ALTERNATIVE: in getSummary()
DDisplayOrderPreference.java26 import com.android.contacts.common.preference.ContactsPreferences;
33 private ContactsPreferences mPreferences;
48 mPreferences = new ContactsPreferences(mContext); in prepare()
54 String.valueOf(ContactsPreferences.DISPLAY_ORDER_PRIMARY), in prepare()
55 String.valueOf(ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE), in prepare()
68 case ContactsPreferences.DISPLAY_ORDER_PRIMARY: in getSummary()
70 case ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE: in getSummary()
DDefaultAccountPreference.java35 private ContactsPreferences mPreferences;
49 mPreferences = new ContactsPreferences(getContext()); in prepare()
/packages/apps/Dialer/tests/src/com/android/dialer/list/
DPhoneFavoritesTileAdapterTest.java14 import com.android.contacts.common.preference.ContactsPreferences;
177 .putInt(ContactsPreferences.SORT_ORDER_KEY, in testArrangeContactsByPinnedPosition_All_Pinned_AllConflicts_SortNameAlternative()
178 ContactsPreferences.SORT_ORDER_ALTERNATIVE) in testArrangeContactsByPinnedPosition_All_Pinned_AllConflicts_SortNameAlternative()
208 setNameDisplayOrder(getContext(), ContactsPreferences.DISPLAY_ORDER_PRIMARY); in testSetContactCursor_DisplayNameOrder_Primary()
212 Assert.assertEquals(ContactsPreferences.DISPLAY_ORDER_PRIMARY, in testSetContactCursor_DisplayNameOrder_Primary()
217 setNameDisplayOrder(getContext(), ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE); in testSetContactCursor_DisplayNameOrder_Alternative()
221 Assert.assertEquals(ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE, in testSetContactCursor_DisplayNameOrder_Alternative()
226 setNameDisplayOrder(getContext(), ContactsPreferences.DISPLAY_ORDER_PRIMARY); in testSetContactCursor_DisplayNameOrder_Changed()
230 Assert.assertEquals(ContactsPreferences.DISPLAY_ORDER_PRIMARY, in testSetContactCursor_DisplayNameOrder_Changed()
233 setNameDisplayOrder(getContext(), ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE); in testSetContactCursor_DisplayNameOrder_Changed()
[all …]
/packages/apps/Dialer/InCallUI/src/com/android/incallui/
DContactsPreferencesFactory.java23 import com.android.contacts.common.preference.ContactsPreferences;
32 private static ContactsPreferences sTestInstance;
41 public static ContactsPreferences newContactsPreferences(Context context) { in newContactsPreferences()
46 return new ContactsPreferences(context); in newContactsPreferences()
57 static void setTestInstance(ContactsPreferences testInstance) { in setTestInstance()
DConferenceParticipantListAdapter.java38 import com.android.contacts.common.preference.ContactsPreferences;
210 @Nullable private final ContactsPreferences mContactsPreferences;
254 mContactsPreferences.refreshValue(ContactsPreferences.DISPLAY_ORDER_KEY); in updateParticipants()
255 mContactsPreferences.refreshValue(ContactsPreferences.SORT_ORDER_KEY); in updateParticipants()
/packages/apps/ContactsCommon/tests/src/com/android/contacts/common/util/
DContactDisplayUtilTests.java25 import com.android.contacts.common.preference.ContactsPreferences;
40 @Mock private ContactsPreferences mContactsPreferences;
132 .thenReturn(ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE); in testGetPreferredDisplayName_EmptyAlternative()
145 .thenReturn(ContactsPreferences.DISPLAY_ORDER_PRIMARY); in testGetPreferredDisplayName_Primary()
152 .thenReturn(ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE); in testGetPreferredDisplayName_Alternative()
178 .thenReturn(ContactsPreferences.SORT_ORDER_ALTERNATIVE); in testGetPreferredSortName_EmptyAlternative()
191 .thenReturn(ContactsPreferences.SORT_ORDER_PRIMARY); in testGetPreferredSortName_Primary()
198 .thenReturn(ContactsPreferences.SORT_ORDER_ALTERNATIVE); in testGetPreferredSortName_Alternative()
/packages/apps/ContactsCommon/src/com/android/contacts/common/util/
DContactDisplayUtils.java35 import com.android.contacts.common.preference.ContactsPreferences;
254 @Nullable ContactsPreferences contactsPreferences) { in getPreferredDisplayName()
258 if (contactsPreferences.getDisplayOrder() == ContactsPreferences.DISPLAY_ORDER_PRIMARY) { in getPreferredDisplayName()
262 if (contactsPreferences.getDisplayOrder() == ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE in getPreferredDisplayName()
281 @Nullable ContactsPreferences contactsPreferences) { in getPreferredSortName()
286 if (contactsPreferences.getSortOrder() == ContactsPreferences.SORT_ORDER_PRIMARY) { in getPreferredSortName()
290 if (contactsPreferences.getSortOrder() == ContactsPreferences.SORT_ORDER_ALTERNATIVE && in getPreferredSortName()
/packages/apps/ContactsCommon/tests/src/com/android/contacts/common/list/
DContactListItemViewTest.java29 import com.android.contacts.common.preference.ContactsPreferences;
60 view.showDisplayName(cursor, 0, ContactsPreferences.DISPLAY_ORDER_PRIMARY); in testShowDisplayName_Simple()
70 view.showDisplayName(cursor, 0, ContactsPreferences.DISPLAY_ORDER_PRIMARY); in testShowDisplayName_Unknown()
80 view.showDisplayName(cursor, 0, ContactsPreferences.DISPLAY_ORDER_PRIMARY); in testShowDisplayName_WithPrefix()
95 view.showDisplayName(cursor, 0, ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE); in testShowDisplayName_WithPrefixReversed()
/packages/apps/Contacts/src/com/android/contacts/
DGroupMemberLoader.java27 import com.android.contacts.common.preference.ContactsPreferences;
97 ContactsPreferences prefs = new ContactsPreferences(context); in GroupMemberLoader()
98 if (prefs.getSortOrder() == ContactsPreferences.SORT_ORDER_PRIMARY) { in GroupMemberLoader()
/packages/apps/Dialer/InCallUI/tests/src/com/android/incallui/
DContactsPreferencesFactoryTest.java23 import com.android.contacts.common.preference.ContactsPreferences;
45 ContactsPreferences testInstance = Mockito.mock(ContactsPreferences.class); in testNewContactsPreferences_TestInstance()
DStatusBarNotifierTest.java22 import com.android.contacts.common.preference.ContactsPreferences;
38 @Mock private ContactsPreferences mContactsPreferences;
48 .thenReturn(ContactsPreferences.DISPLAY_ORDER_PRIMARY); in setUp()
DCallCardPresenterTest.java22 import com.android.contacts.common.preference.ContactsPreferences;
37 @Mock private ContactsPreferences mContactsPreferences;
47 .thenReturn(ContactsPreferences.DISPLAY_ORDER_PRIMARY); in setUp()
/packages/apps/ContactsCommon/src/com/android/contacts/common/list/
DDefaultContactListAdapter.java36 import com.android.contacts.common.preference.ContactsPreferences;
116 if (getSortOrder() == ContactsPreferences.SORT_ORDER_PRIMARY) { in configureLoader()
258 return prefs.getBoolean(ContactsPreferences.PREF_DISPLAY_ONLY_PHONES, in isCustomFilterForPhoneNumbersOnly()
259 ContactsPreferences.PREF_DISPLAY_ONLY_PHONES_DEFAULT); in isCustomFilterForPhoneNumbersOnly()
DContactEntry.java24 import com.android.contacts.common.preference.ContactsPreferences;
63 || nameDisplayOrder == ContactsPreferences.DISPLAY_ORDER_PRIMARY in getPreferredDisplayName()
DContactEntryListFragment.java51 import com.android.contacts.common.preference.ContactsPreferences;
132 private ContactsPreferences mContactsPrefs;
270 mContactsPrefs = new ContactsPreferences(mContext); in onCreate()
922 private ContactsPreferences.ChangeListener mPreferencesChangeListener =
923 new ContactsPreferences.ChangeListener() {
DContactListAdapter.java32 import com.android.contacts.common.preference.ContactsPreferences;
383 if (sortOrder == ContactsPreferences.DISPLAY_ORDER_PRIMARY) { in getProjection()
389 if (sortOrder == ContactsPreferences.DISPLAY_ORDER_PRIMARY) { in getProjection()
/packages/apps/Dialer/src/com/android/dialer/list/
DPhoneFavoritesTileAdapter.java47 import com.android.contacts.common.preference.ContactsPreferences;
73 private ContactsPreferences mContactsPreferences;
134 if (mContactsPreferences.getSortOrder() == ContactsPreferences.SORT_ORDER_PRIMARY
153 mContactsPreferences = new ContactsPreferences(mContext); in PhoneFavoritesTileAdapter()
204 mContactsPreferences.refreshValue(ContactsPreferences.DISPLAY_ORDER_KEY); in refreshContactsPreferences()
205 mContactsPreferences.refreshValue(ContactsPreferences.SORT_ORDER_KEY); in refreshContactsPreferences()
/packages/apps/Contacts/src/com/android/contacts/list/
DPostalAddressListAdapter.java33 import com.android.contacts.common.preference.ContactsPreferences;
87 if (getContactNameDisplayOrder() == ContactsPreferences.DISPLAY_ORDER_PRIMARY) { in configureLoader()
93 if (getSortOrder() == ContactsPreferences.SORT_ORDER_PRIMARY) { in configureLoader()
DEmailAddressListAdapter.java34 import com.android.contacts.common.preference.ContactsPreferences;
97 if (getContactNameDisplayOrder() == ContactsPreferences.DISPLAY_ORDER_PRIMARY) { in configureLoader()
103 if (getSortOrder() == ContactsPreferences.SORT_ORDER_PRIMARY) { in configureLoader()
/packages/apps/Contacts/src/com/android/contacts/detail/
DContactDisplayUtils.java26 import com.android.contacts.common.preference.ContactsPreferences;
64 ContactsPreferences prefs = new ContactsPreferences(context); in getDisplayName()
66 if (prefs.getDisplayOrder() == ContactsPreferences.DISPLAY_ORDER_PRIMARY) { in getDisplayName()
/packages/apps/Dialer/src/com/android/dialer/
DPhoneCallDetails.java20 import com.android.contacts.common.preference.ContactsPreferences;
151 if (nameDisplayOrder == ContactsPreferences.DISPLAY_ORDER_PRIMARY in getPreferredName()
/packages/apps/Dialer/tests/src/com/android/dialer/calllog/
DCallLogAdapterTest.java37 import com.android.contacts.common.preference.ContactsPreferences;
190 setNameDisplayOrder(getContext(), ContactsPreferences.DISPLAY_ORDER_PRIMARY); in testBindView_FirstNameFirstOrder()
204 setNameDisplayOrder(getContext(), ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE); in testBindView_LastNameFirstOrder()
220 setNameDisplayOrder(context, ContactsPreferences.DISPLAY_ORDER_PRIMARY); in testBindView_NameOrderCorrectOnChange()
227 setNameDisplayOrder(context, ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE); in testBindView_NameOrderCorrectOnChange()
237 ContactsPreferences.DISPLAY_ORDER_KEY, displayOrder).commit(); in setNameDisplayOrder()
/packages/apps/Dialer/src/com/android/dialer/calllog/
DCallLogAdapter.java48 import com.android.contacts.common.preference.ContactsPreferences;
143 private ContactsPreferences mContactsPreferences;
297 mContactsPreferences = new ContactsPreferences(mContext); in CallLogAdapter()
362 mContactsPreferences.refreshValue(ContactsPreferences.DISPLAY_ORDER_KEY); in onResume()
611 if (mContactsPreferences.getDisplayOrder() == ContactsPreferences.DISPLAY_ORDER_PRIMARY || in getPreferredDisplayName()

12