aboutsummaryrefslogtreecommitdiff
path: root/tests/src/com/android/providers/contacts/aggregation/ContactAggregator2Test.java
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2024-03-06 09:30:10 -0800
committerXin Li <delphij@google.com>2024-03-06 18:58:26 -0800
commit83de92b2fc8fc5ba5239330dc7429049fb99b6f4 (patch)
treebf0292d772be4be60cb926c2ab2a3a11341a863e /tests/src/com/android/providers/contacts/aggregation/ContactAggregator2Test.java
parenta3c215a1e51bcee7087d5e676fdeaafc2ad96328 (diff)
parent9b815a8d8edeac84b1bac6c2a91cd5f2cc91e284 (diff)
downloadContactsProvider-83de92b2fc8fc5ba5239330dc7429049fb99b6f4.tar.gz
Merge Android 14 QPR2 to AOSP main
Bug: 319669529 Merged-In: Ia3c08524a7476566e8f85a79c15af583fd65f16a Change-Id: I4310460d119fbfadb93399107644ef19f776343f
Diffstat (limited to 'tests/src/com/android/providers/contacts/aggregation/ContactAggregator2Test.java')
-rw-r--r--tests/src/com/android/providers/contacts/aggregation/ContactAggregator2Test.java111
1 files changed, 0 insertions, 111 deletions
diff --git a/tests/src/com/android/providers/contacts/aggregation/ContactAggregator2Test.java b/tests/src/com/android/providers/contacts/aggregation/ContactAggregator2Test.java
index b19a10fb..ff12ea05 100644
--- a/tests/src/com/android/providers/contacts/aggregation/ContactAggregator2Test.java
+++ b/tests/src/com/android/providers/contacts/aggregation/ContactAggregator2Test.java
@@ -429,69 +429,6 @@ public class ContactAggregator2Test extends BaseContactsProvider2Test {
assertNotAggregated(rawContactId1, rawContactId2);
}
- public void testAggregationByCommonNicknameWithLastName() {
- long rawContactId1 = RawContactUtil.createRawContact(mResolver, ACCOUNT_1);
- DataUtil.insertStructuredName(mResolver, rawContactId1, "Bill", "Gore");
-
- long rawContactId2 = RawContactUtil.createRawContact(mResolver, ACCOUNT_2);
- DataUtil.insertStructuredName(mResolver, rawContactId2, "William", "Gore");
-
- if (ActivityManager.isLowRamDeviceStatic()) {
- // No common nickname DB on lowram devices.
- assertNotAggregated(rawContactId1, rawContactId2);
- } else {
- assertAggregated(rawContactId1, rawContactId2, "William Gore");
- }
- }
-
- public void testAggregationByCommonNicknameOnly() {
- long rawContactId1 = RawContactUtil.createRawContact(mResolver, ACCOUNT_1);
- DataUtil.insertStructuredName(mResolver, rawContactId1, "Lawrence", null);
-
- long rawContactId2 = RawContactUtil.createRawContact(mResolver, ACCOUNT_2);
- DataUtil.insertStructuredName(mResolver, rawContactId2, "Larry", null);
-
- if (ActivityManager.isLowRamDeviceStatic()) {
- // No common nickname DB on lowram devices.
- assertNotAggregated(rawContactId1, rawContactId2);
- } else {
- assertAggregated(rawContactId1, rawContactId2, "Lawrence");
- }
- }
-
- public void testAggregationByNicknameNoStructuredNameWithinSameAccount() {
- long rawContactId1 = RawContactUtil.createRawContact(mResolver, ACCOUNT_1);
- insertNickname(rawContactId1, "Frozone");
-
- long rawContactId2 = RawContactUtil.createRawContact(mResolver, ACCOUNT_1);
- insertNickname(rawContactId2, "Frozone");
-
- assertNotAggregated(rawContactId1, rawContactId2);
- }
-
- public void testAggregationByNicknameNoStructuredNameWithinDifferentAccounts() {
- long rawContactId1 = RawContactUtil.createRawContact(mResolver, ACCOUNT_1);
- insertNickname(rawContactId1, "Frozone");
-
- long rawContactId2 = RawContactUtil.createRawContact(mResolver, ACCOUNT_2);
- insertNickname(rawContactId2, "Frozone");
-
- assertAggregated(rawContactId1, rawContactId2);
- }
-
-
- public void testAggregationByNicknameWithDifferentNames() {
- long rawContactId1 = RawContactUtil.createRawContact(mResolver, ACCOUNT_1);
- DataUtil.insertStructuredName(mResolver, rawContactId1, "Helen", "Parr");
- insertNickname(rawContactId1, "Elastigirl");
-
- long rawContactId2 = RawContactUtil.createRawContact(mResolver, ACCOUNT_2);
- DataUtil.insertStructuredName(mResolver, rawContactId2, "Shawn", "Johnson");
- insertNickname(rawContactId2, "Elastigirl");
-
- assertNotAggregated(rawContactId1, rawContactId2);
- }
-
public void testNonAggregationOnOrganization() {
ContentValues values = new ContentValues();
values.put(Organization.TITLE, "Monsters, Inc");
@@ -1050,54 +987,6 @@ public class ContactAggregator2Test extends BaseContactsProvider2Test {
assertSuggestions(contactId1, contactId2);
}
- public void testAggregationSuggestionsBasedOnNickname() {
- long rawContactId1 = RawContactUtil.createRawContact(mResolver);
- DataUtil.insertStructuredName(mResolver, rawContactId1, "Peter", "Parker");
- insertNickname(rawContactId1, "Spider-Man");
-
- long rawContactId2 = RawContactUtil.createRawContact(mResolver);
- DataUtil.insertStructuredName(mResolver, rawContactId2, "Manny", "Spider");
-
- long contactId1 = queryContactId(rawContactId1);
- setAggregationException(AggregationExceptions.TYPE_KEEP_SEPARATE,
- rawContactId1, rawContactId2);
-
- long contactId2 = queryContactId(rawContactId2);
- assertSuggestions(contactId1, contactId2);
- }
-
- public void testAggregationSuggestionsBasedOnNicknameMatchingName() {
- long rawContactId1 = RawContactUtil.createRawContact(mResolver);
- DataUtil.insertStructuredName(mResolver, rawContactId1, "Clark", "Kent");
- insertNickname(rawContactId1, "Superman");
-
- long rawContactId2 = RawContactUtil.createRawContact(mResolver);
- DataUtil.insertStructuredName(mResolver, rawContactId2, "Roy", "Williams");
- insertNickname(rawContactId2, "superman");
-
- long contactId1 = queryContactId(rawContactId1);
- setAggregationException(AggregationExceptions.TYPE_KEEP_SEPARATE,
- rawContactId1, rawContactId2);
-
- long contactId2 = queryContactId(rawContactId2);
- assertSuggestions(contactId1, contactId2);
- }
-
- public void testAggregationSuggestionsBasedOnCommonNickname() {
- long rawContactId1 = RawContactUtil.createRawContact(mResolver);
- DataUtil.insertStructuredName(mResolver, rawContactId1, "Dick", "Cherry");
-
- long rawContactId2 = RawContactUtil.createRawContact(mResolver);
- DataUtil.insertStructuredName(mResolver, rawContactId2, "Richard", "Cherry");
-
- setAggregationException(AggregationExceptions.TYPE_KEEP_SEPARATE,
- rawContactId1, rawContactId2);
-
- long contactId1 = queryContactId(rawContactId1);
- long contactId2 = queryContactId(rawContactId2);
- assertSuggestions(contactId1, contactId2);
- }
-
public void testAggregationSuggestionsBasedOnPhoneNumberWithFilter() {
// Create two contacts that would not be aggregated because of name mismatch