diff options
author | Zachary Heidepriem <zachh@google.com> | 2017-10-12 01:29:20 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-10-12 01:29:20 +0000 |
commit | 306bb488847ebd58c31e2144ba8c558544403048 (patch) | |
tree | d06792cffc3d7a377631796a2ca85a99ae7b43b6 /java/com/android/dialer/contactactions/IntentModule.java | |
parent | 71064e2aa5b3c6b24e27095f0bc1a2d940d58d05 (diff) | |
parent | 2633778c274746a35e4a54266a3319c53fd1cded (diff) |
Merge "Added basic bottom sheet to new call log."
am: 2633778c27
Change-Id: Id6b9f75c0cf3c42b28a0c44d75c10d9c80853936
Diffstat (limited to 'java/com/android/dialer/contactactions/IntentModule.java')
-rw-r--r-- | java/com/android/dialer/contactactions/IntentModule.java | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/java/com/android/dialer/contactactions/IntentModule.java b/java/com/android/dialer/contactactions/IntentModule.java index 201f52192..5a4870cbe 100644 --- a/java/com/android/dialer/contactactions/IntentModule.java +++ b/java/com/android/dialer/contactactions/IntentModule.java @@ -19,7 +19,9 @@ package com.android.dialer.contactactions; import android.content.Context; import android.content.Intent; import android.support.annotation.DrawableRes; +import android.support.annotation.Nullable; import android.support.annotation.StringRes; +import android.telecom.PhoneAccountHandle; import com.android.dialer.callintent.CallInitiationType.Type; import com.android.dialer.callintent.CallIntentBuilder; @@ -56,19 +58,33 @@ public class IntentModule implements ContactActionModule { return true; } - public static IntentModule newCallModule(Context context, String number, Type initiationType) { + public static IntentModule newCallModule( + Context context, + String number, + @Nullable PhoneAccountHandle phoneAccountHandle, + Type initiationType) { + // TODO(zachh): Support post-dial digits; consider using DialerPhoneNumber. return new IntentModule( context, - new CallIntentBuilder(number, initiationType).build(), + new CallIntentBuilder(number, initiationType) + .setPhoneAccountHandle(phoneAccountHandle) + .build(), R.string.call, R.drawable.quantum_ic_call_white_24); } public static IntentModule newVideoCallModule( - Context context, String number, Type initiationType) { + Context context, + String number, + @Nullable PhoneAccountHandle phoneAccountHandle, + Type initiationType) { + // TODO(zachh): Support post-dial digits; consider using DialerPhoneNumber. return new IntentModule( context, - new CallIntentBuilder(number, initiationType).setIsVideoCall(true).build(), + new CallIntentBuilder(number, initiationType) + .setPhoneAccountHandle(phoneAccountHandle) + .setIsVideoCall(true) + .build(), R.string.video_call, R.drawable.quantum_ic_videocam_white_24); } |