Home
last modified time | relevance | path

Searched refs:contactId (Results 1 – 25 of 112) sorted by relevance

12345

/packages/providers/ContactsProvider/src/com/android/providers/contacts/aggregation/util/
DContactMatcher.java163 private MatchScore getMatchingScore(long contactId) { in getMatchingScore() argument
164 MatchScore matchingScore = mScores.get(contactId); in getMatchingScore()
168 matchingScore.reset(contactId); in getMatchingScore()
170 matchingScore = new MatchScore(contactId); in getMatchingScore()
174 mScores.put(contactId, matchingScore); in getMatchingScore()
182 public void matchIdentity(long contactId) { in matchIdentity() argument
183 updatePrimaryScore(contactId, MatchScore.MAX_SCORE); in matchIdentity()
193 public void matchName(long contactId, int candidateNameType, String candidateName, in matchName() argument
201 updatePrimaryScore(contactId, maxScore); in matchName()
241 updatePrimaryScore(contactId, score); in matchName()
[all …]
DRawContactMatcher.java168 private MatchScore getMatchingScore(long rawContactId, long contactId, long accountId) { in getMatchingScore() argument
173 matchingScore.reset(rawContactId, contactId, accountId); in getMatchingScore()
175 matchingScore = new MatchScore(rawContactId, contactId, accountId); in getMatchingScore()
191 public void matchName(long rawContactId, long contactId, long accountId, int in matchName() argument
199 updatePrimaryScore(rawContactId, contactId, accountId, maxScore); in matchName()
239 updatePrimaryScore(rawContactId, contactId, accountId, score); in matchName()
242 public void matchIdentity(long rawContactId, long contactId, long accountId) { in matchIdentity() argument
243 updateSecondaryScore(rawContactId, contactId, accountId, IDENTITY_MATCH_SCORE); in matchIdentity()
246 public void updateScoreWithPhoneNumberMatch(long rawContactId, long contactId, long accountId) { in updateScoreWithPhoneNumberMatch() argument
247 updateSecondaryScore(rawContactId, contactId, accountId, PHONE_MATCH_SCORE); in updateScoreWithPhoneNumberMatch()
[all …]
DMatchScore.java38 public MatchScore(long rawContactId, long contactId, long accountId) { in MatchScore() argument
40 this.mContactId = contactId; in MatchScore()
44 public MatchScore(long contactId) { in MatchScore() argument
46 this.mContactId = contactId; in MatchScore()
50 public void reset(long rawContactId, long contactId, long accountId) { in reset() argument
52 this.mContactId = contactId; in reset()
61 public void reset(long contactId) { in reset() argument
62 this.reset(0l, contactId, 0l); in reset()
/packages/providers/ContactsProvider/src/com/android/providers/contacts/aggregation/
DContactAggregator.java94 long contactId = -1; // Best matching contact ID. in aggregateContact() local
104 contactId = pickBestMatchBasedOnExceptions(db, rawContactId, matcher); in aggregateContact()
105 if (contactId == -1) { in aggregateContact()
111 contactId = pickBestMatchBasedOnData(db, rawContactId, candidates, matcher); in aggregateContact()
116 if (contactId != -1 && contactId != currentContactId) { in aggregateContact()
123 mSelectionArgs2[0] = String.valueOf(contactId); in aggregateContact()
159 contactId = -1; in aggregateContact()
181 if (contactId == -1 in aggregateContact()
185 contactId = currentContactId; in aggregateContact()
188 if (contactId == currentContactId) { in aggregateContact()
[all …]
DAbstractContactAggregator.java518 long contactId = mDbHelper.getContactId(rawContactId); in triggerAggregation() local
520 if (contactId != 0) { in triggerAggregation()
521 updateAggregateData(txContext, contactId); in triggerAggregation()
576 protected final void markContactForAggregation(SQLiteDatabase db, long contactId) { in markContactForAggregation() argument
577 mSelectionArgs1[0] = String.valueOf(contactId); in markContactForAggregation()
645 long contactId = insertContact(db, rawContactId); in onRawContactInsert() local
646 setContactId(rawContactId, contactId); in onRawContactInsert()
647 mDbHelper.updateContactVisible(txContext, contactId); in onRawContactInsert()
648 return contactId; in onRawContactInsert()
680 long contactId = 0; in aggregateContact() local
[all …]
DContactAggregator2.java333 Long contactId = null; in reAggregateRawContacts() local
342 contactId = currentCidForRawContact; in reAggregateRawContacts()
345 if (cid != null && !cid.equals(contactId)) { in reAggregateRawContacts()
358 contactId = currentContactId; in reAggregateRawContacts()
367 createContactForRawContacts(db, txContext, connectedRawContactIds, contactId); in reAggregateRawContacts()
399 private boolean canBeReused(SQLiteDatabase db, Long contactId, in canBeReused() argument
404 mSelectionArgs1[0] = String.valueOf(contactId); in canBeReused()
459 public void updateAggregationAfterVisibilityChange(long contactId) { in updateAggregationAfterVisibilityChange() argument
461 boolean visible = mDbHelper.isContactInDefaultDirectory(db, contactId); in updateAggregationAfterVisibilityChange()
463 markContactForAggregation(db, contactId); in updateAggregationAfterVisibilityChange()
[all …]
/packages/apps/Contacts/tests/src/com/android/contacts/tests/allintents/
DAllIntentsActivity.java295 long contactId = findArbitraryContactWithPhoneNumber(); in onListItemClick() local
296 if (contactId != -1) { in onListItemClick()
297 Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId); in onListItemClick()
305 final long contactId = findArbitraryContactWithPhoneNumber(); in onListItemClick() local
306 if (contactId != -1) { in onListItemClick()
307 final Uri uri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId); in onListItemClick()
314 final long contactId = findArbitraryContactWithPhoneNumber(); in onListItemClick() local
315 if (contactId != -1) { in onListItemClick()
316 final Uri uri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId); in onListItemClick()
327 final long contactId = findArbitraryContactWithPhoneNumber(); in onListItemClick() local
[all …]
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DSearchIndexManagerTest.java53 long contactId = queryContactId(rawContactId); in testSearchIndexForStructuredName() local
69 contactId, null, "John Doe Bob I Parr Helen I Parr PhD par helen parhelen", null); in testSearchIndexForStructuredName()
74 long contactId = queryContactId(rawContactId); in testSearchIndexForStructuredName_phoneticOnly() local
89 assertSearchIndex(contactId, null, "yamada taro", null); in testSearchIndexForStructuredName_phoneticOnly()
99 long contactId = queryContactId(rawContactId); in testSearchIndexForChineseName() local
105 contactId, null, "\u695A\u8FAD \u695A\u8FAD CI \u8FAD CHUCI CC C", null); in testSearchIndexForChineseName()
135 long contactId = queryContactId(rawContactId); in testSearchIndexForKoreanName() local
140 assertSearchIndex(contactId, null, in testSearchIndexForKoreanName()
199 long contactId = queryContactId(rawContactId); in testSearchIndexForOrganization() local
210 assertSearchIndex(contactId, in testSearchIndexForOrganization()
[all …]
DContactLookupKeyTest.java54 long contactId = queryContactId(rawContactId1); in testLookupKeyUsingDisplayNameAndNoAccount() local
55 assertStoredValue(ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId), in testLookupKeyUsingDisplayNameAndNoAccount()
60 assertStoredValue(lookupUri, Contacts._ID, contactId); in testLookupKeyUsingDisplayNameAndNoAccount()
63 assertStoredValue(ContentUris.withAppendedId(lookupUri, contactId), in testLookupKeyUsingDisplayNameAndNoAccount()
64 Contacts._ID, contactId); in testLookupKeyUsingDisplayNameAndNoAccount() local
67 assertStoredValue(ContentUris.withAppendedId(lookupUri, contactId + 1), in testLookupKeyUsingDisplayNameAndNoAccount()
68 Contacts._ID, contactId); in testLookupKeyUsingDisplayNameAndNoAccount() local
89 long contactId = queryContactId(rawContactId1); in testLookupKeyUsingSourceIdAndNoAccount() local
90 assertStoredValue(ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId), in testLookupKeyUsingSourceIdAndNoAccount()
94 assertStoredValue(lookupUri, Contacts._ID, contactId); in testLookupKeyUsingSourceIdAndNoAccount()
[all …]
DContactsProvider2Test.java1032 long contactId = queryContactId(rawContactId); in testDataDirectoryWithLookupUri() local
1033 String lookupKey = queryLookupKey(contactId); in testDataDirectoryWithLookupUri()
1036 Uri lookupUri = ContactsContract.Contacts.getLookupUri(contactId, lookupKey); in testDataDirectoryWithLookupUri()
1042 lookupUri = ContactsContract.Contacts.getLookupUri(contactId + 1, lookupKey); in testDataDirectoryWithLookupUri()
1084 long contactId = queryContactId(rawContactId1); in testContactEntitiesWithIdBasedUri() local
1086 Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId); in testContactEntitiesWithIdBasedUri()
1089 assertEntityRows(entityUri, contactId, rawContactId1, rawContactId2); in testContactEntitiesWithIdBasedUri()
1106 long contactId = queryContactId(rawContactId1); in testContactEntitiesWithLookupUri() local
1107 String lookupKey = queryLookupKey(contactId); in testContactEntitiesWithLookupUri()
1110 Uri contactLookupUri = ContactsContract.Contacts.getLookupUri(contactId, lookupKey); in testContactEntitiesWithLookupUri()
[all …]
DGroupsTest.java232 final long contactId = this.queryContactId(rawContactId); in assertRawContactVisible() local
233 assertContactVisible(contactId, expected); in assertRawContactVisible()
236 public void assertContactVisible(long contactId, boolean expected) { in assertContactVisible() argument
239 }, Contacts._ID + "=" + contactId, null, null); in assertContactVisible()
246 public ContentProviderOperation buildVisibleAssert(long contactId, boolean visible) { in buildVisibleAssert() argument
248 Contacts._ID + "=" + contactId + " AND " + Contacts.IN_VISIBLE_GROUP + "=" in buildVisibleAssert()
260 final long contactId = this.queryContactId(rawContactId); in testDelayVisibleTransaction() local
261 final Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId); in testDelayVisibleTransaction()
269 oper.add(buildVisibleAssert(contactId, true)); in testDelayVisibleTransaction()
272 oper.add(buildVisibleAssert(contactId, true)); in testDelayVisibleTransaction()
[all …]
DBaseContactsProvider2Test.java564 protected void markInvisible(long contactId) { in markInvisible() argument
569 " WHERE " + BaseColumns._ID + "=" + contactId); in markInvisible()
589 protected Cursor queryContact(long contactId) { in queryContact() argument
590 return mResolver.query(ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId), in queryContact()
594 protected Cursor queryContact(long contactId, String[] projection) { in queryContact() argument
595 return mResolver.query(ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId), in queryContact()
606 long contactId = c.getLong(c.getColumnIndex(RawContacts.CONTACT_ID)); in queryContactId() local
608 return contactId; in queryContactId()
611 protected long queryPhotoId(long contactId) { in queryPhotoId() argument
612 Cursor c = queryContact(contactId); in queryPhotoId()
[all …]
/packages/providers/ContactsProvider/test_common/src/com/android/providers/contacts/testutil/
DDatabaseAsserts.java60 long contactId = RawContactUtil.queryContactIdByRawContactId(resolver, rawContactId); in assertAndCreateContact() local
61 MoreAsserts.assertNotEqual(CommonDatabaseUtils.NOT_FOUND, contactId); in assertAndCreateContact()
63 return new ContactIdPair(contactId, rawContactId); in assertAndCreateContact()
75 long contactId = RawContactUtil.queryContactIdByRawContactId(resolver, rawContactId); in assertAndCreateContactWithName() local
76 MoreAsserts.assertNotEqual(CommonDatabaseUtils.NOT_FOUND, contactId); in assertAndCreateContactWithName()
78 return new ContactIdPair(contactId, rawContactId); in assertAndCreateContactWithName()
88 public static void assertHasDeleteLogGreaterThan(ContentResolver resolver, long contactId, in assertHasDeleteLogGreaterThan() argument
90 Assert.assertFalse(ContactUtil.recordExistsForContactId(resolver, contactId)); in assertHasDeleteLogGreaterThan()
93 contactId); in assertHasDeleteLogGreaterThan()
105 public ContactIdPair(long contactId, long rawContactId) { in ContactIdPair() argument
[all …]
DContactUtil.java33 public static void update(ContentResolver resolver, long contactId, in update() argument
35 Uri uri = ContentUris.withAppendedId(URI, contactId); in update()
39 public static void delete(ContentResolver resolver, long contactId) { in delete() argument
40 Uri uri = ContentUris.withAppendedId(URI, contactId); in delete()
44 public static boolean recordExistsForContactId(ContentResolver resolver, long contactId) { in recordExistsForContactId() argument
48 Uri uri = ContentUris.withAppendedId(URI, contactId); in recordExistsForContactId()
56 public static long queryContactLastUpdatedTimestamp(ContentResolver resolver, long contactId) { in queryContactLastUpdatedTimestamp() argument
61 Uri uri = ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, contactId); in queryContactLastUpdatedTimestamp()
/packages/apps/Messaging/src/com/android/messaging/util/
DContactUtil.java195 public static void showOrAddContact(final View view, final long contactId, in showOrAddContact() argument
198 if (contactId > ParticipantData.PARTICIPANT_CONTACT_ID_NOT_RESOLVED in showOrAddContact()
201 ContactsContract.Contacts.getLookupUri(contactId, contactLookupKey); in showOrAddContact()
413 private static CursorQueryData lookupStructuredName(final Context context, final long contactId, in lookupStructuredName() argument
421 .appendPath(String.valueOf(contactId)) in lookupStructuredName()
443 public static String lookupFirstName(final Context context, final long contactId) { in lookupFirstName() argument
444 if (isEnterpriseContactId(contactId)) { in lookupFirstName()
450 nameCursor = ContactUtil.lookupStructuredName(context, contactId, true) in lookupFirstName()
469 final String destinationLabel, final long contactId, final String lookupKey, in createRecipientEntry() argument
473 destination, destinationType, destinationLabel, contactId, null, dataId, in createRecipientEntry()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/pbap/
DBluetoothPbapUtils.java233 String contactId = c.getString(0); in updateSecondaryVersionCounter() local
236 updatedList.add(contactId); in updateSecondaryVersionCounter()
238 currentContactSet.add(contactId); in updateSecondaryVersionCounter()
431 String contactId, data, mimeType; in fetchAndSetContacts() local
438 contactId = c.getString(indexCId); in fetchAndSetContacts()
444 setContactFields(TYPE_PHONE, contactId, data); in fetchAndSetContacts()
448 setContactFields(TYPE_EMAIL, contactId, data); in fetchAndSetContacts()
452 setContactFields(TYPE_ADDRESS, contactId, data); in fetchAndSetContacts()
456 setContactFields(TYPE_NAME, contactId, data); in fetchAndSetContacts()
460 sContactSet.add(contactId); in fetchAndSetContacts()
[all …]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/database/
DContactsTableUtil.java58 public static void updateContactLastUpdateByContactId(SQLiteDatabase db, long contactId) { in updateContactLastUpdateByContactId() argument
63 new String[] {String.valueOf(contactId)}); in updateContactLastUpdateByContactId()
112 public static int deleteContact(SQLiteDatabase db, long contactId) { in deleteContact() argument
113 DeletedContactsTableUtil.insertDeletedContact(db, contactId); in deleteContact()
114 return db.delete(Tables.CONTACTS, Contacts._ID + " = ?", new String[]{contactId + ""}); in deleteContact()
134 long contactId = cursor.getLong(0); in deleteContactIfSingleton() local
139 return deleteContact(db, contactId); in deleteContactIfSingleton()
/packages/apps/Contacts/src/com/android/contacts/list/
DMultiSelectEntryContactListAdapter.java132 public void toggleSelectionOfContactId(long contactId) { in toggleSelectionOfContactId() argument
133 if (mSelectedContactIds.contains(contactId)) { in toggleSelectionOfContactId()
134 mSelectedContactIds.remove(contactId); in toggleSelectionOfContactId()
136 mSelectedContactIds.add(contactId); in toggleSelectionOfContactId()
190 final long contactId = cursor.getLong(mContactIdColumnIndex); in bindCheckBox() local
191 checkBox.setChecked(mSelectedContactIds.contains(contactId)); in bindCheckBox()
193 checkBox.setTag(contactId); in bindCheckBox()
/packages/providers/ContactsProvider/src/com/android/providers/contacts/enterprise/
DEnterpriseContactsCursorWrapper.java82 final long contactId = super.getLong(contactIdIndices[0]); in getString() local
88 return getCorpThumbnailUri(contactId, getWrappedCursor()); in getString()
94 return getCorpDisplayPhotoUri(contactId, getWrappedCursor()); in getString()
168 private static String getCorpThumbnailUri(long contactId, Cursor originalCursor) { in getCorpThumbnailUri() argument
178 return ContentUris.appendId(Contacts.CORP_CONTENT_URI.buildUpon(), contactId) in getCorpThumbnailUri()
194 private static String getCorpDisplayPhotoUri(long contactId, Cursor originalCursor) { in getCorpDisplayPhotoUri() argument
203 return ContentUris.appendId(Contacts.CORP_CONTENT_URI.buildUpon(), contactId) in getCorpDisplayPhotoUri()
207 return ContentUris.appendId(Contacts.CORP_CONTENT_URI.buildUpon(), contactId) in getCorpDisplayPhotoUri()
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DGlobalSearchSupport.java72 long contactId; field in GlobalSearchSupport.SearchSuggestion
101 list.add(contactId); // _id in asList()
121 list.add(contactId); in addColumnValue()
146 return Contacts.getLookupUri(contactId, lookupKey).toString(); in buildUri()
150 contactId = 0; in reset()
211 long contactId; in handleSearchShortcutRefresh() local
213 contactId = mContactsProvider.lookupContactIdByLookupKey(db, lookupKey); in handleSearchShortcutRefresh()
215 contactId = -1L; in handleSearchShortcutRefresh()
220 db, projection, ContactsColumns.CONCRETE_ID + "=" + contactId, filter, null, in handleSearchShortcutRefresh()
259 suggestion.contactId = c.getLong(0); in addSearchSuggestionsBasedOnFilter()
/packages/apps/Messaging/src/com/android/messaging/datamodel/
DBugleRecipientEntry.java32 final long contactId, final Long directoryId, final long dataId, in BugleRecipientEntry() argument
35 super(entryType, displayName, destination, destinationType, destinationLabel, contactId, in BugleRecipientEntry()
41 final String destinationLabel, final long contactId, final Long directoryId, in constructTopLevelEntry() argument
45 destinationLabel, contactId, directoryId, dataId, (thumbnailUriAsString != null in constructTopLevelEntry()
51 final String destinationLabel, final long contactId, final Long directoryId, in constructSecondLevelEntry() argument
55 destinationLabel, contactId, directoryId, dataId, (thumbnailUriAsString != null in constructSecondLevelEntry()
/packages/apps/Dialer/java/com/android/dialer/speeddial/loader/
DSpeedDialUiItemMutator.java155 if (entry.contactId() == speedDialUiItem.contactId()) { in removeStarredSpeedDialUiItem()
181 new String[] {Long.toString(speedDialUiItem.contactId())}); in unstarContact()
224 new String[] {Long.toString(item.contactId())}); in insertNewContactEntry()
274 .setContactId(contact.contactId()) in loadSpeedDialUiItemsInternal()
288 if (speedDialUiItems.stream().noneMatch(c -> c.contactId() == contact.contactId())) { in loadSpeedDialUiItemsInternal()
314 uri = Contacts.getLookupUri(entry.contactId(), entry.lookupKey()); in requestHighResolutionPhoto()
376 Contacts.getLookupUri(entry.contactId(), entry.lookupKey()), in updateContactIdsAndLookupKeys()
415 entries.forEach(entry -> contactIds.add(Long.toString(entry.contactId()))); in getSpeedDialUiItemsFromEntries()
439 if (entry.contactId() == item.contactId()) { in getSpeedDialUiItemsFromEntries()
592 if (contactIds.add(item.contactId())) { in updatePinnedPosition()
[all …]
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/aggregation/
DContactAggregatorTest.java158 long contactId = queryContactId(rawContactId); in testAggregationCreatesNewAggregate() local
159 assertTrue(contactId != 0); in testAggregationCreatesNewAggregate()
161 String displayName = queryDisplayName(contactId); in testAggregationCreatesNewAggregate()
1308 long contactId = queryContactId(rawContactId); in testDisplayNameSources() local
1310 assertNull(queryDisplayName(contactId)); in testDisplayNameSources()
1313 assertEquals("eclair@android.com", queryDisplayName(contactId)); in testDisplayNameSources()
1316 assertEquals("800-555-5555", queryDisplayName(contactId)); in testDisplayNameSources()
1321 assertEquals("Android", queryDisplayName(contactId)); in testDisplayNameSources()
1324 assertEquals("Dro", queryDisplayName(contactId)); in testDisplayNameSources()
1330 assertEquals("Eclair Android", queryDisplayName(contactId)); in testDisplayNameSources()
[all …]
DContactAggregator2Test.java158 long contactId = queryContactId(rawContactId); in testAggregationCreatesNewAggregate() local
159 assertTrue(contactId != 0); in testAggregationCreatesNewAggregate()
161 String displayName = queryDisplayName(contactId); in testAggregationCreatesNewAggregate()
1316 long contactId = queryContactId(rawContactId); in testDisplayNameSources() local
1318 assertNull(queryDisplayName(contactId)); in testDisplayNameSources()
1321 assertEquals("eclair@android.com", queryDisplayName(contactId)); in testDisplayNameSources()
1324 assertEquals("800-555-5555", queryDisplayName(contactId)); in testDisplayNameSources()
1329 assertEquals("Android", queryDisplayName(contactId)); in testDisplayNameSources()
1332 assertEquals("Dro", queryDisplayName(contactId)); in testDisplayNameSources()
1338 assertEquals("Eclair Android", queryDisplayName(contactId)); in testDisplayNameSources()
[all …]
/packages/apps/Contacts/src/com/android/contacts/editor/
DAggregationSuggestionEngine.java61 public long contactId; field in AggregationSuggestionEngine.Suggestion
73 .add("contactId", contactId) in toString()
139 public void setContactId(long contactId) { in setContactId() argument
140 if (contactId != mContactId) { in setContactId()
141 mContactId = contactId; in setContactId()
345 final long contactId = cursor.getLong(0); in updateSuggestedContactIds() local
346 if (!changed && Arrays.binarySearch(mSuggestedContactIds, contactId) < 0) { in updateSuggestedContactIds()
349 newIds.add(contactId); in updateSuggestedContactIds()
390 suggestion.contactId = mDataCursor.getLong(DataQuery.CONTACT_ID); in getSuggestions()

12345