diff options
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 9 |
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 |