Commit 23000348 authored by Peter Wen's avatar Peter Wen Committed by Commit Bot

Android: Remove dependency on TouchUtils

android.test.TouchUtils is deprecated.

Bug: 807766
Change-Id: Ib30f91f13afc9a1f7daf19a144dbd43eb06917b7
Reviewed-on: https://chromium-review.googlesource.com/897912Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533758}
parent 43604aeb
...@@ -15,7 +15,7 @@ import android.view.ViewConfiguration; ...@@ -15,7 +15,7 @@ import android.view.ViewConfiguration;
* Based on android.test.TouchUtils, but slightly more flexible (allows to * Based on android.test.TouchUtils, but slightly more flexible (allows to
* specify coordinates for longClick, splits drag operation in three stages, etc). * specify coordinates for longClick, splits drag operation in three stages, etc).
*/ */
public class TestTouchUtils extends android.test.TouchUtils { public class TestTouchUtils {
/** /**
* Returns the absolute location in screen coordinates from location relative * Returns the absolute location in screen coordinates from location relative
* to view. * to view.
......
...@@ -6,7 +6,6 @@ package org.chromium.content.browser.test.util; ...@@ -6,7 +6,6 @@ package org.chromium.content.browser.test.util;
import android.app.Activity; import android.app.Activity;
import android.os.SystemClock; import android.os.SystemClock;
import android.test.TouchUtils;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.ViewConfiguration; import android.view.ViewConfiguration;
...@@ -35,7 +34,6 @@ public class TouchCommon { ...@@ -35,7 +34,6 @@ public class TouchCommon {
* @param x X coordinate, in screen coordinates. * @param x X coordinate, in screen coordinates.
* @param y Y coordinate, in screen coordinates. * @param y Y coordinate, in screen coordinates.
* @param downTime When the drag was started, in millis since the epoch. * @param downTime When the drag was started, in millis since the epoch.
* @see TouchUtils
*/ */
public static void dragStart(Activity activity, float x, float y, long downTime) { public static void dragStart(Activity activity, float x, float y, long downTime) {
View root = getRootViewForActivity(activity); View root = getRootViewForActivity(activity);
...@@ -58,7 +56,6 @@ public class TouchCommon { ...@@ -58,7 +56,6 @@ public class TouchCommon {
* @param toY Y coordinate of the drag destination, in screen coordinates. * @param toY Y coordinate of the drag destination, in screen coordinates.
* @param stepCount How many move steps to include in the drag. * @param stepCount How many move steps to include in the drag.
* @param downTime When the drag was started, in millis since the epoch. * @param downTime When the drag was started, in millis since the epoch.
* @see TouchUtils
*/ */
public static void dragTo(Activity activity, float fromX, float toX, float fromY, public static void dragTo(Activity activity, float fromX, float toX, float fromY,
float toY, int stepCount, long downTime) { float toY, int stepCount, long downTime) {
...@@ -88,7 +85,6 @@ public class TouchCommon { ...@@ -88,7 +85,6 @@ public class TouchCommon {
* @param x X coordinate, in screen coordinates. * @param x X coordinate, in screen coordinates.
* @param y Y coordinate, in screen coordinates. * @param y Y coordinate, in screen coordinates.
* @param downTime When the drag was started, in millis since the epoch. * @param downTime When the drag was started, in millis since the epoch.
* @see TouchUtils
*/ */
public static void dragEnd(Activity activity, float x, float y, long downTime) { public static void dragEnd(Activity activity, float x, float y, long downTime) {
View root = getRootViewForActivity(activity); View root = getRootViewForActivity(activity);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment