Add config to enable / disable VirtualDeviceManager

Bug:287295010

Test: Flashed watch and saw VDM was started also tested case where the flag was set to false.

Change-Id: I3126aa76d7239f1e7c86c7b869e7e79651df079a
This commit is contained in:
Prem
2023-07-17 17:18:58 +00:00
committed by Prem Edhara
parent 6df6883ad7
commit aae8353e2f
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

@@ -2440,8 +2440,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();