diff options
author | Grace Jia <xiaotonj@google.com> | 2020-08-28 15:37:00 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-08-28 15:37:00 +0000 |
commit | 1dc2110ac22657605369d01049ed09d95abec475 (patch) | |
tree | 7309b5a1837ee8067fc5208987b5552410565416 /tests | |
parent | ec77b1ff6d0d422fa2e783dac1190b41e81e6879 (diff) | |
parent | e68de099d119197ec53a2e9224939a1f54a9bf0e (diff) | |
download | ContactsProvider-1dc2110ac22657605369d01049ed09d95abec475.tar.gz |
Merge "Enforce strict grammar when querying the call log"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/providers/contacts/CallLogProviderTest.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/src/com/android/providers/contacts/CallLogProviderTest.java b/tests/src/com/android/providers/contacts/CallLogProviderTest.java index 9efdfaa4..9baf1e41 100644 --- a/tests/src/com/android/providers/contacts/CallLogProviderTest.java +++ b/tests/src/com/android/providers/contacts/CallLogProviderTest.java @@ -18,6 +18,7 @@ package com.android.providers.contacts; import android.telecom.CallerInfo; import com.android.providers.contacts.testutil.CommonDatabaseUtils; +import com.android.providers.contacts.util.ContactsPermissions; import android.content.ComponentName; import android.content.ContentProvider; @@ -59,7 +60,7 @@ public class CallLogProviderTest extends BaseContactsProvider2Test { Voicemails.DIRTY, Voicemails.DELETED}; /** Total number of columns exposed by call_log provider. */ - private static final int NUM_CALLLOG_FIELDS = 34; + private static final int NUM_CALLLOG_FIELDS = 35; private static final int MIN_MATCH = 7; @@ -194,9 +195,12 @@ public class CallLogProviderTest extends BaseContactsProvider2Test { PhoneAccountHandle subscription = new PhoneAccountHandle( sComponentName, "sub0"); + // Allow self-calls in order to add the call + ContactsPermissions.ALLOW_SELF_CALL = true; Uri uri = Calls.addCall(ci, getMockContext(), "1-800-263-7643", Calls.PRESENTATION_ALLOWED, Calls.OUTGOING_TYPE, 0, subscription, 2000, 40, null); + ContactsPermissions.ALLOW_SELF_CALL = false; assertNotNull(uri); assertEquals("0@" + CallLog.AUTHORITY, uri.getAuthority()); |