diff options
Diffstat (limited to 'java/com/android/dialer/app/DialtactsActivity.java')
-rw-r--r-- | java/com/android/dialer/app/DialtactsActivity.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/java/com/android/dialer/app/DialtactsActivity.java b/java/com/android/dialer/app/DialtactsActivity.java index 04f1431e4..5f3620b1c 100644 --- a/java/com/android/dialer/app/DialtactsActivity.java +++ b/java/com/android/dialer/app/DialtactsActivity.java @@ -43,7 +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.telephony.TelephonyManager; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; @@ -90,6 +90,7 @@ import com.android.dialer.app.list.SmartDialSearchFragment; import com.android.dialer.app.settings.DialerSettingsActivity; import com.android.dialer.app.widget.ActionBarController; import com.android.dialer.app.widget.SearchEditTextLayout; +import com.android.dialer.assisteddialing.ConcreteCreator; import com.android.dialer.callcomposer.CallComposerActivity; import com.android.dialer.calldetails.CallDetailsActivity; import com.android.dialer.callintent.CallInitiationType; @@ -97,7 +98,6 @@ 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.contactsfragment.ContactsFragment; @@ -1488,13 +1488,14 @@ 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); - } + new CallIntentBuilder(phoneNumber, callSpecificAppData) + .setIsVideoCall(isVideoCall) + .setAllowAssistedDial( + callSpecificAppData.getAllowAssistedDialing(), + ConcreteCreator.createNewAssistedDialingMediator( + getApplication().getSystemService(TelephonyManager.class), + getApplicationContext())) + .build(); DialerUtils.startActivityWithErrorToast(this, intent); mClearSearchOnPause = true; |