aboutsummaryrefslogtreecommitdiff
path: root/tests/src/com/android/providers/contacts/aggregation/ContactAggregator2Test.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/com/android/providers/contacts/aggregation/ContactAggregator2Test.java')
-rw-r--r--tests/src/com/android/providers/contacts/aggregation/ContactAggregator2Test.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/src/com/android/providers/contacts/aggregation/ContactAggregator2Test.java b/tests/src/com/android/providers/contacts/aggregation/ContactAggregator2Test.java
index 9839f8e7..927b215c 100644
--- a/tests/src/com/android/providers/contacts/aggregation/ContactAggregator2Test.java
+++ b/tests/src/com/android/providers/contacts/aggregation/ContactAggregator2Test.java
@@ -17,6 +17,7 @@
package com.android.providers.contacts.aggregation;
import android.accounts.Account;
+import android.app.ActivityManager;
import android.content.ContentProviderOperation;
import android.content.ContentProviderResult;
import android.content.ContentUris;
@@ -412,7 +413,12 @@ public class ContactAggregator2Test extends BaseContactsProvider2Test {
long rawContactId2 = RawContactUtil.createRawContact(mResolver, ACCOUNT_2);
DataUtil.insertStructuredName(mResolver, rawContactId2, "William", "Gore");
- assertAggregated(rawContactId1, 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() {
@@ -422,7 +428,12 @@ public class ContactAggregator2Test extends BaseContactsProvider2Test {
long rawContactId2 = RawContactUtil.createRawContact(mResolver, ACCOUNT_2);
DataUtil.insertStructuredName(mResolver, rawContactId2, "Larry", null);
- assertAggregated(rawContactId1, rawContactId2, "Lawrence");
+ if (ActivityManager.isLowRamDeviceStatic()) {
+ // No common nickname DB on lowram devices.
+ assertNotAggregated(rawContactId1, rawContactId2);
+ } else {
+ assertAggregated(rawContactId1, rawContactId2, "Lawrence");
+ }
}
public void testAggregationByNicknameNoStructuredNameWithinSameAccount() {