From d77017d981b11611657f74f48290e88b7fa99c7b Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Mon, 31 Aug 2015 16:19:43 -0700 Subject: Don't show dialpad when adding a call When receiving a DIAL intent with the "add_call_mode" extra set, don't show the dialpad when DialtactsActivity is launched. Bug: 23519909 Change-Id: I5e8d462b3e75a12a5ccd38cfb8871b9626f2e9bb --- src/com/android/dialer/DialtactsActivity.java | 6 +++--- src/com/android/dialer/dialpad/DialpadFragment.java | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src/com') 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. -- cgit v1.2.3