Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4fa6711c authored by Nikita Dubrovsky's avatar Nikita Dubrovsky
Browse files

Update READ_CLIPBOARD_IN_BACKGROUND to be grantable via roles

ClipboardService currently has a special case to allow Android System
Intelligence to read the clipboard in the background. The special case
is implemented by checking if the calling package is the provider of
ContentCaptureService. Rather than having to maintain this special case,
we want to reuse the existing READ_CLIPBOARD_IN_BACKGROUND permission
by allowing it to be associated with roles. This way the permission will
be associated with the appropriate role held by Android System
Intelligence and the special case can be removed from ClipboardService.
This also decouples which PCC package provides ContentCaptureService vs
which PCC package should be allowed to access the clipboard.

The change to remove the special case logic from ClipboardService will
be done as a separate CL.

Bug: 216314180
Test: atest CtsPermission2TestCases:PermissionPolicyTest
Test: atest CtsContentTestCases:ClipboardManagerTest
Test: atest IntentResolverUnitTests:UnbundledChooserActivityTest
Test: atest TextClassifierNotificationTests:CopyCodeActivityTest
Change-Id: Ia9ddc7a4f883691c202bece7d9376bd95e6a14b7
parent f9975966
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment