In Android 9 and lower, the screen buffer
capture permissions (
CAPTURE_SECURE_VIDEO_OUTPUT) were granted to apps that
had either signature or privileged permissions. This
enabled seamless screen-buffer capturing activities, such as
taking screenshots, or recording a device’s screen contents.
Starting in Android 10, to prevent silent access to a device’s screen contents, video capture permissions aren't granted to privileged apps. Access without user consent is restricted, and granted only to apps that have signature permissions. Device manufacturers that run privileged apps relying on this silent capture functionality are affected by this requirement.
As of Android 10 if you don’t have the listed screen-buffer capture signature permissions, your app can’t capture screen buffers without user consent. To ensure you have the permissions you need, search your manifest file for the previously listed signature permissions. Migrate all affected privileged apps (as found in your search) to the MediaProjectionManager class, which allows any third party app to capture screen buffers without permissions, but with user consent. This flow displays a dialog that prompts the user to allow screen capturing when an app initiates it. In Android 10, new features of the dialog include the following:
- Provides more visible associations with the Cast icon.
- Provides more information about the sensitivity of the data that can be accessed.
- Prevents users from hiding the dialog on future initiations: the dialog shows every time.