CtsUiAutomatorTest pinchin/pinout test case: add support for 480X320 pixel solution device.
The pinchin/pinout test need the device solution bigger than ***X400.
This is hardcode in the CtsUiAutomatorTest.java
the source code is:
withinMarginOfError(0.1f, screenRect.centerX(), p2s.x))
 private boolean withinMarginOfError(float marginPrecent, int expected, int actual) {
       int m = (int) (marginPrecent * expected);
       return actual >= expected - m && actual <= expected + m;
     }

The vaule of p2s.x equals to  "centerX - 20", 20 is hard code like below:
protected static final int FINGER_TOUCH_HALF_WIDTH = 20;

So only the X pos of the device center is bigger than 20/0.1=200 can meet the requirement.
I have change the 0.1 to 0.125 to let 320 pixels device can meet the
requirement

Signed-off-by: yangxingsui <yang.xingsui@zte.com.cn>

Change-Id: Id4ccba21f08100a6d82991f83b6f18646611153a
Signed-off-by: yangxingsui <yang.xingsui@zte.com.cn>
1 file changed