summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/contactactions/IntentModule.java
diff options
context:
space:
mode:
authortwyen <twyen@google.com>2017-11-07 15:39:15 -0800
committerzachh <zachh@google.com>2017-11-11 23:15:49 +0000
commit0efc840171da8739359b326249978d0a44df540b (patch)
tree238f87ae39ac404331e96a8cbf138e333cb73afa /java/com/android/dialer/contactactions/IntentModule.java
parent73d995ff88b3a8894c7463a21a24dcec3f8d68e4 (diff)
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
Diffstat (limited to 'java/com/android/dialer/contactactions/IntentModule.java')
-rw-r--r--java/com/android/dialer/contactactions/IntentModule.java17
1 files changed, 10 insertions, 7 deletions
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);
}