diff options
-rw-r--r-- | src/com/android/incallui/CallButtonPresenter.java | 5 | ||||
-rw-r--r-- | src/com/android/incallui/CallCommandClient.java | 13 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/com/android/incallui/CallButtonPresenter.java b/src/com/android/incallui/CallButtonPresenter.java index e6cbbd2c..d9ff8011 100644 --- a/src/com/android/incallui/CallButtonPresenter.java +++ b/src/com/android/incallui/CallButtonPresenter.java @@ -214,8 +214,7 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto mAutomaticallyMuted = true; mPreviousMuteState = AudioModeProvider.getInstance().getMute(); // Simulate a click on the mute button - muteClicked(true); - + CallCommandClient.getInstance().muteInternal(true); CallCommandClient.getInstance().addCall(); } @@ -403,7 +402,7 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto if (getUi() == null) { return; } - muteClicked(mPreviousMuteState); + CallCommandClient.getInstance().muteInternal(mPreviousMuteState); } mAutomaticallyMuted = false; } diff --git a/src/com/android/incallui/CallCommandClient.java b/src/com/android/incallui/CallCommandClient.java index ae5f2f93..4a1570d0 100644 --- a/src/com/android/incallui/CallCommandClient.java +++ b/src/com/android/incallui/CallCommandClient.java @@ -114,6 +114,19 @@ public class CallCommandClient { } } + public void muteInternal(boolean onOff) { + Log.i(this, "muteInternal: " + onOff); + if (mCommandService == null) { + Log.e(this, "Cannot mute call; CallCommandService == null"); + return; + } + try { + mCommandService.muteInternal(onOff); + } catch (RemoteException e) { + Log.e(this, "Error muting phone.", e); + } + } + public void hold(int callId, boolean onOff) { Log.i(this, "hold call(" + onOff + "): " + callId); if (mCommandService == null) { |