diff options
author | Yorke Lee <yorkelee@google.com> | 2014-12-17 00:16:58 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-12-17 00:17:02 +0000 |
commit | d3836e9df4ee0b22dd115e96abe976730263129d (patch) | |
tree | ac9d4a3d7748a4f9f4dc129775043f0157c99be9 /policy/src | |
parent | ab4f36c0df73bbe583a16eaa960401fd3f9c0db8 (diff) | |
parent | 4f8032454031da4010f517c18fce559014e1206b (diff) | |
download | frameworks_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.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 |