Do not send updates for disabled displays.
If a display is disabled, do not share it outside of DisplayManagerService. This will help by not creating any unnecessary updates for displays that are disabled, and also not informing Applications of displays that they are unable to use. Also fixing a concurrency issue with DMS.handleLogicalDisplaySwapped which became apparent with this CL. Deferring the runnable with a Handler.post() caused the display-state-OFF update to happen after a newer change to turn the display ON. This caused the device to startup into a black screen. Removed the unnecessary call (since the displays are now made to both go into the "transition" state) to update the state and removed a lot of the redundant code with handleLogicalDisplayChange() which was called at the end of the method anyway. Bug: 221071695 Test: atest com.server.android.display Test: Manually verify display layouts still successfully change, and also confirm logs no longer hand excessive add/remove display notifications. Change-Id: I003fd91567630a447cf030b6fb83e5cb1041bcb5
Loading
Please register or sign in to comment