/packages/apps/Contacts/tests/src/com/android/contacts/model/ |
D | ContactLoaderTest.java | 120 Contact contact = assertLoadContact(baseUri); in testLoadContactWithContactIdUri() local 122 assertEquals(CONTACT_ID, contact.getId()); in testLoadContactWithContactIdUri() 123 assertEquals(RAW_CONTACT_ID, contact.getNameRawContactId()); in testLoadContactWithContactIdUri() 124 assertEquals(DisplayNameSources.STRUCTURED_NAME, contact.getDisplayNameSource()); in testLoadContactWithContactIdUri() 125 assertEquals(LOOKUP_KEY, contact.getLookupKey()); in testLoadContactWithContactIdUri() 126 assertEquals(lookupUri, contact.getLookupUri()); in testLoadContactWithContactIdUri() 127 assertEquals(1, contact.getRawContacts().size()); in testLoadContactWithContactIdUri() 128 assertEquals(1, contact.getStatuses().size()); in testLoadContactWithContactIdUri() 148 Contact contact = assertLoadContact(legacyUri); in testLoadContactWithOldStyleUri() local 150 assertEquals(CONTACT_ID, contact.getId()); in testLoadContactWithOldStyleUri() [all …]
|
D | RawContactTest.java | 42 final RawContact contact = new RawContact(values); in buildRawContact() local 43 contact.addDataItemValues(dataItem); in buildRawContact() 45 return contact; in buildRawContact() 57 final RawContact contact = new RawContact(values); in buildRawContact2() local 58 contact.addDataItemValues(dataItem); in buildRawContact2() 60 return contact; in buildRawContact2()
|
/packages/apps/Car/libs/car-telephony-common/src/com/android/car/telephony/common/ |
D | Contact.java | 148 Contact contact = new Contact(); in fromCursor() local 149 contact.mId = cursor.getLong(contactIdColumn); in fromCursor() 150 contact.mDisplayName = cursor.getString(displayNameColumn); in fromCursor() 151 contact.mAltDisplayName = cursor.getString(altDisplayNameColumn); in fromCursor() 154 contact.mPhoneNumbers.add(number); in fromCursor() 156 contact.mPrimaryPhoneNumber = number; in fromCursor() 159 contact.mIsStarred = cursor.getInt(starredColumn) > 0; in fromCursor() 160 contact.mPinnedPosition = cursor.getInt(pinnedColumn); in fromCursor() 161 contact.mIsVoiceMail = TelecomUtils.isVoicemailNumber(context, number.getNumber()); in fromCursor() 164 contact.mAvatarUri = avatarUriStr == null ? null : Uri.parse(avatarUriStr); in fromCursor() [all …]
|
D | InMemoryPhoneBook.java | 140 Contact contact = Contact.fromCursor(mContext, cursor); in onCursorLoaded() local 141 String lookupKey = contact.getLookupKey(); in onCursorLoaded() 144 existingContact.merge(contact); in onCursorLoaded() 146 result.put(lookupKey, contact); in onCursorLoaded() 153 for (Contact contact : contacts) { in onCursorLoaded() 154 for (PhoneNumber phoneNumber : contact.getNumbers()) { in onCursorLoaded() 155 mPhoneNumberContactMap.put(phoneNumber.getI18nPhoneNumberWrapper(), contact); in onCursorLoaded() local
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
D | GlobalSearchSupportTest.java | 70 GoldenContact contact = new GoldenContactBuilder().name("Deer", "Dough").photo( in testSearchSuggestionsByNameWithPhoto() local 72 new SuggestionTesterBuilder(contact).query("D").expectIcon1Uri(true).expectedText1( in testSearchSuggestionsByNameWithPhoto() 77 GoldenContact contact = new GoldenContactBuilder().name("Deer", "Dough").photo( in testSearchSuggestionsByEmailWithPhoto() local 79 new SuggestionTesterBuilder(contact).query("foo@ac").expectIcon1Uri(true).expectedIcon2( in testSearchSuggestionsByEmailWithPhoto() 85 GoldenContact contact = new GoldenContactBuilder().name("Deer", "Dough").company("Google") in testSearchSuggestionsByName() local 87 new SuggestionTesterBuilder(contact).query("D").expectedText1("Deer Dough").expectedText2( in testSearchSuggestionsByName() 92 GoldenContact contact = new GoldenContactBuilder().name("Deer", "Dough").nickname( in testSearchByNickname() local 94 new SuggestionTesterBuilder(contact).query("L").expectedText1("Deer Dough").expectedText2( in testSearchByNickname() 99 GoldenContact contact = new GoldenContactBuilder().name("Deer", "Dough").company("Google") in testSearchByCompany() local 101 new SuggestionTesterBuilder(contact).query("G").expectedText1("Deer Dough").expectedText2( in testSearchByCompany() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/phonelookup/ |
D | phone_lookup_info.proto | 21 // Information about a single contact. 24 // For a contact in the default directory: 26 // For a contact in other directories: 30 // For a contact in the default directory: 32 // For a contact in other directories: 36 // For a contact in the default directory: 38 // For a contact in other directories: 42 // For a contact in the default directory: 44 // For a contact in other directories: 48 // For a contact in the default directory: [all …]
|
/packages/apps/Dialer/java/com/android/dialer/calldetails/ |
D | OldCallDetailsAdapter.java | 39 private final DialerContact contact; field in OldCallDetailsAdapter 43 DialerContact contact, in OldCallDetailsAdapter() argument 56 this.contact = contact; in OldCallDetailsAdapter() 63 container, contact.getNumber(), contact.getPostDialDigits(), callDetailsHeaderListener); in createCallDetailsHeaderViewHolder() 69 callDetailsHeaderViewHolder.updateContactInfo(contact, getCallbackAction()); in bindCallDetailsHeaderViewHolder() 76 return contact.getNumber(); in getNumber() 81 return contact.getNameOrNumber(); in getPrimaryText() 88 .setPhotoUri(contact.getPhotoUri()) in getPhotoInfo() 89 .setPhotoId(contact.getPhotoId()) in getPhotoInfo() 90 .setName(contact.getNameOrNumber()) in getPhotoInfo() [all …]
|
D | CallDetailsHeaderViewHolder.java | 151 void updateContactInfo(DialerContact contact, @CallbackAction int callbackAction) { in updateContactInfo() argument 155 contact.getContactUri().isEmpty() ? null : Uri.parse(contact.getContactUri()), in updateContactInfo() 156 contact.getPhotoId(), in updateContactInfo() 157 contact.getPhotoUri().isEmpty() ? null : Uri.parse(contact.getPhotoUri()), in updateContactInfo() 158 contact.getNameOrNumber(), in updateContactInfo() 159 contact.getContactType()); in updateContactInfo() 166 if (PhoneNumberHelper.isLocalEmergencyNumber(context, contact.getNumber())) { in updateContactInfo() 169 nameView.setText(contact.getNameOrNumber()); in updateContactInfo() 170 if (!TextUtils.isEmpty(contact.getDisplayNumber())) { in updateContactInfo() 173 TextUtils.isEmpty(contact.getNumberLabel()) in updateContactInfo() [all …]
|
D | OldCallDetailsActivity.java | 42 private DialerContact contact; field in OldCallDetailsActivity 53 DialerContact contact, in newInstance() argument 57 ProtoParsers.put(intent, EXTRA_CONTACT, Assert.isNotNull(contact)); in newInstance() 71 contact = ProtoParsers.getTrusted(intent, EXTRA_CONTACT, DialerContact.getDefaultInstance()); in handleIntent() 86 contact, in createAdapter() 96 return contact.getNumber(); in getNumber()
|
/packages/apps/Dialer/java/com/android/dialer/app/list/ |
D | PhoneFavoritesTileAdapter.java | 242 final ContactEntry contact = new ContactEntry(); in saveCursorToCache() local 244 contact.id = id; in saveCursorToCache() 245 contact.namePrimary = in saveCursorToCache() 247 contact.nameAlternative = in saveCursorToCache() 251 contact.photoUri = (photoUri != null ? Uri.parse(photoUri) : null); in saveCursorToCache() 252 contact.lookupKey = lookupKey; in saveCursorToCache() 253 contact.lookupUri = in saveCursorToCache() 256 contact.isFavorite = isStarred; in saveCursorToCache() 257 contact.isDefaultNumber = isDefaultNumber; in saveCursorToCache() 262 contact.phoneLabel = in saveCursorToCache() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/callcomposer/ |
D | CallComposerActivity.java | 135 private DialerContact contact; field in CallComposerActivity 165 public static Intent newIntent(Context context, DialerContact contact) { in newIntent() argument 167 ProtoParsers.put(intent, ARG_CALL_COMPOSER_CONTACT, contact); in newIntent() 265 sessionId = getEnrichedCallManager().startCallComposerSession(contact.getNumber()); in onResume() 269 sessionId = getEnrichedCallManager().startCallComposerSession(contact.getNumber()); in onResume() 455 contact.getNameOrNumber(), in placeRCSCall() 456 contact.getDisplayNumber(), in placeRCSCall() 457 contact.getNumberLabel(), in placeRCSCall() 458 UriUtils.getLookupKeyFromUri(Uri.parse(contact.getContactUri())), in placeRCSCall() 460 Uri.parse(contact.getPhotoUri()), in placeRCSCall() [all …]
|
/packages/apps/Contacts/src/com/android/contacts/database/ |
D | SimContactDaoImpl.java | 215 final SimContact contact = contacts.get(index); in findAccountsOfExistingSimContacts() local 220 rawContactToSimContact.get(id).add(contact); in findAccountsOfExistingSimContacts() 234 for (SimContact contact : rawContactToSimContact.get(id)) { in findAccountsOfExistingSimContacts() 235 result.get(account).add(contact); in findAccountsOfExistingSimContacts() 304 final SimContact contact = new SimContact(id, name, number, parseEmails(emails)); in loadFromCursor() local 306 if (contact.hasName() || contact.hasPhone() || contact.hasEmails()) { in loadFromCursor() 307 result.add(contact); in loadFromCursor() 318 for (SimContact contact : contacts) { in queryRawContactsForSimContacts() 319 if (contact.hasPhone()) { in queryRawContactsForSimContacts() 321 } else if (contact.hasName()) { in queryRawContactsForSimContacts() [all …]
|
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/contact/ |
D | ContactListViewHolder.java | 17 package com.android.car.dialer.ui.contact; 61 public void onBind(Contact contact) { in onBind() argument 62 TelecomUtils.setContactBitmapAsync(mAvatarView.getContext(), mAvatarView, contact, null); in onBind() local 63 mTitleView.setText(contact.getDisplayName()); in onBind() 64 setLabelText(contact); in onBind() 66 view -> mOnShowContactDetailListener.onShowContactDetail(contact)); in onBind() 68 DialerUtils.promptForPrimaryNumber(itemView.getContext(), contact, in onBind() 74 private void setLabelText(Contact contact) { in setLabelText() argument 81 List<PhoneNumber> numberList = contact.getNumbers(); in setLabelText() 86 readableLabel = contact.hasPrimaryPhoneNumber() in setLabelText() [all …]
|
D | ContactDetailsAdapter.java | 17 package com.android.car.dialer.ui.contact; 52 public ContactDetailsAdapter(@NonNull Context context, @Nullable Contact contact) { in ContactDetailsAdapter() argument 55 setContact(contact); in ContactDetailsAdapter() 58 void setContact(Contact contact) { in setContact() argument 59 L.d(TAG, "setContact %s", contact); in setContact() 62 mItems.add(contact); in setContact() 64 if (contact != null) { in setContact() 65 mItems.addAll(contact.getNumbers()); in setContact()
|
D | ContactDetailsFragment.java | 17 package com.android.car.dialer.ui.contact; 71 public static ContactDetailsFragment newInstance(Contact contact) { in newInstance() argument 74 args.putParcelable(KEY_CONTACT_ENTITY, contact); in newInstance() 122 private void onContactChanged(Contact contact) { in onContactChanged() argument 127 TelecomUtils.setContactBitmapAsync(getContext(), mAvatarView, contact, null); in onContactChanged() local 131 if (contact != null) { in onContactChanged() 132 mNameView.setText(contact.getDisplayName()); in onContactChanged()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/map/ |
D | SmsMmsContacts.java | 157 MapContact contact = mNames.get(phone); in getContactNameFromPhone() local 159 if (contact != null) { in getContactNameFromPhone() 160 if (contact.getId() < 0) { in getContactNameFromPhone() 164 return contact; in getContactNameFromPhone() 170 if (p.matcher(contact.getName()).find()) { in getContactNameFromPhone() 171 return contact; in getContactNameFromPhone() 193 contact = MapContact.create(id, name); in getContactNameFromPhone() 194 mNames.put(phone, contact); in getContactNameFromPhone() 196 contact = MapContact.create(-1, null); in getContactNameFromPhone() 197 mNames.put(phone, contact); in getContactNameFromPhone() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/searchfragment/cp2/ |
D | ContactFilterCursor.java | 116 Cp2Contact contact = Cp2Contact.fromCursor(cursor); in createCursor() local 117 cp2Contacts.add(contact); in createCursor() 118 contactIdsToPosition.put(contact.contactId(), cursor.getPosition()); in createCursor() 132 for (Cp2Contact contact : coalescedContacts) { in createCursor() 133 newCursor.addRow(contact.toCursorRow()); in createCursor() 142 for (Cp2Contact contact : contactsWithSameContactId) { in coalesceContacts() 143 if (contact.mimeType().equals(Phone.CONTENT_ITEM_TYPE)) { in coalesceContacts() 144 phoneContacts.add(contact); in coalesceContacts() 145 } else if (contact.mimeType().equals(Organization.CONTENT_ITEM_TYPE)) { in coalesceContacts() 148 companyName.append(" ").append(contact.companyName()); in coalesceContacts() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/databasepopulator/ |
D | ContactsPopulator.java | 139 for (Contact contact : contacts) { in populateContacts() 140 addContact(contact, operations); in populateContacts() 185 private static void addContact(Contact contact, List<ContentProviderOperation> operations) { in addContact() argument 190 .withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, contact.getAccountType()) in addContact() 191 .withValue(ContactsContract.RawContacts.ACCOUNT_NAME, contact.getAccountName()) in addContact() 192 .withValue(ContactsContract.RawContacts.STARRED, contact.getIsStarred() ? 1 : 0) in addContact() 195 contact.getIsStarred() ? contact.getPinned() : 0) in addContact() 199 if (!TextUtils.isEmpty(contact.getName())) { in addContact() 207 ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME, contact.getName()) in addContact() 211 if (contact.getPhotoStream() != null) { in addContact() [all …]
|
/packages/apps/Contacts/src/com/android/contacts/activities/ |
D | AttachPhotoActivity.java | 207 public void onContactLoaded(Contact contact) { in onActivityResult() 208 saveContact(contact); in onActivityResult() 233 public void onContactLoaded(Contact contact) { in onActivityResult() 234 saveContact(contact); in onActivityResult() 255 Loader<Contact> loader, Contact contact) { in loadContact() 262 listener.onContactLoaded(contact); in loadContact() 269 public void onContactLoaded(Contact contact); in onContactLoaded() argument 278 private void saveContact(Contact contact) { in saveContact() argument 280 if (contact.getRawContacts() == null) { in saveContact() 287 RawContactDeltaList deltaList = contact.createRawContactDeltaList(); in saveContact() [all …]
|
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/common/ |
D | DialerUtils.java | 92 Contact contact, in promptForPrimaryNumber() argument 94 if (contact.hasPrimaryPhoneNumber()) { in promptForPrimaryNumber() 95 callback.onPhoneNumberSelected(contact.getPrimaryPhoneNumber(), false); in promptForPrimaryNumber() 96 } else if (contact.getNumbers().size() == 1) { in promptForPrimaryNumber() 97 callback.onPhoneNumberSelected(contact.getNumbers().get(0), false); in promptForPrimaryNumber() 98 } else if (contact.getNumbers().size() > 0) { in promptForPrimaryNumber() 99 showPhoneNumberSelector(context, contact.getNumbers(), (phoneNumber, always) -> { in promptForPrimaryNumber() 107 L.w(TAG, "contact %s doesn't have any phone number", contact.getDisplayName()); in promptForPrimaryNumber()
|
D | UiCallLogLiveData.java | 121 Contact contact = inMemoryPhoneBook.lookupContactEntry(number); in convert() local 123 if (contact != null && contact.getDisplayName() != null) { in convert() 124 title = contact.getDisplayName(); in convert() 130 PhoneNumber phoneNumber = contact != null ? contact.getPhoneNumber(number) : null; in convert() 136 contact != null ? contact.getAvatarUri() : null, in convert()
|
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/favorite/ |
D | FavoriteContactViewHolder.java | 59 public void onBind(Context context, @Nonnull Contact contact) { in onBind() argument 60 String displayName = contact.getDisplayName(); in onBind() 63 List<PhoneNumber> contactPhoneNumbers = contact.getNumbers(); in onBind() 65 L.w(TAG, "contact %s doesn't have any phone number", contact.getDisplayName()); in onBind() 70 if (!contact.isVoicemail() && contactPhoneNumbers.size() > 1) { in onBind() 71 if (contact.hasPrimaryPhoneNumber()) { in onBind() 73 contact.getPrimaryPhoneNumber().getReadableLabel(context.getResources())); in onBind() 83 TelecomUtils.setContactBitmapAsync(context, mIcon, contact, null); in onBind()
|
D | FavoriteAdapter.java | 73 Contact contact = mFavoriteContacts.get(position); in onBindViewHolder() local 74 viewHolder.onBind(context, contact); in onBindViewHolder() 75 viewHolder.itemView.setOnClickListener((v) -> onItemViewClicked(contact)); in onBindViewHolder() 79 private void onItemViewClicked(Contact contact) { in onItemViewClicked() argument 81 mListener.onItemClicked(contact); in onItemViewClicked()
|
/packages/apps/Dialer/java/com/android/dialer/smartdial/ |
D | SmartDialCursorLoader.java | 98 for (ContactNumber contact : allMatches) { in loadInBackground() 99 row[PhoneQuery.PHONE_ID] = contact.dataId; in loadInBackground() 100 row[PhoneQuery.PHONE_NUMBER] = contact.phoneNumber; in loadInBackground() 101 row[PhoneQuery.CONTACT_ID] = contact.id; in loadInBackground() 102 row[PhoneQuery.LOOKUP_KEY] = contact.lookupKey; in loadInBackground() 103 row[PhoneQuery.PHOTO_ID] = contact.photoId; in loadInBackground() 104 row[PhoneQuery.DISPLAY_NAME] = contact.displayName; in loadInBackground() 105 row[PhoneQuery.CARRIER_PRESENCE] = contact.carrierPresence; in loadInBackground()
|
/packages/apps/Contacts/tests/src/com/android/contacts/tests/ |
D | SimContactsTestHelper.java | 93 for (SimContact contact : contacts) { in deleteAllSimContacts() 96 .withSelection(getWriteSelection(contact), null) in deleteAllSimContacts() 120 for (SimContact contact : contacts) { in captureRestoreSnapshot() 121 final String[] emails = contact.getEmails(); in captureRestoreSnapshot() 128 .withValue("tag", contact.getName()) in captureRestoreSnapshot() 129 .withValue("number", contact.getPhone()) in captureRestoreSnapshot()
|