From 10e25b46bbb6ebb9a44d4cb6b6884cccaf1c46f5 Mon Sep 17 00:00:00 2001 From: Sam Lin Date: Wed, 6 Nov 2013 20:41:10 +0800 Subject: 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 --- InCallUI/src/com/android/incallui/InCallActivity.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'InCallUI') 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(); } -- cgit v1.2.3