diff options
author | Jay Shrauner <shrauner@google.com> | 2013-02-27 14:53:41 -0800 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2013-03-04 17:16:37 -0800 |
commit | 2d2e22626b698b2484026ae18eca3c2c6340f2d1 (patch) | |
tree | ea6320a5cda746895ad992bdde4150d6d5fbfd6f /tests/src/com/android/providers/contacts/FastScrollingIndexCacheTest.java | |
parent | 21cfa6019b9fb82c23edf978d27904757207d9b0 (diff) | |
download | packages_providers_ContactsProvider-2d2e22626b698b2484026ae18eca3c2c6340f2d1.zip packages_providers_ContactsProvider-2d2e22626b698b2484026ae18eca3c2c6340f2d1.tar.gz packages_providers_ContactsProvider-2d2e22626b698b2484026ae18eca3c2c6340f2d1.tar.bz2 |
Auto-update ContactsDB on ICU version change
Save current ICU version into the ContactsDB and rebuild
locale specific data whenever the version changes.
Bug:
Change-Id: Id5fd3e178558dc903b522b2655c75e6aa353f6e5
Diffstat (limited to 'tests/src/com/android/providers/contacts/FastScrollingIndexCacheTest.java')
-rw-r--r-- | tests/src/com/android/providers/contacts/FastScrollingIndexCacheTest.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/src/com/android/providers/contacts/FastScrollingIndexCacheTest.java b/tests/src/com/android/providers/contacts/FastScrollingIndexCacheTest.java index 281834f..de01d9e 100644 --- a/tests/src/com/android/providers/contacts/FastScrollingIndexCacheTest.java +++ b/tests/src/com/android/providers/contacts/FastScrollingIndexCacheTest.java @@ -54,7 +54,7 @@ public class FastScrollingIndexCacheTest extends AndroidTestCase { super.setUp(); mPrefs = new MockSharedPreferences(); - mCache = new FastScrollingIndexCache(mPrefs); + mCache = FastScrollingIndexCache.getInstance(mPrefs); } private void assertBundle(String[] expectedTitles, int[] expectedCounts, Bundle actual) { @@ -141,7 +141,8 @@ public class FastScrollingIndexCacheTest extends AndroidTestCase { // Now, create a new cache instance (with the same shared preferences) // It should restore the cache content from the preferences... - FastScrollingIndexCache cache2 = new FastScrollingIndexCache(mPrefs); + FastScrollingIndexCache.releaseInstance(); + FastScrollingIndexCache cache2 = FastScrollingIndexCache.getInstance(mPrefs); assertBundle(TITLES_0, COUNTS_0, cache2.get(null, null, null, null, null)); assertBundle(TITLES_1, COUNTS_1, cache2.get(URI_A, "*s*", PROJECTION_0, "*so*", "*ce*")); assertBundle(TITLES_2, COUNTS_2, cache2.get(URI_A, "*s*", PROJECTION_1, "*so*", "*ce*")); |