Added captureScreen function for displayId or layerStack
Previously, screencap shell command could accept a display id as an argument. It would use the id to look up information about the display (displayToken, orientation, colorMode) by making requests into SurfaceFlinger. Since those requests only worked for physical display ids, screencap didn't work to capture virtual displays. Instead of adding new methods to look up display information for a virtual display, this change just adds a new captureScreen function in SurfaceFlinger that accepts a displayId or layerStack and handles getting the default info for the requested display. This works for both physical and virtual displays. Test: adb shell screencap -d <layerStack for virt display> Fixes: 130974213 Change-Id: I24b7558c973a057414c6b4f81ab1d60152fff38d
Loading
Please register or sign in to comment