From 0efc840171da8739359b326249978d0a44df540b Mon Sep 17 00:00:00 2001 From: twyen Date: Tue, 7 Nov 2017 15:39:15 -0800 Subject: Hook up pre-call actions This CL replaces all instance of CallIntentBuilder.build() with PreCall.getIntent(), which when run as an activity, will finish building the intent with user interaction. Bug: 64216442 Test: manual PiperOrigin-RevId: 174924323 Change-Id: If41868df4c7ed078d03bd3431fa85b8947056a01 --- .../com/android/dialer/contactactions/IntentModule.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'java/com/android/dialer/contactactions/IntentModule.java') diff --git a/java/com/android/dialer/contactactions/IntentModule.java b/java/com/android/dialer/contactactions/IntentModule.java index 5a4870cbe..57eb50a9b 100644 --- a/java/com/android/dialer/contactactions/IntentModule.java +++ b/java/com/android/dialer/contactactions/IntentModule.java @@ -24,6 +24,7 @@ import android.support.annotation.StringRes; import android.telecom.PhoneAccountHandle; import com.android.dialer.callintent.CallInitiationType.Type; import com.android.dialer.callintent.CallIntentBuilder; +import com.android.dialer.precall.PreCall; /** * {@link ContactActionModule} useful for making easy to build modules based on starting an intent. @@ -66,9 +67,10 @@ public class IntentModule implements ContactActionModule { // TODO(zachh): Support post-dial digits; consider using DialerPhoneNumber. return new IntentModule( context, - new CallIntentBuilder(number, initiationType) - .setPhoneAccountHandle(phoneAccountHandle) - .build(), + PreCall.getIntent( + context, + new CallIntentBuilder(number, initiationType) + .setPhoneAccountHandle(phoneAccountHandle)), R.string.call, R.drawable.quantum_ic_call_white_24); } @@ -81,10 +83,11 @@ public class IntentModule implements ContactActionModule { // TODO(zachh): Support post-dial digits; consider using DialerPhoneNumber. return new IntentModule( context, - new CallIntentBuilder(number, initiationType) - .setPhoneAccountHandle(phoneAccountHandle) - .setIsVideoCall(true) - .build(), + PreCall.getIntent( + context, + new CallIntentBuilder(number, initiationType) + .setPhoneAccountHandle(phoneAccountHandle) + .setIsVideoCall(true)), R.string.video_call, R.drawable.quantum_ic_videocam_white_24); } -- cgit v1.2.3