summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2013-03-27 23:53:41 (GMT)
committerGeorge Mount <mount@google.com>2013-03-29 23:44:11 (GMT)
commitb658ef4f610fcbafff4fa5e584cabe253e76d879 (patch)
tree364ac4160b69e3ad8505d3df6a47b92b6ff5ba3e /tests
parent8e498a060dca7e0a1d2ceaa39b902d1cce7f7c4a (diff)
downloadandroid_packages_apps_Snap-b658ef4f610fcbafff4fa5e584cabe253e76d879.zip
android_packages_apps_Snap-b658ef4f610fcbafff4fa5e584cabe253e76d879.tar.gz
android_packages_apps_Snap-b658ef4f610fcbafff4fa5e584cabe253e76d879.tar.bz2
Remove ImageCache from PhotoProvider in favor of MediaCache.
Change-Id: I4e75a094d1dc033ac892c2b95bdc6b6a4a165304
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/photos/data/MediaCacheTest.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/src/com/android/photos/data/MediaCacheTest.java b/tests/src/com/android/photos/data/MediaCacheTest.java
index df990ed..9e71128 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<PhotoProvider> {
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<PhotoProvider> {
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<PhotoProvider> {
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<PhotoProvider> {
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<PhotoProvider> {
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<PhotoProvider> {
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<PhotoProvider> {
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