diff options
author | Sailesh Nepal <sail@google.com> | 2014-03-25 00:16:55 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-03-25 00:16:55 +0000 |
commit | 53c3c2496804b41a4b520293afbeeb8edc31061e (patch) | |
tree | 5db5c54cb5fcb9bf3c0ba6358938d588677a87ba /InCallUI/src/com/android/incallui/InCallActivity.java | |
parent | 7a3f2707da6e5fecc7090e5cb1bac240f9e26f32 (diff) | |
parent | c58da178877a4d42cb6dab9ad67d8cf86d030e1a (diff) |
Merge "Hookup audio mode to InCallUI" into master-nova
Diffstat (limited to 'InCallUI/src/com/android/incallui/InCallActivity.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/InCallActivity.java | 12 |
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 a97f6a05f..203476cc0 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 + "..."); |