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

Commit 3d9f41a7 authored by allenwtsu's avatar allenwtsu
Browse files

[AudioCodec] Export API to get audio codec

Test: by manual
Bug: 143576354
Change-Id: I5b7be8268596ae890120628aa23c318bf51eb9a3
parent 7251af1f
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -217,6 +217,9 @@ public abstract class Connection {
    protected int mCause = DisconnectCause.NOT_DISCONNECTED;
    protected int mCause = DisconnectCause.NOT_DISCONNECTED;
    protected PostDialState mPostDialState = PostDialState.NOT_STARTED;
    protected PostDialState mPostDialState = PostDialState.NOT_STARTED;


    // Store the current audio code
    protected int mAudioCodec;

    @UnsupportedAppUsage
    @UnsupportedAppUsage
    private static String LOG_TAG = "Connection";
    private static String LOG_TAG = "Connection";


@@ -1355,4 +1358,12 @@ public abstract class Connection {
                .append(" post dial state: " + getPostDialState());
                .append(" post dial state: " + getPostDialState());
        return str.toString();
        return str.toString();
    }
    }

    /**
     * Get current audio codec.
     * @return current audio codec.
     */
    public int getAudioCodec() {
        return mAudioCodec;
    }
}
}
+0 −3
Original line number Original line Diff line number Diff line
@@ -79,9 +79,6 @@ public class GsmCdmaConnection extends Connection {
    // The cached delay to be used between DTMF tones fetched from carrier config.
    // The cached delay to be used between DTMF tones fetched from carrier config.
    private int mDtmfToneDelay = 0;
    private int mDtmfToneDelay = 0;


    // Store the current audio codec
    private int mAudioCodec = DriverCall.AUDIO_QUALITY_UNSPECIFIED;

    private TelephonyMetrics mMetrics = TelephonyMetrics.getInstance();
    private TelephonyMetrics mMetrics = TelephonyMetrics.getInstance();


    //***** Event Constants
    //***** Event Constants
+0 −3
Original line number Original line Diff line number Diff line
@@ -132,9 +132,6 @@ public class ImsPhoneConnection extends Connection implements
     */
     */
    private boolean mIsLocalVideoCapable = true;
    private boolean mIsLocalVideoCapable = true;


    // Store the current audio codec
    private int mAudioCodec = ImsStreamMediaProfile.AUDIO_QUALITY_NONE;

    //***** Event Constants
    //***** Event Constants
    private static final int EVENT_DTMF_DONE = 1;
    private static final int EVENT_DTMF_DONE = 1;
    private static final int EVENT_PAUSE_DONE = 2;
    private static final int EVENT_PAUSE_DONE = 2;