summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChih-yu Huang <akahuang@google.com>2011-10-21 11:50:02 +0800
committerWu-cheng Li <wuchengli@google.com>2011-10-21 19:47:21 +0800
commit048edf2ef22607b85bc4b062e2af71804f5b3530 (patch)
treec6fd30acd6a03b034296667f666f197c1d0bccb7 /tests
parent7d9eadd0c6c38b3761b7e8d3fa3658d194810d60 (diff)
downloadLegacyCamera-048edf2ef22607b85bc4b062e2af71804f5b3530.zip
LegacyCamera-048edf2ef22607b85bc4b062e2af71804f5b3530.tar.gz
LegacyCamera-048edf2ef22607b85bc4b062e2af71804f5b3530.tar.bz2
Fix focus area in front camera.
Front camera preview is mirrored. Change to use matrix to calculate the focus area. So the focus area will be correct in all orientations in front or back camera. bug:5446617 bug:5461028 Change-Id: I2d39a22cd9f034c5028843ca3d4abe0f9962f18a
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/camera/unittest/CameraTest.java16
1 files changed, 0 insertions, 16 deletions
diff --git a/tests/src/com/android/camera/unittest/CameraTest.java b/tests/src/com/android/camera/unittest/CameraTest.java
index ad0eed5..0e1242c 100644
--- a/tests/src/com/android/camera/unittest/CameraTest.java
+++ b/tests/src/com/android/camera/unittest/CameraTest.java
@@ -73,22 +73,6 @@ public class CameraTest extends TestCase {
assertEquals(180, Util.roundOrientation(180, 270));
}
- public void testConvertToFocusArea() {
- Rect rect = new Rect();
- FocusManager.convertToFocusArea(0, 0, 100, 100, 800, 480, rect);
- assertEquals(new Rect(-1000, -1000, -750, -583), rect);
- FocusManager.convertToFocusArea(0, 0, 400, 240, 800, 480, rect);
- assertEquals(new Rect(-1000, -1000, 0, 0), rect);
- FocusManager.convertToFocusArea(400, 240, 400, 240, 800, 480, rect);
- assertEquals(new Rect(0, 0, 1000, 1000), rect);
- FocusManager.convertToFocusArea(200, 120, 400, 240, 800, 480, rect);
- assertEquals(new Rect(-500, -500, 500, 500), rect);
- FocusManager.convertToFocusArea(0, 0, 800, 480, 800, 480, rect);
- assertEquals(new Rect(-1000, -1000, 1000, 1000), rect);
- FocusManager.convertToFocusArea(860, 620, 100, 100, 960, 720, rect);
- assertEquals(new Rect(792, 722, 1000, 1000), rect);
- }
-
public void testPrepareMatrix() {
Matrix matrix = new Matrix();
float[] points;