diff options
author | linyuh <linyuh@google.com> | 2018-04-18 16:13:15 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-04-18 16:50:37 -0700 |
commit | ad11c3f4f2063d216422f2405ce92639afebf071 (patch) | |
tree | 0c77a984c1a9f22e70480b832bebcbc6e1463bf7 | |
parent | 5ccde90a5bb1d5bebc97de2baa9c72fff7cb1342 (diff) |
Support placing a call with assisted dialing in the new call log.
Bug: 70988691
Test: ModulesTest
PiperOrigin-RevId: 193434411
Change-Id: I3fe493eeb2869cad0d42ccf08d57018a42b1b84e
-rw-r--r-- | java/com/android/dialer/calllog/ui/menu/Modules.java | 11 |
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()); + } } |