summaryrefslogtreecommitdiff
path: root/InCallUI/src/com/android/incallui/InCallActivity.java
diff options
context:
space:
mode:
authorSailesh Nepal <sail@google.com>2014-03-19 10:27:06 -0700
committerSailesh Nepal <sail@google.com>2014-03-22 14:40:32 -0700
commitc58da178877a4d42cb6dab9ad67d8cf86d030e1a (patch)
treee6f8876f183278eb6e06fcd6ad8ebe2788e405e4 /InCallUI/src/com/android/incallui/InCallActivity.java
parentc1fff09df8c696216b29bfc03e3d7ce5e59fc5a5 (diff)
Hookup audio mode to InCallUI
Change-Id: I0f79cf4dede272811ef88540a3acdb0a6f332948
Diffstat (limited to 'InCallUI/src/com/android/incallui/InCallActivity.java')
-rw-r--r--InCallUI/src/com/android/incallui/InCallActivity.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java
index 5f446336a..c01f1f6b6 100644
--- a/InCallUI/src/com/android/incallui/InCallActivity.java
+++ b/InCallUI/src/com/android/incallui/InCallActivity.java
@@ -28,6 +28,7 @@ import android.content.DialogInterface.OnCancelListener;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
+import android.telecomm.InCallAdapter;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
@@ -258,6 +259,7 @@ public class InCallActivity extends Activity {
case KeyEvent.KEYCODE_MUTE:
// toggle mute
+ setMute(!AudioModeProvider.getInstance().getMute());
CallCommandClient.getInstance().mute(!AudioModeProvider.getInstance().getMute());
return true;
@@ -284,6 +286,16 @@ public class InCallActivity extends Activity {
return super.onKeyDown(keyCode, event);
}
+ private void setMute(boolean shouldMute) {
+ CallCommandClient.getInstance().mute(shouldMute);
+
+ InCallAdapter telecommAdapter = InCallPresenter.getInstance().getTelecommAdapter();
+ if (telecommAdapter != null) {
+ Log.i(this, "Setting mute");
+ telecommAdapter.mute(shouldMute);
+ }
+ }
+
private boolean handleDialerKeyDown(int keyCode, KeyEvent event) {
Log.v(this, "handleDialerKeyDown: keyCode " + keyCode + ", event " + event + "...");