Merge "Add config to enable / disable VirtualDeviceManager" into main

This commit is contained in:
Prem Edhara
2023-07-21 18:22:32 +00:00
committed by Android (Google) Code Review
3 changed files with 6 additions and 1 deletions

View File

@@ -198,6 +198,9 @@
service. Off by default, since the service may not be available on some devices. -->
<bool name="config_enableProximityService">false</bool>
<!-- Enable or disable android.companion.virtual.VirtualDeviceManager. Enabled by default. -->
<bool name="config_enableVirtualDeviceManager">true</bool>
<!-- Whether dialogs should close automatically when the user touches outside
of them. This should not normally be modified. -->
<bool name="config_closeDialogWhenTouchOutside">true</bool>

View File

@@ -418,6 +418,7 @@
<java-symbol type="bool" name="config_localDisplaysMirrorContent" />
<java-symbol type="bool" name="config_ignoreUdfpsVote" />
<java-symbol type="bool" name="config_enableProximityService" />
<java-symbol type="bool" name="config_enableVirtualDeviceManager" />
<java-symbol type="array" name="config_localPrivateDisplayPorts" />
<java-symbol type="integer" name="config_defaultDisplayDefaultColorMode" />
<java-symbol type="bool" name="config_enableAppWidgetService" />

View File

@@ -2447,8 +2447,9 @@ public final class SystemServer implements Dumpable {
t.traceBegin("StartCompanionDeviceManager");
mSystemServiceManager.startService(COMPANION_DEVICE_MANAGER_SERVICE_CLASS);
t.traceEnd();
}
// VirtualDeviceManager depends on CDM to control the associations.
if (context.getResources().getBoolean(R.bool.config_enableVirtualDeviceManager)) {
t.traceBegin("StartVirtualDeviceManager");
mSystemServiceManager.startService(VIRTUAL_DEVICE_MANAGER_SERVICE_CLASS);
t.traceEnd();