Permission enforcement for A11y volume changes
Make modifying the STREAM_ACCESSIBILITY volume conditional
to have the BIND_ACCESSIBILITY_SERVICE permission.
Add BIND_ACCESSIBILITY_SERVICE permission to sysUI.
Test: cts-tradefed run cts -m CtsMediaTestCases -t android.media.cts.AudioManagerTest#testAccessibilityVolume
Bug: 34379420
Bug: 30448020
Change-Id: I9f26affccd953bd8473d06822857edf92fef4ba8
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index 428b7b8..4b932a3 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -180,6 +180,9 @@
<!-- accessibility -->
<uses-permission android:name="android.permission.MODIFY_ACCESSIBILITY_DATA" />
+ <!-- to control accessibility volume -->
+ <uses-permission android:name="android.permission.BIND_ACCESSIBILITY_SERVICE" />
+
<application
android:name=".SystemUIApplication"
android:persistent="true"