diff options
| author | 2017-02-07 11:04:18 -0800 | |
|---|---|---|
| committer | 2017-02-07 11:14:19 -0800 | |
| commit | c117bea6dcc1fc8a414a50ad6dfc3c24d4be4beb (patch) | |
| tree | 5ffba86f2f2b6f1c101a1c313b85d3d8a0991fbf | |
| parent | 4c28b93caa3ce7a2d19ba40150d589d777b9c926 (diff) | |
audio: deprecate AudioManager.isBluetoothA2dpOn()
This method name is misleading and the functionality is now
replaced by the more generic AudioManager.getDevices() method.
Bug: 35076621
Test: make, make update-api
Change-Id: Idc2e55f85722d3197fc8fab115af33f5da889d57
| -rw-r--r-- | api/current.txt | 2 | ||||
| -rw-r--r-- | api/system-current.txt | 2 | ||||
| -rw-r--r-- | api/test-current.txt | 2 | ||||
| -rw-r--r-- | media/java/android/media/AudioManager.java | 7 |
4 files changed, 7 insertions, 6 deletions
diff --git a/api/current.txt b/api/current.txt index e315958badeb..2405c1cfd4c2 100644 --- a/api/current.txt +++ b/api/current.txt @@ -20627,7 +20627,7 @@ package android.media { method public int getStreamMaxVolume(int); method public int getStreamVolume(int); method public deprecated int getVibrateSetting(int); - method public boolean isBluetoothA2dpOn(); + method public deprecated boolean isBluetoothA2dpOn(); method public boolean isBluetoothScoAvailableOffCall(); method public boolean isBluetoothScoOn(); method public boolean isMicrophoneMute(); diff --git a/api/system-current.txt b/api/system-current.txt index ae145dc9b037..01ba9634ed65 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -22209,7 +22209,7 @@ package android.media { method public int getStreamMaxVolume(int); method public int getStreamVolume(int); method public deprecated int getVibrateSetting(int); - method public boolean isBluetoothA2dpOn(); + method public deprecated boolean isBluetoothA2dpOn(); method public boolean isBluetoothScoAvailableOffCall(); method public boolean isBluetoothScoOn(); method public boolean isHdmiSystemAudioSupported(); diff --git a/api/test-current.txt b/api/test-current.txt index 1e3b6db92185..e949dcf47484 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -20719,7 +20719,7 @@ package android.media { method public int getStreamMaxVolume(int); method public int getStreamVolume(int); method public deprecated int getVibrateSetting(int); - method public boolean isBluetoothA2dpOn(); + method public deprecated boolean isBluetoothA2dpOn(); method public boolean isBluetoothScoAvailableOffCall(); method public boolean isBluetoothScoOn(); method public boolean isMicrophoneMute(); diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java index fb3f5b38959b..a4f2a7ea49f0 100644 --- a/media/java/android/media/AudioManager.java +++ b/media/java/android/media/AudioManager.java @@ -1456,10 +1456,11 @@ public class AudioManager { } /** - * Checks whether A2DP audio routing to the Bluetooth headset is on or off. + * Checks whether a Bluetooth A2DP audio peripheral is connected or not. * - * @return true if A2DP audio is being routed to/from Bluetooth headset; + * @return true if a Bluetooth A2DP peripheral is connected * false if otherwise + * @deprecated Use {@link AudioManager#getDevices(int)} instead to list available audio devices. */ public boolean isBluetoothA2dpOn() { if (AudioSystem.getDeviceConnectionState(DEVICE_OUT_BLUETOOTH_A2DP,"") @@ -1492,7 +1493,7 @@ public class AudioManager { * * @return true if a wired headset is connected. * false if otherwise - * @deprecated Use only to check is a headset is connected or not. + * @deprecated Use {@link AudioManager#getDevices(int)} instead to list available audio devices. */ public boolean isWiredHeadsetOn() { if (AudioSystem.getDeviceConnectionState(DEVICE_OUT_WIRED_HEADSET,"") |