Add APIs to control the external display state
External displays start disabled, signal connection / disconnection and can be enabled / disabled by system apps. The implementation of the signalling is mostly in LogicalDisplayMapper. The flags are accessed through DisplayManagerFlags, which is injected into DisplayManagerService. All other uses come from DisplayManagerService and is propagated. This allows for injection in tests. Currently, we are using a standard flag, but if DeviceConfig is not ready, we instead read a default static value. The value cannot change during the runtime of the device. When read only flags are ready, we can simplify the code to remove the default value, as the flag will always be available. To test on a local device, set `DisplayManagerFlags.DEFAULT_IS_CONNECTED_DISPLAY_MANAGEMENT_ENABLED` to true. Bug: 280739508 Test: atest LocalDisplayAdapterTest Test: atest DisplayManagerServiceTest Change-Id: I91411a8e726982d88474cf2ecd0f423bde9be107
Loading
Please register or sign in to comment