summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-04-19 00:42:36 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-04-19 00:42:36 +0000
commit05dce3a885dac59b9af1badc44135dd5d8f74f83 (patch)
tree0c77a984c1a9f22e70480b832bebcbc6e1463bf7
parent92f4a54ae630ee4844876c8cae7012e2797bec0f (diff)
parentad11c3f4f2063d216422f2405ce92639afebf071 (diff)
Merge "Support placing a call with assisted dialing in the new call log."
-rw-r--r--java/com/android/dialer/calllog/ui/menu/Modules.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/java/com/android/dialer/calllog/ui/menu/Modules.java b/java/com/android/dialer/calllog/ui/menu/Modules.java
index 70f17662e..0b9b01d2a 100644
--- a/java/com/android/dialer/calllog/ui/menu/Modules.java
+++ b/java/com/android/dialer/calllog/ui/menu/Modules.java
@@ -149,7 +149,8 @@ final class Modules {
// TODO(zachh): Support post-dial digits; consider using DialerPhoneNumber.
CallIntentBuilder callIntentBuilder =
new CallIntentBuilder(normalizedNumber, CallInitiationType.Type.CALL_LOG)
- .setPhoneAccountHandle(phoneAccountHandle);
+ .setPhoneAccountHandle(phoneAccountHandle)
+ .setAllowAssistedDial(canSupportAssistedDialing(row));
modules.add(IntentModule.newCallModule(context, callIntentBuilder));
// If the call log entry is for a spam call, nothing more to be done.
@@ -184,8 +185,6 @@ final class Modules {
private static HistoryItemActionModule createModuleForAccessingCallDetails(
Context context, CoalescedRow row) {
boolean canReportAsInvalidNumber = row.getNumberAttributes().getCanReportAsInvalidNumber();
- boolean canSupportAssistedDialing =
- !TextUtils.isEmpty(row.getNumberAttributes().getLookupUri());
return new IntentModule(
context,
@@ -194,7 +193,7 @@ final class Modules {
row.getCoalescedIds(),
createCallDetailsHeaderInfoFromRow(context, row),
canReportAsInvalidNumber,
- canSupportAssistedDialing),
+ canSupportAssistedDialing(row)),
R.string.call_details_menu_label,
R.drawable.quantum_ic_info_outline_vd_theme_24);
}
@@ -243,4 +242,8 @@ final class Modules {
&& canRelyOnCarrierVideoPresence
&& row.getNumberAttributes().getCanSupportCarrierVideoCall();
}
+
+ private static boolean canSupportAssistedDialing(CoalescedRow row) {
+ return !TextUtils.isEmpty(row.getNumberAttributes().getLookupUri());
+ }
}