Home
last modified time | relevance | path

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

1234

/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.java506 long contactId = mDbHelper.getContactId(rawContactId); in triggerAggregation() local
508 if (contactId != 0) { in triggerAggregation()
509 updateAggregateData(txContext, contactId); in triggerAggregation()
564 protected final void markContactForAggregation(SQLiteDatabase db, long contactId) { in markContactForAggregation() argument
565 mSelectionArgs1[0] = String.valueOf(contactId); in markContactForAggregation()
633 long contactId = insertContact(db, rawContactId); in onRawContactInsert() local
634 setContactId(rawContactId, contactId); in onRawContactInsert()
635 mDbHelper.updateContactVisible(txContext, contactId); in onRawContactInsert()
636 return contactId; in onRawContactInsert()
668 long contactId = 0; in aggregateContact() local
[all …]
DContactAggregator2.java331 Long contactId = null; in reAggregateRawContacts() local
340 contactId = currentCidForRawContact; in reAggregateRawContacts()
343 if (cid != null && !cid.equals(contactId)) { in reAggregateRawContacts()
356 contactId = currentContactId; in reAggregateRawContacts()
365 createContactForRawContacts(db, txContext, connectedRawContactIds, contactId); in reAggregateRawContacts()
397 private boolean canBeReused(SQLiteDatabase db, Long contactId, in canBeReused() argument
402 mSelectionArgs1[0] = String.valueOf(contactId); in canBeReused()
457 public void updateAggregationAfterVisibilityChange(long contactId) { in updateAggregationAfterVisibilityChange() argument
459 boolean visible = mDbHelper.isContactInDefaultDirectory(db, contactId); in updateAggregationAfterVisibilityChange()
461 markContactForAggregation(db, contactId); in updateAggregationAfterVisibilityChange()
[all …]
/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/apps/Contacts/tests/src/com/android/contacts/tests/allintents/
DAllIntentsActivity.java281 long contactId = findArbitraryContactWithPhoneNumber(); in onListItemClick() local
282 if (contactId != -1) { in onListItemClick()
283 Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId); in onListItemClick()
295 final long contactId = findArbitraryContactWithPhoneNumber(); in onListItemClick() local
296 final Uri uri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId); in onListItemClick()
302 final long contactId = findArbitraryContactWithPhoneNumber(); in onListItemClick() local
303 final Uri uri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId); in onListItemClick()
313 final long contactId = findArbitraryContactWithPhoneNumber(); in onListItemClick() local
314 final Uri uri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId); in onListItemClick()
321 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 …]
DContactsProvider2Test.java852 long contactId = queryContactId(rawContactId); in testDataDirectoryWithLookupUri() local
853 String lookupKey = queryLookupKey(contactId); in testDataDirectoryWithLookupUri()
856 Uri lookupUri = ContactsContract.Contacts.getLookupUri(contactId, lookupKey); in testDataDirectoryWithLookupUri()
862 lookupUri = ContactsContract.Contacts.getLookupUri(contactId + 1, lookupKey); in testDataDirectoryWithLookupUri()
904 long contactId = queryContactId(rawContactId1); in testContactEntitiesWithIdBasedUri() local
906 Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId); in testContactEntitiesWithIdBasedUri()
909 assertEntityRows(entityUri, contactId, rawContactId1, rawContactId2); in testContactEntitiesWithIdBasedUri()
926 long contactId = queryContactId(rawContactId1); in testContactEntitiesWithLookupUri() local
927 String lookupKey = queryLookupKey(contactId); in testContactEntitiesWithLookupUri()
930 Uri contactLookupUri = ContactsContract.Contacts.getLookupUri(contactId, lookupKey); in testContactEntitiesWithLookupUri()
[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 …]
DBaseContactsProvider2Test.java552 protected void markInvisible(long contactId) { in markInvisible() argument
557 " WHERE " + BaseColumns._ID + "=" + contactId); in markInvisible()
565 protected Cursor queryContact(long contactId) { in queryContact() argument
566 return mResolver.query(ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId), in queryContact()
570 protected Cursor queryContact(long contactId, String[] projection) { in queryContact() argument
571 return mResolver.query(ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId), in queryContact()
582 long contactId = c.getLong(c.getColumnIndex(RawContacts.CONTACT_ID)); in queryContactId() local
584 return contactId; in queryContactId()
587 protected long queryPhotoId(long contactId) { in queryPhotoId() argument
588 Cursor c = queryContact(contactId); in queryPhotoId()
[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 …]
/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()
379 private static CursorQueryData lookupStructuredName(final Context context, final long contactId, in lookupStructuredName() argument
387 .appendPath(String.valueOf(contactId)) in lookupStructuredName()
409 public static String lookupFirstName(final Context context, final long contactId) { in lookupFirstName() argument
410 if (isEnterpriseContactId(contactId)) { in lookupFirstName()
416 nameCursor = ContactUtil.lookupStructuredName(context, contactId, true) in lookupFirstName()
435 final String destinationLabel, final long contactId, final String lookupKey, in createRecipientEntry() argument
439 destination, destinationType, destinationLabel, contactId, null, dataId, in createRecipientEntry()
[all …]
/packages/providers/ContactsProvider/tests/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/providers/ContactsProvider/tests/src/com/android/providers/contacts/aggregation/
DContactAggregatorTest.java134 long contactId = queryContactId(rawContactId); in testAggregationCreatesNewAggregate() local
135 assertTrue(contactId != 0); in testAggregationCreatesNewAggregate()
137 String displayName = queryDisplayName(contactId); in testAggregationCreatesNewAggregate()
1273 long contactId = queryContactId(rawContactId); in testDisplayNameSources() local
1275 assertNull(queryDisplayName(contactId)); in testDisplayNameSources()
1278 assertEquals("eclair@android.com", queryDisplayName(contactId)); in testDisplayNameSources()
1281 assertEquals("800-555-5555", queryDisplayName(contactId)); in testDisplayNameSources()
1286 assertEquals("Android", queryDisplayName(contactId)); in testDisplayNameSources()
1289 assertEquals("Dro", queryDisplayName(contactId)); in testDisplayNameSources()
1295 assertEquals("Eclair Android", queryDisplayName(contactId)); in testDisplayNameSources()
[all …]
DContactAggregator2Test.java134 long contactId = queryContactId(rawContactId); in testAggregationCreatesNewAggregate() local
135 assertTrue(contactId != 0); in testAggregationCreatesNewAggregate()
137 String displayName = queryDisplayName(contactId); in testAggregationCreatesNewAggregate()
1282 long contactId = queryContactId(rawContactId); in testDisplayNameSources() local
1284 assertNull(queryDisplayName(contactId)); in testDisplayNameSources()
1287 assertEquals("eclair@android.com", queryDisplayName(contactId)); in testDisplayNameSources()
1290 assertEquals("800-555-5555", queryDisplayName(contactId)); in testDisplayNameSources()
1295 assertEquals("Android", queryDisplayName(contactId)); in testDisplayNameSources()
1298 assertEquals("Dro", queryDisplayName(contactId)); in testDisplayNameSources()
1304 assertEquals("Eclair Android", queryDisplayName(contactId)); in testDisplayNameSources()
[all …]
/packages/apps/Contacts/src/com/android/contacts/list/
DMultiSelectEntryContactListAdapter.java96 public void toggleSelectionOfContactId(long contactId) { in toggleSelectionOfContactId() argument
97 if (mSelectedContactIds.contains(contactId)) { in toggleSelectionOfContactId()
98 mSelectedContactIds.remove(contactId); in toggleSelectionOfContactId()
100 mSelectedContactIds.add(contactId); in toggleSelectionOfContactId()
126 final long contactId = cursor.getLong(ContactQuery.CONTACT_ID); in bindCheckBox() local
127 checkBox.setChecked(mSelectedContactIds.contains(contactId)); in bindCheckBox()
128 checkBox.setTag(contactId); in bindCheckBox()
136 final Long contactId = (Long) checkBox.getTag();
138 mSelectedContactIds.add(contactId);
140 mSelectedContactIds.remove(contactId);
/packages/apps/Contacts/src/com/android/contacts/editor/
DAggregationSuggestionEngine.java72 public long contactId; field in AggregationSuggestionEngine.Suggestion
83 return "ID: " + contactId + " rawContacts: " + rawContacts + " name: " + name in toString()
143 public void setContactId(long contactId) { in setContactId() argument
144 if (contactId != mContactId) { in setContactId()
145 mContactId = contactId; in setContactId()
342 final long contactId = cursor.getLong(0); in updateSuggestedContactIds() local
344 Arrays.binarySearch(mSuggestedContactIds, contactId) < 0) { in updateSuggestedContactIds()
347 newIds.add(contactId); in updateSuggestedContactIds()
383 long contactId = mDataCursor.getLong(DataQuery.CONTACT_ID); in getSuggestions() local
384 if (contactId != currentContactId) { in getSuggestions()
[all …]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DContactsProvider2.java3209 long contactId = -1; in insertStatusUpdate() local
3284 contactId = cursor.getLong(DataContactsQuery.CONTACT_ID); in insertStatusUpdate()
3306 values.put(PresenceColumns.CONTACT_ID, contactId); in insertStatusUpdate()
3406 if (contactId != -1) { in insertStatusUpdate()
3407 mAggregator.get().updateLastStatusUpdateId(contactId); in insertStatusUpdate()
3481 long contactId = ContentUris.parseId(uri); in deleteInTransaction() local
3482 return deleteContact(contactId, callerIsSyncAdapter); in deleteInTransaction()
3494 final long contactId = lookupContactIdByLookupKey(db, lookupKey); in deleteInTransaction() local
3495 return deleteContact(contactId, callerIsSyncAdapter); in deleteInTransaction()
3505 long contactId = ContentUris.parseId(uri); in deleteInTransaction() local
[all …]
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/Contacts/src/com/android/contacts/group/
DSuggestedMemberListAdapter.java118 public void addNewMember(long contactId) { in addNewMember() argument
119 mExistingMemberContactIds.add(contactId); in addNewMember()
122 public void removeMember(long contactId) { in removeMember() argument
123 if (mExistingMemberContactIds.contains(contactId)) { in removeMember()
124 mExistingMemberContactIds.remove(contactId); in removeMember()
218 long contactId = cursor.getLong(CONTACT_ID_COLUMN_INDEX); in performFiltering() local
220 if (mExistingMemberContactIds.contains(contactId)) { in performFiltering()
226 contactId); in performFiltering()
333 public SuggestedMember(long rawContactId, String displayName, long contactId) { in SuggestedMember() argument
336 mContactId = contactId; in SuggestedMember()
/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/experimental/LoaderApp/src/com/android/loaderapp/util/
DContactsUtils.java275 long contactId = -1; in queryForContactId() local
281 contactId = contactIdCursor.getLong(0); in queryForContactId()
288 return contactId; in queryForContactId()
291 public static String querySuperPrimaryPhone(ContentResolver cr, long contactId) { in querySuperPrimaryPhone() argument
295 Uri baseUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId); in querySuperPrimaryPhone()
315 public static long queryForRawContactId(ContentResolver cr, long contactId) { in queryForRawContactId() argument
321 RawContacts.CONTACT_ID + "=" + contactId, null, null); in queryForRawContactId()
334 public static ArrayList<Long> queryForAllRawContactIds(ContentResolver cr, long contactId) { in queryForAllRawContactIds() argument
340 RawContacts.CONTACT_ID + "=" + contactId, null, null); in queryForAllRawContactIds()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/util/
DAccountImageChangeObserver.java147 long contactId = getContactIdForAccount(context, thisAccount); in registerChangeUriIfPresent() local
148 if (contactId != -1) { in registerChangeUriIfPresent()
150 contactId); in registerChangeUriIfPresent()
174 long contactId = -1; in getContactIdForAccount() local
180 contactId = c.getLong(1); in getContactIdForAccount()
189 if (contactId != -1 && !TextUtils.isEmpty(lookupKey)) { in getContactIdForAccount()
190 return contactId; in getContactIdForAccount()

1234