am f3c6df01: Fixing the issue with AsYouTypeFormatter accidentally remove national prefix for some numbers.
* commit 'f3c6df010e7bc8ead25ba577ae09474b70d08adc':
Fixing the issue with AsYouTypeFormatter accidentally remove national prefix for some numbers.
diff --git a/java/src/com/android/i18n/phonenumbers/AsYouTypeFormatter.java b/java/src/com/android/i18n/phonenumbers/AsYouTypeFormatter.java
index 5dd0ea2..7c713c8 100644
--- a/java/src/com/android/i18n/phonenumbers/AsYouTypeFormatter.java
+++ b/java/src/com/android/i18n/phonenumbers/AsYouTypeFormatter.java
@@ -334,7 +334,7 @@
}
return ableToFormat
? prefixBeforeNationalNumber + tempNationalNumber
- : tempNationalNumber;
+ : accruedInput.toString();
} else {
return attemptToChooseFormattingPattern();
}
@@ -402,7 +402,7 @@
}
return ableToFormat
? prefixBeforeNationalNumber + tempNationalNumber
- : tempNationalNumber;
+ : accruedInput.toString();
} else {
return prefixBeforeNationalNumber.toString();
}