am 4dd082bf: Disable dialpad chooser when the user selects "Add call".
Merge commit '4dd082bff5d9f2d056affbfa0858f04dac38598e' into gingerbread-plus-aosp
* commit '4dd082bff5d9f2d056affbfa0858f04dac38598e':
Disable dialpad chooser when the user selects "Add call".
diff --git a/src/com/android/contacts/TwelveKeyDialer.java b/src/com/android/contacts/TwelveKeyDialer.java
index a16ca32..53c59f3 100644
--- a/src/com/android/contacts/TwelveKeyDialer.java
+++ b/src/com/android/contacts/TwelveKeyDialer.java
@@ -302,6 +302,7 @@
if (Intent.ACTION_DIAL.equals(action) || Intent.ACTION_VIEW.equals(action)) {
// see if we are "adding a call" from the InCallScreen; false by default.
mIsAddCallMode = intent.getBooleanExtra(ADD_CALL_MODE_KEY, false);
+
Uri uri = intent.getData();
if (uri != null) {
if ("tel".equals(uri.getScheme())) {
@@ -325,10 +326,15 @@
}
}
} else {
- // Like ACTION_MAIN
- // If there's already an active call, bring up an intermediate UI
- // to make the user confirm what they really want to do.
- needToShowDialpadChooser = phoneIsInUse();
+ // ACTION_DIAL or ACTION_VIEW with no data.
+ // This behaves basically like ACTION_MAIN: If there's
+ // already an active call, bring up an intermediate UI to
+ // make the user confirm what they really want to do.
+ // Be sure *not* to show the dialpad chooser if this is an
+ // explicit "Add call" action, though.
+ if (!mIsAddCallMode && phoneIsInUse()) {
+ needToShowDialpadChooser = true;
+ }
}
} else if (Intent.ACTION_MAIN.equals(action)) {
// The MAIN action means we're bringing up a blank dialer