From 048edf2ef22607b85bc4b062e2af71804f5b3530 Mon Sep 17 00:00:00 2001 From: Chih-yu Huang Date: Fri, 21 Oct 2011 11:50:02 +0800 Subject: 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 --- tests/src/com/android/camera/unittest/CameraTest.java | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'tests') 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; -- cgit v1.1