Start consumer_ir service only when supported

This service is only useful when the FEATURE_CONSUMER_IR is enabled

Test: flash and use IR remote with Android TV
Bug: 264411203
Change-Id: I7127d918f9c4d507773db3613a91206ba6f6aeb8
This commit is contained in:
Nikolas Havrikov
2023-01-04 17:30:19 +01:00
parent b255015ed2
commit cd8caa4880

View File

@@ -1559,7 +1559,7 @@ public final class SystemServer implements Dumpable {
ServiceManager.addService("dynamic_system", dynamicSystem);
t.traceEnd();
if (!isWatch) {
if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CONSUMER_IR)) {
t.traceBegin("StartConsumerIrService");
consumerIr = new ConsumerIrService(context);
ServiceManager.addService(Context.CONSUMER_IR_SERVICE, consumerIr);