From fca49c41c379336a345237c60d2577a3c5d20171 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Tue, 8 Oct 2013 15:20:02 -0700 Subject: 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 --- services/java/com/android/server/SystemServer.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'services/java') diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index dd3b3a7..a689f55 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -61,6 +61,7 @@ import com.android.server.display.DisplayManagerService; import com.android.server.dreams.DreamManagerService; import com.android.server.fingerprint.FingerprintService; import com.android.server.hdmi.HdmiControlService; +import com.android.server.gesture.GestureService; import com.android.server.input.InputManagerService; import com.android.server.job.JobSchedulerService; import com.android.server.lights.LightsService; @@ -544,6 +545,7 @@ public final class SystemServer { LockSettingsService lockSettings = null; AssetAtlasService atlas = null; MediaRouterService mediaRouter = null; + GestureService gestureService = null; // Bring up services needed for UI. if (mFactoryTestMode != FactoryTest.FACTORY_TEST_LOW_LEVEL) { @@ -944,6 +946,17 @@ public final class SystemServer { new GraphicsStatsService(context)); } + if (context.getResources().getBoolean( + com.android.internal.R.bool.config_enableGestureService)) { + try { + Slog.i(TAG, "Gesture Sensor Service"); + gestureService = new GestureService(context, inputManager); + ServiceManager.addService("gesture", gestureService); + } catch (Throwable e) { + Slog.e(TAG, "Failure starting Gesture Sensor Service", e); + } + } + if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_PRINTING)) { mSystemServiceManager.startService(PRINT_MANAGER_SERVICE_CLASS); } @@ -1073,6 +1086,14 @@ public final class SystemServer { reportWtf("making Display Manager Service ready", e); } + if (gestureService != null) { + try { + gestureService.systemReady(); + } catch (Throwable e) { + reportWtf("making Gesture Sensor Service ready", e); + } + } + // These are needed to propagate to the runnable below. final NetworkManagementService networkManagementF = networkManagement; final NetworkStatsService networkStatsF = networkStats; -- cgit v1.1