diff options
author | Anne Rong <annerong@google.com> | 2015-08-19 18:32:08 -0700 |
---|---|---|
committer | Anne Rong <annerong@google.com> | 2015-08-21 14:15:27 -0700 |
commit | 7e488f53b356e04b83ea34549ffcba27d850eb9a (patch) | |
tree | 4cc4c750486c606025c463fb43c5a6aec5d3fa76 /tests/src/com/android/dialer/database | |
parent | 6fcdcc15f3b8786e0ecab5886324eeb212c58699 (diff) |
FilteredNumberProvider authority name & filtered_number_table changes
Authority name for FilteredNumberProvider changed so it can be
overriden in GoogleDialer.
Added UNIQUE constraint to NORMALIZED_NUMBER field.
Added NUMBER field to filtered_number_table (un-normalized number).
Bug: 23424013
Bug: 23424011
Change-Id: I3156cee70ddcaea15b7272650d5f255782e34520
Diffstat (limited to 'tests/src/com/android/dialer/database')
-rw-r--r-- | tests/src/com/android/dialer/database/FilteredNumberProviderTest.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/src/com/android/dialer/database/FilteredNumberProviderTest.java b/tests/src/com/android/dialer/database/FilteredNumberProviderTest.java index 94bf6e6c2..5184930f7 100644 --- a/tests/src/com/android/dialer/database/FilteredNumberProviderTest.java +++ b/tests/src/com/android/dialer/database/FilteredNumberProviderTest.java @@ -32,7 +32,8 @@ public class FilteredNumberProviderTest extends private static final String TIME_ZONE_AMERICA_LOS_ANGELES = "America/Los_Angeles"; private static final String DEFAULT_TIMEZONE = TIME_ZONE_AMERICA_LOS_ANGELES; private static final String DEFAULT_COUNTRY_ISO = "US"; - private static final String TEST_NUMBER = "+1234567890"; + private static final String TEST_NUMBER = "234567890"; + private static final String TEST_NORMALIZED_NUMBER = "+1234567890"; private static final long TEST_TIME = 1439936706; public FilteredNumberProviderTest () { @@ -141,7 +142,7 @@ public class FilteredNumberProviderTest extends v.put(FilteredNumberContract.FilteredNumberColumns.LAST_TIME_FILTERED, TEST_TIME); int rows = mResolver.update(FilteredNumberContract.FilteredNumber.CONTENT_URI, v, FilteredNumberContract.FilteredNumberColumns.NORMALIZED_NUMBER + " = ?", - new String[]{TEST_NUMBER}); + new String[]{TEST_NORMALIZED_NUMBER}); assertEquals(rows, 1); ContentValues expected = getTestValues(TEST_TIME); @@ -186,7 +187,9 @@ public class FilteredNumberProviderTest extends private ContentValues getTestValues(Long timeNow) { ContentValues v = new ContentValues(); v.putNull(FilteredNumberContract.FilteredNumberColumns._ID); - v.put(FilteredNumberContract.FilteredNumberColumns.NORMALIZED_NUMBER, TEST_NUMBER); + v.put(FilteredNumberContract.FilteredNumberColumns.NORMALIZED_NUMBER, + TEST_NORMALIZED_NUMBER); + v.put(FilteredNumberContract.FilteredNumberColumns.NUMBER, TEST_NUMBER); v.put(FilteredNumberContract.FilteredNumberColumns.COUNTRY_ISO, DEFAULT_COUNTRY_ISO); v.put(FilteredNumberContract.FilteredNumberColumns.TIMES_FILTERED, 0); v.putNull(FilteredNumberContract.FilteredNumberColumns.LAST_TIME_FILTERED); |