From 87bd0dccf7f2558ea1a5e0fce523aea022709834 Mon Sep 17 00:00:00 2001 From: Svetoslav Ganov Date: Tue, 8 May 2012 13:46:48 -0700 Subject: [PATCH] Renaming the constants for activation and long press. 1. We will have a double tap to activate an item and tap and hold to perform a long press. Change-Id: Ibd9d8774e5a4693d8868d1128e55a82ff0c3a80b --- api/current.txt | 4 ++-- .../accessibilityservice/AccessibilityService.java | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api/current.txt b/api/current.txt index 13c972fc9f937..ce39c68b50a18 100644 --- a/api/current.txt +++ b/api/current.txt @@ -2018,6 +2018,7 @@ package android.accessibilityservice { method protected void onServiceConnected(); method public final boolean performGlobalAction(int); method public final void setServiceInfo(android.accessibilityservice.AccessibilityServiceInfo); + field public static final int GESTURE_DOUBLE_TAP = 17; // 0x11 field public static final int GESTURE_SWIPE_DOWN = 2; // 0x2 field public static final int GESTURE_SWIPE_DOWN_AND_LEFT = 15; // 0xf field public static final int GESTURE_SWIPE_DOWN_AND_RIGHT = 16; // 0x10 @@ -2034,8 +2035,7 @@ package android.accessibilityservice { field public static final int GESTURE_SWIPE_UP_AND_DOWN = 7; // 0x7 field public static final int GESTURE_SWIPE_UP_AND_LEFT = 13; // 0xd field public static final int GESTURE_SWIPE_UP_AND_RIGHT = 14; // 0xe - field public static final int GESTURE_TWO_FINGER_LONG_PRESS = 18; // 0x12 - field public static final int GESTURE_TWO_FINGER_TAP = 17; // 0x11 + field public static final int GESTURE_TAP_AND_HOLD = 18; // 0x12 field public static final int GLOBAL_ACTION_BACK = 1; // 0x1 field public static final int GLOBAL_ACTION_HOME = 2; // 0x2 field public static final int GLOBAL_ACTION_NOTIFICATIONS = 4; // 0x4 diff --git a/core/java/android/accessibilityservice/AccessibilityService.java b/core/java/android/accessibilityservice/AccessibilityService.java index b644dd1c0fb98..c559e540f8536 100644 --- a/core/java/android/accessibilityservice/AccessibilityService.java +++ b/core/java/android/accessibilityservice/AccessibilityService.java @@ -284,14 +284,14 @@ public abstract class AccessibilityService extends Service { public static final int GESTURE_SWIPE_DOWN_AND_RIGHT = 16; /** - * The user has performed a two finger tap gesture on the touch screen. + * The user has performed a double tap gesture on the touch screen. */ - public static final int GESTURE_TWO_FINGER_TAP = 17; + public static final int GESTURE_DOUBLE_TAP = 17; /** - * The user has performed a two finger long press gesture on the touch screen. + * The user has performed a tap and hold gesture on the touch screen. */ - public static final int GESTURE_TWO_FINGER_LONG_PRESS = 18; + public static final int GESTURE_TAP_AND_HOLD = 18; /** * The {@link Intent} that must be declared as handled by the service. @@ -408,8 +408,8 @@ public abstract class AccessibilityService extends Service { * @see #GESTURE_SWIPE_RIGHT_AND_DOWN * @see #GESTURE_CLOCKWISE_CIRCLE * @see #GESTURE_COUNTER_CLOCKWISE_CIRCLE - * @see #GESTURE_TWO_FINGER_TAP - * @see #GESTURE_TWO_FINGER_LONG_PRESS + * @see #GESTURE_DOUBLE_TAP + * @see #GESTURE_TAP_AND_HOLD */ protected boolean onGesture(int gestureId) { // TODO: Describe the default gesture processing in the javaDoc once it is finalized.