diff options
author | Santos Cordon <santoscordon@google.com> | 2013-09-19 21:30:46 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-09-19 21:30:47 +0000 |
commit | 7b35331be8f517a072e2d38603f82caba49d9d91 (patch) | |
tree | 1bd73fb000030b89c2fb888f739b12ca02473a34 /InCallUI/src/com/android/incallui/InCallActivity.java | |
parent | e568ea229963a5d6ca11b768c6464b3e96e932cd (diff) | |
parent | 2acdea2c70d7fc470509b8d6ac3c5e7273544bea (diff) |
Merge "Add support for hardware CALL button." into klp-dev
Diffstat (limited to 'InCallUI/src/com/android/incallui/InCallActivity.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/InCallActivity.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java index 15e48c54a..8a5ba6b5e 100644 --- a/InCallUI/src/com/android/incallui/InCallActivity.java +++ b/InCallUI/src/com/android/incallui/InCallActivity.java @@ -193,7 +193,10 @@ public class InCallActivity extends Activity { public boolean onKeyDown(int keyCode, KeyEvent event) { switch (keyCode) { case KeyEvent.KEYCODE_CALL: - // TODO(klp): handle call key + boolean handled = InCallPresenter.getInstance().handleCallKey(); + if (!handled) { + Log.w(this, "InCallActivity should always handle KEYCODE_CALL in onKeyDown"); + } // Always consume CALL to be sure the PhoneWindow won't do anything with it return true; @@ -212,11 +215,12 @@ public class InCallActivity extends Activity { case KeyEvent.KEYCODE_VOLUME_UP: case KeyEvent.KEYCODE_VOLUME_DOWN: case KeyEvent.KEYCODE_VOLUME_MUTE: - // Not sure if needed. If so, silence ringer. + // Ringer silencing handled by PhoneWindowManager. break; case KeyEvent.KEYCODE_MUTE: - toast("mute"); + // toggle mute + CallCommandClient.getInstance().mute(!AudioModeProvider.getInstance().getMute()); return true; // Various testing/debugging features, enabled ONLY when VERBOSE == true. @@ -231,11 +235,10 @@ public class InCallActivity extends Activity { } break; case KeyEvent.KEYCODE_EQUALS: - // TODO(klp): Dump phone state? + // TODO: Dump phone state? break; } - // TODO(klp) Adds hardware keyboard support return super.onKeyDown(keyCode, event); } |