summaryrefslogtreecommitdiffstats
path: root/test-runner
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2014-10-02 14:32:37 +0100
committerNeil Fuller <nfuller@google.com>2014-10-02 14:32:37 +0100
commitc2a0b4482d7144e8382346ea4c22c7b89368fec0 (patch)
treef0ec3fbeee8dde1d56ad85c59d858ec093d5eb9d /test-runner
parentf08384c763d2e57c05e0be4325c267d12fc516d4 (diff)
parentee665151a4c6359cbfbb9a6795aa9097c4622083 (diff)
downloadframeworks_base-c2a0b4482d7144e8382346ea4c22c7b89368fec0.zip
frameworks_base-c2a0b4482d7144e8382346ea4c22c7b89368fec0.tar.gz
frameworks_base-c2a0b4482d7144e8382346ea4c22c7b89368fec0.tar.bz2
resolved conflicts for merge of ee665151 to lmp-mr1-dev-plus-aosp
Change-Id: I2588c65b7a9fa43f968151a206924a804f0595a7
Diffstat (limited to 'test-runner')
-rw-r--r--test-runner/src/android/test/TouchUtils.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/test-runner/src/android/test/TouchUtils.java b/test-runner/src/android/test/TouchUtils.java
index 67a0bc2..1b854b0 100644
--- a/test-runner/src/android/test/TouchUtils.java
+++ b/test-runner/src/android/test/TouchUtils.java
@@ -564,7 +564,7 @@ public class TouchUtils {
final int fromX = xy[0];
final int fromY = xy[1];
- int distance = (int) Math.sqrt(deltaX * deltaX + deltaY * deltaY);
+ int distance = (int) Math.hypot(deltaX, deltaY);
drag(test, fromX, fromX + deltaX, fromY, fromY + deltaY, distance);
@@ -617,7 +617,7 @@ public class TouchUtils {
int deltaX = fromX - toX;
int deltaY = fromY - toY;
- int distance = (int)Math.sqrt(deltaX * deltaX + deltaY * deltaY);
+ int distance = (int)Math.hypot(deltaX, deltaY);
drag(test, fromX, toX, fromY, toY, distance);
return distance;