Home
last modified time | relevance | path

Searched refs:rawContactId (Results 1 – 25 of 66) sorted by relevance

123

/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DSearchIndexManagerTest.java52 long rawContactId = RawContactUtil.createRawContact(mResolver); in testSearchIndexForStructuredName() local
53 long contactId = queryContactId(rawContactId); in testSearchIndexForStructuredName()
54 DataUtil.insertStructuredName(mResolver, rawContactId, "John", "Doe"); in testSearchIndexForStructuredName()
57 DataUtil.insertStructuredName(mResolver, rawContactId, values); in testSearchIndexForStructuredName()
66 DataUtil.insertStructuredName(mResolver, rawContactId, values); in testSearchIndexForStructuredName()
73 long rawContactId = RawContactUtil.createRawContact(mResolver); in testSearchIndexForStructuredName_phoneticOnly() local
74 long contactId = queryContactId(rawContactId); in testSearchIndexForStructuredName_phoneticOnly()
75 DataUtil.insertStructuredName(mResolver, rawContactId, "John", "Doe"); in testSearchIndexForStructuredName_phoneticOnly()
78 DataUtil.insertStructuredName(mResolver, rawContactId, values); in testSearchIndexForStructuredName_phoneticOnly()
87 DataUtil.insertStructuredName(mResolver, rawContactId, values); in testSearchIndexForStructuredName_phoneticOnly()
[all …]
DBaseContactsProvider2Test.java228 protected Uri insertOrganization(long rawContactId, ContentValues values) { in insertOrganization() argument
229 return insertOrganization(rawContactId, values, false, false); in insertOrganization()
232 protected Uri insertOrganization(long rawContactId, ContentValues values, boolean primary) { in insertOrganization() argument
233 return insertOrganization(rawContactId, values, primary, false); in insertOrganization()
236 protected Uri insertOrganization(long rawContactId, ContentValues values, boolean primary, in insertOrganization() argument
238 values.put(Data.RAW_CONTACT_ID, rawContactId); in insertOrganization()
252 protected Uri insertPhoneNumber(long rawContactId, String phoneNumber) { in insertPhoneNumber() argument
253 return insertPhoneNumber(rawContactId, phoneNumber, false); in insertPhoneNumber()
256 protected Uri insertPhoneNumber(long rawContactId, String phoneNumber, boolean primary) { in insertPhoneNumber() argument
257 return insertPhoneNumber(rawContactId, phoneNumber, primary, false, Phone.TYPE_HOME); in insertPhoneNumber()
[all …]
DContactsProvider2Test.java838 long rawContactId = ContentUris.parseId(rowUri); in testRawContactsInsert() local
841 assertSelection(RawContacts.CONTENT_URI, values, RawContacts._ID, rawContactId); in testRawContactsInsert()
848 long rawContactId = RawContactUtil.createRawContactWithName(mResolver); in testDataDirectoryWithLookupUri() local
849 insertPhoneNumber(rawContactId, "555-GOOG-411"); in testDataDirectoryWithLookupUri()
850 insertEmail(rawContactId, "google@android.com"); in testDataDirectoryWithLookupUri()
852 long contactId = queryContactId(rawContactId); in testDataDirectoryWithLookupUri()
1009 long rawContactId = RawContactUtil.createRawContactWithName(mResolver, "John", "Doe"); in testDataInsert() local
1012 putDataValues(values, rawContactId); in testDataInsert()
1016 long contactId = queryContactId(rawContactId); in testDataInsert()
1023 Uri rawContactUri = ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId); in testDataInsert()
[all …]
DSqlInjectionDetectionTest.java46 long rawContactId = RawContactUtil.createRawContactWithName(mResolver, "Hot", "Tamale"); in testPhoneQueryValid() local
47 insertPhoneNumber(rawContactId, "555-123-4567"); in testPhoneQueryValid()
54 long rawContactId = RawContactUtil.createRawContactWithName(mResolver, "Hot", "Tamale"); in testPhoneQueryBadProjection() local
55 insertPhoneNumber(rawContactId, "555-123-4567"); in testPhoneQueryBadProjection()
62 long rawContactId = RawContactUtil.createRawContactWithName(mResolver, "Hot", "Tamale"); in testPhoneQueryBadSelection() local
63 insertPhoneNumber(rawContactId, "555-123-4567"); in testPhoneQueryBadSelection()
70 long rawContactId = RawContactUtil.createRawContactWithName(mResolver, "Hot", "Tamale"); in testPhoneQueryBadSortOrder() local
71 insertPhoneNumber(rawContactId, "555-123-4567"); in testPhoneQueryBadSortOrder()
79 long rawContactId = RawContactUtil.createRawContactWithName(mResolver, "Hot", "Tamale"); in testPhoneQueryBadLimit() local
80 insertPhoneNumber(rawContactId, "555-123-4567"); in testPhoneQueryBadLimit()
/packages/providers/ContactsProvider/src/com/android/providers/contacts/aggregation/
DContactAggregator.java80 long rawContactId, long accountId, long currentContactId, in aggregateContact() argument
84 Log.v(TAG, "aggregateContact: rid=" + rawContactId + " cid=" + currentContactId); in aggregateContact()
89 Integer aggModeObject = mRawContactsMarkedForAggregation.remove(rawContactId); in aggregateContact()
104 contactId = pickBestMatchBasedOnExceptions(db, rawContactId, matcher); in aggregateContact()
111 contactId = pickBestMatchBasedOnData(db, rawContactId, candidates, matcher); in aggregateContact()
124 mSelectionArgs2[1] = String.valueOf(rawContactId); in aggregateContact()
155 actionCode = canJoinIntoContact(db, rawContactId, in aggregateContact()
175 mRawContactCountQuery.bindLong(2, rawContactId); in aggregateContact()
190 markAggregated(db, String.valueOf(rawContactId)); in aggregateContact()
196 createContactForRawContacts(db, txContext, Sets.newHashSet(rawContactId), null); in aggregateContact()
[all …]
DContactAggregator2.java90 long rawContactId, long accountId, long currentContactId, in aggregateContact() argument
93 if (!needAggregate(db, rawContactId)) { in aggregateContact()
95 Log.v(TAG, "Skip rid=" + rawContactId + " which has already been aggregated."); in aggregateContact()
101 Log.v(TAG, "aggregateContact: rid=" + rawContactId + " cid=" + currentContactId); in aggregateContact()
106 Integer aggModeObject = mRawContactsMarkedForAggregation.remove(rawContactId); in aggregateContact()
119 matchingCandidates = findRawContactMatchingCandidates(db, rawContactId, candidates, in aggregateContact()
132 mRawContactCountQuery.bindLong(2, rawContactId); in aggregateContact()
167 markAggregated(db, String.valueOf(rawContactId)); in aggregateContact()
171 Log.v(TAG, "create new contact for rid=" + rawContactId); in aggregateContact()
173 createContactForRawContacts(db, txContext, Sets.newHashSet(rawContactId), null); in aggregateContact()
[all …]
DAbstractContactAggregator.java250 long rawContactId; field in AbstractContactAggregator.DisplayNameCandidate
261 rawContactId = -1; in clear()
438 for (long rawContactId : mRawContactsMarkedForAggregation.keySet()) { in aggregateInTransaction()
442 sbQuery.append(rawContactId); in aggregateInTransaction()
490 public final void triggerAggregation(TransactionContext txContext, long rawContactId) { in triggerAggregation() argument
495 int aggregationMode = mDbHelper.getAggregationMode(rawContactId); in triggerAggregation()
501 markForAggregation(rawContactId, aggregationMode, false); in triggerAggregation()
506 long contactId = mDbHelper.getContactId(rawContactId); in triggerAggregation()
515 aggregateContact(txContext, mDbHelper.getWritableDatabase(), rawContactId); in triggerAggregation()
527 public final void markNewForAggregation(long rawContactId, int aggregationMode) { in markNewForAggregation() argument
[all …]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DDataRowHandler.java108 public long insert(SQLiteDatabase db, TransactionContext txContext, long rawContactId, in insert() argument
116 mDbHelper.setIsPrimary(rawContactId, dataId, mimeTypeId); in insert()
122 mDbHelper.setIsSuperPrimary(rawContactId, dataId, mimeTypeId); in insert()
124 mDbHelper.clearSuperPrimary(rawContactId, mimeTypeId); in insert()
129 if (mDbHelper.rawContactHasSuperPrimary(rawContactId, mimeTypeId)) { in insert()
130 mDbHelper.setIsSuperPrimary(rawContactId, dataId, mimeTypeId); in insert()
136 txContext.invalidateSearchIndexForRawContact(rawContactId); in insert()
151 long rawContactId = c.getLong(DataUpdateQuery.RAW_CONTACT_ID); in update() local
153 handlePrimaryAndSuperPrimary(values, dataId, rawContactId); in update()
161 txContext.invalidateSearchIndexForRawContact(rawContactId); in update()
[all …]
DDataRowHandlerForGroupMembership.java75 public long insert(SQLiteDatabase db, TransactionContext txContext, long rawContactId, in insert() argument
77 resolveGroupSourceIdInValues(txContext, rawContactId, db, values, true); in insert()
78 long dataId = super.insert(db, txContext, rawContactId, values); in insert()
79 if (hasFavoritesGroupMembership(db, rawContactId)) { in insert()
80 updateRawContactsStar(db, rawContactId, true /* starred */); in insert()
82 updateVisibility(txContext, rawContactId); in insert()
89 long rawContactId = c.getLong(DataUpdateQuery.RAW_CONTACT_ID); in update() local
90 boolean wasStarred = hasFavoritesGroupMembership(db, rawContactId); in update()
91 resolveGroupSourceIdInValues(txContext, rawContactId, db, values, false); in update()
95 boolean isStarred = hasFavoritesGroupMembership(db, rawContactId); in update()
[all …]
DDataRowHandlerForPhoneNumber.java42 public long insert(SQLiteDatabase db, TransactionContext txContext, long rawContactId, in insert() argument
46 final long dataId = super.insert(db, txContext, rawContactId, values); in insert()
50 updatePhoneLookup(db, rawContactId, dataId, number, normalizedNumber); in insert()
51 mContactAggregator.updateHasPhoneNumber(db, rawContactId); in insert()
52 fixRawContactDisplayName(db, txContext, rawContactId); in insert()
54 triggerAggregation(txContext, rawContactId); in insert()
70 long rawContactId = c.getLong(DataUpdateQuery.RAW_CONTACT_ID); in update() local
71 updatePhoneLookup(db, rawContactId, dataId, in update()
74 mContactAggregator.updateHasPhoneNumber(db, rawContactId); in update()
75 fixRawContactDisplayName(db, txContext, rawContactId); in update()
[all …]
DTransactionContext.java55 public void rawContactInserted(long rawContactId, long accountId) { in rawContactInserted() argument
57 mInsertedRawContactsAccounts.put(rawContactId, accountId); in rawContactInserted()
59 markRawContactChangedOrDeletedOrInserted(rawContactId); in rawContactInserted()
62 public void rawContactUpdated(long rawContactId) { in rawContactUpdated() argument
64 mUpdatedRawContacts.add(rawContactId); in rawContactUpdated()
67 public void markRawContactDirtyAndChanged(long rawContactId, boolean isSyncAdapter) { in markRawContactDirtyAndChanged() argument
72 mDirtyRawContacts.add(rawContactId); in markRawContactDirtyAndChanged()
75 markRawContactChangedOrDeletedOrInserted(rawContactId); in markRawContactDirtyAndChanged()
78 public void markRawContactChangedOrDeletedOrInserted(long rawContactId) { in markRawContactChangedOrDeletedOrInserted() argument
82 mChangedRawContacts.add(rawContactId); in markRawContactChangedOrDeletedOrInserted()
[all …]
DNameLookupBuilder.java82 protected abstract void insertNameLookup(long rawContactId, long dataId, int lookupType, in insertNameLookup() argument
99 public void insertNameLookup(long rawContactId, long dataId, String name, int fullNameStyle) { in insertNameLookup() argument
111 insertNameVariant(rawContactId, dataId, tokenCount, NameLookupType.NAME_EXACT, true); in insertNameLookup()
126 insertCollationKey(rawContactId, dataId, MAX_NAME_TOKENS); in insertNameLookup()
138 insertNameVariants(rawContactId, dataId, 0, tokenCount, !tooManyTokens, true); in insertNameLookup()
139 insertNicknamePermutations(rawContactId, dataId, 0, tokenCount); in insertNameLookup()
239 private void insertNameVariants(long rawContactId, long dataId, int fromIndex, int toIndex, in insertNameVariants() argument
242 insertNameVariant(rawContactId, dataId, toIndex, in insertNameVariants()
255 insertNameVariants(rawContactId, dataId, fromIndex + 1, toIndex, in insertNameVariants()
266 private void insertNameVariant(long rawContactId, long dataId, int tokenCount, in insertNameVariant() argument
[all …]
DLegacyApiSupport.java793 long rawContactId = Long.parseLong(uri.getPathSegments().get(1)); in insert() local
794 id = insertContactMethod(rawContactId, values); in insert()
799 long rawContactId = getRequiredValue(values, ContactMethods.PERSON_ID); in insert() local
800 id = insertContactMethod(rawContactId, values); in insert()
805 long rawContactId = getRequiredValue(values, in insert() local
807 id = insertPhone(rawContactId, values); in insert()
812 long rawContactId = Long.parseLong(uri.getPathSegments().get(1)); in insert() local
813 id = insertPhone(rawContactId, values); in insert()
818 long rawContactId = getRequiredValue(values, in insert() local
820 id = insertExtension(rawContactId, values); in insert()
[all …]
DDataRowHandlerForNickname.java39 public long insert(SQLiteDatabase db, TransactionContext txContext, long rawContactId, in insert() argument
43 long dataId = super.insert(db, txContext, rawContactId, values); in insert()
46 fixRawContactDisplayName(db, txContext, rawContactId); in insert()
47 mDbHelper.insertNameLookupForNickname(rawContactId, dataId, nickname); in insert()
48 triggerAggregation(txContext, rawContactId); in insert()
57 long rawContactId = c.getLong(DataUpdateQuery.RAW_CONTACT_ID); in update() local
66 mDbHelper.insertNameLookupForNickname(rawContactId, dataId, nickname); in update()
67 fixRawContactDisplayName(db, txContext, rawContactId); in update()
68 triggerAggregation(txContext, rawContactId); in update()
77 long rawContactId = c.getLong(DataDeleteQuery.RAW_CONTACT_ID); in delete() local
[all …]
DDataRowHandlerForEmail.java37 public long insert(SQLiteDatabase db, TransactionContext txContext, long rawContactId, in insert() argument
41 long dataId = super.insert(db, txContext, rawContactId, values); in insert()
43 fixRawContactDisplayName(db, txContext, rawContactId); in insert()
44 String address = mDbHelper.insertNameLookupForEmail(rawContactId, dataId, email); in insert()
46 triggerAggregation(txContext, rawContactId); in insert()
60 long rawContactId = c.getLong(DataUpdateQuery.RAW_CONTACT_ID); in update() local
64 mDbHelper.insertNameLookupForEmail(rawContactId, dataId, address); in update()
65 fixRawContactDisplayName(db, txContext, rawContactId); in update()
66 triggerAggregation(txContext, rawContactId); in update()
75 long rawContactId = c.getLong(DataDeleteQuery.RAW_CONTACT_ID); in delete() local
[all …]
DDataRowHandlerForStructuredName.java47 public long insert(SQLiteDatabase db, TransactionContext txContext, long rawContactId, in insert() argument
51 long dataId = super.insert(db, txContext, rawContactId, values); in insert()
55 mNameLookupBuilder.insertNameLookup(rawContactId, dataId, name, in insert()
59 fixRawContactDisplayName(db, txContext, rawContactId); in insert()
60 triggerAggregation(txContext, rawContactId); in insert()
68 final long rawContactId = c.getLong(DataUpdateQuery.RAW_CONTACT_ID); in update() local
83 mNameLookupBuilder.insertNameLookup(rawContactId, dataId, name, in update()
88 fixRawContactDisplayName(db, txContext, rawContactId); in update()
89 triggerAggregation(txContext, rawContactId); in update()
96 long rawContactId = c.getLong(DataDeleteQuery.RAW_CONTACT_ID); in delete() local
[all …]
DContactsProvider2.java2420 for (long rawContactId : mTransactionContext.get().getInsertedRawContactIds()) { in flushTransactionalChanges()
2421 mDbHelper.get().updateRawContactDisplayName(db, rawContactId); in flushTransactionalChanges()
2422 mAggregator.get().onRawContactInsert(mTransactionContext.get(), db, rawContactId); in flushTransactionalChanges() local
2752 final long rawContactId = db.insert(Tables.RAW_CONTACTS, RawContacts.CONTACT_ID, values); in insertRawContact() local
2756 mAggregator.get().markNewForAggregation(rawContactId, aggregationMode); in insertRawContact()
2759 mTransactionContext.get().rawContactInserted(rawContactId, accountId); in insertRawContact()
2762 addAutoAddMembership(rawContactId); in insertRawContact()
2764 updateFavoritesMembership(rawContactId, true); in insertRawContact()
2769 return rawContactId; in insertRawContact()
2772 private void addAutoAddMembership(long rawContactId) { in addAutoAddMembership() argument
[all …]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/aggregation/util/
DRawContactMatcher.java168 private MatchScore getMatchingScore(long rawContactId, long contactId, long accountId) { in getMatchingScore() argument
169 MatchScore matchingScore = mScores.get(rawContactId); in getMatchingScore()
173 matchingScore.reset(rawContactId, contactId, accountId); in getMatchingScore()
175 matchingScore = new MatchScore(rawContactId, contactId, accountId); in getMatchingScore()
179 mScores.put(rawContactId, matchingScore); 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()
[all …]
/packages/apps/ContactsCommon/src/com/android/contacts/common/model/
DRawContactDeltaList.java106 final Long rawContactId = remoteEntity.getValues().getId(); in mergeAfter() local
109 final RawContactDelta localEntity = local.getByRawContactId(rawContactId); in mergeAfter()
133 final long rawContactId = this.findRawContactId(); in buildDiff() local
160 if (rawContactId != -1) { in buildDiff()
161 builder.withValue(AggregationExceptions.RAW_CONTACT_ID2, rawContactId); in buildDiff()
176 if (rawContactId != -1) { in buildDiff()
179 builder.withValue(AggregationExceptions.RAW_CONTACT_ID1, rawContactId); in buildDiff()
288 final Long rawContactId = delta.getValues().getAsLong(RawContacts._ID); in findRawContactId() local
289 if (rawContactId != null && rawContactId >= 0) { in findRawContactId()
290 return rawContactId; in findRawContactId()
[all …]
/packages/experimental/LoaderApp/src/com/android/loaderapp/model/
DEntitySet.java93 final Long rawContactId = remoteEntity.getValues().getId(); in mergeAfter() local
96 final EntityDelta localEntity = local.getByRawContactId(rawContactId); in mergeAfter()
117 final long rawContactId = this.findRawContactId(); in buildDiff() local
142 if (rawContactId != -1) { in buildDiff()
145 builder.withValue(AggregationExceptions.RAW_CONTACT_ID1, rawContactId); in buildDiff()
233 final Long rawContactId = delta.getValues().getAsLong(RawContacts._ID); in findRawContactId() local
234 if (rawContactId != null && rawContactId >= 0) { in findRawContactId()
235 return rawContactId; in findRawContactId()
255 public EntityDelta getByRawContactId(Long rawContactId) { in getByRawContactId() argument
256 final int index = this.indexOfRawContactId(rawContactId); in getByRawContactId()
[all …]
/packages/apps/Contacts/src/com/android/contacts/
DContactSaveService.java311 Class<? extends Activity> callbackActivity, String callbackAction, long rawContactId, in createSaveContactIntent() argument
314 bundle.putParcelable(String.valueOf(rawContactId), updatedPhotoPath); in createSaveContactIntent()
403 final long rawContactId = getRawContactId(state, diff, results); in saveContact() local
404 if (rawContactId == -1) { in saveContact()
431 rawContactId); in saveContact()
460 Long rawContactId = state.getRawContactId(i); in saveContact()
461 if (rawContactId != null && rawContactId != -1) { in saveContact()
465 sb.append(rawContactId); in saveContact()
497 long rawContactId = Long.parseLong(key); in saveContact() local
501 if (rawContactId < 0) { in saveContact()
[all …]
DSplitAggregateView.java81 void onContactSelected(long rawContactId); in onContactSelected() argument
100 mListener.onContactSelected(list.get(position).rawContactId); in SplitAggregateView()
116 final long rawContactId; field in SplitAggregateView.RawContactInfo
124 public RawContactInfo(long rawContactId) { in RawContactInfo() argument
125 this.rawContactId = rawContactId; in RawContactInfo()
165 long rawContactId = cursor.getLong(SplitQuery.RAW_CONTACT_ID); in loadData() local
166 RawContactInfo info = rawContactInfos.get(rawContactId); in loadData()
168 info = new RawContactInfo(rawContactId); in loadData()
169 rawContactInfos.put(rawContactId, info); in loadData()
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/testutil/
DDataUtil.java45 public static Uri insertStructuredName(ContentResolver resolver, long rawContactId, in insertStructuredName() argument
47 values.put(ContactsContract.Data.RAW_CONTACT_ID, rawContactId); in insertStructuredName()
54 public static Uri insertStructuredName(ContentResolver resolver, long rawContactId, in insertStructuredName() argument
56 return insertStructuredName(resolver, rawContactId, givenName, familyName, in insertStructuredName()
61 ContentResolver resolver, long rawContactId, String givenName, String familyName, in insertStructuredName() argument
63 return insertStructuredName(resolver, rawContactId, givenName, familyName, phoneticFamily, in insertStructuredName()
68 ContentResolver resolver, long rawContactId, String givenName, String familyName, in insertStructuredName() argument
97 return insertStructuredName(resolver, rawContactId, values); in insertStructuredName()
100 public static Uri insertPhoneticName(ContentResolver resolver, long rawContactId, in insertPhoneticName() argument
106 return insertStructuredName(resolver, rawContactId, values); in insertPhoneticName()
DRawContactUtil.java37 public static void update(ContentResolver resolver, long rawContactId, in update() argument
39 Uri uri = ContentUris.withAppendedId(URI, rawContactId); in update()
44 long rawContactId, String[] projection) { in queryByRawContactId() argument
46 rawContactId); in queryByRawContactId()
63 public static void delete(ContentResolver resolver, long rawContactId, in delete() argument
65 Uri uri = ContentUris.withAppendedId(ContactsContract.RawContacts.CONTENT_URI, rawContactId) in delete()
113 long rawContactId = createRawContact(resolver, account); in createRawContactWithName() local
114 DataUtil.insertStructuredName(resolver, rawContactId, firstName, lastName); in createRawContactWithName()
115 return rawContactId; in createRawContactWithName()
DDatabaseAsserts.java58 long rawContactId = RawContactUtil.createRawContactWithName(resolver); in assertAndCreateContact() local
60 long contactId = RawContactUtil.queryContactIdByRawContactId(resolver, rawContactId); in assertAndCreateContact()
63 return new ContactIdPair(contactId, rawContactId); in assertAndCreateContact()
73 long rawContactId = RawContactUtil.createRawContactWithName(resolver, firstName, lastName); in assertAndCreateContactWithName() local
75 long contactId = RawContactUtil.queryContactIdByRawContactId(resolver, rawContactId); in assertAndCreateContactWithName()
78 return new ContactIdPair(contactId, rawContactId); in assertAndCreateContactWithName()
105 public ContactIdPair(long contactId, long rawContactId) { in ContactIdPair() argument
107 this.mRawContactId = rawContactId; in ContactIdPair()

123