summaryrefslogtreecommitdiffstats
path: root/policy/src
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-12-17 00:16:58 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-12-17 00:17:02 +0000
commitd3836e9df4ee0b22dd115e96abe976730263129d (patch)
treeac9d4a3d7748a4f9f4dc129775043f0157c99be9 /policy/src
parentab4f36c0df73bbe583a16eaa960401fd3f9c0db8 (diff)
parent4f8032454031da4010f517c18fce559014e1206b (diff)
downloadframeworks_base-d3836e9df4ee0b22dd115e96abe976730263129d.zip
frameworks_base-d3836e9df4ee0b22dd115e96abe976730263129d.tar.gz
frameworks_base-d3836e9df4ee0b22dd115e96abe976730263129d.tar.bz2
Merge "Revert "Allow home to be pressed while in incoming call screen"" into lmp-mr1-dev
Diffstat (limited to 'policy/src')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index c468be1..f0c6bb7 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -2452,6 +2452,15 @@ public class PhoneWindowManager implements WindowManagerPolicy {
return -1;
}
+ // If an incoming call is ringing, HOME is totally disabled.
+ // (The user is already on the InCallUI at this point,
+ // and his ONLY options are to answer or reject the call.)
+ TelecomManager telecomManager = getTelecommService();
+ if (telecomManager != null && telecomManager.isRinging()) {
+ Log.i(TAG, "Ignoring HOME; there's a ringing incoming call.");
+ return -1;
+ }
+
// Delay handling home if a double-tap is possible.
if (mDoubleTapOnHomeBehavior != DOUBLE_TAP_HOME_NOTHING) {
mHandler.removeCallbacks(mHomeDoubleTapTimeoutRunnable); // just in case