Skip to content

Commit

Permalink
Telephony: Support muting by RIL command
Browse files Browse the repository at this point in the history
While almost everyone already moved to AudioManager years ago,
some OEMs (cough Huawei) still use RIL for muting and don't
promote the necessary calls in their audio HAL.
Let's handle these odd cases too when it's necessary.

Change-Id: Id916dec2574d6e57b6f809fbaf2b0959c0cc7256
  • Loading branch information
Flex1911 authored and Dil3mm4 committed Nov 9, 2018
1 parent 9576e6f commit 42ae80d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/com/android/services/telephony/TelephonyConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import android.os.Looper;
import android.os.Message;
import android.os.PersistableBundle;
import android.os.SystemProperties;
import android.telecom.CallAudioState;
import android.telecom.ConferenceParticipant;
import android.telecom.Connection;
Expand Down Expand Up @@ -697,6 +698,10 @@ public void onCallAudioStateChanged(CallAudioState audioState) {
// TODO: update TTY mode.
if (getPhone() != null) {
getPhone().setEchoSuppressionEnabled();

if (SystemProperties.getBoolean("persist.sys.radio.huawei", false)) {
getPhone().setMute(audioState.isMuted());
}
}
}

Expand Down

0 comments on commit 42ae80d

Please sign in to comment.