Make non-main displays take headless screenshots.
Instead of expecting ScreenshotController to function headlessly,
separate the small bit of code that does the actual saving into its own
class and use that instead of ScreenshotController when headless
operation is needed for secondary displays.
Existing "no-UI" functionality in ScreenshotController is untouched for
now to minimize the scope of the change.
Bug: 339424226
Test: atest TakeScreenshotExecutorTest
Test: manual testing with secondary display.
Flag: EXEMPT bugfix
Change-Id: I3abc3e72f43649e114358ab7aa6d14e807fc3bf2
4 files changed