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

Commit c001f552 authored by Sally's avatar Sally
Browse files

Modify MANAGE_ACCESSIBILITY to accept roles

This is the first step in allowing Exo and the Chromebook to act
on streamed screen content on behalf of its accessibility users.

It was assumed Exo would have access to this permission, but since
it's not signed by the platform, the signature-level permission is
not automatically granted. This fix allows only pre-installed,
privileged apps that have this role, and which have asked the user
for consent to stream and communicate with apps on the mobile device.

Bug: 280661435
Test: atest AccessibilityDisplayProxyTest, PermissionPolicyTest,
CtsCompanionDeviceManagerUiAutomationTestCases, CtsRoleTestCases

Change-Id: I5c0d4d0a44344a25c41e944bdfbdfaf696da68a3
parent c468a9f9
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -7129,9 +7129,10 @@
                android:protectionLevel="signature" />
                android:protectionLevel="signature" />


    <!-- @SystemApi Allows modifying accessibility state.
    <!-- @SystemApi Allows modifying accessibility state.
        <p> The only approved role for this permission is COMPANION_DEVICE_APP_STREAMING.
         @hide -->
         @hide -->
    <permission android:name="android.permission.MANAGE_ACCESSIBILITY"
    <permission android:name="android.permission.MANAGE_ACCESSIBILITY"
        android:protectionLevel="signature|setup|recents" />
        android:protectionLevel="signature|setup|recents|role" />


    <!-- @SystemApi Allows an app to grant a profile owner access to device identifiers.
    <!-- @SystemApi Allows an app to grant a profile owner access to device identifiers.
         <p>Not for use by third-party applications.
         <p>Not for use by third-party applications.