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

Commit 3bec57aa authored by Marin Shalamanov's avatar Marin Shalamanov
Browse files

Make AudioManager.getSurroundFormats a TestApi

We need to access this API from a TVTS test.

Bug: 187028404
Test: locally run
    m tvts && tvts-tradefed run commandAndExit \
         tvts-all -m TvtsHdmiHostTestCases
Change-Id: I0122ff2a1f285aa01dc76e332a35798e19a07ac7
Merged-In: I0122ff2a1f285aa01dc76e332a35798e19a07ac7
parent f5098669
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1428,6 +1428,7 @@ package android.media {
    method @RequiresPermission("android.permission.QUERY_AUDIO_STATE") public int abandonAudioFocusForTest(@NonNull android.media.AudioFocusRequest, @NonNull String);
    method @Nullable public static android.media.AudioDeviceInfo getDeviceInfoFromType(int);
    method @IntRange(from=0) @RequiresPermission("android.permission.QUERY_AUDIO_STATE") public long getFadeOutDurationOnFocusLossMillis(@NonNull android.media.AudioAttributes);
    method @NonNull public java.util.Map<java.lang.Integer,java.lang.Boolean> getSurroundFormats();
    method public boolean hasRegisteredDynamicPolicy();
    method @RequiresPermission(anyOf={android.Manifest.permission.MODIFY_AUDIO_ROUTING, android.Manifest.permission.QUERY_AUDIO_STATE}) public boolean isFullVolumeDevice();
    method @RequiresPermission("android.permission.QUERY_AUDIO_STATE") public int requestAudioFocusForTest(@NonNull android.media.AudioFocusRequest, @NonNull String, int, int);
+2 −0
Original line number Diff line number Diff line
@@ -7055,6 +7055,8 @@ public class AudioManager {
     * @return a map where the key is a surround format and
     * the value indicates the surround format is enabled or not
     */
    @TestApi
    @NonNull
    public Map<Integer, Boolean> getSurroundFormats() {
        Map<Integer, Boolean> surroundFormats = new HashMap<>();
        int status = AudioSystem.getSurroundFormats(surroundFormats);