diff options
author | twyen <twyen@google.com> | 2018-05-18 15:19:50 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-05-18 15:21:34 -0700 |
commit | f3291fb8739679a84257f8574c61331af070970f (patch) | |
tree | f5ded8c30d282e6d02aca725e7949b9ac58f3523 /java | |
parent | ee506ae30e8df1a13af215676e9e29a07bd8d75a (diff) |
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
Diffstat (limited to 'java')
-rw-r--r-- | java/com/android/dialer/main/impl/MainSearchController.java | 7 | ||||
-rw-r--r-- | java/com/android/dialer/searchfragment/list/NewSearchFragment.java | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/java/com/android/dialer/main/impl/MainSearchController.java b/java/com/android/dialer/main/impl/MainSearchController.java index fc4fc3dcb..945e8a948 100644 --- a/java/com/android/dialer/main/impl/MainSearchController.java +++ b/java/com/android/dialer/main/impl/MainSearchController.java @@ -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 diff --git a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java index abb3aecd4..5417fcf8c 100644 --- a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java +++ b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java @@ -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; |