Home
last modified time | relevance | path

Searched refs:contact (Results 1 – 25 of 82) sorted by relevance

1234

/packages/apps/Contacts/tests/src/com/android/contacts/model/
DContactLoaderTest.java124 Contact contact = assertLoadContact(baseUri); in testLoadContactWithContactIdUri() local
126 assertEquals(CONTACT_ID, contact.getId()); in testLoadContactWithContactIdUri()
127 assertEquals(RAW_CONTACT_ID, contact.getNameRawContactId()); in testLoadContactWithContactIdUri()
128 assertEquals(DisplayNameSources.STRUCTURED_NAME, contact.getDisplayNameSource()); in testLoadContactWithContactIdUri()
129 assertEquals(LOOKUP_KEY, contact.getLookupKey()); in testLoadContactWithContactIdUri()
130 assertEquals(lookupUri, contact.getLookupUri()); in testLoadContactWithContactIdUri()
131 assertEquals(1, contact.getRawContacts().size()); in testLoadContactWithContactIdUri()
132 assertEquals(1, contact.getStatuses().size()); in testLoadContactWithContactIdUri()
152 Contact contact = assertLoadContact(legacyUri); in testLoadContactWithOldStyleUri() local
154 assertEquals(CONTACT_ID, contact.getId()); in testLoadContactWithOldStyleUri()
[all …]
DRawContactTest.java42 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()
DRawContactDeltaListTests.java119 final ContentValues contact = new ContentValues(); in buildBeforeEntity() local
120 contact.put(RawContacts.VERSION, version); in buildBeforeEntity()
121 contact.put(RawContacts._ID, rawContactId); in buildBeforeEntity()
122 final RawContact before = new RawContact(contact); in buildBeforeEntity()
131 final ContentValues contact = new ContentValues(); in buildAfterEntity() local
132 contact.put(RawContacts.ACCOUNT_TYPE, TEST_ACCOUNT); in buildAfterEntity()
133 final RawContactDelta after = new RawContactDelta(ValuesDelta.fromAfter(contact)); in buildAfterEntity()
DSimContactTests.java45 private void assertParcelsCorrectly(SimContact contact) { in assertParcelsCorrectly() argument
47 parcel.writeParcelable(contact, 0); in assertParcelsCorrectly()
51 assertThat(unparceled, equalTo(contact)); in assertParcelsCorrectly()
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DGlobalSearchSupportTest.java70 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/calldetails/
DCallDetailsHeaderViewHolder.java49 private DialerContact contact; field in CallDetailsHeaderViewHolder
67 void updateContactInfo(DialerContact contact) { in updateContactInfo() argument
68 this.contact = contact; in updateContactInfo()
72 contact.hasContactUri() ? Uri.parse(contact.getContactUri()) : null, in updateContactInfo()
73 contact.getPhotoId(), in updateContactInfo()
74 contact.hasPhotoUri() ? Uri.parse(contact.getPhotoUri()) : null, in updateContactInfo()
75 contact.getNameOrNumber(), in updateContactInfo()
76 contact.getContactType()); in updateContactInfo()
78 nameView.setText(contact.getNameOrNumber()); in updateContactInfo()
79 if (!TextUtils.isEmpty(contact.getDisplayNumber())) { in updateContactInfo()
[all …]
DCallDetailsAdapter.java38 private final DialerContact contact; field in CallDetailsAdapter
45 @NonNull DialerContact contact, in CallDetailsAdapter() argument
48 this.contact = Assert.isNotNull(contact); in CallDetailsAdapter()
76 ((CallDetailsHeaderViewHolder) holder).updateContactInfo(contact); in onBindViewHolder()
78 ((CallDetailsFooterViewHolder) holder).setPhoneNumber(contact.getNumber()); in onBindViewHolder()
83 contact.getNumber(), in onBindViewHolder()
DCallDetailsActivity.java56 private DialerContact contact; field in CallDetailsActivity
66 @NonNull DialerContact contact, in newInstance() argument
69 Assert.isNotNull(contact); in newInstance()
72 ProtoParsers.put(intent, EXTRA_CONTACT, contact); in newInstance()
115 contact = ProtoParsers.getTrusted(intent, EXTRA_CONTACT, DialerContact.getDefaultInstance()); in onHandleIntent()
123 recyclerView.setAdapter(new CallDetailsAdapter(this, contact, entries, this)); in onHandleIntent()
180 data.putExtra(EXTRA_PHONE_NUMBER, contact.getNumber()); in onPostExecute()
/packages/apps/Dialer/java/com/android/dialer/contactactions/
DContactActionBottomSheet.java46 private final DialerContact contact; field in ContactActionBottomSheet
49 Context context, DialerContact contact, List<ContactActionModule> modules) { in ContactActionBottomSheet() argument
52 this.contact = contact; in ContactActionBottomSheet()
57 Context context, DialerContact contact, List<ContactActionModule> modules) { in show() argument
58 ContactActionBottomSheet sheet = new ContactActionBottomSheet(context, contact, modules); in show()
86 contact.hasContactUri() ? Uri.parse(contact.getContactUri()) : null, in getContactView()
87 contact.getPhotoId(), in getContactView()
88 contact.hasPhotoUri() ? Uri.parse(contact.getPhotoUri()) : null, in getContactView()
89 contact.getNameOrNumber(), in getContactView()
90 contact.getContactType()); in getContactView()
[all …]
/packages/apps/Dialer/java/com/android/dialer/app/list/
DPhoneFavoritesTileAdapter.java249 final ContactEntry contact = new ContactEntry(); in saveCursorToCache() local
251 contact.id = id; in saveCursorToCache()
252 contact.namePrimary = in saveCursorToCache()
254 contact.nameAlternative = in saveCursorToCache()
258 contact.nameDisplayOrder = mContactsPreferences.getDisplayOrder(); in saveCursorToCache()
259 contact.photoUri = (photoUri != null ? Uri.parse(photoUri) : null); in saveCursorToCache()
260 contact.lookupKey = lookupKey; in saveCursorToCache()
261 contact.lookupUri = in saveCursorToCache()
264 contact.isFavorite = isStarred; in saveCursorToCache()
265 contact.isDefaultNumber = isDefaultNumber; in saveCursorToCache()
[all …]
/packages/apps/Contacts/src/com/android/contacts/database/
DSimContactDaoImpl.java215 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/Dialer/java/com/android/dialer/callcomposer/
DCallComposerActivity.java121 private DialerContact contact; field in CallComposerActivity
149 public static Intent newIntent(Context context, DialerContact contact) { in newIntent() argument
151 ProtoParsers.put(intent, ARG_CALL_COMPOSER_CONTACT, contact); in newIntent()
218 sessionId = getEnrichedCallManager().startCallComposerSession(contact.getNumber()); in onResume()
222 sessionId = getEnrichedCallManager().startCallComposerSession(contact.getNumber()); in onResume()
398 new CallIntentBuilder(contact.getNumber(), CallInitiationType.Type.CALL_COMPOSER).build()); in placeRCSCall()
489 contact = DialerContact.parseFrom(bytes); in onHandleIntent()
494 contact = in onHandleIntent()
511 contact.hasContactUri() ? Uri.parse(contact.getContactUri()) : null, in updateContactInfo()
512 contact.getPhotoId(), in updateContactInfo()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/map/
DSmsMmsContacts.java148 MapContact contact = mNames.get(phone); in getContactNameFromPhone() local
150 if(contact != null){ in getContactNameFromPhone()
151 if(contact.getId() < 0) { in getContactNameFromPhone()
155 return contact; in getContactNameFromPhone()
161 if(p.matcher(contact.getName()).find()) { in getContactNameFromPhone()
162 return contact; in getContactNameFromPhone()
184 contact = MapContact.create(id, name); in getContactNameFromPhone()
185 mNames.put(phone, contact); in getContactNameFromPhone()
187 contact = MapContact.create(-1, null); in getContactNameFromPhone()
188 mNames.put(phone, contact); in getContactNameFromPhone()
[all …]
DBluetoothMapConvoListingElement.java120 public void addContact(BluetoothMapConvoContactElement contact){ in addContact() argument
123 mContacts.add(contact); in addContact()
126 public void removeContact(BluetoothMapConvoContactElement contact){ in removeContact() argument
127 mContacts.remove(contact); in removeContact()
272 for(BluetoothMapConvoContactElement contact:mContacts){ in encode()
273 contact.encode(xmlConvoElement); in encode()
/packages/apps/Contacts/src/com/android/contacts/activities/
DAttachPhotoActivity.java207 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/Dialer/java/com/android/dialer/simulator/impl/
DSimulatorContacts.java120 for (Contact contact : SIMPLE_CONTACTS) { in populateContacts()
121 addContact(contact, operations); in populateContacts()
130 private static void addContact(Contact contact, List<ContentProviderOperation> operations) { in addContact() argument
135 .withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, contact.getAccountType()) in addContact()
136 .withValue(ContactsContract.RawContacts.ACCOUNT_NAME, contact.getAccountName()) in addContact()
137 .withValue(ContactsContract.RawContacts.STARRED, contact.getIsStarred() ? 1 : 0) in addContact()
141 if (!TextUtils.isEmpty(contact.getName())) { in addContact()
149 ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME, contact.getName()) in addContact()
153 if (contact.getPhotoStream() != null) { in addContact()
162 contact.getPhotoStream().toByteArray()) in addContact()
[all …]
/packages/apps/Dialer/java/com/android/dialer/app/dialpad/
DSmartDialCursorLoader.java97 for (ContactNumber contact : allMatches) { in loadInBackground()
98 row[PhoneQuery.PHONE_ID] = contact.dataId; in loadInBackground()
99 row[PhoneQuery.PHONE_NUMBER] = contact.phoneNumber; in loadInBackground()
100 row[PhoneQuery.CONTACT_ID] = contact.id; in loadInBackground()
101 row[PhoneQuery.LOOKUP_KEY] = contact.lookupKey; in loadInBackground()
102 row[PhoneQuery.PHOTO_ID] = contact.photoId; in loadInBackground()
103 row[PhoneQuery.DISPLAY_NAME] = contact.displayName; in loadInBackground()
104 row[PhoneQuery.CARRIER_PRESENCE] = contact.carrierPresence; in loadInBackground()
/packages/apps/Contacts/src/com/android/contacts/
DSimImportFragment.java426 public boolean existsInCurrentAccount(SimContact contact) { in existsInCurrentAccount() argument
430 return mExistingMap.get(mSelectedAccount).contains(contact); in existsInCurrentAccount()
433 private String getItemLabel(SimContact contact) { in getItemLabel() argument
434 if (contact.hasName()) { in getItemLabel()
435 return contact.getName(); in getItemLabel()
436 } else if (contact.hasPhone()) { in getItemLabel()
437 return contact.getPhone(); in getItemLabel()
438 } else if (contact.hasEmails()) { in getItemLabel()
439 return contact.getEmails()[0]; in getItemLabel()
/packages/apps/Contacts/tests/src/com/android/contacts/tests/
DSimContactsTestHelper.java92 for (SimContact contact : contacts) { in deleteAllSimContacts()
95 .withSelection(getWriteSelection(contact), null) in deleteAllSimContacts()
119 for (SimContact contact : contacts) { in captureRestoreSnapshot()
120 final String[] emails = contact.getEmails(); in captureRestoreSnapshot()
127 .withValue("tag", contact.getName()) in captureRestoreSnapshot()
128 .withValue("number", contact.getPhone()) in captureRestoreSnapshot()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
DContactsManagerTest.java114 ContactsManager.RankedContact contact = new ContactsManager.RankedContact(cursor); in testComputeAffinity() local
115 contact.computeAffinity(1, month_ago); in testComputeAffinity()
116 assertEquals(contact.getAffinity(), 1.0f); in testComputeAffinity()
117 contact.computeAffinity(2, now); in testComputeAffinity()
118 assertEquals(contact.getAffinity(), (2.0f/3.0f + (float)Math.pow(0.5, 3) + 1.0f) / 3); in testComputeAffinity()
/packages/apps/Contacts/src/com/android/contacts/editor/
DContactEditorFragment.java390 public void onLoadFinished(Loader<Contact> loader, Contact contact) {
396 if (!contact.isLoaded()) {
405 mLookupUri = contact.getLookupUri();
407 setState(contact);
1053 private void setState(Contact contact) { in setState() argument
1061 mContact = contact; in setState()
1062 mRawContacts = contact.getRawContacts(); in setState()
1066 if (!contact.isUserProfile() && !contact.isWritableContact(mContext)) { in setState()
1068 mReadOnlyDisplayNameId = contact.getNameRawContactId(); in setState()
1076 setStateForExistingContact(contact.isUserProfile(), mRawContacts); in setState()
[all …]
/packages/apps/EmergencyInfo/tests/robolectric/src/com/android/emergency/preferences/
DEmergencyContactsPreferenceTest.java99 EmergencyContactManager.Contact contact = mock(EmergencyContactManager.Contact.class); in testAddAndRemoveEmergencyContact() local
100 when(mContactFactory.getContact(any(), any())).thenReturn(contact); in testAddAndRemoveEmergencyContact()
101 when(contact.getName()).thenReturn(name); in testAddAndRemoveEmergencyContact()
102 when(contact.getPhoneNumber()).thenReturn(phoneNumber); in testAddAndRemoveEmergencyContact()
105 when(contact.getPhoneUri()).thenReturn(uri); in testAddAndRemoveEmergencyContact()
/packages/apps/Contacts/src/com/android/contacts/model/
DContactLoader.java379 final Contact contact = new Contact( in loadEncodedContactEntity() local
398 contact.setStatuses(new ImmutableMap.Builder<Long, DataStatus>().build()); in loadEncodedContactEntity()
404 contact.setDirectoryMetaData(directoryName, null, accountName, accountType, in loadEncodedContactEntity()
408 contact.setDirectoryMetaData(directoryName, null, null, null, in loadEncodedContactEntity()
435 contact.setRawContacts(new ImmutableList.Builder<RawContact>() in loadEncodedContactEntity()
438 return contact; in loadEncodedContactEntity()
476 Contact contact = loadContactHeaderData(cursor, contactUri); in loadContactEntity() local
508 contact.setRawContacts(rawContactsBuilder.build()); in loadContactEntity()
509 contact.setStatuses(statusesBuilder.build()); in loadContactEntity()
511 return contact; in loadContactEntity()
/packages/apps/Dialer/java/com/android/dialer/app/calllog/
DCallLogListItemViewHolder.java922 DialerContact.Builder contact = DialerContact.newBuilder(); in buildContact() local
923 contact.setPhotoId(info.photoId); in buildContact()
925 contact.setPhotoUri(info.photoUri.toString()); in buildContact()
928 contact.setContactUri(info.lookupUri.toString()); in buildContact()
931 contact.setNameOrNumber((String) nameOrNumber); in buildContact()
933 contact.setContactType(getContactType()); in buildContact()
934 contact.setNumber(number); in buildContact()
937 contact.setDisplayNumber(displayNumber); in buildContact()
940 contact.setNumberLabel(numberType); in buildContact()
947 contact.setSimDetails(simDetails.build()); in buildContact()
[all …]
/packages/apps/Dialer/java/com/android/contacts/common/list/
DPhoneNumberListAdapter.java264 DialerContact.Builder contact = DialerContact.newBuilder(); in getDialerContact() local
265 contact in getDialerContact()
278 contact.setPhotoUri(photoUri); in getDialerContact()
282 contact.setContactUri(contactUri.toString()); in getDialerContact()
286 contact.setDisplayNumber(number); in getDialerContact()
289 return contact.build(); in getDialerContact()

1234