Merge "Tighten formatInOriginalFormat not to format numbers which we don't have formatting patterns, and use the raw_input instead."
diff --git a/java/src/com/android/i18n/phonenumbers/AsYouTypeFormatter.java b/java/src/com/android/i18n/phonenumbers/AsYouTypeFormatter.java
index 500329d..d658086 100644
--- a/java/src/com/android/i18n/phonenumbers/AsYouTypeFormatter.java
+++ b/java/src/com/android/i18n/phonenumbers/AsYouTypeFormatter.java
@@ -356,7 +356,7 @@
           }
           return ableToFormat
              ? prefixBeforeNationalNumber + tempNationalNumber
-             : tempNationalNumber;
+             : accruedInput.toString();
         } else {
           return attemptToChooseFormattingPattern();
         }
@@ -446,7 +446,7 @@
       }
       return ableToFormat
           ? prefixBeforeNationalNumber + tempNationalNumber
-          : tempNationalNumber;
+          : accruedInput.toString();
     } else {
       return prefixBeforeNationalNumber.toString();
     }