Avoid showing the screenshot ui on external displays
When adding a window (the screenshot one in this case) to an external display that is mirroring the default one, mirroring stops. For now we can't distinguish whether an external display is mirroring or extending the default one, so we're always passing "false" to "showUIOnExternalDisplay" ScreenshotController constructor to only show the UI on the default display While a simple "showUi" would have worked from ScreenshotController point of view, the more verbose "showUIOnExternalDisplay" makes it explicit that we can't avoid showing the UI on the default display. Writing a test for ScreenshotController is not currently feasible due to the many deps that can't be mocked. Making it testable would require a full risky refactor. Note that the screenshot window is still created regardless of the value of showUIOnExternalDisplay parameter: as a follow up improvement we can avoid the creation of it, but it would involve a big refactor of the class, not easy to flag-guard. Bug: 290910794 Bug: 304693302 Test: Tested manually on felix with simulated external display Change-Id: Id709a7c0ff5a3b3cda665ce44c7fa25727552a69
Loading
Please register or sign in to comment