am e43f8e97: Fix SmartDialNameMatcher NANP test
* commit 'e43f8e97a6f37dc23ce13dbfbf0483f1d1f737d3':
Fix SmartDialNameMatcher NANP test
diff --git a/src/com/android/dialer/dialpad/SmartDialNameMatcher.java b/src/com/android/dialer/dialpad/SmartDialNameMatcher.java
index c160bd2..43aeb26 100644
--- a/src/com/android/dialer/dialpad/SmartDialNameMatcher.java
+++ b/src/com/android/dialer/dialpad/SmartDialNameMatcher.java
@@ -135,10 +135,6 @@
SmartDialPrefix.parsePhoneNumber(phoneNumber);
if (phoneNumberTokens == null) {
- if (matchPos != null) {
- replaceBitInMask(builder, matchPos);
- mPhoneNumberMatchMask = builder.toString();
- }
return matchPos;
}
if (phoneNumberTokens.countryCodeOffset != 0) {
diff --git a/tests/src/com/android/dialer/dialpad/SmartDialNameMatcherTest.java b/tests/src/com/android/dialer/dialpad/SmartDialNameMatcherTest.java
index 1e578ee..c1365f5 100644
--- a/tests/src/com/android/dialer/dialpad/SmartDialNameMatcherTest.java
+++ b/tests/src/com/android/dialer/dialpad/SmartDialNameMatcherTest.java
@@ -198,6 +198,7 @@
}
public void testMatches_NumberNANP() {
+ SmartDialPrefix.setUserInNanpRegion(true);
// An 11 digit number prefixed with 1 should be matched by the 10 digit number, as well as
// the 7 digit number (without area code)
checkMatchesNumber("1-510-333-7596", "5103337596", true, true, 2, 14);