diff --git a/src/com/android/contacts/editor/TextFieldsEditorView.java b/src/com/android/contacts/editor/TextFieldsEditorView.java
index 8558b11..e48ba51 100644
--- a/src/com/android/contacts/editor/TextFieldsEditorView.java
+++ b/src/com/android/contacts/editor/TextFieldsEditorView.java
@@ -41,7 +41,7 @@
 import com.android.contacts.model.RawContactDelta.ValuesDelta;
 import com.android.contacts.model.account.AccountType.EditField;
 import com.android.contacts.model.dataitem.DataKind;
-import com.android.contacts.util.PhoneNumberFormatter;
+import com.android.contacts.common.util.PhoneNumberFormatter;
 
 /**
  * Simple editor that handles labels and any {@link EditField} defined for the
diff --git a/src/com/android/contacts/util/PhoneNumberFormatter.java b/src/com/android/contacts/util/PhoneNumberFormatter.java
deleted file mode 100644
index 2a8ac3b..0000000
--- a/src/com/android/contacts/util/PhoneNumberFormatter.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.contacts.util;
-
-import android.content.Context;
-import android.os.AsyncTask;
-import android.telephony.PhoneNumberFormattingTextWatcher;
-import android.widget.TextView;
-
-import com.android.contacts.common.GeoUtil;
-
-public final class PhoneNumberFormatter {
-    private PhoneNumberFormatter() {}
-
-    /**
-     * Load {@link TextWatcherLoadAsyncTask} in a worker thread and set it to a {@link TextView}.
-     */
-    private static class TextWatcherLoadAsyncTask extends
-            AsyncTask<Void, Void, PhoneNumberFormattingTextWatcher> {
-        private final String mCountryCode;
-        private final TextView mTextView;
-
-        public TextWatcherLoadAsyncTask(String countryCode, TextView textView) {
-            mCountryCode = countryCode;
-            mTextView = textView;
-        }
-
-        @Override
-        protected PhoneNumberFormattingTextWatcher doInBackground(Void... params) {
-            return new PhoneNumberFormattingTextWatcher(mCountryCode);
-        }
-
-        @Override
-        protected void onPostExecute(PhoneNumberFormattingTextWatcher watcher) {
-            if (watcher == null || isCancelled()) {
-                return; // May happen if we cancel the task.
-            }
-            // Setting a text changed listener is safe even after the view is detached.
-            mTextView.addTextChangedListener(watcher);
-
-            // Note changes the user made before onPostExecute() will not be formatted, but
-            // once they type the next letter we format the entire text, so it's not a big deal.
-            // (And loading PhoneNumberFormattingTextWatcher is usually fast enough.)
-            // We could use watcher.afterTextChanged(mTextView.getEditableText()) to force format
-            // the existing content here, but that could cause unwanted results.
-            // (e.g. the contact editor thinks the user changed the content, and would save
-            // when closed even when the user didn't make other changes.)
-        }
-    }
-
-    /**
-     * Delay-set {@link PhoneNumberFormattingTextWatcher} to a {@link TextView}.
-     */
-    public static final void setPhoneNumberFormattingTextWatcher(Context context,
-            TextView textView) {
-        new TextWatcherLoadAsyncTask(GeoUtil.getCurrentCountryIso(context), textView)
-                .executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void[]) null);
-    }
-}
