summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRay Chen <raychen@google.com>2009-07-20 16:33:41 +0800
committerRay Chen <raychen@google.com>2009-07-29 19:00:13 +0800
commit012d0f38e1fd547436675257c5cd5c62928e2ed5 (patch)
tree884ff5188b25ea36698ac458cdf4e356c91e656c /tests
parentb53862357d977643c760c4eaeb0b7dcc841727f6 (diff)
downloadLegacyCamera-012d0f38e1fd547436675257c5cd5c62928e2ed5.zip
LegacyCamera-012d0f38e1fd547436675257c5cd5c62928e2ed5.tar.gz
LegacyCamera-012d0f38e1fd547436675257c5cd5c62928e2ed5.tar.bz2
Defer bitmap rotation until it's drawn on ImageView.
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/camera/BitmapManagerUnitTests.java2
-rw-r--r--tests/src/com/android/camera/gallery/MockImage.java11
2 files changed, 11 insertions, 2 deletions
diff --git a/tests/src/com/android/camera/BitmapManagerUnitTests.java b/tests/src/com/android/camera/BitmapManagerUnitTests.java
index 1e6300e..4ac8b1f 100644
--- a/tests/src/com/android/camera/BitmapManagerUnitTests.java
+++ b/tests/src/com/android/camera/BitmapManagerUnitTests.java
@@ -40,7 +40,7 @@ public class BitmapManagerUnitTests extends AndroidTestCase {
@Override
public void run() {
- bitmap = mImage.thumbBitmap();
+ bitmap = mImage.thumbBitmap(IImage.ROTATE_AS_NEEDED);
}
public Bitmap getBitmap() {
diff --git a/tests/src/com/android/camera/gallery/MockImage.java b/tests/src/com/android/camera/gallery/MockImage.java
index 97d51b6..ad68e55 100644
--- a/tests/src/com/android/camera/gallery/MockImage.java
+++ b/tests/src/com/android/camera/gallery/MockImage.java
@@ -16,6 +16,10 @@ public class MockImage implements IImage {
mTakenDate = takenDate;
}
+ public int getDegreesRotated() {
+ return 0;
+ }
+
protected void setContainer(IImageList container) {
this.mContainer = container;
}
@@ -25,6 +29,11 @@ public class MockImage implements IImage {
}
public Bitmap fullSizeBitmap(int minSideLength, int maxNumberOfPixels,
+ boolean rotateAsNeeded) {
+ return null;
+ }
+
+ public Bitmap fullSizeBitmap(int minSideLength, int maxNumberOfPixels,
boolean rotateAsNeeded, boolean useNative) {
return null;
}
@@ -92,7 +101,7 @@ public class MockImage implements IImage {
public void setTitle(String name) {
}
- public Bitmap thumbBitmap() {
+ public Bitmap thumbBitmap(boolean rotateAsNeeded) {
return null;
}