Format phone numbers when inserting a new contact
am: c03cfc04a8
Change-Id: Ida51773110228e025773f1b26977de72686fdcbf
diff --git a/src/com/android/contacts/editor/TextFieldsEditorView.java b/src/com/android/contacts/editor/TextFieldsEditorView.java
index 77b584c..564a9f5 100644
--- a/src/com/android/contacts/editor/TextFieldsEditorView.java
+++ b/src/com/android/contacts/editor/TextFieldsEditorView.java
@@ -228,7 +228,8 @@
fieldView.setInputType(inputType);
if (inputType == InputType.TYPE_CLASS_PHONE) {
PhoneNumberFormatter.setPhoneNumberFormattingTextWatcher(
- getContext(), fieldView, /* formatAfterWatcherSet =*/ false);
+ getContext(), fieldView,
+ /* formatAfterWatcherSet =*/ state.isContactInsert());
fieldView.setTextDirection(View.TEXT_DIRECTION_LTR);
}
fieldView.setTextAlignment(View.TEXT_ALIGNMENT_VIEW_START);