summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-03-16 20:20:06 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-03-16 20:20:06 +0000
commitb75ca5654be392b44e722451417748df630281be (patch)
treeabc18919ecf4fe280a028590a65d341b1dc23659
parenta8e623280c43dc27ecede733c29917c9f18c3e6a (diff)
parentd0fc91676dc50d1bde2247599401d6509aa8068b (diff)
Merge "Check if dialpad is already open when handleing new intents."
-rw-r--r--java/com/android/dialer/main/impl/MainSearchController.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/java/com/android/dialer/main/impl/MainSearchController.java b/java/com/android/dialer/main/impl/MainSearchController.java
index a614c7035..46f6a90b9 100644
--- a/java/com/android/dialer/main/impl/MainSearchController.java
+++ b/java/com/android/dialer/main/impl/MainSearchController.java
@@ -110,6 +110,15 @@ public class MainSearchController implements SearchBarListener {
/** Should be called if we're showing the dialpad because of a new ACTION_DIAL intent. */
public void showDialpadFromNewIntent() {
LogUtil.enterBlock("MainSearchController.showDialpadFromNewIntent");
+ if (isDialpadVisible()) {
+ // One scenario where this can happen is if the user has the dialpad open when the receive a
+ // call and press add call in the in call ui which calls this method.
+ LogUtil.i("MainSearchController.showDialpadFromNewIntent", "Dialpad is already visible.");
+
+ // Mark started from new intent in case there is a phone number in the intent
+ getDialpadFragment().setStartedFromNewIntent(true);
+ return;
+ }
showDialpad(/* animate=*/ false, /* fromNewIntent=*/ true);
}