diff options
Diffstat (limited to 'java/com/android/dialer/app/calllog/IntentProvider.java')
-rw-r--r-- | java/com/android/dialer/app/calllog/IntentProvider.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/java/com/android/dialer/app/calllog/IntentProvider.java b/java/com/android/dialer/app/calllog/IntentProvider.java index 55fdbbace..52a7b0faf 100644 --- a/java/com/android/dialer/app/calllog/IntentProvider.java +++ b/java/com/android/dialer/app/calllog/IntentProvider.java @@ -22,8 +22,10 @@ import android.content.Intent; import android.net.Uri; import android.provider.ContactsContract; import android.telecom.PhoneAccountHandle; +import android.telephony.TelephonyManager; import com.android.contacts.common.model.Contact; import com.android.contacts.common.model.ContactLoader; +import com.android.dialer.assisteddialing.ConcreteCreator; import com.android.dialer.calldetails.CallDetailsActivity; import com.android.dialer.calldetails.CallDetailsEntries; import com.android.dialer.callintent.CallInitiationType; @@ -59,6 +61,19 @@ public abstract class IntentProvider { }; } + public static IntentProvider getAssistedDialIntentProvider( + final String number, final Context context, final TelephonyManager telephonyManager) { + return new IntentProvider() { + @Override + public Intent getIntent(Context context) { + return new CallIntentBuilder(number, CallInitiationType.Type.CALL_LOG) + .setAllowAssistedDial( + true, ConcreteCreator.createNewAssistedDialingMediator(telephonyManager, context)) + .build(); + } + }; + } + public static IntentProvider getReturnVideoCallIntentProvider(final String number) { return getReturnVideoCallIntentProvider(number, null); } |