Skip to content
Commit 5ae620bd authored by Chavi Weingarten's avatar Chavi Weingarten
Browse files

Replace screenshots using internal displayToken with new API

In order to remove SurfaceControl.getInternalDisplayToken, we need to
replace all usages of it. The primary use is for screen capturing since
you could call directly into SF via ScreenCapture.captureDisplay if you
had a display token. However, this isn't scalable with multi-display
since you need to be explicity which display to capture.

The change provides a new API into WMS to capture a display using the
displayId. This is still a privilege call so only processes with
READ_FRAME_BUFFER can use it. In most cases, the replacement for now is
to use DEFAULT_DISPLAY, but they can be modified later to send the
desired display.

Test: power + volume down
Test: assistant screencapture
Test: SurfaceViewTests
Bug: 242714168

Change-Id: I9b406b699d48ae34c6ffd91c34941f1580f38d28
parent ddd124e8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment