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

Commit 0d11f067 authored by Hari Raj Vijayakumar's avatar Hari Raj Vijayakumar
Browse files

Remove WRITE_SETTINGS permission check from AudioManager getter APIs

Bug: 267725330
Test: manual
Change-Id: Ib3255900c816591ab15e23919ad0541c34563e63
parent 7b4e6dc5
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -2329,10 +2329,6 @@ public class AudioService extends IAudioService.Stub
            Log.w(TAG, "audioFormat to enable is not a surround format.");
            return false;
        }
        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SETTINGS)
                != PackageManager.PERMISSION_GRANTED) {
            throw new SecurityException("Missing WRITE_SETTINGS permission");
        }
        final long token = Binder.clearCallingIdentity();
        try {
@@ -2400,11 +2396,6 @@ public class AudioService extends IAudioService.Stub
    /** @see AudioManager#getEncodedSurroundMode() */
    @Override
    public int getEncodedSurroundMode(int targetSdkVersion) {
        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SETTINGS)
                != PackageManager.PERMISSION_GRANTED) {
            throw new SecurityException("Missing WRITE_SETTINGS permission");
        }
        final long token = Binder.clearCallingIdentity();
        try {
            synchronized (mSettingsLock) {