From b658ef4f610fcbafff4fa5e584cabe253e76d879 Mon Sep 17 00:00:00 2001 From: George Mount Date: Wed, 27 Mar 2013 16:53:41 -0700 Subject: Remove ImageCache from PhotoProvider in favor of MediaCache. Change-Id: I4e75a094d1dc033ac892c2b95bdc6b6a4a165304 --- tests/src/com/android/photos/data/MediaCacheTest.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'tests') diff --git a/tests/src/com/android/photos/data/MediaCacheTest.java b/tests/src/com/android/photos/data/MediaCacheTest.java index df990edb1..9e7112807 100644 --- a/tests/src/com/android/photos/data/MediaCacheTest.java +++ b/tests/src/com/android/photos/data/MediaCacheTest.java @@ -157,7 +157,7 @@ public class MediaCacheTest extends ProviderTestCase2 { public void testRetrieveOriginal() throws IOException { copyResourceToFile(R.raw.galaxy_nexus, mImage.getPath()); Uri uri = Uri.fromFile(mImage); - mMediaCache.retrieveOriginal(uri, mReady, mReady); + mMediaCache.retrieveOriginal(uri, mReady, null); assertTrue(mReady.waitForNotification()); assertNull(mReady.mInputStream); assertEquals(mImage, mReady.mOriginalFile); @@ -236,13 +236,13 @@ public class MediaCacheTest extends ProviderTestCase2 { copyResourceToFile(R.raw.android_lawn, mImage.getPath()); Uri uri = Uri.fromFile(mImage); - mMediaCache.retrieveOriginal(uri, mReady, mReady); + mMediaCache.retrieveOriginal(uri, mReady, null); assertTrue(mReady.waitForNotification()); assertNull(mReady.mInputStream); assertNotNull(mReady.mOriginalFile); mReady = new ReadyCollector(); - mMediaCache.retrievePreview(uri, mReady, mReady); + mMediaCache.retrievePreview(uri, mReady, null); assertTrue(mReady.waitForNotification()); assertNotNull(mReady.mInputStream); assertNull(mReady.mOriginalFile); @@ -254,7 +254,7 @@ public class MediaCacheTest extends ProviderTestCase2 { assertTrue(maxDimension < (targetSize * 2)); mReady = new ReadyCollector(); - mMediaCache.retrieveThumbnail(uri, mReady, mReady); + mMediaCache.retrieveThumbnail(uri, mReady, null); assertTrue(mReady.waitForNotification()); assertNotNull(mReady.mInputStream); assertNull(mReady.mOriginalFile); @@ -269,11 +269,11 @@ public class MediaCacheTest extends ProviderTestCase2 { public void testFastImage() throws IOException { copyResourceToFile(R.raw.galaxy_nexus, mImage.getPath()); Uri uri = Uri.fromFile(mImage); - mMediaCache.retrieveThumbnail(uri, mReady, mReady); + mMediaCache.retrieveThumbnail(uri, mReady, null); mReady.waitForNotification(); mReady.mInputStream.close(); - mMediaCache.retrieveOriginal(uri, mReady, mReady); + mMediaCache.retrieveOriginal(uri, mReady, null); assertTrue(mReady.waitForNotification()); assertNotNull(mReady.mInputStream); mReady.mInputStream.close(); @@ -282,7 +282,7 @@ public class MediaCacheTest extends ProviderTestCase2 { public void testBadRetriever() { Uri uri = Photos.CONTENT_URI; try { - mMediaCache.retrieveOriginal(uri, mReady, mReady); + mMediaCache.retrieveOriginal(uri, mReady, null); fail("Expected exception"); } catch (IllegalArgumentException e) { // expected @@ -295,7 +295,7 @@ public class MediaCacheTest extends ProviderTestCase2 { copyResourceToFile(R.raw.android_lawn, mImage.getPath()); Uri uri = Uri.fromFile(mImage); - mMediaCache.retrieveThumbnail(uri, mReady, mReady); + mMediaCache.retrieveThumbnail(uri, mReady, null); assertTrue(mReady.waitForNotification()); mReady.mInputStream.close(); assertNotNull(mMediaCache.getCachedFile(uri, MediaSize.Preview)); @@ -307,7 +307,7 @@ public class MediaCacheTest extends ProviderTestCase2 { mMediaCache.addRetriever(uri.getScheme(), uri.getAuthority(), retriever); retriever.setNullUri(); try { - mMediaCache.retrieveOriginal(uri, mReady, mReady); + mMediaCache.retrieveOriginal(uri, mReady, null); fail("Expected IllegalArgumentException"); } catch (IllegalArgumentException e) { // expected -- cgit v1.2.3