diff options
author | Brandon Maxwell <maxwelb@google.com> | 2016-03-21 20:12:07 -0700 |
---|---|---|
committer | Brandon Maxwell <maxwelb@google.com> | 2016-03-21 20:28:36 -0700 |
commit | edf03935c1b4ff958e133c505dd94046b07a62b1 (patch) | |
tree | 9b1990adf09bb90d95a9ba04b58f999fff491039 /tests | |
parent | ac6cd58c8642d22e47a6d4b30295137a61177e85 (diff) |
No notification shown for blocking after E911 call
The Dialer is no longer responsible for showing a notification that
call blocking is disabled after the user makes an emergency call.
This CL ensures that the notification isn't shown.
Change-Id: Ib87679a067831b771d99e5b2b205c84101f05fef
Fixes: 27705312
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/dialer/filterednumber/FilteredNumbersUtilTest.java | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/tests/src/com/android/dialer/filterednumber/FilteredNumbersUtilTest.java b/tests/src/com/android/dialer/filterednumber/FilteredNumbersUtilTest.java index d2e7f0a1c..d496b1845 100644 --- a/tests/src/com/android/dialer/filterednumber/FilteredNumbersUtilTest.java +++ b/tests/src/com/android/dialer/filterednumber/FilteredNumbersUtilTest.java @@ -15,12 +15,20 @@ */ package com.android.dialer.filterednumber; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyZeroInteractions; + +import android.content.Context; import android.preference.PreferenceManager; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; +import com.android.contacts.common.compat.CompatUtils; import com.android.contacts.common.test.mocks.ContactsMockContext; import com.android.contacts.common.test.mocks.MockContentProvider.Query; +import com.android.dialer.compat.FilteredNumberCompat; import com.android.dialer.database.FilteredNumberContract; import com.android.dialer.database.FilteredNumberContract.FilteredNumber; import com.android.dialer.database.FilteredNumberContract.FilteredNumberColumns; @@ -31,10 +39,10 @@ public class FilteredNumbersUtilTest extends AndroidTestCase { private static final String COUNTRY_ISO = "US"; // Wed Nov 11 2015 15:00:00 - private static final long EARLIER_TIME = 1447282800000l; + private static final long EARLIER_TIME = 1447282800000L; // Wed Nov 11 2015 15:01:40 - private static final long LATER_TIME = 1447282900000l; + private static final long LATER_TIME = 1447282900000L; private static final String[] FILTERED_NUMBER_PROJECTION = new String[] { FilteredNumberColumns.CREATION_TIME }; @@ -98,6 +106,18 @@ public class FilteredNumbersUtilTest extends AndroidTestCase { COUNTRY_ISO, 0)); } + public void testMaybeNotifyCallBlockingDisabled_Migrated() { + if (!CompatUtils.isNCompatible()) { + return; + } + FilteredNumberCompat.setIsEnabledForTest(true); + FilteredNumberCompat.setHasMigratedToNewBlocking(true); + Context mockContext = mock(Context.class); + + FilteredNumbersUtil.maybeNotifyCallBlockingDisabled(mockContext); + verifyZeroInteractions(mockContext); + } + private void setupShouldBlockVoicemailQuery(long creationTimeMs) { Query query = mContext.getContactsProvider().expectQuery(FilteredNumber.CONTENT_URI) .withProjection(FILTERED_NUMBER_PROJECTION) |