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

Commit f23f1b7b authored by Eric Laurent's avatar Eric Laurent
Browse files

AudioManager: mark deprecated call routing API as such

Add @Deprecated annotation to call audio routing methods that have
been replaced by setDeviceForCommunication() API in Android SC:
- startBluetoothSco()
- stopBluetoothSco()
- isBluetoothScoOn()
- setSpeakerPhoneOn()
- isSpeakerPhoneOn()

Bug: 197043248
Test: make
Change-Id: I32daaaabaf6498a2ddfcaa7a4137d15b75722596
parent 43243e35
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -20026,14 +20026,14 @@ package android.media {
    method @Deprecated public int getVibrateSetting(int);
    method @Deprecated public boolean isBluetoothA2dpOn();
    method public boolean isBluetoothScoAvailableOffCall();
    method public boolean isBluetoothScoOn();
    method @Deprecated public boolean isBluetoothScoOn();
    method public boolean isCallScreeningModeSupported();
    method public static boolean isHapticPlaybackSupported();
    method public boolean isMicrophoneMute();
    method public boolean isMusicActive();
    method public static boolean isOffloadedPlaybackSupported(@NonNull android.media.AudioFormat, @NonNull android.media.AudioAttributes);
    method public boolean isRampingRingerEnabled();
    method public boolean isSpeakerphoneOn();
    method @Deprecated public boolean isSpeakerphoneOn();
    method public boolean isStreamMute(int);
    method public boolean isSurroundFormatEnabled(int);
    method public boolean isVolumeFixed();
@@ -20062,7 +20062,7 @@ package android.media {
    method public void setParameters(String);
    method public void setRingerMode(int);
    method @Deprecated public void setRouting(int, int, int);
    method public void setSpeakerphoneOn(boolean);
    method @Deprecated public void setSpeakerphoneOn(boolean);
    method @Deprecated public void setStreamMute(int, boolean);
    method @Deprecated public void setStreamSolo(int, boolean);
    method public void setStreamVolume(int, int, int);
@@ -20070,8 +20070,8 @@ package android.media {
    method @Deprecated public void setVibrateSetting(int, int);
    method @Deprecated public void setWiredHeadsetOn(boolean);
    method @Deprecated public boolean shouldVibrate(int);
    method public void startBluetoothSco();
    method public void stopBluetoothSco();
    method @Deprecated public void startBluetoothSco();
    method @Deprecated public void stopBluetoothSco();
    method public void unloadSoundEffects();
    method public void unregisterAudioDeviceCallback(android.media.AudioDeviceCallback);
    method public void unregisterAudioPlaybackCallback(@NonNull android.media.AudioManager.AudioPlaybackCallback);
+11 −5
Original line number Diff line number Diff line
@@ -1628,8 +1628,10 @@ public class AudioManager {
     *
     * @param on set <var>true</var> to turn on speakerphone;
     *           <var>false</var> to turn it off
     * @deprecated Use {@link AudioManager#setCommunicationDevice(AudioDeviceInfo)} or
     *           {@link AudioManager#clearCommunicationDevice()} instead.
     */
    public void setSpeakerphoneOn(boolean on){
    @Deprecated public void setSpeakerphoneOn(boolean on) {
        final IAudioService service = getService();
        try {
            service.setSpeakerphoneOn(mICallBack, on);
@@ -1642,8 +1644,9 @@ public class AudioManager {
     * Checks whether the speakerphone is on or off.
     *
     * @return true if speakerphone is on, false if it's off
     * @deprecated Use {@link AudioManager#getCommunicationDevice()} instead.
     */
    public boolean isSpeakerphoneOn() {
    @Deprecated public boolean isSpeakerphoneOn() {
        final IAudioService service = getService();
        try {
            return service.isSpeakerphoneOn();
@@ -2709,8 +2712,9 @@ public class AudioManager {
     * connection is established.
     * @see #stopBluetoothSco()
     * @see #ACTION_SCO_AUDIO_STATE_UPDATED
     * @deprecated Use {@link AudioManager#setCommunicationDevice(AudioDeviceInfo)} instead.
     */
    public void startBluetoothSco(){
    @Deprecated public void startBluetoothSco() {
        final IAudioService service = getService();
        try {
            service.startBluetoothSco(mICallBack,
@@ -2753,9 +2757,10 @@ public class AudioManager {
     * bluetooth SCO audio with {@link #startBluetoothSco()} when finished with the SCO
     * connection or if connection fails.
     * @see #startBluetoothSco()
     * @deprecated Use {@link AudioManager#clearCommunicationDevice()} instead.
     */
    // Also used for connections started with {@link #startBluetoothScoVirtualCall()}
    public void stopBluetoothSco(){
    @Deprecated public void stopBluetoothSco() {
        final IAudioService service = getService();
        try {
            service.stopBluetoothSco(mICallBack);
@@ -2787,8 +2792,9 @@ public class AudioManager {
     *
     * @return true if SCO is used for communications;
     *         false if otherwise
     * @deprecated Use {@link AudioManager#getCommunicationDevice()} instead.
     */
    public boolean isBluetoothScoOn() {
    @Deprecated public boolean isBluetoothScoOn() {
        final IAudioService service = getService();
        try {
            return service.isBluetoothScoOn();