/packages/apps/Car/libs/car-telephony-common/src/com/android/car/telephony/common/ |
D | Contact.java | 39 public class Contact implements Parcelable, Comparable<Contact> { class 132 public static Contact fromCursor(Context context, Cursor cursor) { in fromCursor() 148 Contact contact = new Contact(); in fromCursor() 182 return obj instanceof Contact && mLookupKey.equals(((Contact) obj).mLookupKey); in equals() 246 public Contact merge(Contact contact) { in merge() 309 public static final Creator<Contact> CREATOR = new Creator<Contact>() { 311 public Contact createFromParcel(Parcel source) { 312 return Contact.fromParcel(source); 316 public Contact[] newArray(int size) { 317 return new Contact[size]; [all …]
|
D | InMemoryPhoneBook.java | 39 public class InMemoryPhoneBook implements Observer<List<Contact>> { 44 private final AsyncQueryLiveData<List<Contact>> mContactListAsyncQueryLiveData; 46 private final Map<I18nPhoneNumberWrapper, Contact> mPhoneNumberContactMap = new HashMap<>(); 86 mContactListAsyncQueryLiveData = new AsyncQueryLiveData<List<Contact>>(mContext, in InMemoryPhoneBook() 89 protected List<Contact> convertToEntity(Cursor cursor) { in InMemoryPhoneBook() 110 public LiveData<List<Contact>> getContactsLiveData() { in getContactsLiveData() 119 public Contact lookupContactEntry(String phoneNumber) { in lookupContactEntry() 135 private List<Contact> onCursorLoaded(Cursor cursor) { in onCursorLoaded() 136 Map<String, Contact> result = new LinkedHashMap<>(); in onCursorLoaded() 137 List<Contact> contacts = new ArrayList<>(); in onCursorLoaded() [all …]
|
/packages/apps/Car/libs/car-telephony-common/tests/robotests/src/com/android/car/telephony/common/ |
D | ContactTest.java | 66 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/ |
D | ContactsPopulator.java | 44 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/Car/Dialer/src/com/android/car/dialer/ui/contact/ |
D | ContactListViewModel.java | 30 import com.android.car.telephony.common.Contact; 44 private final LiveData<List<Contact>> mSortedContactListLiveData; 53 LiveData<List<Contact>> contactListLiveData = InMemoryPhoneBook.get().getContactsLiveData(); in ContactListViewModel() 61 public LiveData<List<Contact>> getAllContacts() { in getAllContacts() 65 private static class SortedContactListLiveData extends MediatorLiveData<List<Contact>> { 67 private final LiveData<List<Contact>> mContactListLiveData; 80 private final Comparator<Contact> mFirstNameComparator = 91 private final Comparator<Contact> mLastNameComparator = 95 @NonNull LiveData<List<Contact>> contactListLiveData, in SortedContactListLiveData() 115 List<Contact> contactList = mContactListLiveData.getValue(); in updateSortedContactList() [all …]
|
D | ContactListAdapter.java | 28 import com.android.car.telephony.common.Contact; 38 void onShowContactDetail(Contact contact); in onShowContactDetail() 42 private final List<Contact> mContactList = new ArrayList<>(); 51 public void setContactList(List<Contact> contactList) { in setContactList() 69 Contact contact = mContactList.get(position); in onBindViewHolder()
|
D | ContactDetailsAdapter.java | 32 import com.android.car.telephony.common.Contact; 52 public ContactDetailsAdapter(@NonNull Context context, @Nullable Contact contact) { in ContactDetailsAdapter() 58 void setContact(Contact contact) { in setContact() 77 if (obj == null || obj instanceof Contact) { in getItemViewType() 113 viewHolder.bind(mContext, (Contact) mItems.get(position)); in onBindViewHolder()
|
D | ContactDetailsFragment.java | 37 import com.android.car.telephony.common.Contact; 55 private Contact mContact; 57 private LiveData<Contact> mContactDetailsLiveData; 71 public static ContactDetailsFragment newInstance(Contact contact) { in newInstance() 122 private void onContactChanged(Contact contact) { in onContactChanged()
|
/packages/apps/Dialer/java/com/android/contacts/common/model/ |
D | Contact.java | 43 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()
|
D | ContactLoader.java | 71 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/ |
D | ContactLoader.java | 75 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 …]
|
D | Contact.java | 50 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/livedata/ |
D | FavoriteContactLiveData.java | 24 import com.android.car.telephony.common.Contact; 35 public class FavoriteContactLiveData extends AsyncQueryLiveData<List<Contact>> { 66 protected List<Contact> convertToEntity(Cursor cursor) { in convertToEntity() 67 Map<String, Contact> result = new LinkedHashMap<>(); in convertToEntity() 69 Contact contact = Contact.fromCursor(mContext, cursor); in convertToEntity() 72 Contact existingContact = result.get(lookupKey); in convertToEntity()
|
D | ContactDetailsLiveData.java | 29 import com.android.car.telephony.common.Contact; 33 public class ContactDetailsLiveData extends AsyncQueryLiveData<Contact> { 42 protected Contact convertToEntity(Cursor cursor) { in convertToEntity() 45 Contact contact = Contact.fromCursor(mContext, cursor); in convertToEntity() 47 contact.merge(Contact.fromCursor(mContext, cursor)); in convertToEntity()
|
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/favorite/ |
D | FavoriteAdapter.java | 30 import com.android.car.telephony.common.Contact; 41 private List<Contact> mFavoriteContacts = Collections.emptyList(); 42 private OnItemClickedListener<Contact> mListener; 45 public void setFavoriteContacts(List<Contact> favoriteContacts) { in setFavoriteContacts() 73 Contact contact = mFavoriteContacts.get(position); in onBindViewHolder() 79 private void onItemViewClicked(Contact contact) { in onItemViewClicked() 88 public void setOnListItemClickedListener(OnItemClickedListener<Contact> listener) { in setOnListItemClickedListener()
|
D | FavoriteViewModel.java | 23 import com.android.car.telephony.common.Contact; 31 private LiveData<List<Contact>> mFavoriteContactsLiveData; 39 public LiveData<List<Contact>> getFavoriteContacts() { in getFavoriteContacts()
|
/packages/apps/Contacts/src/com/android/contacts/activities/ |
D | AttachPhotoActivity.java | 46 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/ |
D | ContactDisplayUtils.java | 38 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/ |
D | ContactLoaderTest.java | 88 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/tests/robotests/src/com/android/car/dialer/ui/contact/ |
D | ContactListFragmentTest.java | 39 import com.android.car.telephony.common.Contact; 70 private Contact mMockContact1; 72 private Contact mMockContact2; 74 private Contact mMockContact3; 82 MutableLiveData<List<Contact>> contactList = new MutableLiveData<>(); in setUp() 87 MutableLiveData<Contact> contactDetail = new MutableLiveData<>(); in setUp()
|
/packages/apps/EmergencyInfo/tests/robolectric/src/com/android/emergency/preferences/ |
D | EmergencyContactsPreferenceTest.java | 94 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/ |
D | ShadowInMemoryPhoneBook.java | 19 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/ |
D | ViewNotificationService.java | 26 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()
|
/packages/apps/Contacts/src/com/android/contacts/quickcontact/ |
D | InvisibleContactUtil.java | 11 import com.android.contacts.model.Contact; 32 public static boolean isInvisibleAndAddable(Contact contactData, Context context) { in isInvisibleAndAddable() 72 public static void addToDefaultGroup(Contact contactData, Context context) { in addToDefaultGroup() 86 public static boolean markAddToDefaultGroup(Contact contactData, in markAddToDefaultGroup()
|
/packages/apps/EmergencyInfo/src/com/android/emergency/ |
D | EmergencyContactManager.java | 41 public static Contact getContact(Context context, Uri phoneUri) { in getContact() 92 return new Contact(contactLookupUri, phoneUri, name, phoneNumber, phoneType, photo); in getContact() 122 public static class Contact { class in EmergencyContactManager 140 public Contact(Uri contactLookupUri, in Contact() method in EmergencyContactManager.Contact
|