From 7ba07b0c656117986a7368e91df8d23696711200 Mon Sep 17 00:00:00 2001 From: Hall Liu Date: Wed, 13 Feb 2019 17:34:52 -0800 Subject: [PATCH] Rename the RTT audio flag in ImsStreamMediaProfile Change-Id: I6a086f656fc241035a4ce50955410094c5d7dcc2 Fixes: 123938874 Test: manual --- api/system-current.txt | 4 ++-- .../telephony/ims/ImsStreamMediaProfile.java | 23 ++++++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/api/system-current.txt b/api/system-current.txt index 8a7cf2e8bdde9..e2f30deb5acd0 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -7219,12 +7219,12 @@ package android.telephony.ims { method public int describeContents(); method public int getAudioDirection(); method public int getAudioQuality(); - method public boolean getRttAudioSpeech(); method public int getRttMode(); method public int getVideoDirection(); method public int getVideoQuality(); + method public boolean isReceivingRttAudio(); method public boolean isRttCall(); - method public void setRttAudioSpeech(boolean); + method public void setReceivingRttAudio(boolean); method public void setRttMode(int); method public void writeToParcel(android.os.Parcel, int); field public static final int AUDIO_QUALITY_AMR = 1; // 0x1 diff --git a/telephony/java/android/telephony/ims/ImsStreamMediaProfile.java b/telephony/java/android/telephony/ims/ImsStreamMediaProfile.java index 837ef54a2f241..d11a0de24fb5f 100644 --- a/telephony/java/android/telephony/ims/ImsStreamMediaProfile.java +++ b/telephony/java/android/telephony/ims/ImsStreamMediaProfile.java @@ -99,7 +99,7 @@ public final class ImsStreamMediaProfile implements Parcelable { public int mRttMode; // RTT Audio Speech Indicator /** @hide */ - public boolean mHasRttAudioSpeech = false; + public boolean mIsReceivingRttAudio = false; /** @hide */ public ImsStreamMediaProfile(Parcel in) { @@ -201,7 +201,7 @@ public final class ImsStreamMediaProfile implements Parcelable { ", videoQuality=" + mVideoQuality + ", videoDirection=" + mVideoDirection + ", rttMode=" + mRttMode + - ", hasRttAudioSpeech=" + mHasRttAudioSpeech + " }"; + ", hasRttAudioSpeech=" + mIsReceivingRttAudio + " }"; } @Override @@ -216,7 +216,7 @@ public final class ImsStreamMediaProfile implements Parcelable { out.writeInt(mVideoQuality); out.writeInt(mVideoDirection); out.writeInt(mRttMode); - out.writeBoolean(mHasRttAudioSpeech); + out.writeBoolean(mIsReceivingRttAudio); } private void readFromParcel(Parcel in) { @@ -225,7 +225,7 @@ public final class ImsStreamMediaProfile implements Parcelable { mVideoQuality = in.readInt(); mVideoDirection = in.readInt(); mRttMode = in.readInt(); - mHasRttAudioSpeech = in.readBoolean(); + mIsReceivingRttAudio = in.readBoolean(); } public static final Creator CREATOR = @@ -256,8 +256,12 @@ public final class ImsStreamMediaProfile implements Parcelable { mRttMode = rttMode; } - public void setRttAudioSpeech(boolean audioOn) { - mHasRttAudioSpeech = audioOn; + /** + * Sets whether the remote party is transmitting audio over the RTT call. + * @param audioOn true if audio is being received, false otherwise. + */ + public void setReceivingRttAudio(boolean audioOn) { + mIsReceivingRttAudio = audioOn; } public int getAudioQuality() { @@ -280,7 +284,10 @@ public final class ImsStreamMediaProfile implements Parcelable { return mRttMode; } - public boolean getRttAudioSpeech() { - return mHasRttAudioSpeech; + /** + * @return true if remote party is transmitting audio, false otherwise. + */ + public boolean isReceivingRttAudio() { + return mIsReceivingRttAudio; } }