summaryrefslogtreecommitdiffstats
path: root/java/com/android/contacts
diff options
context:
space:
mode:
authorZachary Heidepriem <zachh@google.com>2017-11-11 15:03:26 -0800
committerZachary Heidepriem <zachh@google.com>2017-11-11 15:03:26 -0800
commit73d995ff88b3a8894c7463a21a24dcec3f8d68e4 (patch)
tree10724581a5fc2e869e61a396cb1b68119b69e163 /java/com/android/contacts
parent5e20ba7b1c6a9644da034b345000b37856d78125 (diff)
downloadandroid_packages_apps_Dialer-73d995ff88b3a8894c7463a21a24dcec3f8d68e4.tar.gz
android_packages_apps_Dialer-73d995ff88b3a8894c7463a21a24dcec3f8d68e4.tar.bz2
android_packages_apps_Dialer-73d995ff88b3a8894c7463a21a24dcec3f8d68e4.zip
Implement CallingAccountSelector and AssistedDialAction
CallingAccountSelector examines the CallIntentBuilder, and if the PhoneAccountHandle is missing on a multi-SIM device while the default is not set, it will show a dialog to let the user select it. This step used to be after the in call UI is launched and telecom wants dialer to disambiguate. This step is moved to pre call as dialer need more control, like voicemail calls should always prompt, or the preferred SIM info might be available. This also allows telecom to send the selected PhoneAccountHandle to other apps so they have more information on how to rewrite numbers. AssistedDialAction replaces the step previously in CallIntentBuilder.build(), and rewrites the URI. Pre-call actions are not hooked up for dialing in this CL yet, assisted dialing will still be broken. Bug: 64216442 Test: CallingAccountSelectorTest, AssistedDialActionTest PiperOrigin-RevId: 174917321 Change-Id: Iba2e9092f83c036b402d4044a48ff5c44e806210
Diffstat (limited to 'java/com/android/contacts')
-rw-r--r--java/com/android/contacts/common/widget/SelectPhoneAccountDialogFragment.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/java/com/android/contacts/common/widget/SelectPhoneAccountDialogFragment.java b/java/com/android/contacts/common/widget/SelectPhoneAccountDialogFragment.java
index 8156d97cf..6c6aebc0b 100644
--- a/java/com/android/contacts/common/widget/SelectPhoneAccountDialogFragment.java
+++ b/java/com/android/contacts/common/widget/SelectPhoneAccountDialogFragment.java
@@ -26,6 +26,7 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.ResultReceiver;
import android.support.annotation.Nullable;
+import android.support.annotation.VisibleForTesting;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
@@ -116,6 +117,12 @@ public class SelectPhoneAccountDialogFragment extends DialogFragment {
mListener = listener;
}
+ @Nullable
+ @VisibleForTesting
+ public SelectPhoneAccountListener getListener() {
+ return mListener;
+ }
+
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);