Disable TvInputManagerService on non-TV devices.
The block condition is based on FEATURE_LEANBACK instead of
FEATURE_TELEVISION which is deprecated in favor of FEATURE_LEANBACK.
Bug: 16497355
Change-Id: I433051362fe94ea453afe9344800fb4f8c7076a9
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index bf2edc8..9e67908 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -930,7 +930,9 @@
mSystemServiceManager.startService(HdmiControlService.class);
}
- mSystemServiceManager.startService(TvInputManagerService.class);
+ if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_LEANBACK)) {
+ mSystemServiceManager.startService(TvInputManagerService.class);
+ }
if (!disableNonCoreServices) {
try {