diff options
author | Bai Tao <michaelbai@google.com> | 2010-08-26 19:48:52 +0800 |
---|---|---|
committer | Bai Tao <michaelbai@google.com> | 2010-09-01 12:02:10 +0800 |
commit | 2530512f639c4979fd7371c7dd25dd67e8118124 (patch) | |
tree | e07056494be0280eae47116fb423ae0207353fb0 /tests | |
parent | 2e40e351a80ff608045bc9f55b48bd1a3d16926b (diff) | |
download | packages_providers_ContactsProvider-2530512f639c4979fd7371c7dd25dd67e8118124.zip packages_providers_ContactsProvider-2530512f639c4979fd7371c7dd25dd67e8118124.tar.gz packages_providers_ContactsProvider-2530512f639c4979fd7371c7dd25dd67e8118124.tar.bz2 |
Store the current country code in call log
a. Created a CountryMonitor class to monitor country for CallLog and Contacts Provider
b. Added a new field countryiso in calls table.
c. Upgrade the database to 406.
Change-Id: I894739c65672b017f8d634f0d9cd5dd11ac930d1
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/providers/contacts/CallLogProviderTest.java | 7 | ||||
-rw-r--r-- | tests/src/com/android/providers/contacts/ContactsProvider2Test.java | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/src/com/android/providers/contacts/CallLogProviderTest.java b/tests/src/com/android/providers/contacts/CallLogProviderTest.java index af5a1fe..392fa65 100644 --- a/tests/src/com/android/providers/contacts/CallLogProviderTest.java +++ b/tests/src/com/android/providers/contacts/CallLogProviderTest.java @@ -63,6 +63,7 @@ public class CallLogProviderTest extends BaseContactsProvider2Test { ContentValues values = new ContentValues(); putCallValues(values); Uri uri = mResolver.insert(Calls.CONTENT_URI, values); + values.put(Calls.COUNTRY_ISO, "us"); assertStoredValues(uri, values); assertSelection(uri, values, Calls._ID, ContentUris.parseId(uri)); } @@ -137,6 +138,7 @@ public class CallLogProviderTest extends BaseContactsProvider2Test { values.put(Calls.CACHED_NAME, "1-800-GOOG-411"); values.put(Calls.CACHED_NUMBER_TYPE, Phone.TYPE_CUSTOM); values.put(Calls.CACHED_NUMBER_LABEL, "Directory"); + values.put(Calls.COUNTRY_ISO, "us"); assertStoredValues(uri, values); } @@ -158,6 +160,11 @@ public class CallLogProviderTest extends BaseContactsProvider2Test { } return mDbHelper; } + + @Override + protected String getCurrentCountryIso() { + return "us"; + } } } diff --git a/tests/src/com/android/providers/contacts/ContactsProvider2Test.java b/tests/src/com/android/providers/contacts/ContactsProvider2Test.java index 4c293e1..f6e78d4 100644 --- a/tests/src/com/android/providers/contacts/ContactsProvider2Test.java +++ b/tests/src/com/android/providers/contacts/ContactsProvider2Test.java @@ -456,6 +456,7 @@ public class ContactsProvider2Test extends BaseContactsProvider2Test { PhoneLookup.NUMBER, PhoneLookup.TYPE, PhoneLookup.LABEL, + PhoneLookup.NORMALIZED_NUMBER, }); } |