Home
last modified time | relevance | path

Searched refs:Contact (Results 1 – 25 of 65) sorted by relevance

123

/packages/apps/Car/libs/car-telephony-common/src/com/android/car/telephony/common/
DInMemoryPhoneBook.java42 public class InMemoryPhoneBook implements Observer<List<Contact>> {
47 private final AsyncQueryLiveData<List<Contact>> mContactListAsyncQueryLiveData;
51 private final Map<I18nPhoneNumberWrapper, Contact> mPhoneNumberContactMap = new HashMap<>();
56 private final Map<String, Map<String, Contact>> mLookupKeyContactMap = new HashMap<>();
115 mContactListAsyncQueryLiveData = new AsyncQueryLiveData<List<Contact>>(mContext, in InMemoryPhoneBook()
118 protected List<Contact> convertToEntity(Cursor cursor) { in InMemoryPhoneBook()
139 public LiveData<List<Contact>> getContactsLiveData() { in getContactsLiveData()
148 public Contact lookupContactEntry(String phoneNumber) { in lookupContactEntry()
169 public Contact lookupContactByKey(String lookupKey, @Nullable String accountName) { in lookupContactByKey()
190 public List<Contact> lookupContactByKey(String lookupKey) { in lookupContactByKey()
[all …]
DContact.java38 public class Contact implements Parcelable, Comparable<Contact> { class
210 public static Contact fromCursor(Context context, Cursor cursor) { in fromCursor()
223 public static Contact fromCursor(Context context, Cursor cursor, @Nullable Contact contact) { in fromCursor()
230 contact = new Contact(); in fromCursor()
237 contact = new Contact(); in fromCursor()
366 return obj instanceof Contact && mLookupKey.equals(((Contact) obj).mLookupKey) in equals()
367 && mAccountName.equals(((Contact) obj).mAccountName); in equals()
582 public static final Creator<Contact> CREATOR = new Creator<Contact>() {
584 public Contact createFromParcel(Parcel source) {
585 return Contact.fromParcel(source);
[all …]
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/contact/
DContactDetailsViewModel.java33 import com.android.car.telephony.common.Contact;
60 public LiveData<FutureData<Contact>> getContactDetails(@Nullable Contact contact) { in getContactDetails()
65 LiveData<Contact> contactLiveData = new ContactDetailsLiveData(getApplication(), contact); in getContactDetails()
76 public void addToFavorite(Contact contact, PhoneNumber phoneNumber) { in addToFavorite()
86 public void removeFromFavorite(Contact contact, PhoneNumber phoneNumber) { in removeFromFavorite()
90 private class ContactDetailsLiveData extends MediatorLiveData<Contact> {
95 private Contact mContact;
98 private ContactDetailsLiveData(Context context, @NonNull Contact contact) { in ContactDetailsLiveData()
109 private void onContactListChanged(List<Contact> contacts) { in onContactListChanged()
111 Contact inMemoryContact = InMemoryPhoneBook.get().lookupContactByKey( in onContactListChanged()
[all …]
DContactListViewModel.java33 import com.android.car.telephony.common.Contact;
48 private final LiveData<Pair<Integer, List<Contact>>> mSortedContactListLiveData;
49 private final LiveData<FutureData<Pair<Integer, List<Contact>>>> mContactList;
57 LiveData<List<Contact>> contactListLiveData = InMemoryPhoneBook.get().getContactsLiveData(); in ContactListViewModel()
67 public LiveData<FutureData<Pair<Integer, List<Contact>>>> getAllContacts() { in getAllContacts()
72 extends MediatorLiveData<Pair<Integer, List<Contact>>> {
74 private final LiveData<List<Contact>> mContactListLiveData;
82 @NonNull LiveData<List<Contact>> contactListLiveData, in SortedContactListLiveData()
105 List<Contact> contactList = mContactListLiveData.getValue(); in updateSortedContactList()
106 Pair<Comparator<Contact>, Integer> contactSortingInfo = ContactSortingInfo in updateSortedContactList()
[all …]
DContactDetailsAdapter.java30 import com.android.car.telephony.common.Contact;
45 void onClick(Contact contact, PhoneNumber phoneNumber); in onClick()
51 private Contact mContact;
55 @Nullable Contact contact, in ContactDetailsAdapter()
63 void setContact(Contact contact) { in setContact()
80 if (obj == null || obj instanceof Contact) { in getItemViewType()
124 viewHolder.bind(mContext, (Contact) mItems.get(position)); in onBindViewHolder()
DContactListAdapter.java30 import com.android.car.telephony.common.Contact;
42 void onShowContactDetail(Contact contact); in onShowContactDetail()
46 private final List<Contact> mContactList = new ArrayList<>();
60 public void setContactList(Pair<Integer, List<Contact>> contactListPair) { in setContactList()
79 Contact contact = mContactList.get(position); in onBindViewHolder()
98 private String getHeader(Contact contact) { in getHeader()
DContactDetailsFragment.java36 import com.android.car.telephony.common.Contact;
59 private Contact mContact;
60 private LiveData<FutureData<Contact>> mContactDetailsLiveData;
69 public static ContactDetailsFragment newInstance(Contact contact) { in newInstance()
112 private void onContactChanged(Contact contact) { in onContactChanged()
189 public void onClick(Contact contact, PhoneNumber phoneNumber) { in onClick()
DContactListViewHolder.java32 import com.android.car.telephony.common.Contact;
67 public void bind(Contact contact, boolean showHeader, String header) { in bind()
82 private void setLabelText(Contact contact) { in setLabelText()
103 private void setCallActionView(Contact contact, boolean forceShowButton) { in setCallActionView()
124 private void setShowContactDetailView(Contact contact, boolean forceShowButton) { in setShowContactDetailView()
/packages/apps/Car/Dialer/src/com/android/car/dialer/storage/
DFavoriteNumberRepository.java34 import com.android.car.telephony.common.Contact;
78 private final LiveData<List<Contact>> mFavoriteContacts;
101 public LiveData<List<Contact>> getFavoriteContacts() { in getFavoriteContacts()
108 public void addToFavorite(Contact contact, PhoneNumber phoneNumber) { in addToFavorite()
122 public void removeFromFavorite(Contact contact, PhoneNumber phoneNumber) { in removeFromFavorite()
152 private void convertToContacts(Context context, final MutableLiveData<List<Contact>> results) { in convertToContacts()
168 List<Contact> favoriteContacts = new ArrayList<>(); in convertToContacts()
171 Contact contact = lookupContact(cr, favoriteNumber); in convertToContacts()
191 private Contact lookupContact(ContentResolver cr, FavoriteNumberEntity favoriteNumber) { in lookupContact()
209 Contact contact = Contact.fromCursor(mContext, cursor); in lookupContact()
[all …]
/packages/apps/Car/libs/car-telephony-common/tests/robotests/src/com/android/car/telephony/common/
DContactTest.java66 private Contact mNullName;
67 private Contact mEmptyName;
68 private Contact mLetterName1;
69 private Contact mLetterName2;
70 private Contact mDigitName1;
71 private Contact mDigitName2;
72 private Contact mSpecCharName;
87 mNullName = Contact.fromCursor(mMockContext, mMockCursor); in setup()
89 mEmptyName = Contact.fromCursor(mMockContext, mMockCursor); in setup()
91 mLetterName1 = Contact.fromCursor(mMockContext, mMockCursor); in setup()
[all …]
/packages/apps/Dialer/java/com/android/dialer/databasepopulator/
DContactsPopulator.java44 private static final Contact[] SIMPLE_CONTACTS = {
46 Contact.builder()
55 Contact.builder()
64 Contact.builder()
73 Contact.builder()
83 Contact.builder()
90 Contact.builder()
96 Contact.builder()
102 Contact.builder()
108 Contact.builder()
[all …]
/packages/apps/Dialer/java/com/android/contacts/common/model/
DContact.java43 public class Contact { class
63 private final Contact.Status mStatus;
81 private Contact(Uri requestedUri, Contact.Status status, Exception exception) { in Contact() method in Contact
110 public Contact( in Contact() method in Contact
153 public Contact(Uri requestedUri, Contact from) { in Contact() method in Contact
189 public static Contact forError(Uri requestedUri, Exception exception) { in forError()
190 return new Contact(requestedUri, Status.ERROR, exception); in forError()
193 public static Contact forNotFound(Uri requestedUri) { in forNotFound()
194 return new Contact(requestedUri, Status.NOT_FOUND, null); in forNotFound()
DContactLoader.java71 public class ContactLoader extends AsyncTaskLoader<Contact> {
76 private static Contact sCachedResult = null;
85 private Contact mContact;
114 public static Contact parseEncodedContactEntity(Uri lookupUri) { in parseEncodedContactEntity()
122 private static Contact loadEncodedContactEntity(Uri uri, Uri lookupUri) throws JSONException { in loadEncodedContactEntity()
133 final Contact contact = in loadEncodedContactEntity()
134 new Contact( in loadEncodedContactEntity()
220 public Contact loadInBackground() { in loadInBackground()
225 final Contact cachedResult = sCachedResult; in loadInBackground()
228 final Contact result; in loadInBackground()
[all …]
/packages/apps/Contacts/src/com/android/contacts/model/
DContactLoader.java75 public class ContactLoader extends AsyncTaskLoader<Contact> {
82 private static Contact sCachedResult = null;
89 private Contact mContact;
295 public Contact loadInBackground() { in loadInBackground()
300 final Contact cachedResult = sCachedResult; in loadInBackground()
303 final Contact result; in loadInBackground()
309 result = new Contact(mRequestedUri, cachedResult); in loadInBackground()
338 return Contact.forError(mRequestedUri, e); in loadInBackground()
349 public static Contact parseEncodedContactEntity(Uri lookupUri) { in parseEncodedContactEntity()
357 private static Contact loadEncodedContactEntity(Uri uri, Uri lookupUri) throws JSONException { in loadEncodedContactEntity()
[all …]
DContact.java50 public class Contact { class
96 private final Contact.Status mStatus;
102 private Contact(Uri requestedUri, Contact.Status status, Exception exception) { in Contact() method in Contact
130 public static Contact forError(Uri requestedUri, Exception exception) { in forError()
131 return new Contact(requestedUri, Status.ERROR, exception); in forError()
134 public static Contact forNotFound(Uri requestedUri) { in forNotFound()
135 return new Contact(requestedUri, Status.NOT_FOUND, null); in forNotFound()
141 public Contact(Uri requestedUri, Uri uri, Uri lookupUri, long directoryId, String lookupKey, in Contact() method in Contact
170 public Contact(Uri requestedUri, Contact from) { in Contact() method in Contact
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/favorite/
DBluetoothFavoriteContactsLiveData.java26 import com.android.car.telephony.common.Contact;
33 class BluetoothFavoriteContactsLiveData extends AsyncQueryLiveData<List<Contact>> {
42 protected List<Contact> convertToEntity(@NonNull Cursor cursor) { in convertToEntity()
43 List<Contact> resultList = new ArrayList<>(); in convertToEntity()
46 Contact favoriteEntry = Contact.fromCursor(mContext, cursor); in convertToEntity()
50 for (Contact contact : resultList) { in convertToEntity()
DFavoriteAdapter.java29 import com.android.car.telephony.common.Contact;
54 private OnItemClickedListener<Contact> mListener;
74 if (item instanceof Contact) { in getItemViewType()
103 Contact contact = (Contact) mFavoriteContacts.get(position); in onBindViewHolder()
122 private void onItemViewClicked(Contact contact) { in onItemViewClicked()
131 public void setOnListItemClickedListener(OnItemClickedListener<Contact> listener) { in setOnListItemClickedListener()
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/common/
DContactResultsLiveData.java32 import com.android.car.telephony.common.Contact;
58 private final LiveData<List<Contact>> mContactListLiveData;
98 private void onContactsChange(List<Contact> contactList) { in onContactsChange()
133 List<Contact> lookupResults = InMemoryPhoneBook.get().lookupContactByKey(lookupKey); in onQueryFinished()
134 for (Contact contact : lookupResults) { in onQueryFinished()
140 Set<Contact> set = new HashSet<>(); in onQueryFinished()
185 private final Contact mContact;
188 public ContactResultListItem(Contact contact, String number) { in ContactResultListItem()
196 public Contact getContact() { in getContact()
/packages/apps/Contacts/src/com/android/contacts/activities/
DAttachPhotoActivity.java46 import com.android.contacts.model.Contact;
207 public void onContactLoaded(Contact contact) { in onActivityResult()
233 public void onContactLoaded(Contact contact) { in onActivityResult()
252 loader.registerListener(0, new OnLoadCompleteListener<Contact>() { in loadContact()
255 Loader<Contact> loader, Contact contact) { in loadContact()
269 public void onContactLoaded(Contact contact); in onContactLoaded()
278 private void saveContact(Contact contact) { in saveContact()
298 private void saveToContact(Contact contact, RawContactDeltaList deltaList, in saveToContact()
390 public void onContactLoaded(Contact contactToSave) { in createNewRawContact()
/packages/apps/Contacts/src/com/android/contacts/detail/
DContactDisplayUtils.java38 import com.android.contacts.model.Contact;
61 public static CharSequence getDisplayName(Context context, Contact contactData) { in getDisplayName()
84 public static String getPhoneticName(Context context, Contact contactData) { in getPhoneticName()
96 public static String getAttribution(Context context, Contact contactData) { in getAttribution()
117 public static String getCompany(Context context, Contact contactData) { in getCompany()
177 public static void setDisplayName(Context context, Contact contactData, TextView textView) { in setDisplayName()
188 public static void setCompanyName(Context context, Contact contactData, TextView textView) { in setCompanyName()
199 public static void setPhoneticName(Context context, Contact contactData, TextView textView) { in setPhoneticName()
210 public static void setAttribution(Context context, Contact contactData, TextView textView) { in setAttribution()
/packages/apps/Contacts/tests/src/com/android/contacts/model/
DContactLoaderTest.java88 private Contact assertLoadContact(Uri uri) { in assertLoadContact()
94 Contact result = assertLoadContact(null); in testNullUri()
99 Contact result = assertLoadContact(Uri.EMPTY); in testEmptyUri()
104 Contact result = assertLoadContact(Uri.parse("content://wtf")); in testInvalidUri()
120 Contact contact = assertLoadContact(baseUri); in testLoadContactWithContactIdUri()
148 Contact contact = assertLoadContact(legacyUri); in testLoadContactWithOldStyleUri()
179 Contact contact = assertLoadContact(rawContactUri); in testLoadContactWithRawContactIdUri()
203 Contact contact = assertLoadContact(lookupNoIdUri); in testLoadContactWithContactLookupUri()
227 Contact contact = assertLoadContact(lookupUri); in testLoadContactWithContactLookupAndIdUri()
261 Contact contact = assertLoadContact(lookupWithWrongIdUri); in testLoadContactWithContactLookupWithIncorrectIdUri()
[all …]
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/common/entity/
DContactSortingInfo.java24 import com.android.car.telephony.common.Contact;
41 private static final Comparator<Contact> sFirstNameComparator =
52 private static final Comparator<Contact> sLastNameComparator =
60 public static Pair<Comparator<Contact>, Integer> getSortingInfo(Context context, in getSortingInfo()
68 Comparator<Contact> comparator; in getSortingInfo()
/packages/apps/EmergencyInfo/tests/robolectric/src/com/android/emergency/preferences/
DEmergencyContactsPreferenceTest.java94 EmergencyContactManager.Contact contact = mock(EmergencyContactManager.Contact.class); in testAddAndRemoveEmergencyContact()
123 EmergencyContactManager.Contact contactJane = mock(EmergencyContactManager.Contact.class); in testReloadFromPreference()
132 EmergencyContactManager.Contact contactJohn = mock(EmergencyContactManager.Contact.class); in testReloadFromPreference()
/packages/apps/Car/Dialer/tests/robotests/src/com/android/car/dialer/testutils/
DShadowInMemoryPhoneBook.java19 import com.android.car.telephony.common.Contact;
34 private Map<String, Contact> contactMap = new HashMap<>();
39 public void add(String number, Contact contact) { in add()
47 public Contact lookupContactEntry(String number) { in lookupContactEntry()
/packages/apps/Contacts/src/com/android/contacts/
DViewNotificationService.java26 import com.android.contacts.model.Contact;
46 contactLoader.registerListener(0, new OnLoadCompleteListener<Contact>() { in onStartCommand()
48 public void onLoadComplete(Loader<Contact> loader, Contact data) { in onStartCommand()

123