Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 93df2ea9 authored by chaviw's avatar chaviw
Browse files

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
parent 9d41bd7c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment