Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad11c3f4 authored by linyuh's avatar linyuh Committed by Copybara-Service
Browse files

Support placing a call with assisted dialing in the new call log.

Bug: 70988691
Test: ModulesTest
PiperOrigin-RevId: 193434411
Change-Id: I3fe493eeb2869cad0d42ccf08d57018a42b1b84e
parent 5ccde90a
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -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());
  }
}