Add the core assisted dialing logic to telephony.

This module contains all of the transformation logic,
constraints, settings, tests, and other functionality for the feature.

Test: Unit tests that do not require a ShadowPhoneGlobals or AndroidManifest
Bug: 63995261
Change-Id: Iec93497042e6288965054bba359ac984b8db694e
diff --git a/src/com/android/phone/PhoneGlobals.java b/src/com/android/phone/PhoneGlobals.java
index 3fc3c7c..16c6bf7 100644
--- a/src/com/android/phone/PhoneGlobals.java
+++ b/src/com/android/phone/PhoneGlobals.java
@@ -49,6 +49,7 @@
 import android.util.Log;
 import android.widget.Toast;
 
+import com.android.i18n.phonenumbers.PhoneNumberUtil;
 import com.android.internal.telephony.Call;
 import com.android.internal.telephony.CallManager;
 import com.android.internal.telephony.IccCardConstants;
@@ -183,6 +184,8 @@
 
     private final SettingsObserver mSettingsObserver;
 
+    private final PhoneNumberUtil mPhoneNumberUtil = PhoneNumberUtil.getInstance();
+
     Handler mHandler = new Handler() {
         @Override
         public void handleMessage(Message msg) {
@@ -196,7 +199,7 @@
                             CarrierConfigManager.KEY_IGNORE_SIM_NETWORK_LOCKED_EVENTS_BOOL)) {
                         // Some products don't have the concept of a "SIM network lock"
                         Log.i(LOG_TAG, "Ignoring EVENT_SIM_NETWORK_LOCKED event; "
-                              + "not showing 'SIM network unlock' PIN entry screen");
+                                + "not showing 'SIM network unlock' PIN entry screen");
                     } else {
                         // Normal case: show the "SIM network unlock" PIN entry screen.
                         // The user won't be able to do anything else until
@@ -439,6 +442,10 @@
         return mCM;
     }
 
+    public PhoneNumberUtil getPhoneNumberUtil() {
+        return mPhoneNumberUtil;
+    }
+
     public PersistableBundle getCarrierConfig() {
         return getCarrierConfigForSubId(SubscriptionManager.getDefaultSubscriptionId());
     }
@@ -652,7 +659,7 @@
     private void setRadioPowerOff(Context context) {
         Log.i(LOG_TAG, "Turning radio off - airplane");
         Settings.Global.putInt(context.getContentResolver(), Settings.Global.CELL_ON,
-                 PhoneConstants.CELL_OFF_DUE_TO_AIRPLANE_MODE_FLAG);
+                PhoneConstants.CELL_OFF_DUE_TO_AIRPLANE_MODE_FLAG);
         SystemProperties.set("persist.radio.airplane_mode_on", "1");
         Settings.Global.putInt(getContentResolver(), Settings.Global.ENABLE_CELLULAR_ON_BOOT, 0);
         PhoneUtils.setRadioPower(false);