Loading packages/SystemUI/AndroidManifest.xml +3 −0 Original line number Diff line number Diff line Loading @@ -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" Loading services/core/java/com/android/server/audio/AudioService.java +14 −0 Original line number Diff line number Diff line Loading @@ -1241,6 +1241,13 @@ public class AudioService extends IAudioService.Stub /** @see AudioManager#adjustStreamVolume(int, int, int) */ public void adjustStreamVolume(int streamType, int direction, int flags, String callingPackage) { if ( streamType == AudioManager.STREAM_ACCESSIBILITY && (PackageManager.PERMISSION_GRANTED != mContext.checkCallingOrSelfPermission( android.Manifest.permission.BIND_ACCESSIBILITY_SERVICE))) { Log.w(TAG, "Trying to call adjustStreamVolume() for a11y without" + "BIND_ACCESSIBILITY_SERVICE / callingPackage=" + callingPackage); return; } adjustStreamVolume(streamType, direction, flags, callingPackage, callingPackage, Binder.getCallingUid()); } Loading Loading @@ -1552,6 +1559,13 @@ public class AudioService extends IAudioService.Stub /** @see AudioManager#setStreamVolume(int, int, int) */ public void setStreamVolume(int streamType, int index, int flags, String callingPackage) { if ( streamType == AudioManager.STREAM_ACCESSIBILITY && (PackageManager.PERMISSION_GRANTED != mContext.checkCallingOrSelfPermission( android.Manifest.permission.BIND_ACCESSIBILITY_SERVICE))) { Log.w(TAG, "Trying to call setStreamVolume() for a11y without" + " BIND_ACCESSIBILITY_SERVICE callingPackage=" + callingPackage); return; } setStreamVolume(streamType, index, flags, callingPackage, callingPackage, Binder.getCallingUid()); } Loading Loading
packages/SystemUI/AndroidManifest.xml +3 −0 Original line number Diff line number Diff line Loading @@ -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" Loading
services/core/java/com/android/server/audio/AudioService.java +14 −0 Original line number Diff line number Diff line Loading @@ -1241,6 +1241,13 @@ public class AudioService extends IAudioService.Stub /** @see AudioManager#adjustStreamVolume(int, int, int) */ public void adjustStreamVolume(int streamType, int direction, int flags, String callingPackage) { if ( streamType == AudioManager.STREAM_ACCESSIBILITY && (PackageManager.PERMISSION_GRANTED != mContext.checkCallingOrSelfPermission( android.Manifest.permission.BIND_ACCESSIBILITY_SERVICE))) { Log.w(TAG, "Trying to call adjustStreamVolume() for a11y without" + "BIND_ACCESSIBILITY_SERVICE / callingPackage=" + callingPackage); return; } adjustStreamVolume(streamType, direction, flags, callingPackage, callingPackage, Binder.getCallingUid()); } Loading Loading @@ -1552,6 +1559,13 @@ public class AudioService extends IAudioService.Stub /** @see AudioManager#setStreamVolume(int, int, int) */ public void setStreamVolume(int streamType, int index, int flags, String callingPackage) { if ( streamType == AudioManager.STREAM_ACCESSIBILITY && (PackageManager.PERMISSION_GRANTED != mContext.checkCallingOrSelfPermission( android.Manifest.permission.BIND_ACCESSIBILITY_SERVICE))) { Log.w(TAG, "Trying to call setStreamVolume() for a11y without" + " BIND_ACCESSIBILITY_SERVICE callingPackage=" + callingPackage); return; } setStreamVolume(streamType, index, flags, callingPackage, callingPackage, Binder.getCallingUid()); } Loading