diff options
author | Yorke Lee <yorkelee@google.com> | 2014-12-15 23:22:06 +0000 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2014-12-15 23:22:06 +0000 |
commit | 4f8032454031da4010f517c18fce559014e1206b (patch) | |
tree | bc68c64c707879e7fe2bd07e39fb8fc65f53c7b8 /policy | |
parent | ad84e0637f43311a05e894393be6538909b937fb (diff) | |
download | frameworks_base-4f8032454031da4010f517c18fce559014e1206b.zip frameworks_base-4f8032454031da4010f517c18fce559014e1206b.tar.gz frameworks_base-4f8032454031da4010f517c18fce559014e1206b.tar.bz2 |
Revert "Allow home to be pressed while in incoming call screen"
This reverts commit ad84e0637f43311a05e894393be6538909b937fb.
Bug: 18742942
Change-Id: I6c0a1651526a37cca8e27be9fbd36a2f59943366
Diffstat (limited to 'policy')
-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 4b2e8aa..99d5848 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -2208,6 +2208,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 |