Make consumer_ir an optional service.
b/31244699
Change-Id: Id851b0139d476a829097399374bb196cbfe96cf0
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 97a829e..8a59648 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -551,6 +551,9 @@
boolean disableTextServices = SystemProperties.getBoolean("config.disable_textservices", false);
boolean disableSamplingProfiler = SystemProperties.getBoolean("config.disable_samplingprof",
false);
+
+ boolean disableConsumerIr = SystemProperties.getBoolean("config.disable_consumerir", false);
+
boolean isEmulator = SystemProperties.get("ro.kernel.qemu").equals("1");
try {
@@ -595,10 +598,12 @@
ServiceManager.addService("vibrator", vibrator);
Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
- traceBeginAndSlog("StartConsumerIrService");
- consumerIr = new ConsumerIrService(context);
- ServiceManager.addService(Context.CONSUMER_IR_SERVICE, consumerIr);
- Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
+ if (!disableConsumerIr) {
+ traceBeginAndSlog("StartConsumerIrService");
+ consumerIr = new ConsumerIrService(context);
+ ServiceManager.addService(Context.CONSUMER_IR_SERVICE, consumerIr);
+ Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
+ }
traceBeginAndSlog("StartAlarmManagerService");
mSystemServiceManager.startService(AlarmManagerService.class);