diff options
author | Sam Lin <samlin@google.com> | 2013-11-06 20:41:10 +0800 |
---|---|---|
committer | Sam Lin <samlin@google.com> | 2013-11-07 04:46:07 +0800 |
commit | 10e25b46bbb6ebb9a44d4cb6b6884cccaf1c46f5 (patch) | |
tree | e04989fe66ca8c87b89a28d105445877bb23e06d /InCallUI/src/com/android/incallui/InCallActivity.java | |
parent | 6d1b439f3f570ebee6c82aa7d0f2144558ca42e7 (diff) |
Disable HW BACK key at the incoming-call screen
For devices with HW BACK key, it should be disabled at the incoming-
call screen. Therefore, a user will not leave the screen by mistake.
Bug: 11548503
Change-Id: I2f4f875c23687afe52a5f816550b9383b9a852c8
Diffstat (limited to 'InCallUI/src/com/android/incallui/InCallActivity.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/InCallActivity.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java index 58db132a6..64e856c93 100644 --- a/InCallUI/src/com/android/incallui/InCallActivity.java +++ b/InCallUI/src/com/android/incallui/InCallActivity.java @@ -202,6 +202,13 @@ public class InCallActivity extends Activity { return; } + // Always disable the Back key while an incoming call is ringing + final Call call = CallList.getInstance().getIncomingCall(); + if (call != null) { + Log.d(this, "Consume Back press for an inconing call"); + return; + } + // Nothing special to do. Fall back to the default behavior. super.onBackPressed(); } |