diff options
author | Ravindra <c_rthat@codeaurora.org> | 2014-04-11 15:58:21 +0530 |
---|---|---|
committer | emancebo <emancebo@cyngn.com> | 2014-09-04 15:20:00 -0700 |
commit | 298fc72f9fb1f119e0be03cc668148a2487bfff7 (patch) | |
tree | 9a56bbd473db2dfefe704d2f9cf81c3df4dafd35 | |
parent | 6d4bb8a904e5a20ca071a2ab324394344e509b9d (diff) | |
download | packages_apps_InCallUI-298fc72f9fb1f119e0be03cc668148a2487bfff7.tar.gz packages_apps_InCallUI-298fc72f9fb1f119e0be03cc668148a2487bfff7.tar.bz2 packages_apps_InCallUI-298fc72f9fb1f119e0be03cc668148a2487bfff7.zip |
Fix to mute/unmute properly while adding a call
Call setMuteInternal instead of setMute while adding
call to an existing active call.
Change-Id: I9c9efa22d8b5d6ddf00ba19e866cdb153474f5c8
CRs-Fixed: 650135
-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) { |