For API 26+ we can use PixelCopy API to copy Window into a Bitmap.
The benefit is that users won't have to grant permission when we try to take a screenshot.
So, on O+ let's try to take a screenshot using PixelCopy first, falling back to MediaProjection only if it fails.
For API 26+ we can use PixelCopy API to copy Window into a Bitmap. The benefit is that users won't have to grant permission when we try to take a screenshot. So, on O+ let's try to take a screenshot using PixelCopy first, falling back to MediaProjection only if it fails.