Add setting to redirect vibrator to game controller.
Bug: 6334179
Change-Id: I70093e38824ea3e5cf9cf242d1d7b6d26115ed80
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 241d04ff..75dcf8c 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -115,6 +115,7 @@
LightsService lights = null;
PowerManagerService power = null;
BatteryService battery = null;
+ VibratorService vibrator = null;
AlarmManagerService alarm = null;
NetworkManagementService networkManagement = null;
NetworkStatsService networkStats = null;
@@ -203,7 +204,8 @@
ServiceManager.addService("battery", battery);
Slog.i(TAG, "Vibrator Service");
- ServiceManager.addService("vibrator", new VibratorService(context));
+ vibrator = new VibratorService(context);
+ ServiceManager.addService("vibrator", vibrator);
// only initialize the power service after we have started the
// lights service, content providers and the battery service.
@@ -645,6 +647,12 @@
// It is now time to start up the app processes...
+ try {
+ vibrator.systemReady();
+ } catch (Throwable e) {
+ reportWtf("making Vibrator Service ready", e);
+ }
+
if (devicePolicy != null) {
try {
devicePolicy.systemReady();