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

Commit f3291fb8 authored by twyen's avatar twyen Committed by Copybara-Service
Browse files

Fix video call from search stripping + prefix

The smart dial normalization remove non-digits, so the raw number must be set.

TEST=TAP
Bug: 79400183
Test: TAP
PiperOrigin-RevId: 197208475
Change-Id: I303f1b19c30f11303066750f7a830f33ab79ce4f
parent ee506ae3
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -444,11 +444,12 @@ public class MainSearchController implements SearchBarListener {

  /** @see OnDialpadQueryChangedListener#onDialpadQueryChanged(java.lang.String) */
  public void onDialpadQueryChanged(String query) {
    query = SmartDialNameMatcher.normalizeNumber(/* context = */ activity, query);
    String normalizedQuery = SmartDialNameMatcher.normalizeNumber(/* context = */ activity, query);
    if (searchFragment != null) {
      searchFragment.setQuery(query, CallInitiationType.Type.DIALPAD);
      searchFragment.setRawNumber(query);
      searchFragment.setQuery(normalizedQuery, CallInitiationType.Type.DIALPAD);
    }
    dialpadFragment.process_quote_emergency_unquote(query);
    dialpadFragment.process_quote_emergency_unquote(normalizedQuery);
  }

  @Override
+5 −0
Original line number Diff line number Diff line
@@ -251,6 +251,11 @@ public final class NewSearchFragment extends Fragment
    this.rawNumber = rawNumber;
  }

  @VisibleForTesting
  public String getRawNumber() {
    return rawNumber;
  }

  public void setQuery(String query, CallInitiationType.Type callInitiationType) {
    this.query = query;
    this.callInitiationType = callInitiationType;