diff options
Diffstat (limited to 'java/com/android/dialer/app')
3 files changed, 20 insertions, 0 deletions
diff --git a/java/com/android/dialer/app/DialtactsActivity.java b/java/com/android/dialer/app/DialtactsActivity.java index a8b75bba7..d7edc6838 100644 --- a/java/com/android/dialer/app/DialtactsActivity.java +++ b/java/com/android/dialer/app/DialtactsActivity.java @@ -43,6 +43,7 @@ import android.support.v4.app.ActivityCompat; import android.support.v4.view.ViewPager; import android.support.v7.app.ActionBar; import android.telecom.PhoneAccount; +import android.telecom.TelecomManager; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; @@ -96,6 +97,7 @@ import com.android.dialer.callintent.CallIntentBuilder; import com.android.dialer.callintent.CallSpecificAppData; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; +import com.android.dialer.compat.telephony.TelephonyManagerCompat; import com.android.dialer.configprovider.ConfigProviderBindings; import com.android.dialer.constants.ActivityRequestCodes; import com.android.dialer.database.Database; @@ -1449,6 +1451,12 @@ public class DialtactsActivity extends TransactionSafeActivity Intent intent = new CallIntentBuilder(phoneNumber, callSpecificAppData).setIsVideoCall(isVideoCall).build(); + if (callSpecificAppData.getAllowAssistedDialing()) { + Bundle extras = new Bundle(); + extras.putBoolean(TelephonyManagerCompat.ALLOW_ASSISTED_DIAL, true); + intent.putExtra(TelecomManager.EXTRA_OUTGOING_CALL_EXTRAS, extras); + } + DialerUtils.startActivityWithErrorToast(this, intent); mClearSearchOnPause = true; } diff --git a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java index 745f8b665..55490393e 100644 --- a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java +++ b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java @@ -23,6 +23,7 @@ import android.content.Intent; import android.content.res.Resources; import android.net.Uri; import android.os.AsyncTask; +import android.os.Bundle; import android.provider.CallLog; import android.provider.CallLog.Calls; import android.provider.ContactsContract.CommonDataKinds.Phone; @@ -68,6 +69,7 @@ import com.android.dialer.callintent.CallIntentBuilder; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; import com.android.dialer.compat.CompatUtils; +import com.android.dialer.compat.telephony.TelephonyManagerCompat; import com.android.dialer.configprovider.ConfigProviderBindings; import com.android.dialer.constants.ActivityRequestCodes; import com.android.dialer.contactphoto.ContactPhotoManager; @@ -886,6 +888,15 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder return; } + if (info != null && info.lookupKey != null) { + Bundle extras = new Bundle(); + if (intent.hasExtra(TelecomManager.EXTRA_OUTGOING_CALL_EXTRAS)) { + extras = intent.getParcelableExtra(TelecomManager.EXTRA_OUTGOING_CALL_EXTRAS); + } + extras.putBoolean(TelephonyManagerCompat.ALLOW_ASSISTED_DIAL, true); + intent.putExtra(TelecomManager.EXTRA_OUTGOING_CALL_EXTRAS, extras); + } + // We check to see if we are starting a Lightbringer intent. The reason is Lightbringer // intents need to be started using startActivityForResult instead of the usual startActivity String packageName = intent.getPackage(); diff --git a/java/com/android/dialer/app/list/PhoneFavoriteTileView.java b/java/com/android/dialer/app/list/PhoneFavoriteTileView.java index 88a6dff4d..e0961be4b 100644 --- a/java/com/android/dialer/app/list/PhoneFavoriteTileView.java +++ b/java/com/android/dialer/app/list/PhoneFavoriteTileView.java @@ -129,6 +129,7 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { CallSpecificAppData.Builder callSpecificAppData = CallSpecificAppData.newBuilder() + .setAllowAssistedDialing(true) .setCallInitiationType(CallInitiationType.Type.SPEED_DIAL) .setSpeedDialContactPosition(position); if (isStarred) { |