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

Commit 3fdf8ccd authored by Jonathan Reichert's avatar Jonathan Reichert Committed by Automerger Merge Worker
Browse files

Merge "Remove WRITE_SETTINGS permission check from AudioManager getter APIs" am: 697fe662

parents ef7d75e7 697fe662
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -2369,10 +2369,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 {
@@ -2440,11 +2436,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) {