Fixed testPinchIn to calculate expected touch down points correctly.

Bug: 11565859
Change-Id: Ie33b202878356a0f22b3836b7075cb21b3cf3056
diff --git a/tests/uiautomator/src/com/android/cts/uiautomatortest/CtsUiAutomatorTest.java b/tests/uiautomator/src/com/android/cts/uiautomatortest/CtsUiAutomatorTest.java
index 8c3cc8f..7e44e49 100644
--- a/tests/uiautomator/src/com/android/cts/uiautomatortest/CtsUiAutomatorTest.java
+++ b/tests/uiautomator/src/com/android/cts/uiautomatortest/CtsUiAutomatorTest.java
@@ -51,6 +51,9 @@
 
     private static final String SCREEN_SHOT_FILE_PATH_NAME = "/data/local/tmp/ctsScreenShot";
 
+    // Should match the value defined in UiObject
+    private static final int FINGER_TOUCH_HALF_WIDTH = 20;
+
     @Override
     protected void setUp() throws Exception {
         super.setUp();
@@ -885,10 +888,10 @@
                 withinMarginOfError(0.1f, screenRect.right, p2s.x));
 
         assertTrue("Touch-up X coordinate for pointer 1 is invalid",
-                withinMarginOfError(0.1f, screenRect.centerX(), p1e.x));
+                withinMarginOfError(0.1f, screenRect.centerX() - FINGER_TOUCH_HALF_WIDTH, p1e.x));
 
         assertTrue("Touch-up X coordinate for pointer 2 is invalid",
-                withinMarginOfError(0.1f, screenRect.centerX(), p2e.x));
+                withinMarginOfError(0.1f, screenRect.centerX() + FINGER_TOUCH_HALF_WIDTH, p2e.x));
     }
 
     /**