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
Loading
Please register or sign in to comment