diff options
author | Chih-Chung Chang <chihchung@google.com> | 2009-08-25 18:28:29 +0800 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2009-08-26 15:34:23 +0800 |
commit | f5bf8ca5870fed38fe91e3e018ebc13cc1738364 (patch) | |
tree | 1a2d1f798d583768a0a29d3f27633c2062bee406 /tests/src/com | |
parent | 3d66a954bc3b809669c762341065f29a4c5c0689 (diff) | |
download | packages_apps_LegacyCamera-f5bf8ca5870fed38fe91e3e018ebc13cc1738364.zip packages_apps_LegacyCamera-f5bf8ca5870fed38fe91e3e018ebc13cc1738364.tar.gz packages_apps_LegacyCamera-f5bf8ca5870fed38fe91e3e018ebc13cc1738364.tar.bz2 |
Create ImageListParam as a spec for creating image lists.
Also merge deactivate() and close().
Change-Id: Idc76eda25bfcefab949e46412dca366228b3f437
Diffstat (limited to 'tests/src/com')
-rw-r--r-- | tests/src/com/android/camera/BitmapManagerUnitTests.java | 10 | ||||
-rw-r--r-- | tests/src/com/android/camera/gallery/ImageListUberUnitTests.java | 6 |
2 files changed, 6 insertions, 10 deletions
diff --git a/tests/src/com/android/camera/BitmapManagerUnitTests.java b/tests/src/com/android/camera/BitmapManagerUnitTests.java index 4ac8b1f..e6d9e38 100644 --- a/tests/src/com/android/camera/BitmapManagerUnitTests.java +++ b/tests/src/com/android/camera/BitmapManagerUnitTests.java @@ -52,10 +52,12 @@ public class BitmapManagerUnitTests extends AndroidTestCase { public void setUp() { mContext = getContext(); mBitmapManager = BitmapManager.instance(); - mImageList = ImageManager.allImages(mContext.getContentResolver(), - ImageManager.DataLocation.ALL, - ImageManager.INCLUDE_IMAGES, - ImageManager.SORT_DESCENDING); + mImageList = ImageManager.makeImageList( + mContext.getContentResolver(), + ImageManager.DataLocation.ALL, + ImageManager.INCLUDE_IMAGES, + ImageManager.SORT_DESCENDING, + null); mImage = mImageList.getImageAt(0); } diff --git a/tests/src/com/android/camera/gallery/ImageListUberUnitTests.java b/tests/src/com/android/camera/gallery/ImageListUberUnitTests.java index 457dbe4..30487f2 100644 --- a/tests/src/com/android/camera/gallery/ImageListUberUnitTests.java +++ b/tests/src/com/android/camera/gallery/ImageListUberUnitTests.java @@ -14,7 +14,6 @@ public class ImageListUberUnitTests extends AndroidTestCase { listB.addImage(new MockImage(1, 1)); ImageListUber uber = new ImageListUber( new IImageList[] {listA, listB}, ImageManager.SORT_DESCENDING); - uber.open(getContext().getContentResolver()); assertEquals(2, uber.getImageAt(0).fullSizeImageId()); assertEquals(1, uber.getImageAt(1).fullSizeImageId()); @@ -23,7 +22,6 @@ public class ImageListUberUnitTests extends AndroidTestCase { uber = new ImageListUber( new IImageList[] {listA, listB}, ImageManager.SORT_DESCENDING); - uber.open(getContext().getContentResolver()); assertEquals(2, uber.getImageAt(0).fullSizeImageId()); assertEquals(1, uber.getImageAt(1).fullSizeImageId()); assertEquals(0, uber.getImageAt(2).fullSizeImageId()); @@ -39,7 +37,6 @@ public class ImageListUberUnitTests extends AndroidTestCase { ImageListUber uber = new ImageListUber( new IImageList[] {listB, listA}, ImageManager.SORT_DESCENDING); - uber.open(getContext().getContentResolver()); assertEquals(2, uber.getImageAt(0).fullSizeImageId()); assertEquals(1, uber.getImageAt(1).fullSizeImageId()); assertEquals(0, uber.getImageAt(2).fullSizeImageId()); @@ -48,7 +45,6 @@ public class ImageListUberUnitTests extends AndroidTestCase { uber = new ImageListUber( new IImageList[] {listA, listB}, ImageManager.SORT_DESCENDING); - uber.open(getContext().getContentResolver()); assertEquals(2, uber.getImageAt(0).fullSizeImageId()); assertEquals(1, uber.getImageAt(1).fullSizeImageId()); assertEquals(0, uber.getImageAt(2).fullSizeImageId()); @@ -64,7 +60,6 @@ public class ImageListUberUnitTests extends AndroidTestCase { listB.addImage(target); ImageListUber uber = new ImageListUber( new IImageList[] {listB, listA}, ImageManager.SORT_DESCENDING); - uber.open(getContext().getContentResolver()); uber.removeImage(target); assertEquals(2, uber.getImageAt(0).fullSizeImageId()); assertEquals(0, uber.getImageAt(1).fullSizeImageId()); @@ -83,7 +78,6 @@ public class ImageListUberUnitTests extends AndroidTestCase { listB.addImage(target); ImageListUber uber = new ImageListUber( new IImageList[] {listB, listA}, ImageManager.SORT_DESCENDING); - uber.open(getContext().getContentResolver()); uber.removeImageAt(1); assertEquals(2, uber.getImageAt(0).fullSizeImageId()); assertEquals(0, uber.getImageAt(1).fullSizeImageId()); |