diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-11-12 00:55:34 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-11-12 00:55:34 +0000 |
commit | 2b52d2a3cdcb0ac00d87d2c2cbd1d6b750ea036d (patch) | |
tree | c87ae220455edeac1c6fb5b12e033e37a07c9ed4 /java/com/android/dialer/calllogutils/CallLogIntents.java | |
parent | 5e20ba7b1c6a9644da034b345000b37856d78125 (diff) | |
parent | b7dba5aaa8c477d97121fc6e3411332e66cbabe8 (diff) |
Merge changes I0ed4fa1b,Ie03ce41e,If41868df,Iba2e9092
* changes:
Expose tab index to protected
Added temporary logging to debug problem with null phone numbers from remote contacts.
Hook up pre-call actions
Implement CallingAccountSelector and AssistedDialAction
Diffstat (limited to 'java/com/android/dialer/calllogutils/CallLogIntents.java')
-rw-r--r-- | java/com/android/dialer/calllogutils/CallLogIntents.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/java/com/android/dialer/calllogutils/CallLogIntents.java b/java/com/android/dialer/calllogutils/CallLogIntents.java index 11308e607..b06fe6e93 100644 --- a/java/com/android/dialer/calllogutils/CallLogIntents.java +++ b/java/com/android/dialer/calllogutils/CallLogIntents.java @@ -15,6 +15,7 @@ */ package com.android.dialer.calllogutils; +import android.content.Context; import android.content.Intent; import android.provider.CallLog.Calls; import android.support.annotation.Nullable; @@ -22,6 +23,7 @@ import android.text.TextUtils; import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.callintent.CallIntentBuilder; import com.android.dialer.calllog.model.CoalescedRow; +import com.android.dialer.precall.PreCall; /** Provides intents related to call log entries. */ public final class CallLogIntents { @@ -35,10 +37,9 @@ public final class CallLogIntents { * @return null if the provided {@code row} doesn't have a number */ @Nullable - public static Intent getCallBackIntent(CoalescedRow row) { + public static Intent getCallBackIntent(Context context, CoalescedRow row) { // TODO(zachh): Do something with parsed values to make more dialable? String originalNumber = row.number().getRawInput().getNumber(); - // TODO(zachh): Make this more sophisticated, e.g. return null for non-dialable numbers? if (TextUtils.isEmpty(originalNumber)) { return null; @@ -46,10 +47,11 @@ public final class CallLogIntents { // TODO(zachh): More granular logging? // TODO(zachh): Support assisted dialing. - return new CallIntentBuilder(originalNumber, CallInitiationType.Type.CALL_LOG) - .setPhoneAccountHandle( - PhoneAccountUtils.getAccount(row.phoneAccountComponentName(), row.phoneAccountId())) - .setIsVideoCall((row.features() & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO) - .build(); + return PreCall.getIntent( + context, + new CallIntentBuilder(originalNumber, CallInitiationType.Type.CALL_LOG) + .setPhoneAccountHandle( + PhoneAccountUtils.getAccount(row.phoneAccountComponentName(), row.phoneAccountId())) + .setIsVideoCall((row.features() & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO)); } } |