Ejemplo n.º 1
0
 void sendDtmf(char c) {
   if (SC_DBG) log("sendDtmf: c=" + c);
   AudioGroup audioGroup = getAudioGroup();
   if (audioGroup == null) {
     if (SC_DBG) log("sendDtmf: audioGroup == null, ignore c=" + c);
     return;
   }
   audioGroup.sendDtmf(convertDtmf(c));
 }
Ejemplo n.º 2
0
 void setAudioGroupMode() {
   AudioGroup audioGroup = getAudioGroup();
   if (audioGroup == null) {
     if (SC_DBG) log("setAudioGroupMode: audioGroup == null ignore");
     return;
   }
   int mode = audioGroup.getMode();
   if (mState == State.HOLDING) {
     audioGroup.setMode(AudioGroup.MODE_ON_HOLD);
   } else if (getMute()) {
     audioGroup.setMode(AudioGroup.MODE_MUTED);
   } else if (isSpeakerOn()) {
     audioGroup.setMode(AudioGroup.MODE_ECHO_SUPPRESSION);
   } else {
     audioGroup.setMode(AudioGroup.MODE_NORMAL);
   }
   if (SC_DBG)
     log(String.format("setAudioGroupMode change: %d --> %d", mode, audioGroup.getMode()));
 }