summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/java/android/service/gesture/IGestureService.aidl11
-rw-r--r--core/java/android/view/InputDevice.java13
-rwxr-xr-xcore/res/res/values/config.xml3
-rwxr-xr-xcore/res/res/values/symbols.xml3
4 files changed, 30 insertions, 0 deletions
diff --git a/core/java/android/service/gesture/IGestureService.aidl b/core/java/android/service/gesture/IGestureService.aidl
new file mode 100644
index 0000000..1944d50
--- /dev/null
+++ b/core/java/android/service/gesture/IGestureService.aidl
@@ -0,0 +1,11 @@
+package android.service.gesture;
+
+import android.app.PendingIntent;
+
+/** @hide */
+interface IGestureService {
+
+ void setOnLongPressPendingIntent(in PendingIntent pendingIntent);
+ void setOnDoubleClickPendingIntent(in PendingIntent pendingIntent);
+
+}
diff --git a/core/java/android/view/InputDevice.java b/core/java/android/view/InputDevice.java
index cc4598d..7642ed9 100644
--- a/core/java/android/view/InputDevice.java
+++ b/core/java/android/view/InputDevice.java
@@ -256,6 +256,18 @@ public final class InputDevice implements Parcelable {
public static final int SOURCE_TOUCH_NAVIGATION = 0x00200000 | SOURCE_CLASS_NONE;
/**
+ * The input source is a touch device whose motions should be interpreted as gestures.
+ *
+ * For example, an upward swipe should be treated the same as a swipe of the touchscreen.
+ * The same should apply for left, right, down swipes. Complex gestures may also be input.
+ *
+ * @see #SOURCE_CLASS_NONE
+ *
+ * @hide
+ */
+ public static final int SOURCE_GESTURE_SENSOR = 0x00400000 | SOURCE_CLASS_NONE;
+
+ /**
* The input source is a joystick.
* (It may also be a {@link #SOURCE_GAMEPAD}).
*
@@ -948,6 +960,7 @@ public final class InputDevice implements Parcelable {
appendSourceDescriptionIfApplicable(description, SOURCE_TOUCHPAD, "touchpad");
appendSourceDescriptionIfApplicable(description, SOURCE_JOYSTICK, "joystick");
appendSourceDescriptionIfApplicable(description, SOURCE_GAMEPAD, "gamepad");
+ appendSourceDescriptionIfApplicable(description, SOURCE_GESTURE_SENSOR, "gesture");
description.append(" )\n");
final int numAxes = mMotionRanges.size();
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index bc95f43..1dd1c61 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2121,6 +2121,9 @@
<bool name="config_auto_attach_data_on_creation">true</bool>
+ <!-- True if the gesture service should be started at system start -->
+ <bool name="config_enableGestureService">false</bool>
+
<!-- Values for GPS configuration -->
<string-array translatable="false" name="config_gpsParameters">
<item>SUPL_HOST=supl.google.com</item>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 0fe919d..01a4bad 100755
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2375,4 +2375,7 @@
<!-- Data Connectivity Error Configurations -->
<java-symbol type="bool" name="config_reject_ggsn_perm_failure" />
<java-symbol type="bool" name="config_protocol_errors_perm_failure" />
+
+ <!-- Gesture Sensor -->
+ <java-symbol type="bool" name="config_enableGestureService" />
</resources>