diff options
author | Yorke Lee <yorkelee@google.com> | 2015-09-02 17:42:57 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-09-02 17:42:57 +0000 |
commit | ef01b9967e0b518497ef1e4194b99ef7873ffc5b (patch) | |
tree | b6c0901103d1f5e110d381d2786acf6634c14f61 | |
parent | 1e864d0c64e0fe64c471bee1fb82525356aeb9db (diff) | |
parent | d77017d981b11611657f74f48290e88b7fa99c7b (diff) |
Merge "Don't show dialpad when adding a call" into ub-contactsdialer-a-dev
-rw-r--r-- | src/com/android/dialer/DialtactsActivity.java | 6 | ||||
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index ae1a16050..43426955d 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -907,11 +907,11 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O return; } - final boolean phoneIsInUse = phoneIsInUse(); - if (phoneIsInUse || (intent.getData() != null && isDialIntent(intent))) { + final boolean showDialpadChooser = phoneIsInUse() && !DialpadFragment.isAddCallMode(intent); + if (showDialpadChooser || (intent.getData() != null && isDialIntent(intent))) { showDialpadFragment(false); mDialpadFragment.setStartedFromNewIntent(true); - if (phoneIsInUse && !mDialpadFragment.isVisible()) { + if (showDialpadChooser && !mDialpadFragment.isVisible()) { mInCallDialpadUp = true; } } diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 01dc892e5..0bbf802a4 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -481,7 +481,10 @@ public class DialpadFragment extends Fragment * @param intent The intent. * @return {@literal true} if add call operation was requested. {@literal false} otherwise. */ - private static boolean isAddCallMode(Intent intent) { + public static boolean isAddCallMode(Intent intent) { + if (intent == null) { + return false; + } final String action = intent.getAction(); if (Intent.ACTION_DIAL.equals(action) || Intent.ACTION_VIEW.equals(action)) { // see if we are "adding a call" from the InCallScreen; false by default. |