From 73d995ff88b3a8894c7463a21a24dcec3f8d68e4 Mon Sep 17 00:00:00 2001 From: Zachary Heidepriem Date: Sat, 11 Nov 2017 15:03:26 -0800 Subject: 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 --- java/com/android/dialer/assisteddialing/ConcreteCreator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'java/com/android/dialer/assisteddialing') diff --git a/java/com/android/dialer/assisteddialing/ConcreteCreator.java b/java/com/android/dialer/assisteddialing/ConcreteCreator.java index c3721a7a8..806764567 100644 --- a/java/com/android/dialer/assisteddialing/ConcreteCreator.java +++ b/java/com/android/dialer/assisteddialing/ConcreteCreator.java @@ -22,6 +22,7 @@ import android.os.Build; import android.os.Build.VERSION_CODES; import android.preference.PreferenceManager; import android.support.annotation.NonNull; +import android.support.annotation.VisibleForTesting; import android.support.v4.os.UserManagerCompat; import android.telephony.TelephonyManager; import com.android.dialer.assisteddialing.ui.R; @@ -41,7 +42,7 @@ public final class ConcreteCreator { // Floor set at N due to use of Optional. protected static final int BUILD_CODE_FLOOR = Build.VERSION_CODES.N; // Ceiling set at O because this feature will ship as part of the framework in P. - protected static final int BUILD_CODE_CEILING = Build.VERSION_CODES.O; + @VisibleForTesting public static final int BUILD_CODE_CEILING = Build.VERSION_CODES.O; /** * Creates a new AssistedDialingMediator -- cgit v1.2.3