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 --- .../android/dialer/app/calllog/IntentProvider.java | 29 +++++++++++++--------- 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'java/com/android/dialer/app/calllog/IntentProvider.java') diff --git a/java/com/android/dialer/app/calllog/IntentProvider.java b/java/com/android/dialer/app/calllog/IntentProvider.java index 5180651da..0835d894c 100644 --- a/java/com/android/dialer/app/calllog/IntentProvider.java +++ b/java/com/android/dialer/app/calllog/IntentProvider.java @@ -32,6 +32,7 @@ import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.callintent.CallIntentBuilder; import com.android.dialer.dialercontact.DialerContact; import com.android.dialer.duo.DuoComponent; +import com.android.dialer.precall.PreCall; import com.android.dialer.util.IntentUtil; import java.util.ArrayList; @@ -53,9 +54,10 @@ public abstract class IntentProvider { return new IntentProvider() { @Override public Intent getIntent(Context context) { - return new CallIntentBuilder(number, CallInitiationType.Type.CALL_LOG) - .setPhoneAccountHandle(accountHandle) - .build(); + return PreCall.getIntent( + context, + new CallIntentBuilder(number, CallInitiationType.Type.CALL_LOG) + .setPhoneAccountHandle(accountHandle)); } }; } @@ -65,9 +67,10 @@ public abstract class IntentProvider { return new IntentProvider() { @Override public Intent getIntent(Context context) { - return new CallIntentBuilder(number, CallInitiationType.Type.CALL_LOG) - .setAllowAssistedDial(true) - .build(); + return PreCall.getIntent( + context, + new CallIntentBuilder(number, CallInitiationType.Type.CALL_LOG) + .setAllowAssistedDial(true)); } }; } @@ -81,10 +84,11 @@ public abstract class IntentProvider { return new IntentProvider() { @Override public Intent getIntent(Context context) { - return new CallIntentBuilder(number, CallInitiationType.Type.CALL_LOG) - .setPhoneAccountHandle(accountHandle) - .setIsVideoCall(true) - .build(); + return PreCall.getIntent( + context, + new CallIntentBuilder(number, CallInitiationType.Type.CALL_LOG) + .setPhoneAccountHandle(accountHandle) + .setIsVideoCall(true)); } }; } @@ -103,8 +107,9 @@ public abstract class IntentProvider { return new IntentProvider() { @Override public Intent getIntent(Context context) { - return CallIntentBuilder.forVoicemail(phoneAccountHandle, CallInitiationType.Type.CALL_LOG) - .build(); + return PreCall.getIntent( + context, + CallIntentBuilder.forVoicemail(phoneAccountHandle, CallInitiationType.Type.CALL_LOG)); } }; } -- cgit v1.2.3