summaryrefslogtreecommitdiffstats
path: root/services/java
diff options
context:
space:
mode:
authorEthan Chen <intervigil@gmail.com>2013-10-08 15:20:02 -0700
committerSteve Kondik <steve@cyngn.com>2015-10-18 00:51:44 -0700
commitfca49c41c379336a345237c60d2577a3c5d20171 (patch)
tree292854cc71c8b3fcd061b63cf15d9a6c5f52bd93 /services/java
parenta45a56b204c320c04176f71881e85e36357fc27f (diff)
downloadframeworks_base-fca49c41c379336a345237c60d2577a3c5d20171.zip
frameworks_base-fca49c41c379336a345237c60d2577a3c5d20171.tar.gz
frameworks_base-fca49c41c379336a345237c60d2577a3c5d20171.tar.bz2
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
Diffstat (limited to 'services/java')
-rw-r--r--services/java/com/android/server/SystemServer.java21
1 files changed, 21 insertions, 0 deletions
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;