Changing the return type of takeScreenshot() (2/n)
Implementing the new return type for A11y services to take
the screenshot of the specified display.
boolean takeScreenshot(int displayId,
@NonNull @CallbackExecutor Executor executor,
@NonNull Consumer<ScreenshotResult> callback)
The return type is a new class, ScreenshotResult, including
hardwareBuffer, colorSpace, and timestamp. A11y services could
use the method, Bitmap#wrapHardwareBuffer, to obtain the bitmap.
Bug: 10931661
Test: a11y CTS & unit tests
Change-Id: I03eae10f0970d0e11e02c9d3f4031c4096b7b5b4
8 files changed