Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ac4922a authored by Ethan Chen's avatar Ethan Chen Committed by Steve Kondik
Browse files

Support GESTURE_SENSOR input device type with GestureService

* The GESTURE_SENSOR input device type is meant to support touch sensors
  which are meant for gesture input only, very similar to a touchpad,
  but without the pointer capability.
* Define separate service to handle gestures from GESTURE_SENSOR device
  type.

Change-Id: I9b273df2a3cc141774d7f7cd81e43a90ea5b230b

Hide InputDevice.SOURCE_GESTURE_SENSOR from API

Change-Id: If009e9595fc593594b0e7764669996de137483a1

GestureInput : Allow doubletap/longpress configuration

Allows devices to specify pending intents for double tap and
long press events.

Change-Id: I7e7cc2f9f96a01d8f6232e5cf0e19832fdfd5359
parent 3d24dedf
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -241,6 +241,7 @@ LOCAL_SRC_FILES += \
	core/java/android/service/gesture/IEdgeGestureService.aidl \
	core/java/android/service/gesture/IEdgeGestureActivationListener.aidl \
	core/java/android/service/gesture/IEdgeGestureHostCallback.aidl \
	core/java/android/service/gesture/IGestureService.aidl \
	core/java/android/service/wallpaper/IWallpaperConnection.aidl \
	core/java/android/service/wallpaper/IWallpaperEngine.aidl \
	core/java/android/service/wallpaper/IWallpaperService.aidl \
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ public class Input {
        put("touchpad", InputDevice.SOURCE_TOUCHPAD);
        put("touchnavigation", InputDevice.SOURCE_TOUCH_NAVIGATION);
        put("joystick", InputDevice.SOURCE_JOYSTICK);
        put("gesture", InputDevice.SOURCE_GESTURE_SENSOR);
    }};


+11 −0
Original line number Diff line number Diff line
package android.service.gesture;

import android.app.PendingIntent;

/** @hide */
interface IGestureService {

    void setOnLongPressPendingIntent(in PendingIntent pendingIntent);
    void setOnDoubleClickPendingIntent(in PendingIntent pendingIntent);

}
+13 −0
Original line number Diff line number Diff line
@@ -225,6 +225,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}).
@@ -904,6 +916,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();
+3 −0
Original line number Diff line number Diff line
@@ -1852,6 +1852,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>
Loading