Add property to disable camera service proxy.
This service proxy (together with the native server) are not needed on
Android Wear, as we don't have any watches with cameras.
Bug: 28560707
Change-Id: Ie4a830a3ba48c90d3e968fc5cdf57ccafcc1f5d8
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 53117e1..812b226 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -548,12 +548,14 @@
false);
boolean disableTrustManager = SystemProperties.getBoolean("config.disable_trustmanager",
false);
- boolean disableTextServices = SystemProperties.getBoolean("config.disable_textservices", false);
+ 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 disableVrManager = SystemProperties.getBoolean("config.disable_vrmanager", false);
+ boolean disableCameraService = SystemProperties.getBoolean("config.disable_cameraservice",
+ false);
boolean isEmulator = SystemProperties.get("ro.kernel.qemu").equals("1");
@@ -578,8 +580,10 @@
mContentResolver = context.getContentResolver();
- Slog.i(TAG, "Camera Service");
- mSystemServiceManager.startService(CameraService.class);
+ if (!disableCameraService) {
+ Slog.i(TAG, "Camera Service");
+ mSystemServiceManager.startService(CameraService.class);
+ }
// The AccountManager must come before the ContentService
traceBeginAndSlog("StartAccountManagerService");