From b7fe6a9a6ffa3f330a04a366a45f323efa7e7539 Mon Sep 17 00:00:00 2001 From: Kriti Dang Date: Tue, 13 Apr 2021 11:21:55 +0200 Subject: [PATCH] Removing permission requirements from surround sound setting getter APIs Bug: 184044815 Test: atest AudioManagerTest Change-Id: I86cc248b05a80bdb3ab0bee96a9ef57b9e633f2c --- core/api/current.txt | 4 ++-- media/java/android/media/AudioManager.java | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/api/current.txt b/core/api/current.txt index a30191ce63a76..39b038873f61c 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -20374,7 +20374,7 @@ package android.media { method @NonNull public java.util.List getAvailableCommunicationDevices(); method @Nullable public android.media.AudioDeviceInfo getCommunicationDevice(); method public android.media.AudioDeviceInfo[] getDevices(int); - method @RequiresPermission(android.Manifest.permission.WRITE_SETTINGS) public int getEncodedSurroundMode(); + method public int getEncodedSurroundMode(); method public java.util.List getMicrophones() throws java.io.IOException; method public int getMode(); method public String getParameters(String); @@ -20397,7 +20397,7 @@ package android.media { method public static boolean isOffloadedPlaybackSupported(@NonNull android.media.AudioFormat, @NonNull android.media.AudioAttributes); method public boolean isSpeakerphoneOn(); method public boolean isStreamMute(int); - method @RequiresPermission(android.Manifest.permission.WRITE_SETTINGS) public boolean isSurroundFormatEnabled(int); + method public boolean isSurroundFormatEnabled(int); method public boolean isVolumeFixed(); method @Deprecated public boolean isWiredHeadsetOn(); method public void loadSoundEffects(); diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java index a717a90c1c37f..c041343a468a7 100644 --- a/media/java/android/media/AudioManager.java +++ b/media/java/android/media/AudioManager.java @@ -6870,7 +6870,6 @@ public class AudioManager { * * @return true if successful, otherwise false */ - @RequiresPermission(android.Manifest.permission.WRITE_SETTINGS) public @EncodedSurroundOutputMode int getEncodedSurroundMode() { try { return getService().getEncodedSurroundMode(); @@ -6926,7 +6925,6 @@ public class AudioManager { * * @return whether the required surround format is enabled */ - @RequiresPermission(android.Manifest.permission.WRITE_SETTINGS) public boolean isSurroundFormatEnabled(@AudioFormat.SurroundSoundEncoding int audioFormat) { try { return getService().isSurroundFormatEnabled(audioFormat);