Import translations. DO NOT MERGE am: 2dceb0fe40  -s ours
am: 2b41d966ab  -s ours

Change-Id: Iad12294f12e89c6e8dcaf7ddcb88226930e2dd5b
diff --git a/Android.mk b/Android.mk
index cbebc44..24fb423 100644
--- a/Android.mk
+++ b/Android.mk
@@ -9,9 +9,17 @@
 src_dirs := src $(phone_common_dir)/src sip/src
 res_dirs := res $(phone_common_dir)/res sip/res
 
-LOCAL_JAVA_LIBRARIES := telephony-common voip-common ims-common
+LOCAL_JAVA_LIBRARIES := \
+        telephony-common \
+        voip-common \
+        ims-common \
+        org.apache.http.legacy
+
 LOCAL_STATIC_JAVA_LIBRARIES := \
-        org.apache.http.legacy \
+        android-support-v7-appcompat \
+        android-support-v7-preference \
+        android-support-v7-recyclerview \
+        android-support-v14-preference \
         guava \
         volley
 
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index f611706..9e39d30 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -40,7 +40,7 @@
     <protected-broadcast android:name="android.intent.action.SIM_STATE_CHANGED" />
     <protected-broadcast android:name="android.intent.action.NETWORK_SET_TIME" />
     <protected-broadcast android:name="android.intent.action.NETWORK_SET_TIMEZONE" />
-    <protected-broadcast android:name="android.intent.action.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS" />
+    <protected-broadcast android:name="com.android.internal.intent.action.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS" />
     <protected-broadcast android:name="android.intent.action.ACTION_MDN_STATE_CHANGED" />
     <protected-broadcast android:name="android.provider.Telephony.SPN_STRINGS_UPDATED" />
     <protected-broadcast android:name="android.provider.Telephony.SIM_FULL" />
@@ -54,14 +54,16 @@
     <protected-broadcast android:name="android.provider.Telephony.WAP_PUSH_RECEIVED" />
     <protected-broadcast android:name="android.provider.Telephony.SMS_CB_RECEIVED" />
     <protected-broadcast android:name="android.provider.Telephony.SMS_EMERGENCY_CB_RECEIVED" />
-    <protected-broadcast android:name= "android.intent.action.stk.command" />
-    <protected-broadcast android:name= "android.intent.action.stk.session_end" />
-    <protected-broadcast android:name= "android.intent.action.stk.icc_status_change" />
-    <protected-broadcast android:name= "android.intent.action.stk.alpha_notify" />
-    <protected-broadcast android:name= "android.intent.action.CARRIER_SIGNAL_REDIRECTED" />
-    <protected-broadcast android:name= "android.intent.action.CARRIER_SIGNAL_REQUEST_NETWORK_FAILED" />
-    <protected-broadcast android:name= "android.intent.action.CARRIER_SIGNAL_PCO_VALUE" />
-    <protected-broadcast android:name= "android.intent.action.VOICEMAIL_SMS_RECEIVED" />
+    <protected-broadcast android:name="android.provider.Telephony.SECRET_CODE" />
+    <protected-broadcast android:name= "com.android.internal.stk.command" />
+    <protected-broadcast android:name= "com.android.internal.stk.session_end" />
+    <protected-broadcast android:name= "com.android.internal.stk.icc_status_change" />
+    <protected-broadcast android:name= "com.android.internal.stk.alpha_notify" />
+    <protected-broadcast android:name= "com.android.internal.telephony.CARRIER_SIGNAL_REDIRECTED" />
+    <protected-broadcast android:name= "com.android.internal.telephony.CARRIER_SIGNAL_REQUEST_NETWORK_FAILED" />
+    <protected-broadcast android:name= "com.android.internal.telephony.CARRIER_SIGNAL_PCO_VALUE" />
+    <protected-broadcast android:name= "com.android.internal.telephony.CARRIER_SIGNAL_RESET" />
+    <protected-broadcast android:name= "com.android.internal.provider.action.VOICEMAIL_SMS_RECEIVED" />
     <protected-broadcast android:name= "com.android.intent.isim_refresh" />
     <protected-broadcast android:name= "com.android.ims.IMS_SERVICE_UP" />
     <protected-broadcast android:name= "com.android.ims.IMS_SERVICE_DOWN" />
@@ -73,10 +75,17 @@
     <protected-broadcast android:name= "com.android.intent.action.IMS_CONFIG_CHANGED" />
     <protected-broadcast android:name= "com.android.ims.REGISTRATION_ERROR" />
     <protected-broadcast android:name= "com.android.phone.vvm.omtp.sms.REQUEST_SENT" />
+    <protected-broadcast android:name= "com.android.phone.vvm.ACTION_VISUAL_VOICEMAIL_SERVICE_EVENT" />
 
     <uses-permission android:name="android.permission.BROADCAST_STICKY" />
     <uses-permission android:name="android.permission.CALL_PHONE" />
     <uses-permission android:name="android.permission.CALL_PRIVILEGED" />
+    <!-- TELEPHONY_SECRET_CODE used to be sent by the Dialer app, but is now sent by
+         the phone process through an API added in O. Since the broadcast was unprotected prior to
+         O, apps may have required this permission (which only Dialer has) in their receivers.
+         So, declare this permission here for backwards compatibility so the phone process can send
+         the broadcasts to those same receivers. -->
+    <uses-permission android:name="android.permission.CONTROL_INCALL_EXPERIENCE" />
     <uses-permission android:name="android.permission.WRITE_SETTINGS" />
     <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
     <uses-permission android:name="android.permission.READ_CONTACTS" />
@@ -133,6 +142,7 @@
     <uses-permission android:name="android.permission.DUMP" />
     <uses-permission android:name="android.permission.REGISTER_CALL_PROVIDER" />
     <uses-permission android:name="android.permission.REGISTER_SIM_SUBSCRIPTION" />
+    <uses-permission android:name="android.permission.BIND_IMS_SERVICE" />
     <uses-permission android:name="android.permission.BIND_CARRIER_SERVICES" />
     <!-- BIND_CARRIER_MESSAGING_SERVICE has been deprecated in favor of BIND_CARRIER_SERVICES. -->
     <uses-permission android:name="android.permission.BIND_CARRIER_MESSAGING_SERVICE" />
@@ -144,6 +154,7 @@
     <uses-permission android:name="com.android.voicemail.permission.ADD_VOICEMAIL" />
     <uses-permission android:name="com.android.voicemail.permission.WRITE_VOICEMAIL" />
     <uses-permission android:name="com.android.voicemail.permission.READ_VOICEMAIL" />
+    <uses-permission android:name="android.permission.BIND_VISUAL_VOICEMAIL_SERVICE"/>
     <uses-permission android:name="android.permission.LOCAL_MAC_ADDRESS" />
     <uses-permission android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE" />
     <uses-permission android:name="android.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST" />
@@ -156,6 +167,7 @@
          start requests, even if they happen immediately after the user
          presses home. -->
     <uses-permission android:name="android.permission.STOP_APP_SWITCHES" />
+    <uses-permission android:name="android.permission.UPDATE_DEVICE_STATS" />
 
     <application android:name="PhoneApp"
             android:persistent="true"
@@ -314,34 +326,10 @@
             </intent-filter>
         </receiver>
 
-        <!-- Trampoline activity that handles the PERFORM_CDMA_PROVISIONING intent. -->
-        <activity android:name="InCallScreenShowActivation"
-            android:permission="android.permission.PERFORM_CDMA_PROVISIONING"
-            android:label="@string/phoneIconLabel"
-            android:theme="@android:style/Theme.NoDisplay"
-            android:excludeFromRecents="true">
-            <intent-filter>
-                <action android:name="com.android.phone.PERFORM_CDMA_PROVISIONING" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
-        </activity>
-
-        <!-- Trampoline activity that handles the SIM_ACTIVATION_REQUEST intent. -->
-        <activity android:name="com.android.services.telephony.activation.SimActivationActivity"
-                android:permission="android.permission.PERFORM_SIM_ACTIVATION"
-                android:label="@string/phoneIconLabel"
-                android:theme="@android:style/Theme.NoDisplay"
-                android:excludeFromRecents="true">
-            <intent-filter>
-                <action android:name="android.intent.action.SIM_ACTIVATION_REQUEST" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
-        </activity>
-
         <!-- "Mobile network settings" screen, used on both
              non-voice-capable tablets and regular phone devices. -->
         <activity android:name="MobileNetworkSettings"
-            android:label="@string/settings_label"
+            android:label="@string/network_settings_title"
             android:theme="@style/NetworkOperatorsSettingsTheme">
             <intent-filter>
                 <action android:name="android.intent.action.VIEW" />
@@ -460,12 +448,18 @@
             </intent-filter>
         </activity>
 
-        <!-- Broadcast Receiver that will process BOOT Complete and launch OTA -->
-        <!-- TODO http://b/23526250 Handle OTASP under system user -->
-        <receiver android:name="OtaStartupReceiver" android:exported="false"
-                androidprv:systemUserOnly="true">
-            <intent-filter android:priority="100">
-                 <action android:name="android.intent.action.BOOT_COMPLETED"/>
+        <!-- Activation service that trigger OTASP sim provisioning -->
+        <service android:name=".otasp.OtaspActivationService" android:launchMode="singleInstance"
+                 androidprv:systemUserOnly="true">
+            <intent-filter>
+                <action android:name="android.service.simActivation.SimActivationService" />
+            </intent-filter>
+        </service>
+
+        <receiver android:name=".otasp.OtaspSimStateReceiver" androidprv:systemUserOnly="true"
+                  android:exported ="false">
+            <intent-filter>
+                <action android:name="android.telephony.action.CARRIER_CONFIG_CHANGED" />
             </intent-filter>
         </receiver>
 
@@ -499,7 +493,7 @@
             android:theme="@android:style/Theme.Translucent.NoTitleBar">
             <intent-filter>
                 <action android:name="com.android.phone.action.ACTION_SHOW_ECM_EXIT_DIALOG" />
-                <action android:name="android.intent.action.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS" />
+                <action android:name="com.android.internal.intent.action.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS" />
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity>
@@ -567,13 +561,6 @@
                 android:theme="@style/Empty">
         </activity>
 
-        <activity android:name="HfaActivity"
-                android:configChanges="orientation|screenSize|keyboardHidden"
-                android:launchMode="singleInstance"
-                android:theme="@style/Empty"
-                android:exported="false">
-        </activity>
-
         <activity android:name="com.android.phone.settings.PhoneAccountSettingsActivity"
             android:label="@string/phone_accounts"
             android:theme="@style/DialerSettingsLight">
@@ -598,9 +585,6 @@
             </intent-filter>
         </activity>
 
-        <!-- service to dump telephony information -->
-        <service android:name="HfaService" android:exported="false"/>
-
         <!-- Telecom integration -->
         <service
                 android:singleUser="true"
@@ -622,87 +606,29 @@
                 <action android:name="android.content.action.SEARCH_INDEXABLES_PROVIDER" />
             </intent-filter>
         </provider>
-        <receiver android:name="com.android.phone.vvm.omtp.sms.OmtpMessageReceiver"
+
+        <receiver
+          android:name="com.android.phone.vvm.VvmSmsReceiver"
             android:exported="false"
             androidprv:systemUserOnly="true">
             <intent-filter>
-                <action android:name="android.intent.action.VOICEMAIL_SMS_RECEIVED"/>
+                <action android:name="com.android.internal.provider.action.VOICEMAIL_SMS_RECEIVED"/>
             </intent-filter>
         </receiver>
+
         <receiver
-            android:name="com.android.phone.vvm.omtp.SimChangeReceiver"
-            android:exported="true"
-            androidprv:systemUserOnly="true">
-            <intent-filter>
-                <action android:name="android.telephony.action.CARRIER_CONFIG_CHANGED" />
-                <action android:name="android.intent.action.SIM_STATE_CHANGED" />
-            </intent-filter>
-        </receiver>
-        <receiver
-            android:name="com.android.phone.vvm.omtp.VvmBootCompletedReceiver"
-            android:exported="true"
-            android:permission="android.permission.RECEIVE_BOOT_COMPLETED"
+            android:name="com.android.phone.vvm.VvmSimStateTracker"
+            android:exported="false"
             androidprv:systemUserOnly="true">
             <intent-filter>
                 <action android:name="android.intent.action.BOOT_COMPLETED"/>
-            </intent-filter>
-        </receiver>
-        <receiver
-            android:name="com.android.phone.vvm.omtp.fetch.FetchVoicemailReceiver"
-            android:exported="true"
-            android:permission="com.android.voicemail.permission.READ_VOICEMAIL"
-            androidprv:systemUserOnly="true">
-            <intent-filter>
-                <action android:name="android.intent.action.FETCH_VOICEMAIL" />
-                    <data
-                        android:scheme="content"
-                        android:host="com.android.voicemail"
-                        android:mimeType="vnd.android.cursor.item/voicemail" />
-            </intent-filter>
-        </receiver>
-        <receiver
-            android:name="com.android.phone.vvm.omtp.sync.OmtpVvmSyncReceiver"
-            android:exported="true"
-            android:permission="com.android.voicemail.permission.READ_VOICEMAIL"
-            androidprv:systemUserOnly="true">
-            <intent-filter>
-                <action android:name="android.provider.action.SYNC_VOICEMAIL"/>
-            </intent-filter>
-        </receiver>
-        <receiver
-            android:name="com.android.phone.vvm.omtp.sync.VoicemailProviderChangeReceiver"
-            android:exported="true"
-            androidprv:systemUserOnly="true">
-            <intent-filter>
-                <action android:name="android.intent.action.PROVIDER_CHANGED" />
-                <data
-                    android:scheme="content"
-                    android:host="com.android.voicemail"
-                    android:mimeType="vnd.android.cursor.dir/voicemails"/>
+                <action android:name="android.telephony.action.CARRIER_CONFIG_CHANGED"/>
+                <action android:name="android.intent.action.SIM_STATE_CHANGED"/>
             </intent-filter>
         </receiver>
 
         <service
-            android:name="com.android.phone.vvm.omtp.sms.OmtpProvisioningService"
-            android:exported="false" />
-
-        <service
-          android:name="com.android.phone.vvm.omtp.scheduling.TaskSchedulerService"
-          android:exported="false" />
-
-        <receiver android:name="com.android.phone.vvm.omtp.VvmPackageInstallReceiver"
-            androidprv:systemUserOnly="true">
-            <intent-filter>
-                <action android:name="android.intent.action.PACKAGE_INSTALL" />
-                <action android:name="android.intent.action.PACKAGE_ADDED" />
-                <data android:scheme="package"/>
-            </intent-filter>
-        </receiver>
-
-        <activity android:name=".settings.VoicemailChangePinActivity"
-          android:exported="false"
-          android:theme="@style/DialerSettingsLight"
-          android:windowSoftInputMode="stateVisible|adjustResize">
-          </activity>
+            android:name="com.android.phone.vvm.RemoteVvmTaskManager"
+            android:exported="false"/>
     </application>
 </manifest>
diff --git a/assets/eri_311480.xml b/assets/eri_311480.xml
index 750b200..c5e8624 100644
--- a/assets/eri_311480.xml
+++ b/assets/eri_311480.xml
@@ -58,7 +58,7 @@
          <EriInfo RoamingIndicator="64"
                   IconIndex="1"
                   IconMode="0"
-                  EriText="Verizon Wireless"
+                  EriText="Verizon"
                   CallPromptId="0"
                   AlertId="0"
                   DataServiceSupport="1"/>
@@ -154,7 +154,7 @@
          <EriInfo RoamingIndicator="76"
                   IconIndex="0"
                   IconMode="0"
-                  EriText="Verizon Wireless"
+                  EriText="Verizon"
                   CallPromptId="0"
                   AlertId="0"
                   DataServiceSupport="1"/>
@@ -162,7 +162,7 @@
          <EriInfo RoamingIndicator="77"
                   IconIndex="2"
                   IconMode="0"
-                  EriText="Verizon Wireless"
+                  EriText="Verizon"
                   CallPromptId="0"
                   AlertId="0"
                   DataServiceSupport="1"/>
diff --git a/res/layout/emergency_dialer.xml b/res/layout/emergency_dialer.xml
index 01c2f80..ee55c06 100644
--- a/res/layout/emergency_dialer.xml
+++ b/res/layout/emergency_dialer.xml
@@ -112,11 +112,16 @@
 
     </LinearLayout>
 
+    <Space
+        android:id="@+id/floating_action_button_margin_bottom"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/floating_action_button_margin_bottom"
+        android:layout_alignParentBottom="true"/>
+
     <FrameLayout
         android:id="@+id/floating_action_button_container"
         android:layout_width="@dimen/floating_action_button_width"
         android:layout_height="@dimen/floating_action_button_height"
-        android:layout_marginBottom="@dimen/floating_action_button_margin_bottom"
         android:layout_gravity="center_horizontal|bottom" >
 
         <ImageButton
diff --git a/res/layout/network_setting.xml b/res/layout/network_setting.xml
new file mode 100644
index 0000000..bfc16dc
--- /dev/null
+++ b/res/layout/network_setting.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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.
+-->
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+             android:id="@+id/network_setting_content"
+             android:layout_height="match_parent"
+             android:layout_width="match_parent"/>
diff --git a/res/values-af/config.xml b/res/values-af/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-af/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index bdefd5b..a392829 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Sellulêre data"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobieldata"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Foondienste"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Noodbeller"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Foon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Vermiste stemboodskapnommer"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Geen stemboodskapnommer is op die SIM-kaart gestoor nie."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Voeg nommer by"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Stemboodskapinstellings kan slegs deur die primêre gebruiker gewysig word."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Jou SIM-kaart is oopgesluit. Jou foon sluit tans oop…"</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM-netwerk ontsluit PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Ontsluit"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Versoek tans netwerkontsluiting…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Netwerkaanvraag onsuksesvol ontsluit."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Netwerkontsluiting suksesvol."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Selnetwerkinstellings is nie vir hierdie gebruiker beskikbaar nie"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Mobiele netwerkinstellings is nie vir hierdie gebruiker beskikbaar nie"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM-oproepinstellings"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM-oproepinstellings (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA-oproepinstellings"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Stemboodskap"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Stemboodskapdiens (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Kennisgewings"</string>
     <string name="networks" msgid="8873030692174541976">"Netwerkoperateurs"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Nooduitsendings"</string>
     <string name="call_settings" msgid="6112441768261754562">"Oproepinstellings"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Indien onbereikbaar"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Nommer wanneer onbereikbaar"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Stuur aan na <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Gedeaktiveer"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Af"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Jou diensverskaffer ondersteun nie die deaktivering van oproepaanstuur wanneer jou foon onbereikbaar is nie."</string>
     <string name="updating_title" msgid="6146755386174019046">"Belinstellings"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Oproepinstellings kan net deur die administrateur verander word."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Die nuwe PIN bevat ongeldige karakters."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Kan nie PIN verander nie"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Ongesteunde tipe boodskap, bel <xliff:g id="NUMBER">%s</xliff:g> om te luister."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Selnetwerkinstellings"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Mobiele netwerkinstellings"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobiele netwerk"</string>
     <string name="label_available" msgid="1181658289009300430">"Beskikbare netwerke"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Soek tans…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Geen netwerke gevind nie."</string>
@@ -235,7 +238,7 @@
     <!-- no translation found for throttle_time_frame_subtext (7732763021560399960) -->
     <skip />
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Datatempo verminder na <xliff:g id="USED">%1$d</xliff:g> Kb/s as datagebruiklimiet oorskry word"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Meer inligting oor jou diensverskaffer se beleid oor die gebruik van selnetwerkdata"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Meer inligting oor jou draer se mobielenetwerk-datagebruikbeleid"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Seluitsending-SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Seluitsending-SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Seluitsending-SMS geaktiveer"</string>
@@ -372,6 +375,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Voeg kontak by"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Verander kontak"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Vee kontak uit"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Bel kontak"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Voer PIN2 in"</string>
     <string name="name" msgid="7329028332786872378">"Naam"</string>
     <string name="number" msgid="7905950798349903858">"Nommer"</string>
@@ -386,7 +390,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Verwyder belbeperking-nommer…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Belbeperking-nommer uitgevee."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN is nie opgedateer nie omdat jy \'n verkeerde PIN ingevoer het."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN is nie opgedateer nie, omdat die getal nie 20 syfers kan oorskry nie."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN is nie opgedateer nie, omdat die getal leeg is of 20 syfers oorskry."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN is nie bygewerk nie. Die PIN2 was verkeerd of die foonnommer is verwerp."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN-bewerking het misluk."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Lees tans van SIM-kaart af…"</string>
@@ -448,12 +452,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Skakel vliegtuigmodus af of koppel aan \'n draadlose netwerk om \'n oproep te maak."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Verlaat noodterugbelmodus om \'n nienoodoproep te maak."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Nie geregistreer op netwerk nie."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Sellulêre netwerk nie beskikbaar nie."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Sellulêre netwerk is nie beskikbaar nie. Koppel aan \'n draadlose netwerk om \'n oproep te maak."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobiele netwerk nie beskikbaar nie."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobiele netwerk is nie beskikbaar nie. Koppel aan \'n draadlose netwerk om \'n oproep te maak."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Voer \'n geldige nommer in om \'n oproep te maak."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Oproep het misluk."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Oproep kan nie op die oomblik bygevoeg word nie."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Begin MMI-volgorde…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Diens word nie gesteun nie"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Kan nie oproepe wissel nie."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Kan nie oproep skei nie."</string>
@@ -528,10 +531,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Noodterugbel-modus betree"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Noodterugbel-modus"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Dataverbinding gedeaktiveer"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Geen dataverbinding vir <xliff:g id="COUNT_1">%s</xliff:g> minute nie</item>
-      <item quantity="one">Geen dataverbinding vir <xliff:g id="COUNT_0">%s</xliff:g> minuut nie</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Geen dataverbinding tot <xliff:g id="COMPLETETIME">%s</xliff:g> nie"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Die foon sal <xliff:g id="COUNT_1">%s</xliff:g> minute lank in noodterugbelmodus wees. Terwyl dit in hierdie modus is, kan geen programme gebruik word wat \'n dataverbinding gebruik nie. Wil jy nou uitgaan?</item>
       <item quantity="one">Die foon sal <xliff:g id="COUNT_0">%s</xliff:g> minuut lank in noodterugbelmodus wees. Terwyl dit in hierdie modus is, kan geen programme gebruik word wat \'n dataverbinding gebruik nie. Wil jy nou uitgaan?</item>
@@ -555,12 +555,9 @@
     <string name="selectContact" msgid="781975788478987237">"kies kontak"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Stembel nie ondersteun nie"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"bel"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibreer"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibreer"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Visuele stemboodskapdiens"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Stel PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Verander PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Klank"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Luitoon en vibreer"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Ingeboude SIM-kaarte"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Skakel video-oproepe aan"</string>
@@ -577,6 +574,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Kon nie die boodskap dekodeer nie."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"\'n SIM-kaart het jou diens geaktiveer en jou foon se swerwingvermoëns opgedateer."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Daar is te veel aktiewe oproepe. Beëindig of voeg asseblief bestaande oproepe saam voordat jy \'n nuwe een maak."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Kan nie koppel nie, sit asseblief \'n geldige SIM-kaart in."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi-verbinding verloor. Oproep is beëindig."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Verander stemboodskap-PIN"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Gaan voort"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Kanselleer"</string>
diff --git a/res/values-am/config.xml b/res/values-am/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-am/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index 12f8bb6..d4816e7 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"የተንቀሳቃሽ ስልክ ውሂብ"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"የተንቀሳቃሽ ስልክ ውሂብ"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"የስልክ አገልግሎቶች"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"የአደጋ ጊዜደዋይ"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"ስልክ"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"የድምፅመልዕክት ቁጥርአመለጠ"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"በSIM ካርዱ ላይምንም የድምፅመልዕክት ቁጥር አልከተቀመጠም።"</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"ቁጥር አክል"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"የድምፅ መልዕክት ቅንብሮች መለወጥ የሚችሉት በቀዳሚ ተጠቃሚው ብቻ ነው።"</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"የSIM ካርድዎ አልታገደም። ስልክዎ በመከፈት ላይነው..."</string>
     <string name="label_ndp" msgid="780479633159517250">"የSIM አውታረመረብ መክፈቻ ፒን"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"ክፈት"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"አውታረመረብ ለማስከፈት በመጠየቅ ላይ..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"የአውታረ መረብ ክፈትጥየቃአል ተሳካም።"</string>
     <string name="unlock_success" msgid="6770085622238180152">"የአውታረ መረብክፈት ተሳክቷል።"</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"የተንቀሳቃሽ ስልክ አውታረ መረብ ቅንብሮች ለዚህ ተጠቃሚ አይገኙም"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"የተንቀሳቃሽ ስልክ አውታረ መረብ ቅንብሮች ቅንብሮች ለዚህ ተጠቃሚ አይገኙም"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"የGSM  ጥሪ ቅንብሮች"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"የጂኤስኤም ጥሪ ቅንብሮች (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA የጥሪ ቅንብሮች"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"የድምፅ መልዕክት"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"የድምጽ መልዕክት (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"ማሳወቂያዎች"</string>
     <string name="networks" msgid="8873030692174541976">"የአውታረ መረብ ትእምርተ ከዋኝ"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"የአስቸኳይ አደጋ ስርጭቶች"</string>
     <string name="call_settings" msgid="6112441768261754562">"የጥሪ ቅንብሮች"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"የማልገኝ ሲሆን"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"ቁጥሩሳይገኝ"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"ወደ <xliff:g id="PHONENUMBER">{0}</xliff:g>በማስተላለፍ ላይ"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"ቦዝኗል"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"ጠፍቷል"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"ስልክህ በማይደረስበት ጊዜ የድምጽ ተያያዥ ሞደምህ  የጥሪ-ማስተላለፍን አይደግፍም።"</string>
     <string name="updating_title" msgid="6146755386174019046">"የጥሪ ቅንብሮች"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"የጥሪ ቅንብሮች በአስተዳዳሪ ተጠቃሚው ብቻ ነው ሊለወጡ የሚችሉት።"</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"አዲሱ ፒን ልክ ያልሆኑ ቁምፊዎችን ይዟል።"</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"ፒን መቀየር አልተቻለም።"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"የማይደገፍ የመልዕክት አይነት፤ ለማዳመጥ ወደ <xliff:g id="NUMBER">%s</xliff:g> ይደውሉ።"</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"የተንቀሳቃሽ ስልክ አውታረ መረብ ቅንብሮች"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"የተንቀሳቃሽ ስልክ አውታረ መረብ ቅንብሮች"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"የተንቀሳቃሽ ስልክ አውታረ መረብ"</string>
     <string name="label_available" msgid="1181658289009300430">"የሚገኙ አውታረመረቦች"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"በመፈለግ ላይ…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"ምንም አውታረመረብ አልተገኘም።"</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g>ከከፍተኛው ዘሏል\n የውሂብ ደረጃ ወደ <xliff:g id="USED_1">%2$d</xliff:g> Kb/s ዝቅ ብሏል።"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"የ<xliff:g id="USED_0">%1$d</xliff:g>٪ ዙር ሄዷል \nቀጣይ ክፍለ ጊዜ በ<xliff:g id="USED_1">%2$d</xliff:g> ቀኖች(<xliff:g id="USED_2">%3$s</xliff:g>) ይጀምራል"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"የውሂብ አጠቃቀም ወሰን ከበለጠየውሂብ ደረጃ ወደ <xliff:g id="USED">%1$d</xliff:g>Kb/s ቀንሷል።"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"ተጨማሪ የአገልግሎት አቅራቢዎ የተንቀሳቃሽ ስልክ አውታረ መረብዎ ውሂብ አጠቃቀም መመሪያ"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"ተጨማሪ መረጃ ስለ ድምጸ ተያያዥ ሞደምዎ ተንቀሳቃሽ ስልክ አውታረ መረብዎ ውሂብ አጠቃቀም መመሪያ"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"የተንቀሳቃሽ ስልክ SMS ስርጭት"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"የተንቀሳቃሽ ስልክ SMS ስርጭት"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"የ SMS ህዋስ ማሰራጫ አልነቃም"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"እውቅያዎች አክል"</string>
     <string name="menu_edit" msgid="7143003705504672374">"እውቅያ አርትዕ"</string>
     <string name="menu_delete" msgid="3977150783449642851">"እውቅያ ሰርዝ"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"እውቂያ ደውል"</string>
     <string name="get_pin2" msgid="8204677063922225311">"ፒን2 ተይብ"</string>
     <string name="name" msgid="7329028332786872378">"ስም"</string>
     <string name="number" msgid="7905950798349903858">"ቁጥር"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"በቋሚ መደወያ ቁጥር በመሰረዝ ላይ..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"ቋሚ መደወያ ቁጥር ተሰርዟል።"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"የተሳሳተ ፒን ስላስገባህ FDN አልዘመነም፡፡"</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"ቁጥሩ ከ20 አሀዞች በላይ መብለጥ ስለማይችል FDN አልዘመነም፡፡"</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN ቁጥሩ ባዶ ስለሆነ ወይም ከ20 አኃዞች ስለሚበልጥ አልዘመነም።"</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN አልዘመነም። ፒን2 ትክክል አልነበረም፣ ወይም የስልክ ቁጥሩ ተቀባይነት አላገኘም።"</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN ክወና አልተሳካም!"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"ከSIM ካርድ ላይ በማንበብ ላይ..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"ጥሪ ለማድረግ የአውሮፕላን ሁኔታን ያጥፉ ወይም ወደ ሽቦ አልባ አውታረ መረብ ያገናኙ።"</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"አስቸኳይ ያልሆነ ጥሪ ለማድረግ ከአስቸኳይ መልሰህ ደውል ሁነታ ይውጡ።"</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"በአውታረ መረቡ ላይ አልተመዘገበም።"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"የተንቀሳቃሽ ስልክ አውታረ መረብ አይገኝም።"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"የተንቀሳቃሽ ስልክ አውታረ መረብ አይገኝም። ጥሪ ለማድረግ ወደ ሽቦ አልባ አውታረ መረብ ያገናኙ።"</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"የተንቀሳቃሽ አደራጅ የለም።"</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"የተንቀሳቃሽ ስልክ አውታረ መረብ አይገኝም። ጥሪ ለማድረግ ከሽቦ አልባ አውታረ መረብ ጋር ያገናኙ።"</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"አንድ ጥሪ ለማድረግ የሚሰራ ቁጥር ያስገቡ።"</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"ጥሪ አልተሳካም።"</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"ጥሪ በአሁኑ ጊዜ ሊታከል አይችልም።"</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"የMMI sequence…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"አገልግሎት አይደገፍም"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"ጥሪዎችን መቀያየር አልተቻለም።"</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"ጥሪን መለየት አልተቻለም።"</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"የአደጋጊዜ ተዘዋዋሪ ጥሪ ሁነታ ገብቷል"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"የአደጋጊዜ ተዘዋዋሪጥሪ ሁነታ"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"የውሂብ ተያያዥነት አልነቃም"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">ለ <xliff:g id="COUNT_1">%s</xliff:g> ደቂቃዎች ምንም የውሂብ ተያያዥነት የለም</item>
-      <item quantity="other">ለ <xliff:g id="COUNT_1">%s</xliff:g> ደቂቃዎች ምንም የውሂብ ተያያዥነት የለም</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"እሰከ <xliff:g id="COMPLETETIME">%s</xliff:g> የውሂብ ግንኙነት የለም"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">ስልኩ በድንገተኛ ጥሪ መልሶ መደወያ ሁነታ ለ <xliff:g id="COUNT_1">%s</xliff:g> ደቂቃዎች ይቆያል። በዚህ ሁነታ ላይ በሚሆንበት ጊዜ የውሂብ ግንኙነትን የሚጠቀሙ ማናቸውም መተግበሪያዎች ጥቅም ላይ ሊውሉ አይችሉም። አሁን መውጣት ይፈልጋሉ?</item>
       <item quantity="other">ስልኩ በድንገተኛ ጥሪ መልሶ መደወያ ሁነታ ለ <xliff:g id="COUNT_1">%s</xliff:g> ደቂቃዎች ይቆያል። በዚህ ሁነታ ላይ በሚሆንበት ጊዜ የውሂብ ግንኙነትን የሚጠቀሙ ማናቸውም መተግበሪያዎች ጥቅም ላይ ሊውሉ አይችሉም። አሁን መውጣት ይፈልጋሉ?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"ዕውቂያ ምረጥ"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"የድምፅ ጥሪ አይታገዝም"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"ደውል"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"ንዘር"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"ንዘር"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"ምስላዊ የድመጽ መልዕከት"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"ፒን ያዘጋጁ"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"ፒን ቀይር"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"ድምፅ"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"የደወል ቅላጼ እና ንዘረት"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"አብሮገነብ ሲም ካርዶች"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"የቪዲዮ ጥሪ አብራ"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"መልዕክቱን በማመሳጠር ላይ ስህተት ነበር።"</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"አንድ ሲም ካርድ አገልግሎትዎን ገቢር አድርጎታል፣ እንዲሁም የስልክዎን የማስተላለፍ ችሎታዎችን አዘምኗል።"</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"እጅግ በጣም ብዙ ንቁ ጥሪዎች አሉ። እባክዎ አዲስ ከማስቀመጥዎ በፊት ያሉትን ጥሪዎች ይጨርሱ ወይም ያዋህዱ።"</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"መገናኘት አልተቻለም፣ እባክዎ ትክክል የሆነ SIM ካርድ ያስገቡ።"</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"የWi-Fi ግንኙነት ጠፍቷል። ጥሪ አብቅቷል።"</string>
     <string name="change_pin_title" msgid="7790232089699034029">"የድምፅ መልዕክት ፒን ለውጥ"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"ቀጥል"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"ይቅር"</string>
diff --git a/res/values-ar/config.xml b/res/values-ar/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-ar/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index 781663d..fcb153c 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"بيانات شبكة الجوّال"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"بيانات الجوال"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"خدمات الهاتف"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"طالب الطوارئ"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"الهاتف"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"رقم البريد الصوتي مفقود"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"‏لم يتم تخزين رقم بريد صوتي على شريحة SIM."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"إضافة رقم"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"يمكن تعديل إعدادات البريد الصوتي عن طريق المستخدم الأساسي فقط."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"‏تم إلغاء حظر شريحة SIM. جارٍ إلغاء تأمين الهاتف..."</string>
     <string name="label_ndp" msgid="780479633159517250">"‏رمز PIN لإلغاء تأمين شبكة SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"إلغاء تأمين"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"جارٍ طلب إلغاء تأمين الشبكة..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"لم ينجح طلب إلغاء تأمين الشبكة."</string>
     <string name="unlock_success" msgid="6770085622238180152">"نجح إلغاء تأمين الشبكة."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"لا تتوفّر إعدادات شبكة الجوّال لهذا المستخدم"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"لا تتوفّر إعدادات شبكة الجوّال للمستخدم الحالي."</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"‏إعدادات اتصال نظام GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"‏إعدادات اتصال GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"‏إعدادات اتصال CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"البريد الصوتي"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"البريد الصوتي (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"الإشعارات"</string>
     <string name="networks" msgid="8873030692174541976">"مشغلو الشبكة"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"عمليات البث في حالات الطوارئ"</string>
     <string name="call_settings" msgid="6112441768261754562">"إعدادات الاتصال"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"عند عدم الوصول"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"الرقم عند عدم الوصول"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"إعادة التوجيه إلى <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"معطّل"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"إيقاف"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"لا يتيح مشغل شبكة الجوال تعطيل اعادة توجيه المكالمة عند عدم التمكن من الوصول إلى هاتفك."</string>
     <string name="updating_title" msgid="6146755386174019046">"إعدادات الاتصال"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"لا يمكن تغيير إعدادات المكالمات إلا بواسطة المستخدم الإداري."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"رقم التعريف الشخصي الجديد يحتوي على أحرف غير صالحة."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"غير قادر على تغيير رقم التعريف الشخصي"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"نوع الرسالة غير معتمد، اتصل على <xliff:g id="NUMBER">%s</xliff:g> لسماعها."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"إعدادات شبكة الجوّال"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"إعدادات شبكة الجوال"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"شبكة الجوّال"</string>
     <string name="label_available" msgid="1181658289009300430">"الشبكات المتاحة"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"جارِ البحث…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"لم يتم العثور على شبكات."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> تم تعدي الحد الأقصى\nتم تخفيض معدل البيانات إلى <xliff:g id="USED_1">%2$d</xliff:g> كيلوبايت/ثانية"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"انقضت نسبة <xliff:g id="USED_0">%1$d</xliff:g>٪ من الدورة\nتبدأ الفترة التالية خلال <xliff:g id="USED_1">%2$d</xliff:g> يوم (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"تخفيض معدل البيانات إلى <xliff:g id="USED">%1$d</xliff:g> كيلوبايت/ثانية إذا تم تعدي حد البيانات"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"مزيد من المعلومات حول سياسة استخدام بيانات الشبكة لمشغل شبكة الجوّال"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"مزيد من المعلومات حول سياسة استخدام بيانات شبكة جوال مشغل شبكة الجوال"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"‏الرسائل القصيرة SMS لبث الخلية"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"‏الرسائل القصيرة SMS لبث الخلية"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"‏تم تمكين الرسائل القصيرة SMS لبث الخلية"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"إضافة جهة اتصال"</string>
     <string name="menu_edit" msgid="7143003705504672374">"تعديل جهة الاتصال"</string>
     <string name="menu_delete" msgid="3977150783449642851">"حذف جهة الاتصال"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"الاتصال بجهة الاتصال"</string>
     <string name="get_pin2" msgid="8204677063922225311">"‏اكتب رقم تعريف شخصي PIN2"</string>
     <string name="name" msgid="7329028332786872378">"الاسم"</string>
     <string name="number" msgid="7905950798349903858">"الرقم"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"جارٍ حذف رقم الاتصال الثابت..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"تم حذف رقم الاتصال الثابت."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"‏لم يتم تحديث FDN لأنك كتبت رقم تعريف شخصي غير صحيح."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"‏لم يتم تحديث FDN لأن العدد لا يمكن أن يتجاوز 20 رقمًا."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"‏لم يتم تحديث FDN نظرًا لأن الرقم فارغ أو يتجاوز طوله 20 رقمًا."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"‏لم يتم تحديث FDN. رقم PIN2 غير صحيح، أو تم رفض رقم الهاتف."</string>
     <string name="fdn_failed" msgid="540018079008319747">"‏أخفقت عملية FDN!"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"‏جارٍ القراءة من شريحة SIM..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"عليك إيقاف وضع الطائرة أو الاتصال بشبكة لاسلكية لإجراء مكالمة."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"ينبغي الخروج من وضع معاودة الاتصال بالطوارئ لإجراء مكالمة غير طارئة."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"غير مسجل على الشبكة."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"شبكة الجوّال غير متاحة."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"شبكة الجوّال ليست متوفرة. اتصل بشبكة لاسلكية لإجراء مكالمة."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"شبكة الجوال غير متاحة."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"شبكة الجوّال ليست متوفرة. اتصل بشبكة لاسلكية لإجراء مكالمة."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"لإجراء مكالمة، أدخل رقمًا صالحًا."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"أخفقت المكالمة."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"لا يمكن إضافة مكالمة في الوقت الحالي."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"‏جارٍ بدء تسلسل MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"الخدمة ليست متوفرة"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"يتعذر تبديل المكالمات."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"يتعذر فصل المكالمة."</string>
@@ -524,14 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"تم الدخول إلى وضع هاتف معاودة الاتصال بالطوارئ"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"وضع هاتف معاودة الاتصال بالطوارئ"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"تم تعطيل اتصال البيانات"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="zero">لن يتوفر اتصال بالبيانات لمدة <xliff:g id="COUNT_1">%s</xliff:g> من الدقائق</item>
-      <item quantity="two">لن يتوفر اتصال بالبيانات لمدة دقيقتين (<xliff:g id="COUNT_1">%s</xliff:g>)</item>
-      <item quantity="few">لن يتوفر اتصال بالبيانات لمدة <xliff:g id="COUNT_1">%s</xliff:g> دقائق</item>
-      <item quantity="many">لن يتوفر اتصال بالبيانات لمدة <xliff:g id="COUNT_1">%s</xliff:g> دقيقة</item>
-      <item quantity="other">لن يتوفر اتصال بالبيانات لمدة <xliff:g id="COUNT_1">%s</xliff:g> من الدقائق</item>
-      <item quantity="one">لن يتوفر اتصال بالبيانات لمدة <xliff:g id="COUNT_0">%s</xliff:g> دقيقة</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"لا يوجد اتصال بيانات حتى <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="zero">سيكون الهاتف في وضع الرد على مكالمة الطوارئ لمدة <xliff:g id="COUNT_1">%s</xliff:g> من الدقائق. وأثناء هذا الوضع، لا يمكن استخدام أي تطبيقات تستخدم اتصال بيانات. هل تريد الخروج الآن؟</item>
       <item quantity="two">سيكون الهاتف في وضع الرد على مكالمة الطوارئ لمدة دقيقتين (<xliff:g id="COUNT_1">%s</xliff:g>). وأثناء هذا الوضع، لا يمكن استخدام أي تطبيقات تستخدم اتصال بيانات. هل تريد الخروج الآن؟</item>
@@ -563,12 +559,9 @@
     <string name="selectContact" msgid="781975788478987237">"تحديد جهة اتصال"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"الاتصال الصوتي غير معتمد"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"طلب"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"الاهتزاز"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"الاهتزاز"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"بريد صوتي مرئي"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"تعيين رقم التعريف الشخصي"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"تغيير رقم التعريف الشخصي"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"الصوت"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"نغمة الرنين والاهتزاز"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"‏بطاقات SIM مدمجة"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"تشغيل مكالمات الفيديو"</string>
@@ -585,6 +578,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"حدث خطأ أثناء فك ترميز الرسالة."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"‏نشطت شريحة SIM خدمتك وحدّثت إمكانات التجوال لهاتفك."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"هناك الكثير من المكالمات النشطة. يرجى إنهاء أو دمج المكالمات الموجودة قبل إجراء مكالمة جديدة."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"‏يتعذر الاتصال، يُرجى إدخال شريحة SIM صالحة."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"‏تم فقدان اتصال Wi-Fi. تم إنهاء المكالمة."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"تغيير رقم التعريف الشخصي للبريد الصوتي"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"متابعة"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"إلغاء"</string>
diff --git a/res/values-az-rAZ/arrays.xml b/res/values-az/arrays.xml
similarity index 100%
rename from res/values-az-rAZ/arrays.xml
rename to res/values-az/arrays.xml
diff --git a/res/values-az/config.xml b/res/values-az/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-az/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-az-rAZ/strings.xml b/res/values-az/strings.xml
similarity index 96%
rename from res/values-az-rAZ/strings.xml
rename to res/values-az/strings.xml
index 434a9f3..ea47c71 100644
--- a/res/values-az-rAZ/strings.xml
+++ b/res/values-az/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobil məlumatlar"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobil Data"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefon Xidmətləri"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Təcili Nömrəyığan"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Səsli poçt nömrəsi çatışmır"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM kartda heç bir səsli poçt nömrəsi yoxdur."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Nömrə əlavə edin"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Səsli E-məktub Ayarları yalnız Əsas İstifadəçi tərəfindən dəyişdirilə bilər."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"SIM kartınızın kilidi açıldı. Telefonunuzun da kilidi açılır…"</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM şəbəkəni kiliddən çıxaran PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Kilidi aç"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Şəbəkə kilidinin açılması tələbi göndərilir…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Şəbəkəni kiliddən çıxarmaq sorğusu uğursuzdur."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Şəbəkə uğurla kiliddən çıxarıldı."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Mobil şəbəkə ayarları bu istifadəçi üçün əlçatan deyil"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Mobil şəbəkə ayarları bu istifadəçi üçün əlçatan deyil"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM zəng parametrləri"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM zəng ayarları (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA zəng parametrləri"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Səsli poçt"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Səsli məktub (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"SP:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Bildirişlər"</string>
     <string name="networks" msgid="8873030692174541976">"Şəbəkə operatorları"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Təcili yayımlar"</string>
     <string name="call_settings" msgid="6112441768261754562">"Zəng parametrləri"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Zəng çatmadıqda"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Əlçatmaz olarkən yönləndiriləcək nömrə"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> nömrəsinə yönləndirilir"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Deaktiv"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Deaktiv"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Sizin mobil daşıyıcı telefon əlçatmaz olduğu zaman zəng yönləndirməni deaktiv etməyi dəstəkləmir."</string>
     <string name="updating_title" msgid="6146755386174019046">"Zəng parametrləri"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Zəng parametrləri yalnız admin olan istifadəçi tərəfindən dəyişdirilə bilər."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Yeni PIN kod yanlış simvollardan ibarətdir."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN kodu dəyişmək mümkün olmadı"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Dəstəklənməyən mesaj növü, qulaq asmaq üçün <xliff:g id="NUMBER">%s</xliff:g> nömrəsinə zəng edin."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Mobil şəbəkə ayarları"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Mobil şəbəkə parametrləri"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobil şəbəkə"</string>
     <string name="label_available" msgid="1181658289009300430">"Əlçatımlı şəbəkələr"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Axtarılır..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Şəbəkə tapılmadı"</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> maksimal aşılıb\nData göstəricisi <xliff:g id="USED_1">%2$d</xliff:g> Kb/saniyəyə qədər azalıb"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ dövr keçib\nNövbəti period <xliff:g id="USED_1">%2$d</xliff:g> gün ərzində başlayır (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Əgər data istifadə limiti aşılsa, data göstəricisi <xliff:g id="USED">%1$d</xliff:g> Kb/saniyəyə qədər azalır"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Operatorun mobil şəbəkə data istifadə siyasəti haqqında ətraflı məlumat"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Karrierinizin mobil şəbəkə data istifadə siyasəti haqqında daha çox məlumat"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS Hücrə Yayımı"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Hücrə Yayım SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"SMS Hücrə Yayımı aktivdir"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Kontakt əlavə edin"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Kontakta düzəliş edin"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Kontaktı sil"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Kontaktı yığın"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2 daxil edin"</string>
     <string name="name" msgid="7329028332786872378">"Ad"</string>
     <string name="number" msgid="7905950798349903858">"Nömrə"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Sabit yığım nömrəsi silinir…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Sabit yığım nömrəsi silindi."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Yanlış PIN daxil etdiyiniz üçün FDN güncəlləşdirilmədi."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN güncəlləşdirilmədi, çünki nömrə 20 rəqəmdən çox ola bilməz."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Nömrə boş olduğundan və ya 20 rəqəmi keçdiyindən FDN yenilənmədi."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN güncəlləşdirilmədi. PIN2 yanlış idi və ya telefon nömrəsi rədd edildi."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN əməliyyatı aılnmadı."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"SIM kart oxunur ..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Zəng etmək üçün təyyarə rejimini deaktiv edin və ya Wi-Fi şəbəkəsinə qoşulun."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Qeyri-fövqəladə zəng etmək üçün fövqəladə zəng rejimindən çıxın."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Şəbəkədə qeydə alınmayıb."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mobil şəbəkə əlçatan deyil"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Mobil şəbəkə əlçatmazdır. Zəng etmək üçün Wi-Fi şəbəkəsinə qoşulun."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobil şəbəkə əlçatımlı deyil."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobil şəbəkə əlçatmazdır. Zəng etmək üçün Wi-Fi şəbəkəsinə qoşulun."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Zəngi yerləşdirmək üçün düzgün nömrə daxil edin."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Zəng alınmadı."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Hazırda çağrı edilə bilməz."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI başlanma ardıcıllığı…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Xidmət dəstəklənmir"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Zəngləri keçirmək mümkün deyil."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Zəngi ayırmaq mümkün deyil."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Təcili Geriyə Zəng Rejimi Daxil Edildi"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Təcisi Geriyə Zəng Rejimi"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Data bağlantısı deaktiv edildi"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> dəqiqə ərzində məlumat bağlantısı yoxdur</item>
-      <item quantity="one"><xliff:g id="COUNT_0">%s</xliff:g> dəqiqə ərzində məlumat bağlantısı yoxdur</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> vaxtına qədər data bağlantısı yoxdur"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Telefon <xliff:g id="COUNT_1">%s</xliff:g> dəqiqə Fövqəladə Cavab Zəngi rejimində olacaq. Bu rejimdə olarkən məlumat bağlantısından istifadə edən heç bir proqram istifadə edilə bilməz. İndi çıxmaq istəyirsiniz?</item>
       <item quantity="one">Telefon <xliff:g id="COUNT_0">%s</xliff:g> dəqiqə Fövqəladə Cavab Zəngi rejimində olacaq. Bu rejimdə olarkən məlumat bağlantısından istifadə edən heç bir proqram istifadə edilə bilməz. İndi çıxmaq istəyirsiniz?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"kontakt seçin"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Səsli zəng dəstəklənmir"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"Yığ"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibrasiya"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibrasiya"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Vizual Səsli Mesaj"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN kodu ayarlayın"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"PIN kodu dəyişin"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Səs"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Zəng səsi &amp; Vibrasiya"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Daxili SIM kartlar"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Video çağrını aktivləşdirin"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Mesaj dekod edilən zaman xəta oldu."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM kart xidmətinizi aktivləşdirdi və telefonunuzun rominq imkanlarını güncəlləşdi."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Burada həddindən çox aktiv zəng var. Yeni birini yerləşdirmək üçün mövcud zəngləri sonlandırın və ya birləşdirin."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Qoşulmaq olmadı, etibarlı SİM kart daxil edin."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi bağlantısı kəsildi. Zəng başa çatdı."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Səsli poçtun PIN kodunu dəyişin"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Davam edin"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Ləğv edin"</string>
diff --git a/res/values-b+sr+Latn/config.xml b/res/values-b+sr+Latn/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-b+sr+Latn/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-b+sr+Latn/strings.xml b/res/values-b+sr+Latn/strings.xml
index 853265b..10c4d65 100644
--- a/res/values-b+sr+Latn/strings.xml
+++ b/res/values-b+sr+Latn/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobilni podaci"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobilni podaci"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefonske usluge"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Hitni pozivi"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Nedostaje broj za govornu poštu"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Nije uskladišten nijedan broj govorne pošte na SIM kartici."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Dodaj broj"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Samo primarni korisnik može da menja podešavanja govorne pošte."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Vaša SIM kartica je odblokirana. Telefon se otključava..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN za otključavanje mreže na SIM kartici"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Otključaj"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Traženje otključavanja mreže"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Neuspešan zahtev za zaključavanje mreže."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Uspešno otključavanje mreže"</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Podešavanja mobilne mreže nisu dostupna za ovog korisnika"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Podešavanja mobilne mreže nisu dostupna za ovog korisnika"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Podešavanja GSM poziva"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Podešavanja GSM poziva (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA podešavanja poziva"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Govorna pošta"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Glasovna pošta (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Obaveštenja"</string>
     <string name="networks" msgid="8873030692174541976">"Mrežni operateri"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Hitni prenosi"</string>
     <string name="call_settings" msgid="6112441768261754562">"Podešavanja poziva"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Kad sam nedostupan/a"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Broj kad je nedostupno"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Prosleđuje se na <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Onemogućeno"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Isključeno"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Mobilni operater ne podržava onemogućavanje preusmeravanja poziva kada je telefon nedostupan."</string>
     <string name="updating_title" msgid="6146755386174019046">"Podešavanja poziva"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Samo korisniku sa administratorskim pravima je dozvoljeno da menja podešavanja poziva."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Novi PIN sadrži nevažeće znakove."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Promena PIN-a nije uspela"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Nepodržani tip poruke. Pozovite <xliff:g id="NUMBER">%s</xliff:g> da biste je preslušali."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Podešavanja mobilne mreže"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Podešavanja za mob. mrežu"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobilna mreža"</string>
     <string name="label_available" msgid="1181658289009300430">"Dostupne mreže"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Pretražuje se…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Nisu pronađene mreže."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> maksimum je premašen\nStopa prenosa podataka smanjena je na <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪  je proteklo od ciklusa\nSledeći period počinje za <xliff:g id="USED_1">%2$d</xliff:g> dana (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Brzina prenosa podataka smanjena je na <xliff:g id="USED">%1$d</xliff:g> Kb/s ako je premašeno ograničenje za korišćenje podataka"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Više informacija o smernicama za korišćenje podataka mobilne mreže operatera"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Više informacija o smernicama za korišćenje podataka mobilne mreže operatera"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS info servisa"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS info servisa"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Omogućen je SMS info servisa"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Dodaj kontakt"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Izmeni kontakt"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Izbriši kontakt"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Pozovi kontakt"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Unesite PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Ime"</string>
     <string name="number" msgid="7905950798349903858">"Broj"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Brisanje broja za fiksno biranje…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Izbrisan je broj za fiksno biranje."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Broj za fiksno biranje nije ažuriran jer ste uneli netačan PIN kôd."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Broj za fiksno biranje nije ažuriran jer broj ne sme da premašuje 20 cifara."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Broj za fiksno biranje nije ažuriran jer je prazan ili ima više od 20 cifara."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN nije ažuriran. PIN2 je netačan ili je broj telefona odbačen."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Radnja sa brojem za fiksno biranje nije uspela."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Čita se sa SIM kartice…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Isključite režim rada u avionu ili se povežite na bežičnu mrežu da biste uputili poziv."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Izađite iz režima hitnog povratnog poziva da biste uputili poziv koji nije hitan."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Nije registrovano na mreži."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mobilna mreža nije dostupna."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Mobilna mreža nije dostupna. Povežite se na bežičnu mrežu da biste uputili poziv."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobilna mreža nije dostupna."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobilna mreža nije dostupna. Povežite se na bežičnu da biste uputili poziv."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Da biste uputili poziv, unesite važeći broj."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Poziv nije uspeo."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Trenutno nije moguće dodati poziv."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Pokretanje MMI sekvence"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Usluga nije podržana"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Zamena poziva nije uspela."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Razdvajanje poziva nije uspelo."</string>
@@ -524,11 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Unet je režim za hitan povratni poziv"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Režim za hitan povratni poziv"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Veza za prenos podataka je onemogućena"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">Nema veze za prenos podataka <xliff:g id="COUNT_1">%s</xliff:g> minuta</item>
-      <item quantity="few">Nema veze za prenos podataka <xliff:g id="COUNT_1">%s</xliff:g> minuta</item>
-      <item quantity="other">Nema veze za prenos podataka <xliff:g id="COUNT_1">%s</xliff:g> minuta</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Veza za prenos podataka neće biti dostupna do <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">Telefon će biti u Režimu hitnog povratnog poziva <xliff:g id="COUNT_1">%s</xliff:g> minut. Dok je u ovom režimu ne možete da koristite aplikacije koje koriste vezu za prenos podataka. Želite li odmah da izađete iz ovog režima?</item>
       <item quantity="few">Telefon će biti u Režimu hitnog povratnog poziva <xliff:g id="COUNT_1">%s</xliff:g> minuta. Dok je u ovom režimu ne možete da koristite aplikacije koje koriste vezu za prenos podataka. Želite li odmah da izađete iz ovog režima?</item>
@@ -554,12 +553,9 @@
     <string name="selectContact" msgid="781975788478987237">"izaberite kontakt"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Audio pozivi nisu podržani"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"biranje"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibracija"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibracija"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Vizuelna govorna pošta"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Podesite PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Promenite PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Zvuk"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Melodija zvona i vibracija"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Ugrađene SIM kartice"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Uključi video pozive"</string>
@@ -576,6 +572,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Došlo je do greške pri dekodiranju poruke."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM kartica je aktivirala uslugu i ažurirala funkcije rominga na telefonu."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Ima previše aktivnih poziva. Završite ili objedinite postojeće pozive pre nego što uputite novi."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Povezivanje nije uspelo, ubacite važeću SIM karticu."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi veza je prekinuta. Poziv je završen."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Promenite PIN kôd govorne pošte"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Nastavi"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Otkaži"</string>
diff --git a/res/values-be-rBY/arrays.xml b/res/values-be/arrays.xml
similarity index 100%
rename from res/values-be-rBY/arrays.xml
rename to res/values-be/arrays.xml
diff --git a/res/values-be/config.xml b/res/values-be/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-be/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-be-rBY/strings.xml b/res/values-be/strings.xml
similarity index 96%
rename from res/values-be-rBY/strings.xml
rename to res/values-be/strings.xml
index a230f04..ea1da46 100644
--- a/res/values-be-rBY/strings.xml
+++ b/res/values-be/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Мабільная перадача даных"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobile Data"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Тэлефонныя службы"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Экстраныя выклікі"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Тэлефон"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Адсутнічае нумар галасавой пошты"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"На SIM-карце няма нумару галасавой пошты."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Дадаць нумар"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Налады галасавой пошты можа мяняць толькі першасны карыстальнік."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Ваша SIM-карта была разблакаваная. Ваш тэлефон разблакоўваецца..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN-код разблакавання сеткі SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Разблакаваць"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Запыт разблакавання сеткі..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Запыт разблакавання сеткі няўдалы."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Сетка паспяхова разблакавана."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Налады мабільнай сеткі недаступныя для гэтага карыстальніка"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Налады мабільнай сеткі недаступныя для гэтага карыстальніка"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Налады выклікаў GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Налады выклікаў GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Налады выклікаў CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Галасавая пошта"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Галасавая пошта (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"ГП:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Апавяшчэнні"</string>
     <string name="networks" msgid="8873030692174541976">"Сеткавыя аператары"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Экстранныя трансляцыі"</string>
     <string name="call_settings" msgid="6112441768261754562">"Налады выклікаў"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Калі недасягальны"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Нумар, калі недаступны"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Пераадрасацыя на <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Адключана"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Выключаны"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Ваш аператар не падтрымлівае адключэнне пераадрасацыi выклікаў, калі тэлефон недаступны."</string>
     <string name="updating_title" msgid="6146755386174019046">"Налады выклікаў"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Налады выклікаў можа мяняць толькі адміністратар."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Новы PIN-код змяшчае несапраўдныя сімвалы."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Немагчыма змяніць PIN-код"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Гэты тып паведамлення не падтрымліваецца; каб праслухаць, патэлефануйце на <xliff:g id="NUMBER">%s</xliff:g>."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Налады сотавай сеткі"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Налады мабільнай сеткі"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Мабільная сетка"</string>
     <string name="label_available" msgid="1181658289009300430">"Даступныя сеткі"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Пошук..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Сеткі не знойдзены."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"Максімум <xliff:g id="USED_0">%1$s</xliff:g> перавышаны\nХуткасць перадачы дадзеных зніжана да <xliff:g id="USED_1">%2$d</xliff:g> Кб/с"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>?? цыклу прайшло\nНаступны перыяд пачнецца праз <xliff:g id="USED_1">%2$d</xliff:g> д. (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Хуткасць перадачы дадзеных зніжаецца да <xliff:g id="USED">%1$d</xliff:g> Кб/с, калі абмежаванне выкарыстання дадзеных перавышанае"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Дадатковая інфармацыя аб палітыцы выкарыстання даных у сетцы вашага мабільнага аператара"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Больш падрабязная інфармацыя аб палітыцы выкарыстання дадзеных у сетцы вашага мабільнага аператара"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Перадача SMS на сотавыя"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Перадача SMS на сотавыя"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Перадача SMS на сотавыя ўключана"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Дадаць кантакт"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Рэдагаваць кантакт"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Выдаліць кантакт"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Набраць нумар кантакту"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Увядзіце код PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Імя"</string>
     <string name="number" msgid="7905950798349903858">"Нумар"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Выдаленне дазволенага нумару..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Дазволены нумар выдалены."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN не быў абноўлены, таму што вы набралі няправільны PIN-код."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN не абноўлены, таму што нумар не можа бвць больш за 20 знакаў."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN не быў абноўлены, таму што нумар пусты або перавышае 20 знакаў."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"Cпiс дазволеных нумароў не адноўлены. PIN2 ўведзены няправiльна, або нумар быў адхiлены."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Аперацыя ў закрытай абаненцкай групе не ўдалася."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Чытанне з SIM-карты..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Адключыце рэжым палёту або падлучыцеся да бесправадной сеткі, каб зрабіць выклік."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Выйдзіце з рэжыму экстранных зваротных выклікаў, каб зрабіць няэкстранны выклік."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Не зарэгістраваны ў сетцы."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Мабільная сетка недаступная."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Мабільная сетка недаступная. Падлучыцеся да бесправадной сеткі, каб зрабіць выклік."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Мабільная сетка недаступная."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Мабільная сетка недаступная. Падлучыцеся да бесправадной сеткі, каб зрабіць выклік."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Каб зрабіць выклік, увядзіце сапраўдны нумар."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Збой выклiку."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Зараз немагчыма дадаць выклік."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Пачатак паслядоўнасці MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Служба не падтрымліваецца"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Немагчыма пераключыць выклікі."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Немагчыма аддзяліць выклік."</string>
@@ -524,12 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"У рэжыме аварыйнага зваротнага выкліку"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Рэжым аварыйнага зваротнага выкліку"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Падлучэнне для перадачы дадзеных адключана"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">Злучэння для перадачы даных няма на працягу <xliff:g id="COUNT_1">%s</xliff:g> хвіліны</item>
-      <item quantity="few">Злучэння для перадачы даных няма на працягу <xliff:g id="COUNT_1">%s</xliff:g> хвілін</item>
-      <item quantity="many">Злучэння для перадачы даных няма на працягу <xliff:g id="COUNT_1">%s</xliff:g> хвілін</item>
-      <item quantity="other">Злучэння для перадачы даных няма на працягу <xliff:g id="COUNT_1">%s</xliff:g> хвіліны</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Няма злучэння для перадачы даных да <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">Тэлефон пяройдзе ў рэжым экстраннага зваротнага выкліку на <xliff:g id="COUNT_1">%s</xliff:g> хвіліну. У гэтым рэжыме немагчыма карыстацца праграмамі, якія выкарыстоўваюць злучэнне для перадачы даных. Жадаеце выйсці зараз?</item>
       <item quantity="few">Тэлефон пяройдзе ў рэжым экстраннага зваротнага выкліку на <xliff:g id="COUNT_1">%s</xliff:g> хвіліны. У гэтым рэжыме немагчыма карыстацца праграмамі, якія выкарыстоўваюць злучэнне для перадачы даных. Жадаеце выйсці зараз?</item>
@@ -557,12 +555,9 @@
     <string name="selectContact" msgid="781975788478987237">"выбраць кантакт"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Галасавы выклік не падтрымліваецца"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"набор"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Вібрацыя"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Вібрацыя"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Візуальная галасавая пошта"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Задаць PIN-код"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Змяніць PIN-код"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Гук"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Рынгтон і вiбрацыя"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Убудаваныя SIM-карты"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Уключыць відэавыклікі"</string>
@@ -579,6 +574,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Памылка расшыфравання паведамлення."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM-карта актывавала вашу службу і абнавіла функцыі роўмінгу вашага тэлефона."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Занадта шмат актыўных выклікаў. Скончыце ці аб\'яднайце існуючыя выклікі, перш чым рабіць новы выклік."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Немагчыма падключыцца, устаўце сапраўдную SIM-карту."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Страчана падключэнне да Wi-Fi. Выклік завершаны."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Змяніць PIN-код галасавой пошты"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Працягнуць"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Скасаваць"</string>
diff --git a/res/values-bg/config.xml b/res/values-bg/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-bg/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index 555c72a..c2577ca 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Клетъчни данни"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Мобилни данни"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Телефонни услуги"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Набиране на спешни номера"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Телефон"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Липсващ номер на гласова поща"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"На SIM картата няма съхранен номер за гласова поща."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Добавяне на номер"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Само основният потребител може да променя настройките на гласовата поща."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"SIM картата ви е отблокирана. Телефонът ви се отключва…"</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN за отключване на SIM мрежа"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Отключване"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Изпраща се заявка за отключване на мрежата..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Заявката за отключване на мрежата не бе успешна."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Отключването на мрежата бе успешно."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Настройките за клетъчна мрежа не са налице за този потребител"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Настройките за мобилната мрежа не са налице за този потребител"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Настройки за обаждане с GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Настройки за обаждане с GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Настройки за обаждане в CDMА"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Гласова поща"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Гласова поща (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Известия"</string>
     <string name="networks" msgid="8873030692174541976">"Мрежови оператори"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Спешни излъчвания"</string>
     <string name="call_settings" msgid="6112441768261754562">"Настройки за обаждане"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Когато няма достъп"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Номер, когато няма достъп"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Пренасочва се към <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Деактивирано"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Изкл."</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Операторът ви не поддържа деактивиране на пренасочването на обаждания, когато няма връзка с телефона."</string>
     <string name="updating_title" msgid="6146755386174019046">"Настройки за обаждане"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Само администраторът може да променя настройките за обаждане."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Новият ПИН съдържа невалидни знаци."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Промяната на ПИН не е възможна"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Типът на съобщението не се поддържа. Обадете се на <xliff:g id="NUMBER">%s</xliff:g>, за да го чуете."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Настройки за клетъчна мрежа"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Настройки на мобилн. мрежа"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Мобилна мрежа"</string>
     <string name="label_available" msgid="1181658289009300430">"Налични мрежи"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Търси се…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Не са намерени мрежи."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> надвишен максимум\nСкоростта на данните е намалена до <xliff:g id="USED_1">%2$d</xliff:g> Кб/сек"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ от цикъла са изтекли\nСледващият период започва след <xliff:g id="USED_1">%2$d</xliff:g> дни (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Намаляване на скоростта на данните до <xliff:g id="USED">%1$d</xliff:g> Кб/сек, ако се превиши съответното ограничение"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Още информация относно правилата за пренос на данни през клетъчната мрежа на оператора ви"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Още информация за правилата за използване на данни на оператора ви"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS с клетъчно предаване"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS с клетъчно предаване"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"SMS съобщението с клетъчно предаване е активирано"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Добавяне на контакт"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Редактиране на контакт"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Изтриване на контакта"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Набиране на контакта"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Въведете PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Име"</string>
     <string name="number" msgid="7905950798349903858">"Номер"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Фиксираните номера за набиране се изтриват…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Фиксираните номера за набиране са изтрити."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN не бе актуализирано, защото сте въвели неправилен ПИН."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN не бе актуализирано, защото номерът не може да надвишава 20 цифри."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN не бе актуализиран, защото номерът е празен или надвишава 20 цифри."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN не е актуализирано. PIN2 бе неправилен или телефонният номер бе отхвърлен."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Операцията с фиксираните номера за набиране (FDN) не бе успешна."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Четене на данни от SIM картата…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Изключете самолетния режим или се свържете с безжична мрежа, за да осъществите обаждане."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Излезте от режима на обратно обаждане при спешност, за да можете да извършвате обаждания, които не са спешни."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Няма регистрация в мрежата."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Няма достъп до клетъчната мрежа."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Не е налице клетъчна мрежа. Свържете се с безжична, за да осъществите обаждане."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Няма мобилна мрежа."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Няма мобилна мрежа. Свържете се с безжична, за да се обадите."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"За да извършите обаждане, въведете валиден номер."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Обаждането не бе успешно."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Понастоящем обаждането не може да бъде добавено."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Стартира се последователността MMI…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Услугата не се поддържа"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Обажданията не могат да се превключат."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Обаждането не може да се отдели."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Влизане в режим на обратно обаждане при спешност"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Режим на обратно обаждане при спешност"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Връзката с данни е деактивирана"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Няма връзка за данни в продължение на <xliff:g id="COUNT_1">%s</xliff:g> минути</item>
-      <item quantity="one">Няма връзка за данни в продължение на <xliff:g id="COUNT_0">%s</xliff:g> минута</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Няма връзка за данни до <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Телефонът ще бъде в режим за обратно обаждане при спешност в продължение на <xliff:g id="COUNT_1">%s</xliff:g> минути. В този режим не могат да се използват приложения, работещи с връзка за данни. Искате ли да излезете сега?</item>
       <item quantity="one">Телефонът ще бъде в режим за обратно обаждане при спешност в продължение на <xliff:g id="COUNT_0">%s</xliff:g> минута. В този режим не могат да се използват приложения, работещи с връзка за данни. Искате ли да излезете сега?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"избиране на контакта"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Гласови обаждания не се поддържат"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"набиране"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Вибриране"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Вибриране"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Визуална гласова поща"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Задаване на ПИН"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Промяна на ПИН"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Звук"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Мелодия и вибриране"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Вградени SIM карти"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Включване на видеообажданията"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"При декодирането на съобщението възникна грешка."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM картата е активирала клетъчните ви услуги и е актуализирала възможностите за роуминг на телефона ви."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Активните обаждания са твърде много. Моля, завършете или обединете съществуващи обаждания, преди да започнете ново."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Не може да се установи връзка. Моля, поставете валидна SIM карта."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Връзката с Wi-Fi прекъсна. Обаждането завърши."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Промяна на ПИН за гласовата поща"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Напред"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Отказ"</string>
diff --git a/res/values-bn-rBD/arrays.xml b/res/values-bn/arrays.xml
similarity index 100%
rename from res/values-bn-rBD/arrays.xml
rename to res/values-bn/arrays.xml
diff --git a/res/values-bn/config.xml b/res/values-bn/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-bn/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-bn-rBD/strings.xml b/res/values-bn/strings.xml
similarity index 96%
rename from res/values-bn-rBD/strings.xml
rename to res/values-bn/strings.xml
index 533ca20..617666a 100644
--- a/res/values-bn-rBD/strings.xml
+++ b/res/values-bn/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"সেলুলার ডেটা"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"মোবাইল ডেটা"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"ফোনের পরিষেবা"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"জরুরি ডায়ালার"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"ফোন"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"ভয়েসমেল নম্বর অনুপস্থিত"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"সিম কার্ডটিতে কোনো ভয়েসমেল নম্বর সংরক্ষিত নেই৷"</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"একটি নম্বর যোগ করুন"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"ভয়েসমেল সেটিংস কেবলমাত্র প্রাথমিক ব্যবহারকারী দ্বারা পরিবর্তন করা যাবে।"</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"আপনার সিম কার্ডকে অবরোধ মুক্ত করা হয়েছে৷ আপনার ফোন আনলক করা হচ্ছে..."</string>
     <string name="label_ndp" msgid="780479633159517250">"সিম নেটওয়ার্ক আনলক পিন"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"আনলক করুন"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"নেটওয়ার্ক আনলকের অনুরোধ করা হচ্ছে..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"নেটওয়ার্ক আনলক করার অনুরোধ অসফল হয়েছে৷"</string>
     <string name="unlock_success" msgid="6770085622238180152">"নেটওয়ার্ক আনলক সফল হয়েছে৷"</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"এই ব্যবহারকারীর জন্য সেলুলার নেটওয়ার্ক সেটিংস উপলব্ধ নয়"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"মোবাইল নেটওয়ার্কের সেটিংস এই ব্যবহারকারীর জন্য উপলব্ধ নয়"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM কল সেটিংস"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM কল সেটিংস (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA কল সেটিংস"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"ভয়েসমেল"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"ভয়েসমেল (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"বিজ্ঞপ্তি"</string>
     <string name="networks" msgid="8873030692174541976">"নেটওয়ার্ক অপারেটর"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"জরুরী সম্প্রচার"</string>
     <string name="call_settings" msgid="6112441768261754562">"কল সেটিংস"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"যখন অনুপলব্ধ থাকে"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"যখন সংযোগ স্থাপন করা যাচ্ছে না তখনকার নম্বর"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> এ ফরওয়ার্ড করা হচ্ছে"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"অক্ষম করা হয়েছে"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"বন্ধ আছে"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"আপনার ক্যারিয়ার আপনার ফোনের সাথে যখন সংযোগ স্থাপন করা যাচ্ছে না সেই অবস্থায় কল ফরওয়ার্ডিংকে অক্ষম করা সমর্থন করে না৷"</string>
     <string name="updating_title" msgid="6146755386174019046">"কল সেটিংস"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"কেবলমাত্র প্রশাসক ব্যবহারকারী কল সেটিংস পরিবর্তন করতে পারবেন৷"</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"নতুন পিনে অবৈধ অক্ষর রয়েছে৷"</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"পিন পরিবর্তন করা গেল না"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"এই ধরণের বার্তা সমর্থিত নয় , শুোনার জন্য <xliff:g id="NUMBER">%s</xliff:g> এ কল করুন৷"</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"সেলুলার নেটওয়ার্ক সেটিংস"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"মোবাইল নেটওয়ার্ক সেটিংস"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"মোবাইল নেটওয়ার্ক"</string>
     <string name="label_available" msgid="1181658289009300430">"উপলব্ধ নেটওয়ার্কগুলি"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"অনুসন্ধান করছে..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"কোনো নেটওয়ার্ক পাওয়া যায়নি৷"</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> সর্বোচ্চ সীমা পেরিয়ে গেছে\nডেটার হার <xliff:g id="USED_1">%2$d</xliff:g> Kb/s এ হ্রাস করা হয়েছে"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"এই সময়কালের <xliff:g id="USED_0">%1$d</xliff:g>٪ অতিক্রান্ত হয়েছে\nপরবর্তী সময়কাল <xliff:g id="USED_1">%2$d</xliff:g> দিনের মধ্যে শুরু হবে (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"ডেটা ব্যবহারের সীমা পেরিয়ে গেলে ডেটা হারকে কমিয়ে <xliff:g id="USED">%1$d</xliff:g> Kb/s করা হয়"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"আপনার পরিষেবা প্রদানকারীর সেলুলার নেটওয়ার্ক ডেটা ব্যবহারের নীতি সম্বন্ধে আরো তথ্য"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"আপনার ক্যারিয়ারের মোবাইল নেটওয়ার্ক ডেটা ব্যবহারের নীতি সম্বন্ধে আরো তথ্য"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"সেল সম্প্রচার SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"সেল সম্প্রচার SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"সেল সম্প্রচার SMS সক্ষম করা হয়েছে"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"পরিচিতি যোগ করুন"</string>
     <string name="menu_edit" msgid="7143003705504672374">"পরিচিতি সম্পাদনা করুন"</string>
     <string name="menu_delete" msgid="3977150783449642851">"পরিচিতি মুছুন"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"পরিচিতির নম্বরে ডায়াল করুন"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2 টাইপ করুন"</string>
     <string name="name" msgid="7329028332786872378">"নাম"</string>
     <string name="number" msgid="7905950798349903858">"নম্বর"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"ডায়াল করার জন্য স্থির নম্বর মোছা হচ্ছে..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"স্থায়ী ডায়ালের নম্বর মুছে ফেলা হয়েছে৷"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"আপনি একটি ভুল পিন টাইপ করায় FDN আপডেট করা হয়নি৷"</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN আপডেট করা হয়নি কারণ নম্বরটি ২০ সংখ্যার বেশি হলে চলবে না৷"</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN আপডেট করা হয়নি কারণ নম্বরটি খালি বা ২০ সংখ্যার বেশি।"</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN আপডেট করা হয়নি৷ PIN2 ভুল ছিল, বা ফোন নম্বর বাতিল করা হয়েছে৷"</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN অপারেশন ব্যর্থ হয়েছে৷"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"সিম কার্ড থেকে পড়া হচ্ছে…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"বিমান মোড বন্ধ করুন বা কল করতে কোনো ওয়্যারলেস নেটওয়ার্কে সংযোগ করুন৷"</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"একটি সাধারণ কল করতে জরুরি কলব্যাক মোডের বাইরে আসুন৷"</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"নেটওয়ার্কে নিবন্ধিত নয়৷"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"সেলুলার নেটওয়ার্ক উপলব্ধ নয়।"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"মোবাইল নেটওয়ার্ক উপলব্ধ নেই৷ একটি কল করতে কোনো ওয়্যারলেস নেটওয়ার্কে সংযোগ করুন৷"</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"মোবাইল নেটওয়ার্ক উপলব্ধ নয়৷"</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"মোবাইল নেটওয়ার্ক উপলব্ধ নেই৷ একটি কল করতে কোনো ওয়্যারলেস নেটওয়ার্কে সংযোগ করুন৷"</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"কোনো কল স্থাপন করতে, একটি বৈধ নম্বর লিখুন৷"</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"কল ব্যর্থ হয়েছে৷"</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"এই মুহূর্তে কল যোগ করা যাবে না৷"</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI ক্রম চালু হচ্ছে…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"পরিষেবা সমর্থিত নয়"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"কলগুলি স্যুইচ করা যাবে না৷"</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"কল আলাদা করা যাবে না৷"</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"জরুরি কলব্যাক মোডে প্রবেশ করা হয়েছে"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"জরুরি কলব্যাক মোড"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"ডেটা সংযোগ অক্ষম করা হয়েছে"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one"><xliff:g id="COUNT_1">%s</xliff:g> মিনিট পর্যন্ত কোনো ডেটা সংযোগ থাকবে না</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> মিনিট পর্যন্ত কোনো ডেটা সংযোগ থাকবে না</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> পর্যন্ত কোনো ডেটা সংযোগ থাকবে না"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">ফোনটি <xliff:g id="COUNT_1">%s</xliff:g> মিনিটের জন্য জরুরী কলব্যাক মোডে থাকবে৷ এই মোডে থাকাকালীন একটি ডেটা সংযোগ ব্যবহার করে কোনো অ্যাপ্লিকেশান ব্যবহার করা যাবে না৷ আপনি কি এখনই প্রস্থান করতে চান?</item>
       <item quantity="other">ফোনটি <xliff:g id="COUNT_1">%s</xliff:g> মিনিটের জন্য জরুরী কলব্যাক মোডে থাকবে৷ এই মোডে থাকাকালীন একটি ডেটা সংযোগ ব্যবহার করে কোনো অ্যাপ্লিকেশান ব্যবহার করা যাবে না৷ আপনি কি এখনই প্রস্থান করতে চান?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"পরিচিতি নির্বাচন করুন"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"ভয়েস কলিং সমর্থিত নয়"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"ডায়াল করুন"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"কম্পন"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"কম্পন"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"ভিজ্যুয়াল ভয়েসমেল"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN সেট করুন"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"পিন পরিবর্তন করুন"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"শব্দ"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"রিংটোন ও কম্পন"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"বিল্ট-ইন সিম কার্ডগুলি"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"ভিডিও কলিং চালু করুন"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"বার্তাটি ডিকোড করার সময় একটি ত্রুটি ঘটেছে৷"</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"একটি সিম কার্ড আপনার পরিষেবা সক্রিয় করেছে এবং আপনার ফোনের রোমিং ক্ষমতা আপডেট করা হয়েছে৷"</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"অনেকগুলি কল সক্রিয় রয়েছে। অনুগ্রহ করে একটি নতুন কল করার আগে বিদ্যমান কলগুলি কেটে দিন বা এটিকে সেই কলগুলিতে অন্তর্ভুক্ত করুন।"</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"সংযোগ করা যায়নি, অনুগ্রহ করে একটি বৈধ SIM কার্ড ঢোকান৷"</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"ওয়াই-ফাই সংযোগ বিচ্ছিন্ন হয়েছে। কল কেটে গেছে।"</string>
     <string name="change_pin_title" msgid="7790232089699034029">"ভয়েসমেলের PIN পরিবর্তন করুন"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"চালিয়ে যান"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"বাতিল করুন"</string>
diff --git a/res/values-bs-rBA/arrays.xml b/res/values-bs/arrays.xml
similarity index 100%
rename from res/values-bs-rBA/arrays.xml
rename to res/values-bs/arrays.xml
diff --git a/res/values-bs/config.xml b/res/values-bs/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-bs/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-bs-rBA/strings.xml b/res/values-bs/strings.xml
similarity index 96%
rename from res/values-bs-rBA/strings.xml
rename to res/values-bs/strings.xml
index 8d222e9..85e81ca 100644
--- a/res/values-bs-rBA/strings.xml
+++ b/res/values-bs/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobilni podaci"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobilni podaci"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefonske usluge"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Hitno biranje"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Nedostaje broj govorne pošte"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Broj govorne pošte nije pohranjen na SIM kartici."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Dodaj broj"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Postavke govorne pošte može promijeniti samo Primarni korisnik."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Vaša SIM kartica je odblokirana. Telefon se otključava…"</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN za otključavanje mreže na SIM kartici"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Otključaj"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Traži se otključavanje mreže…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Neuspješan zahtjev za otključavanje mreže."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Mreža je uspješno otključana"</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Postavke mobilne mreže nisu dostupne za ovog korisnika"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Postavke mobilne mreže nisu dostupne za ovog korisnika"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Postavke za GSM poziv"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Postavke za GSM poziv (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Postavke za CDMA poziv"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Govorna pošta"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Govorna pošta (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"GP:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Obavještenja"</string>
     <string name="networks" msgid="8873030692174541976">"Mrežni operateri"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Hitna emitiranja"</string>
     <string name="call_settings" msgid="6112441768261754562">"Postavke poziva"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Kada je nedostupno"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Broj kada je nedostupno"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Preusmjerava se na <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Onemogućeno"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Isključeno"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Vaš operater ne podržava onemogućavanje preusmjeravanja poziva kada ste nedostupni."</string>
     <string name="updating_title" msgid="6146755386174019046">"Postavke poziva"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Postavke poziva može promijeniti samo administrator."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Novi PIN sadrži nevažeće znakove."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Nije moguće promijeniti PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Nepodržana vrsta poruke. Pozovite <xliff:g id="NUMBER">%s</xliff:g> da je preslušate."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Postavke mobilne mreže"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Postavke mobilne mreže"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobilna mreža"</string>
     <string name="label_available" msgid="1181658289009300430">"Dostupne mreže"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Pretraživanje…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Nije pronađena nijedna mreža."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> ograničenje je prekoračeno \nBrzina prijenosa podataka je smanjena na <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"Proteklo je <xliff:g id="USED_0">%1$d</xliff:g> ٪ ciklusa\nSljedeći period počinje za <xliff:g id="USED_1">%2$d</xliff:g> dan(a) (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Brzina prijenosa podataka se smanjuje na <xliff:g id="USED">%1$d</xliff:g> Kb/s ako se prekorači ograničenje korištenja podataka"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Više informacija o pravilima korištenja podataka mobilne mreže vašeg operatera"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Više informacija o pravilima korištenja podataka mobilne mreže vašeg operatera"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS info servisa"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS info servisa"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"SMS info servisa je omogućen"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Dodaj kontakt"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Uredi kontakt"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Izbriši kontakt"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Pozivanje kontakta"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Upišite PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Ime"</string>
     <string name="number" msgid="7905950798349903858">"Broj"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Brisanje broja fiksnog biranja u toku…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Broj fiksnog biranja je izbrisan."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN nije ažuriran jer ste upisali netačan PIN."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN nije ažuriran jer broj ne može imati više od 20 cifara."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN nije ažuriran jer je broj prazan ili ima više od 20 cifara."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN nije ažuriran. PIN2 je netačan ili je broj telefona odbijen."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN operacija nije uspjela."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Čitanje sa SIM kartice u toku…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Isključite način rada u avionu ili se povežite na bežičnu mrežu da uputite poziv."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Izađite iz načina rada za hitni povratni poziv da uputite poziv koji nije hitan."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Nije registrirano na mreži."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mobilna mreža nije dostupna."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Mobilna mreža nije dostupna. Povežite se na bežičnu mrežu da uputite poziv."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobilna mreža nije dostupna."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobilna mreža nije dostupna. Povežite se na bežičnu mrežu da uputite poziv."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Da uputite poziv, upišite važeći broj."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Poziv nije uspio."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Trenutno nije moguće dodati poziv."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Pokretanje MMI sekvence u toku…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Usluga nije podržana"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Nije moguće prebacivanje poziva."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Nije moguće odvojiti poziv."</string>
@@ -524,11 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Aktiviran način rada za hitni povratni poziv"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Način rada za hitni povratni poziv"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Podatkovna veza je onemogućena"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">Nema podatkovne veze <xliff:g id="COUNT_1">%s</xliff:g> minutu</item>
-      <item quantity="few">Nema podatkovne veze <xliff:g id="COUNT_1">%s</xliff:g> minute</item>
-      <item quantity="other">Nema podatkovne veze <xliff:g id="COUNT_1">%s</xliff:g> minuta</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Nema podatkovne veze do <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">Telefon će biti u Načinu rada za hitni povratni poziv <xliff:g id="COUNT_1">%s</xliff:g> minutu. Dok se nalazi u ovom načinu rada, ne mogu se upotrebljavati aplikacije koje koriste podatkovnu vezu. Želite li izaći iz ovog načina rada sada?</item>
       <item quantity="few">Telefon će biti u Načinu rada za hitni povratni poziv u <xliff:g id="COUNT_1">%s</xliff:g> minute. Dok se nalazi u ovom načinu rada, ne mogu se upotrebljavati aplikacije koje koriste podatkovnu vezu. Želite li izaći iz ovog načina rada sada?</item>
@@ -554,12 +553,9 @@
     <string name="selectContact" msgid="781975788478987237">"odaberi kontakt"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Glasovni pozivi nisu podržani"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"biraj"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibriranje"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibriranje"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Vizuelna govorna pošta"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Postavljanje PIN-a"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Promijeni PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Zvuk"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Melodija zvona i vibracija"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Ugrađene SIM kartice"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Uključi videopozive"</string>
@@ -576,6 +572,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Došlo je do greške prilikom dekodiranja poruke."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM kartica je aktivirala vašu uslugu i ažurirala mogućnosti rominga za telefon."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Previše aktivnih poziva. Prekinite ili spojite postojeće pozive prije upućivanja novog poziva."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Povezivanje nije moguće, umetnite važeću SIM karticu."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi veza je prekinuta. Poziv je završen."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Promijeni PIN govorne pošte"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Nastavi"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Otkaži"</string>
diff --git a/res/values-ca/config.xml b/res/values-ca/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-ca/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 416d338..9141e77 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Dades mòbils"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Dades mòbils"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Serveis del telèfon"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Marcador d\'emergència"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telèfon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Falta el número de la bústia de veu"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"No hi ha cap número de bústia de veu emmagatzemat a la targeta SIM."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Afegeix número"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Només l\'usuari principal pot modificar la configuració dels missatges de veu."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"La targeta SIM s\'ha desbloquejat. El telèfon s\'està desbloquejant..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN de desbloqueig de xarxa SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Desbloqueja"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"S\'està sol·licitant el desbloqueig de la xarxa..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Sol·licitud de desbloqueig de xarxa incorrecta."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Desbloqueig de la xarxa correcte."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"La configuració de la xarxa mòbil no està disponible per a aquest usuari."</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"La configuració de la xarxa per a mòbils no està disponible per a aquest usuari."</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Configuració de trucades GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Configuració de trucades GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Configuració de trucades CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Bústia de veu"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Bústia de veu (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"CV:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Notificacions"</string>
     <string name="networks" msgid="8873030692174541976">"Operadors de xarxa"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Missatges d\'emergència"</string>
     <string name="call_settings" msgid="6112441768261754562">"Configuració de trucada"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"No localitzable"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Número quan no es pugui localitzar"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"S\'està desviant a <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Desactivat"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Desactivat"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"El teu operador de telefonia mòbil no permet desactivar la desviació de trucades quan el telèfon estigui il·localitzable."</string>
     <string name="updating_title" msgid="6146755386174019046">"Configuració de trucada"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Només l\'administrador pot canviar la configuració de trucades."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"El PIN nou conté caràcters que no són vàlids."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"No es pot canviar el PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Aquest tipus de missatge no s\'admet. Truca al <xliff:g id="NUMBER">%s</xliff:g> per escoltar-lo."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Configuració de la xarxa mòbil"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Configuració de la xarxa mòbil"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Xarxa mòbil"</string>
     <string name="label_available" msgid="1181658289009300430">"Xarxes disponibles"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"S\'està cercant…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"No s\'ha trobat cap xarxa."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> màxim superat\nVelocitat de dades reduïda a <xliff:g id="USED_1">%2$d</xliff:g> kbps"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ del cicle transcorregut\nEl període següent comença d\'aquí a <xliff:g id="USED_1">%2$d</xliff:g> dies (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"La velocitat de dades es redueix a <xliff:g id="USED">%1$d</xliff:g> kbps si se supera el límit d\'ús de dades"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Més informació sobre la política d\'us de dades de la xarxa mòbil de l\'operador de telefonia mòbil"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Més informació sobre la política d\'us de dades de la xarxa mòbil de l\'operador"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS de difusió de cel·la"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS de difusió de cel·la"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"SMS de difusió de cel·la activat"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Afegeix un contacte"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Edita el contacte"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Suprimeix el contacte"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Marca el número d\'un contacte"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Escriu el PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Nom"</string>
     <string name="number" msgid="7905950798349903858">"Número"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"S\'està suprimint el número de marcatge fix..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Número de marcatge fix suprimit."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN no s\'ha actualitzat ja que has escrit un PIN incorrecte."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN no s\'ha actualitzat ja que el nombre no pot excedir els 20 dígits."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN no s\'ha actualitzat perquè el número està buit o conté més de 20 dígits."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"El número FDN no s\'ha actualitzat. El PIN2 no és correcte o bé s\'ha rebutjat el número de telèfon."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Hi ha hagut un problema en l\'operació FDN."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Lectura de la targeta SIM..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Per fer una trucada, desactiva el mode d\'avió o connecta amb una xarxa sense fil."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Surt del mode de devolució de trucada d\'emergència per fer un altre tipus de trucada."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"No registrat a la xarxa."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"La xarxa mòbil no està disponible."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"La xarxa mòbil no està disponible. Per fer una trucada, connecta amb una xarxa sense fil."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"La xarxa mòbil no està disponible."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"La xarxa mòbil no està disponible. Per fer una trucada, connecta\'t a una xarxa sense fil."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Per realitzar una trucada, introdueix un número vàlid."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"No s\'ha pogut fer la trucada."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"En aquest moment no es pot afegir la trucada."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"S\'està iniciant la seqüència MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"El servei no és compatible."</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"No es pot canviar de trucada."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"No es pot separar la trucada."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"S\'ha activat al mode de devolució de trucada d\'emergència"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Mode de devolució de trucada d\'emergència"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Connexió de dades desactivada"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">No hi ha hagut connexió de dades durant <xliff:g id="COUNT_1">%s</xliff:g> minuts</item>
-      <item quantity="one">No hi ha hagut connexió de dades durant <xliff:g id="COUNT_0">%s</xliff:g> minut</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"No hi haurà connexió de dades fins a les <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">El telèfon estarà en mode de devolució de trucades d\'emergència durant <xliff:g id="COUNT_1">%s</xliff:g> minuts. Durant aquest temps, no es podrà utilitzar cap aplicació que faci servir una connexió de dades. Vols sortir ara?</item>
       <item quantity="one">El telèfon estarà en mode de devolució de trucades d\'emergència durant <xliff:g id="COUNT_0">%s</xliff:g> minut. Durant aquest temps, no es podrà utilitzar cap aplicació que faci servir una connexió de dades. Vols sortir ara?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"selecciona el contacte"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"No s\'admeten les trucades de veu"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"marca"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibra"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibra"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Bústia de veu visual"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Defineix el PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Canvia el PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"So"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"So i vibració"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Targetes SIM integrades"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Activa les videotrucades"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"S\'ha produït un error en descodificar el missatge."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Una targeta SIM ha activat el servei, i s\'ha actualitzat la funció d\'itinerància del telèfon."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Hi ha massa trucades actives. Finalitza\'n alguna o combina-les abans de fer-ne una de nova."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"No es pot establir la connexió. Insereix una targeta SIM vàlida."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"La trucada ha finalitzat perquè s\'ha perdut la connexió Wi-Fi."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Canvia el PIN per a la bústia de veu"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Continua"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Cancel·la"</string>
diff --git a/res/values-cs/config.xml b/res/values-cs/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-cs/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index a2ce340..4b0964c 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobilní data"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobilní data"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefonní služby"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Tísňové volání"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Chybí číslo hlasové schránky"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Na SIM kartě není uloženo žádné číslo hlasové schránky."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Přidat číslo"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Nastavení hlasové schránky může změnit pouze primární uživatel."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"SIM karta byla odblokována. Telefon se odblokovává..."</string>
     <string name="label_ndp" msgid="780479633159517250">"Kód PIN odblokování sítě pro SIM kartu"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Odemknout"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Žádost o odblokování sítě..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Požadavek na odblokování sítě se nezdařil."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Síť byla úspěšně odblokována."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Nastavení mobilní sítě pro tohoto uživatele není dostupné."</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Nastavení mobilní sítě pro tohoto uživatele není dostupné."</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Nastavení hovorů GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Nastavení hovorů GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Nastavení hovorů CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Hlasová schránka"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Hlasová schránka (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"HS:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Oznámení"</string>
     <string name="networks" msgid="8873030692174541976">"Síťoví operátoři"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Výstražné zprávy o výjimečné situaci"</string>
     <string name="call_settings" msgid="6112441768261754562">"Nastavení hovorů"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Při nedostupnosti"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Číslo při nedostupnosti"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Hovory budou přesměrovány na číslo <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Vypnuto"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Vypnuto"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Váš operátor neumožňuje deaktivovat přesměrování hovorů, když je telefon nedostupný."</string>
     <string name="updating_title" msgid="6146755386174019046">"Nastavení hovorů"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Nastavení hovorů může změnit pouze uživatel s oprávněním administrátora."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Nový kód PIN obsahuje neplatné znaky."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Kód PIN se nepodařilo změnit"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Nepodporovaný typ zprávy, pokud si ji chcete poslechnout zavolejte na číslo <xliff:g id="NUMBER">%s</xliff:g>."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Nastavení mobilní sítě"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Nastavení mobilní sítě"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobilní síť"</string>
     <string name="label_available" msgid="1181658289009300430">"Dostupné sítě"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Vyhledávání..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Žádná síť nebyla nalezena."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"Byl překročen limit <xliff:g id="USED_0">%1$s</xliff:g>\nPřenosová rychlost byla snížena na <xliff:g id="USED_1">%2$d</xliff:g> kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"Uplynulo <xliff:g id="USED_0">%1$d</xliff:g>٪ cyklu\nPočet dní do začátku dalšího období: <xliff:g id="USED_1">%2$d</xliff:g> (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"V případě překročení limitu využití dat se přenosová rychlost sníží na <xliff:g id="USED">%1$d</xliff:g> kb/s"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Další informace o zásadách využití dat v mobilní síti vašeho mobilního operátora"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Další informace o zásadách využití dat v mobilní síti vašeho mobilního operátora"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Zprávy SMS informační služby"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Zprávy SMS informační služby"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Zprávy SMS informační služby povoleny"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Přidat kontakt"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Upravit kontakt"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Smazat kontakt"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Vytočit kontakt"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Zadejte kód PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Jméno"</string>
     <string name="number" msgid="7905950798349903858">"Číslo"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Mazání povoleného telefonního čísla..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Povolené telefonní číslo bylo smazáno."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Funkce Povolená tel. čísla nebyla aktualizována, protože jste zadali chybný kód PIN."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Funkce Povolená tel. čísla nebyla aktualizována, protože číslo nesmí obsahovat více než 20 číslic."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Funkce Povolená telefonní čísla nebyla aktualizována, protože číslo je prázdné nebo obsahuje více než 20 číslic."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"Povolená tel. čísla (FDN) nebyla aktualizována. Kód PIN2 byl nesprávný nebo bylo telefonní číslo odmítnuto."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Operace s čísly FDN se nezdařila."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Čtení ze SIM karty..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Chcete-li se připojit k bezdrátové síti a provést hovor, vypněte režim Letadlo."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Chcete-li uskutečnit běžný hovor, opusťte režim tísňového volání."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Přihlášení k síti nebylo úspěšné."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mobilní síť je nedostupná."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Mobilní síť není k dispozici. Chcete-li provést hovor, připojte se k bezdrátové síti."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobilní síť je nedostupná."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobilní síť není k dispozici. Pokud chcete provést hovor, připojte se k bezdrátové síti."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Chcete-li uskutečnit hovor, zadejte platné telefonní číslo."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Volání se nezdařilo."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Hovor teď není možné přidat."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Spouštění sekvence MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Služba není podporována."</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Hovory nelze přepnout."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Hovor nelze rozdělit."</string>
@@ -524,12 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Byl aktivován režim tísňového zpětného volání"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Režim tísňového zpětného volání"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Datové spojení zakázáno"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="few"><xliff:g id="COUNT_1">%s</xliff:g> minuty nebude k dispozici datové připojení</item>
-      <item quantity="many"><xliff:g id="COUNT_1">%s</xliff:g> minuty nebude k dispozici datové připojení</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> minut nebude k dispozici datové připojení</item>
-      <item quantity="one"><xliff:g id="COUNT_0">%s</xliff:g> minutu nebude k dispozici datové připojení</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Datové připojení nebude dostupné do <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="few">]Telefon bude <xliff:g id="COUNT_1">%s</xliff:g> minuty v režimu zpětného tísňového volání. V tomto režimu nelze používat aplikace, které používají datové připojení. Chcete akci nyní ukončit?</item>
       <item quantity="many">]Telefon bude <xliff:g id="COUNT_1">%s</xliff:g> minuty v režimu zpětného tísňového volání. V tomto režimu nelze používat aplikace, které používají datové připojení. Chcete akci nyní ukončit?</item>
@@ -557,12 +555,9 @@
     <string name="selectContact" msgid="781975788478987237">"vybrat kontakt"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Hlasové volání není podporováno"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"vytáčení"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibrace"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibrace"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Vizuální hlasová schránka"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Nastavte kód PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Změnit kód PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Zvuk"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Vyzvánění a vibrace"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Vestavěné SIM karty"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Zapnout videohovory"</string>
@@ -579,6 +574,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Při dekódování zprávy došlo k chybě."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM karta aktivovala vaši službu a byly aktualizovány roamingové možnosti telefonu."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Máte příliš mnoho aktivních hovorů. Ukončete nebo spojte stávající hovory, než zahájíte nový."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Připojení se nezdařilo, vložte prosím platnou SIM kartu."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Bylo ztraceno připojení Wi-Fi. Hovor byl ukončen."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Změňte kód PIN hlasové schránky"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Pokračovat"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Zrušit"</string>
diff --git a/res/values-da/config.xml b/res/values-da/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-da/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index f34255b..da17397 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobildata"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobildata"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Opkaldstjenester"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Nødopkald"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Opkald"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Telefonsvarernummer mangler"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Der er ikke gemt noget telefonsvarernummer på SIM-kortet."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Tilføj nummer"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Indstillingerne for telefonsvareren kan kun ændres af den primære bruger."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Blokeringen af dit SIM-kort er blevet ophævet. Din telefon låser op ..."</string>
     <string name="label_ndp" msgid="780479633159517250">"Pinkode til oplåsning af SIM-netværket"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Lås op"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Anmoder om oplåsning af netværk ..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Anmodningen om oplåsning af netværk mislykkedes."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Netværket blev låst op."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Denne bruger har ikke adgang til indstillingerne for mobilnetværk"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Denne bruger har ikke adgang til mobilnetværksindstillinger"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Indstillinger for GSM-opkald"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Indstillinger for GSM-opkald (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Indstillinger for CDMA-opkald"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Telefonsvarer"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Telefonsvarer (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Underretninger"</string>
     <string name="networks" msgid="8873030692174541976">"Netværksudbydere"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Nødudsendelser"</string>
     <string name="call_settings" msgid="6112441768261754562">"Indstillinger for opkald"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Ved utilgængelig"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Nummer ved utilgængelig"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Viderestiller til <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Deaktiveret"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Fra"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Dit mobilselskab understøtter ikke deaktivering af viderestilling af opkald, når telefonen ikke er tilgængelig."</string>
     <string name="updating_title" msgid="6146755386174019046">"Indstillinger for opkald"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Opkaldsindstillingerne kan kun ændres af administratorbrugeren."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Den nye pinkode har ugyldige tegn."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Pinkoden kan ikke ændres"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Ikke-understøttet beskedtype. Ring til <xliff:g id="NUMBER">%s</xliff:g> for at aflytte."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Indstillinger for mobilnetværk"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Indstillinger for mobilnetværk"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobilnetværk"</string>
     <string name="label_available" msgid="1181658289009300430">"Tilgængelige netværk"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Søger..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Der blev ikke fundet nogen netværk."</string>
@@ -237,7 +240,7 @@
     <!-- no translation found for throttle_time_frame_subtext (7732763021560399960) -->
     <skip />
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Datahastigheden er nedsat til <xliff:g id="USED">%1$d</xliff:g> Kb/s, hvis datagrænsen overskrides"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Flere oplysninger om mobilselskabets politik vedrørende dataforbrug på netværket"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Oplysninger om mobilselskabets politik om databrug på netværket"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Cell Broadcast-sms"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Cell Broadcast-sms"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Cell Broadcast-sms aktiveret"</string>
@@ -374,6 +377,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Tilføj kontakt"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Rediger kontakt"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Slet kontakt"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Ring til kontaktperson"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Indtast PIN2-kode"</string>
     <string name="name" msgid="7329028332786872378">"Navn"</string>
     <string name="number" msgid="7905950798349903858">"Nummer"</string>
@@ -388,7 +392,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Sletter nummer til begrænset opkald..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Nummeret til begrænset opkald blev slettet."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Nummeret til begrænset opkald blev ikke opdateret, fordi du har indtastet en forkert pinkode."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Nummeret til begrænset opkald blev ikke opdateret, fordi nummeret ikke må overstige 20 cifre."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN blev ikke opdateret, fordi antallet er tomt eller overstiger 20 cifre."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"Nummeret til begrænset opkald blev ikke opdateret. PIN2-koden var forkert, eller telefonnummeret blev afvist."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Handlingen mislykkedes."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Læser fra SIM-kort ..."</string>
@@ -450,12 +454,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Slå flytilstand fra, eller opret forbindelse til et trådløst netværk for at foretage et opkald."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Afslut nødtilbagekaldstilstand for at foretage et almindeligt opkald."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Ikke registreret på netværk."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mobilnetværket er ikke tilgængeligt."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Mobilnetværk er ikke tilgængeligt. Opret forbindelse til et trådløst netværk for at foretage et opkald."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobilnetværket er ikke tilgængeligt."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobilnetværk er ikke tilgængeligt. Opret forbindelse til et trådløst netværk for at foretage et opkald."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Indtast et gyldigt nummer for at foretage et opkald."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Opkald mislykkedes."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Opkaldet kan ikke tilføjes på nuværende tidspunkt."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Starter MMI-sekvens ..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Tjenesten er ikke understøttet"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Kan ikke skifte opkald."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Kan ikke adskille opkald."</string>
@@ -530,10 +533,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Gik i nødtilbagekaldstilstand"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Nødtilbagekaldstilstand"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Dataforbindelsen er deaktiveret"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">Ingen dataforbindelse i <xliff:g id="COUNT_1">%s</xliff:g> minutter</item>
-      <item quantity="other">Ingen dataforbindelse i <xliff:g id="COUNT_1">%s</xliff:g> minutter</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Der er ingen dataforbindelse før kl. <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">Telefonen vil være i tilstanden Nødopkald i <xliff:g id="COUNT_1">%s</xliff:g> minutter. Mens denne tilstand er aktiveret, kan du ikke bruge nogen applikationer, der kræver dataforbindelse. Vil du afslutte denne tilstand nu?</item>
       <item quantity="other">Telefonen vil være i tilstanden Nødopkald i <xliff:g id="COUNT_1">%s</xliff:g> minutter. Mens denne tilstand er aktiveret, kan du ikke bruge nogen applikationer, der kræver dataforbindelse. Vil du afslutte denne tilstand nu?</item>
@@ -557,12 +557,9 @@
     <string name="selectContact" msgid="781975788478987237">"vælg kontaktperson"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Taleopkald understøttes ikke"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"ring op"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibration"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibration"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Visuel telefonsvarer"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Angiv pinkode"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Skift pinkode"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Lyd"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Ringetone og vibration"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Indbyggede SIM-kort"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Slå videoopkald til"</string>
@@ -579,6 +576,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Der opstod en fejl under afkodning af beskeden."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Et SIM-kort har aktiveret din tjeneste og opdateret telefonens roamingmuligheder."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Der er for mange aktive opkald. Afslut et opkald, eller flet eksisterende opkald, inden du foretager et nyt."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Forbindelsen kunne ikke oprettes. Indsæt et gyldigt SIM-kort."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Du mistede Wi-Fi-forbindelsen. Opkaldet blev afsluttet."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Skift pinkode til din telefonsvarer"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Fortsæt"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Annuller"</string>
diff --git a/res/values-de/config.xml b/res/values-de/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-de/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index a0ef65b..e07e304 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobilfunkdaten"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobilfunk"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefondienste"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Notruf"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Fehlende Mailbox-Nummer"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Auf der SIM-Karte ist keine Mailbox-Nummer gespeichert."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Nummer hinzufügen"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Mailboxeinstellungen können nur vom primären Nutzer geändert werden."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Deine SIM-Karte wurde entsperrt. Dein Telefon wird nun entsperrt..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN zur Entsperrung des SIM-Netzwerks"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Entsperren"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Netzwerkentsperrung wird angefordert..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Anfrage für Entsperrung des Netzwerks war nicht erfolgreich."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Entsperrung des Netzwerks nicht erfolgreich."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Die Einstellungen für Mobilfunknetze sind für diesen Nutzer nicht verfügbar."</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Mobile Netzwerkeinstellungen sind für diesen Nutzer nicht verfügbar."</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM-Anrufeinstellungen"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM-Anrufeinstellungen (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA-Anrufeinstellungen"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Mailbox"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Mailbox (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"MB:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Benachrichtigungen"</string>
     <string name="networks" msgid="8873030692174541976">"Mobilfunkanbieter"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Notfallbenachrichtigungen"</string>
     <string name="call_settings" msgid="6112441768261754562">"Anrufeinstellungen"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Wenn nicht erreichbar"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Nummer falls nicht erreichbar"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Weiterleitung an <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Deaktiviert"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Aus"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Dein Mobilfunkanbieter unterstützt die Deaktivierung der Anrufweiterleitung bei Nichterreichbarkeit nicht."</string>
     <string name="updating_title" msgid="6146755386174019046">"Anrufeinstellungen"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Anrufeinstellungen können nur vom Administrator geändert werden."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Die neue PIN enthält ungültige Zeichen."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN kann nicht geändert werden"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Nicht unterstützter Nachrichtentyp, zum Abhören <xliff:g id="NUMBER">%s</xliff:g> anrufen."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Einstellungen für Mobilfunknetze"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Einstellungen für Mobilfunknetze"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobilfunknetz"</string>
     <string name="label_available" msgid="1181658289009300430">"Verfügbare Netzwerke"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Suche läuft..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Keine Netzwerke gefunden"</string>
@@ -235,7 +238,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"Maximum von <xliff:g id="USED_0">%1$s</xliff:g> wurde überschritten.\nDatenrate wurde auf <xliff:g id="USED_1">%2$d</xliff:g> kbit/s reduziert."</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g> % des Zyklus sind verstrichen. \nDer nächste Zeitraum beginnt in <xliff:g id="USED_1">%2$d</xliff:g> Tagen (<xliff:g id="USED_2">%3$s</xliff:g>)."</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Datenrate wird auf <xliff:g id="USED">%1$d</xliff:g> kbit/s reduziert, wenn Datennutzungslimit überschritten wird."</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Weitere Informationen zu den Richtlinien deines Mobilfunkanbieters zur Nutzung der Mobilfunkdaten"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Weitere Informationen über die Richtlinien deines Mobilfunkanbieters zur Nutzung der Mobilfunknetzdaten"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Cell Broadcast SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Cell Broadcast SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Cell Broadcast SMS aktiviert"</string>
@@ -372,6 +375,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Kontakt hinzufügen"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Kontakt bearbeiten"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Kontakt löschen"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Nummer des Kontakts wählen"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2 eingeben"</string>
     <string name="name" msgid="7329028332786872378">"Name"</string>
     <string name="number" msgid="7905950798349903858">"Nummer"</string>
@@ -386,7 +390,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Zugelassene Rufnummer wird gelöscht..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Zugelassene Rufnummer gelöscht"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Die Liste der zugelassenen Rufnummern konnte nicht aktualisiert werden, da du eine falsche PIN eingegeben hast."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Die Liste der zugelassenen Rufnummern konnte nicht aktualisiert werden, da die Nummer maximal 20 Ziffern haben darf."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Die Rufnummernbeschränkung wurde nicht aktualisiert, da die Nummer leer ist oder 20 Zeichen überschreitet."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"Die Liste der zugelassenen Rufnummern konnte nicht aktualisiert werden. Die eingegebene PIN2 ist ungültig oder die Rufnummer wurde abgelehnt."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Fehler bei der Rufnummernbeschränkung"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"SIM-Karte wird ausgelesen..."</string>
@@ -448,12 +452,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Deaktiviere zum Telefonieren den Flugmodus oder stelle eine WLAN-Verbindung her."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Beende den Notfallrückrufmodus, um einen Anruf zu tätigen, bei dem es sich nicht um einen Notfall handelt."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Nicht in Netzwerk registriert."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mobilfunknetz nicht verfügbar"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Es ist kein Mobilfunknetz verfügbar. Stelle zum Telefonieren eine WLAN-Verbindung her."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobilfunknetz ist nicht verfügbar."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Es ist kein Mobilfunknetz verfügbar. Stelle zum Telefonieren eine WLAN-Verbindung her."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Gib eine gültige Nummer ein."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Fehler beim Anruf."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Der Anruf kann momentan nicht hinzugefügt werden."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI-Sequenz wird gestartet..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Dienst wird nicht unterstützt"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Anruf kann nicht gewechselt werden."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Anruf kann nicht getrennt werden."</string>
@@ -528,10 +531,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Notfallrückrufmodus aktiviert"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Notfallrückrufmodus"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Datenverbindung deaktiviert"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> Minuten lang keine Datenverbindung</item>
-      <item quantity="one"><xliff:g id="COUNT_0">%s</xliff:g> Minute lang keine Datenverbindung</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Keine Datenverbindung bis <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Das Smartphone wird <xliff:g id="COUNT_1">%s</xliff:g> Minuten lang in den Notfallrückrufmodus versetzt. In dieser Zeit können Apps mit Datenverbindung nicht genutzt werden. Möchtest du den Vorgang jetzt abbrechen?</item>
       <item quantity="one">Das Smartphone wird <xliff:g id="COUNT_0">%s</xliff:g> Minute lang in den Notfallrückrufmodus versetzt. In dieser Zeit können Apps mit Datenverbindung nicht genutzt werden. Möchtest du den Vorgang jetzt abbrechen?</item>
@@ -555,12 +555,9 @@
     <string name="selectContact" msgid="781975788478987237">"Kontakt wählen"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Sprachanruf wird nicht unterstützt."</string>
     <string name="description_dial_button" msgid="7459705245418435351">"Wählen"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibration"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibration"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Visuelle Mailbox"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN festlegen"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"PIN ändern"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Töne"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Klingelton &amp; Vibration"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Integrierte SIM-Karten"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Videoanrufe aktivieren"</string>
@@ -577,6 +574,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Beim Entschlüsseln der Nachricht ist ein Fehler aufgetreten."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Eine SIM-Karte hat deinen Dienst aktiviert und die Roamingfunktionen deines Smartphones aktualisiert."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Zu viele aktive Anrufe. Beende aktive Anrufe oder führe sie zusammen, bevor du einen neuen Anruf tätigst."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Verbindung kann nicht hergestellt werden. Lege eine gültige SIM-Karte ein."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"WLAN-Verbindung unterbrochen. Anruf beendet."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Mailbox-PIN ändern"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Weiter"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Abbrechen"</string>
diff --git a/res/values-el/config.xml b/res/values-el/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-el/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index 81f2046..1bef75b 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Δεδομένα κινητής τηλεφωνίας"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Δεδομένα κινητής συσκευής"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Υπηρεσίες τηλεφώνου"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Πρόγραμμα κλήσης έκτακτης ανάγκης"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Τηλέφωνο"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Λείπει ο αριθμός αυτόματου τηλεφωνητή"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Δεν έχει αποθηκευτεί αριθμός για τον αυτόματο τηλεφωνητή στην κάρτα SIM."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Προσθήκη αριθμού"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Οι ρυθμίσεις αυτόματου τηλεφωνητή μπορούν να αλλάξουν μόνο από τον κύριο χρήστη."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Καταργήθηκε ο αποκλεισμός της κάρτας SIM. Το τηλέφωνό σας ξεκλειδώνεται..."</string>
     <string name="label_ndp" msgid="780479633159517250">"Αριθμός PIN ξεκλειδώματος δικτύου κάρτας SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Ξεκλείδωμα"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Αίτηση ξεκλειδώματος δικτύου..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Ανεπιτυχές αίτημα ξεκλειδώματος δικτύου."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Το ξεκλείδωμα δικτύου ήταν επιτυχές."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Οι ρυθμίσεις δικτύου κινητής τηλεφωνίας δεν είναι διαθέσιμες για αυτόν το χρήστη"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Οι ρυθμίσεις δικτύου κινητής τηλεφωνίας δεν είναι διαθέσιμες γι\' αυτόν το χρήστη"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Ρυθμίσεις κλήσης GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Ρυθμίσεις κλήσης GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Ρυθμίσεις κλήσης CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Αυτόματος τηλεφωνητής"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Τηλεφωνητής (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"ΑΤ:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Ειδοποιήσεις"</string>
     <string name="networks" msgid="8873030692174541976">"Εταιρείες δικτύου"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Εκπομπές έκτακτης ανάγκης"</string>
     <string name="call_settings" msgid="6112441768261754562">"Ρυθμίσεις κλήσης"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Όταν δεν είμαι διαθέσιμος/η"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Αριθμός όταν δεν είμαι διαθέσιμος/η"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Προώθηση στο <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Απενεργοποιημένη"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Ανενεργό"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Η εταιρεία κινητής τηλεφωνίας δεν υποστηρίζει την απενεργοποίηση της προώθησης κλήσεων όταν το τηλέφωνό σας δεν έχει σήμα."</string>
     <string name="updating_title" msgid="6146755386174019046">"Ρυθμίσεις κλήσης"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Οι ρυθμίσεις κλήσεων μπορούν να αλλάξουν μόνο από τον χρήστη που έχει ρόλο διαχειριστή."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Το νέο PIN περιέχει μη έγκυρους χαρακτήρες."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Δεν είναι δυνατή η αλλαγή του PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Μη υποστηριζόμενος τύπος μηνύματος: καλέστε στο <xliff:g id="NUMBER">%s</xliff:g> για να το ακούσετε."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Ρυθμίσεις δικτ. κιν. τηλ."</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Ρυθμίσεις δικτύου κινητής τηλεφωνίας"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Δίκτυο κινητής τηλεφωνίας"</string>
     <string name="label_available" msgid="1181658289009300430">"Διαθέσιμα δίκτυα"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Αναζήτηση..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Δεν βρέθηκαν δίκτυα."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"Συμπληρώθηκε το μέγιστο όριο <xliff:g id="USED_0">%1$s</xliff:g>\nΗ ταχύτητα δεδομένων μειώθηκε σε <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"Έχει περάσει το <xliff:g id="USED_0">%1$d</xliff:g>٪ του κύκλου\nΗ επόμενη περίοδος ξεκινά σε <xliff:g id="USED_1">%2$d</xliff:g> ημέρες (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Εάν το όριο χρήσης δεδομένων ξεπεραστεί, τότε η ταχύτητα δεδομένων θα μειωθεί σε <xliff:g id="USED">%1$d</xliff:g> Kb/s"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Περισσότερες πληροφορίες σχετικά με την πολιτική χρήσης δεδομένων στο δίκτυο της εταιρείας κινητής τηλεφωνίας που χρησιμοποιείτε"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Περισσότερες πληροφορίες σχετικά με την πολιτική χρήσης δεδομένων στο δίκτυο της εταιρείας κινητής τηλεφωνίας"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Cell Broadcast SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Cell Broadcast SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Ενεργοποιήθηκε η μετάδοση SMS μέσω κινητού τηλεφώνου"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Προσθήκη επαφής"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Επεξεργασία επαφής"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Διαγραφή επαφής"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Κλήση επαφής"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Τύπος PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Όνομα"</string>
     <string name="number" msgid="7905950798349903858">"Αριθμός"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Διαγραφή καθορισμένου αριθμού κλήσης…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Ο καθορισμένος αριθμός κλήσης διαγράφηκε."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Το FDN δεν ενημερώθηκε, επειδή πληκτρολογήσατε εσφαλμένο PIN."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Το FDN δεν ενημερώθηκε διότι ο αριθμός δεν μπορεί να ξεπερνάει τα 20 ψηφία."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Το FDN δεν ενημερώθηκε, επειδή ο αριθμός είναι κενός ή ξεπερνάει τα 20 ψηφία."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"Δεν έγινε ενημέρωση του FDN. Το PIN2 ήταν λανθασμένο ή ο αριθμός του τηλεφώνου απορρίφθηκε."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Αποτυχία λειτουργίας FDN."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Ανάγνωση από κάρτα SIM…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Απενεργοποιήστε τη λειτουργία πτήσης ή συνδεθείτε σε ένα ασύρματο δίκτυο για να πραγματοποιήσετε μια κλήση."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Πραγματοποιήστε έξοδο από τη λειτουργία επιστροφής κλήσης έκτακτης ανάγκης για να πραγματοποιήσετε μια κλήση μη έκτακτης ανάγκης."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Δεν έχετε εγγραφεί στο δίκτυο."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Το δίκτυο κινητής τηλεφωνίας δεν είναι διαθέσιμο."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Το δίκτυο κινητής τηλεφωνίας δεν είναι διαθέσιμο. Συνδεθείτε σε ένα ασύρματο δίκτυο για να πραγματοποιήσετε μια κλήση."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Το δίκτυο κινητής τηλεφωνίας δεν είναι διαθέσιμο."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Το δίκτυο κινητής τηλεφωνίας δεν είναι διαθέσιμο. Συνδεθείτε σε ένα ασύρματο δίκτυο για να πραγματοποιήσετε μια κλήση."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Για να πραγματοποιήσετε κλήση, εισαγάγετε έναν έγκυρο αριθμό."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Η κλήση απέτυχε."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Δεν είναι δυνατή η προσθήκη κλήσης αυτήν τη στιγμή."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Έναρξη ακολουθίας MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Η υπηρεσία δεν υποστηρίζεται"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Δεν είναι δυνατή η εναλλαγή κλήσεων."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Δεν είναι δυνατός ο διαχωρισμός της κλήσης."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Είσοδος σε λειτουργία επιστροφής κλήσης έκτακτης ανάγκης"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Λειτουργία επιστροφής κλήσης έκτακτης ανάγκης"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Απενεργοποιήθηκε η σύνδεση δεδομένων"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Δεν θα υπάρχει σύνδεση δεδομένων για <xliff:g id="COUNT_1">%s</xliff:g> λεπτά</item>
-      <item quantity="one">Δεν θα υπάρχει σύνδεση δεδομένων για <xliff:g id="COUNT_0">%s</xliff:g> λεπτό</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Χωρίς σύνδεση δεδομένων έως <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Το τηλέφωνο θα βρίσκεται σε κατάσταση \"Επείγουσας επιστροφής κλήσης\" για <xliff:g id="COUNT_1">%s</xliff:g> λεπτά. Σε αυτήν την κατάσταση, δεν είναι δυνατή η χρήση εφαρμογών που χρησιμοποιούν σύνδεση δεδομένων. Θέλετε να εξέλθετε τώρα;</item>
       <item quantity="one">Το τηλέφωνο θα βρίσκεται σε κατάσταση \"Επείγουσας επιστροφής κλήσης\" για <xliff:g id="COUNT_0">%s</xliff:g> λεπτό. Σε αυτήν την κατάσταση, δεν είναι δυνατή η χρήση εφαρμογών που χρησιμοποιούν σύνδεση δεδομένων. Θέλετε να εξέλθετε τώρα;</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"επιλογή επαφής"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Η φωνητική κλήση δεν υποστηρίζεται"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"κλήση"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Δόνηση"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Δόνηση"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Οπτικός αυτόματος τηλεφ."</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Ορισμός PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Αλλαγή PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Ήχος"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Ήχος κλήσης &amp; δόνηση"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Ενσωματωμένες κάρτες SIM"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Ενεργοποίηση βιντεοκλήσεων"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Παρουσιάστηκε κάποιο σφάλμα κατά την αποκωδικοποίηση του μηνύματος."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Μια κάρτα SIM ενεργοποίησε την υπηρεσία σας και ενημέρωσε τις δυνατότητες περιαγωγής του τηλεφώνου σας."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Υπάρχουν πάρα πολλές ενεργές κλήσεις. Τερματίστε ή να συγχωνεύστε τις υπάρχουσες κλήσεις πριν πραγματοποιήσετε νέα."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Δεν είναι δυνατή η σύνδεση. Τοποθετήστε μια έγκυρη κάρτα SIM."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Η σύνδεση Wi-Fi χάθηκε. Η κλήση τερματίστηκε."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Αλλαγή PIN αυτόματου τηλεφωνητή"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Συνέχεια"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Ακύρωση"</string>
diff --git a/res/values-en-rAU/config.xml b/res/values-en-rAU/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-en-rAU/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-en-rAU/strings.xml b/res/values-en-rAU/strings.xml
index 6fab90f..c5b3b6a 100644
--- a/res/values-en-rAU/strings.xml
+++ b/res/values-en-rAU/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobile Data"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobile Data"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Phone Services"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Emergency Dialler"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Phone"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Missing voicemail number"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"No voicemail number is stored on the SIM card."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Add number"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Voicemail settings can only be modified by the primary user."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Your SIM card has been unblocked. Your phone is unlocking…"</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM network unlock PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Unlock"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Requesting network unlock…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Network unlock request unsuccessful."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Network unlock successful."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Mobile network settings are not available for this user"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Mobile network settings are not available for this user"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM call settings"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM call settings (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA call settings"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Voicemail"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Voicemail (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Notifications"</string>
     <string name="networks" msgid="8873030692174541976">"Network operators"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Emergency broadcasts"</string>
     <string name="call_settings" msgid="6112441768261754562">"Call settings"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"When unreachable"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Number when unreachable"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Forwarding to <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Disabled"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Off"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Your operator doesn\'t support disabling call forwarding when your phone is unreachable."</string>
     <string name="updating_title" msgid="6146755386174019046">"Call settings"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Call settings can only be changed by the admin user."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"The new PIN contains invalid characters."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Unable to change PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Unsupported message type. Call <xliff:g id="NUMBER">%s</xliff:g> to listen."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Mobile network settings"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Mobile network settings"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobile network"</string>
     <string name="label_available" msgid="1181658289009300430">"Available networks"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Searching…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"No networks found."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> maximum exceeded\nData rate reduced to <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ of cycle elapsed\nNext period starts in <xliff:g id="USED_1">%2$d</xliff:g> days (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Data rate reduced to <xliff:g id="USED">%1$d</xliff:g> Kb/s if data usage limit is exceeded"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"More information about your operator\'s mobile network data use policy"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"More information about your operator\'s mobile network data usage policy"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Mobile Broadcast SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Mobile Broadcast SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Mobile Broadcast SMS enabled"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Add contact"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Edit contact"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Delete contact"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Dial contact"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Type PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Name"</string>
     <string name="number" msgid="7905950798349903858">"Number"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Deleting fixed dialling number…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Fixed dialling number deleted."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN wasn\'t updated because you typed an incorrect PIN."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN wasn\'t updated because the number can\'t exceed 20 digits."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN wasn\'t updated because the number is empty or exceeds 20 digits."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN wasn\'t updated. The PIN2 was incorrect or the phone number was rejected."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN operation failed."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Reading from SIM card…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Turn off aeroplane mode or connect to a wireless network to make a call."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Exit emergency callback mode to make a non-emergency call."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Not registered on network."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mobile network not available."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Mobile network is not available. Connect to a wireless network to make a call."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobile network not available."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobile network isn\'t available. Connect to a wireless network to make a call."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"To place a call, enter a valid number."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Call failed."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Call cannot be added at the moment."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Starting MMI sequence…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Service not supported"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Can\'t switch calls."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Can\'t separate call."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Entered Emergency Callback Mode"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Emergency Callback Mode"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Data connection disabled"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">No data connection for <xliff:g id="COUNT_1">%s</xliff:g> minutes</item>
-      <item quantity="one">No data connection for <xliff:g id="COUNT_0">%s</xliff:g> minute</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"No data connection until <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">The phone will be in Emergency Callback mode for <xliff:g id="COUNT_1">%s</xliff:g> minutes. While in this mode no applications using a data connection can be used. Do you want to exit now?</item>
       <item quantity="one">The phone will be in Emergency Callback mode for <xliff:g id="COUNT_0">%s</xliff:g> minute. While in this mode no apps using a data connection can be used. Do you want to exit now?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"select contact"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Voice calling not supported"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"dial"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibrate"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibrate"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Visual Voicemail"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Set PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Change PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Sound"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Ringtone &amp; Vibrate"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Built-in SIM cards"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Turn on video calling"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"There was an error while decoding the message."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"A SIM card has activated your service and updated your phone\'s roaming capabilities."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"There are too many active calls. Please end or merge existing calls before placing a new one."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Unable to connect. Please insert a valid SIM card."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi connection lost. Call ended."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Change Voicemail PIN"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Continue"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Cancel"</string>
diff --git a/res/values-en-rGB/config.xml b/res/values-en-rGB/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-en-rGB/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index 6fab90f..c5b3b6a 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobile Data"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobile Data"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Phone Services"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Emergency Dialler"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Phone"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Missing voicemail number"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"No voicemail number is stored on the SIM card."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Add number"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Voicemail settings can only be modified by the primary user."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Your SIM card has been unblocked. Your phone is unlocking…"</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM network unlock PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Unlock"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Requesting network unlock…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Network unlock request unsuccessful."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Network unlock successful."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Mobile network settings are not available for this user"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Mobile network settings are not available for this user"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM call settings"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM call settings (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA call settings"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Voicemail"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Voicemail (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Notifications"</string>
     <string name="networks" msgid="8873030692174541976">"Network operators"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Emergency broadcasts"</string>
     <string name="call_settings" msgid="6112441768261754562">"Call settings"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"When unreachable"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Number when unreachable"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Forwarding to <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Disabled"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Off"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Your operator doesn\'t support disabling call forwarding when your phone is unreachable."</string>
     <string name="updating_title" msgid="6146755386174019046">"Call settings"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Call settings can only be changed by the admin user."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"The new PIN contains invalid characters."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Unable to change PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Unsupported message type. Call <xliff:g id="NUMBER">%s</xliff:g> to listen."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Mobile network settings"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Mobile network settings"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobile network"</string>
     <string name="label_available" msgid="1181658289009300430">"Available networks"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Searching…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"No networks found."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> maximum exceeded\nData rate reduced to <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ of cycle elapsed\nNext period starts in <xliff:g id="USED_1">%2$d</xliff:g> days (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Data rate reduced to <xliff:g id="USED">%1$d</xliff:g> Kb/s if data usage limit is exceeded"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"More information about your operator\'s mobile network data use policy"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"More information about your operator\'s mobile network data usage policy"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Mobile Broadcast SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Mobile Broadcast SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Mobile Broadcast SMS enabled"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Add contact"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Edit contact"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Delete contact"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Dial contact"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Type PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Name"</string>
     <string name="number" msgid="7905950798349903858">"Number"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Deleting fixed dialling number…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Fixed dialling number deleted."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN wasn\'t updated because you typed an incorrect PIN."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN wasn\'t updated because the number can\'t exceed 20 digits."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN wasn\'t updated because the number is empty or exceeds 20 digits."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN wasn\'t updated. The PIN2 was incorrect or the phone number was rejected."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN operation failed."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Reading from SIM card…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Turn off aeroplane mode or connect to a wireless network to make a call."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Exit emergency callback mode to make a non-emergency call."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Not registered on network."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mobile network not available."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Mobile network is not available. Connect to a wireless network to make a call."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobile network not available."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobile network isn\'t available. Connect to a wireless network to make a call."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"To place a call, enter a valid number."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Call failed."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Call cannot be added at the moment."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Starting MMI sequence…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Service not supported"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Can\'t switch calls."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Can\'t separate call."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Entered Emergency Callback Mode"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Emergency Callback Mode"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Data connection disabled"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">No data connection for <xliff:g id="COUNT_1">%s</xliff:g> minutes</item>
-      <item quantity="one">No data connection for <xliff:g id="COUNT_0">%s</xliff:g> minute</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"No data connection until <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">The phone will be in Emergency Callback mode for <xliff:g id="COUNT_1">%s</xliff:g> minutes. While in this mode no applications using a data connection can be used. Do you want to exit now?</item>
       <item quantity="one">The phone will be in Emergency Callback mode for <xliff:g id="COUNT_0">%s</xliff:g> minute. While in this mode no apps using a data connection can be used. Do you want to exit now?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"select contact"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Voice calling not supported"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"dial"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibrate"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibrate"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Visual Voicemail"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Set PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Change PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Sound"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Ringtone &amp; Vibrate"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Built-in SIM cards"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Turn on video calling"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"There was an error while decoding the message."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"A SIM card has activated your service and updated your phone\'s roaming capabilities."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"There are too many active calls. Please end or merge existing calls before placing a new one."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Unable to connect. Please insert a valid SIM card."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi connection lost. Call ended."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Change Voicemail PIN"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Continue"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Cancel"</string>
diff --git a/res/values-en-rIN/config.xml b/res/values-en-rIN/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-en-rIN/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml
index 6fab90f..c5b3b6a 100644
--- a/res/values-en-rIN/strings.xml
+++ b/res/values-en-rIN/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobile Data"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobile Data"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Phone Services"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Emergency Dialler"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Phone"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Missing voicemail number"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"No voicemail number is stored on the SIM card."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Add number"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Voicemail settings can only be modified by the primary user."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Your SIM card has been unblocked. Your phone is unlocking…"</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM network unlock PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Unlock"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Requesting network unlock…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Network unlock request unsuccessful."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Network unlock successful."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Mobile network settings are not available for this user"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Mobile network settings are not available for this user"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM call settings"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM call settings (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA call settings"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Voicemail"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Voicemail (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Notifications"</string>
     <string name="networks" msgid="8873030692174541976">"Network operators"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Emergency broadcasts"</string>
     <string name="call_settings" msgid="6112441768261754562">"Call settings"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"When unreachable"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Number when unreachable"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Forwarding to <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Disabled"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Off"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Your operator doesn\'t support disabling call forwarding when your phone is unreachable."</string>
     <string name="updating_title" msgid="6146755386174019046">"Call settings"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Call settings can only be changed by the admin user."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"The new PIN contains invalid characters."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Unable to change PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Unsupported message type. Call <xliff:g id="NUMBER">%s</xliff:g> to listen."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Mobile network settings"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Mobile network settings"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobile network"</string>
     <string name="label_available" msgid="1181658289009300430">"Available networks"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Searching…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"No networks found."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> maximum exceeded\nData rate reduced to <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ of cycle elapsed\nNext period starts in <xliff:g id="USED_1">%2$d</xliff:g> days (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Data rate reduced to <xliff:g id="USED">%1$d</xliff:g> Kb/s if data usage limit is exceeded"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"More information about your operator\'s mobile network data use policy"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"More information about your operator\'s mobile network data usage policy"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Mobile Broadcast SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Mobile Broadcast SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Mobile Broadcast SMS enabled"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Add contact"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Edit contact"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Delete contact"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Dial contact"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Type PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Name"</string>
     <string name="number" msgid="7905950798349903858">"Number"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Deleting fixed dialling number…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Fixed dialling number deleted."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN wasn\'t updated because you typed an incorrect PIN."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN wasn\'t updated because the number can\'t exceed 20 digits."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN wasn\'t updated because the number is empty or exceeds 20 digits."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN wasn\'t updated. The PIN2 was incorrect or the phone number was rejected."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN operation failed."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Reading from SIM card…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Turn off aeroplane mode or connect to a wireless network to make a call."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Exit emergency callback mode to make a non-emergency call."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Not registered on network."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mobile network not available."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Mobile network is not available. Connect to a wireless network to make a call."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobile network not available."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobile network isn\'t available. Connect to a wireless network to make a call."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"To place a call, enter a valid number."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Call failed."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Call cannot be added at the moment."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Starting MMI sequence…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Service not supported"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Can\'t switch calls."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Can\'t separate call."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Entered Emergency Callback Mode"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Emergency Callback Mode"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Data connection disabled"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">No data connection for <xliff:g id="COUNT_1">%s</xliff:g> minutes</item>
-      <item quantity="one">No data connection for <xliff:g id="COUNT_0">%s</xliff:g> minute</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"No data connection until <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">The phone will be in Emergency Callback mode for <xliff:g id="COUNT_1">%s</xliff:g> minutes. While in this mode no applications using a data connection can be used. Do you want to exit now?</item>
       <item quantity="one">The phone will be in Emergency Callback mode for <xliff:g id="COUNT_0">%s</xliff:g> minute. While in this mode no apps using a data connection can be used. Do you want to exit now?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"select contact"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Voice calling not supported"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"dial"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibrate"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibrate"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Visual Voicemail"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Set PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Change PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Sound"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Ringtone &amp; Vibrate"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Built-in SIM cards"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Turn on video calling"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"There was an error while decoding the message."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"A SIM card has activated your service and updated your phone\'s roaming capabilities."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"There are too many active calls. Please end or merge existing calls before placing a new one."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Unable to connect. Please insert a valid SIM card."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi connection lost. Call ended."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Change Voicemail PIN"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Continue"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Cancel"</string>
diff --git a/res/values-es-rUS/config.xml b/res/values-es-rUS/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-es-rUS/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 0661f5e..d7db4a9 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Datos móviles"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Datos de celulares"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Servicios telefónicos"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Marcador de emergencia"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Teléfono"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Falta el número de correo de voz"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"No hay un número de correo de voz almacenado en la tarjeta SIM."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Agregar número"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Solo el usuario principal puede cambiar la configuración del correo de voz."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Tu tarjeta SIM ha sido desbloqueada. Tu dispositivo está desbloqueando..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN de desbloqueo de red de tarjeta SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Desbloquear"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Solicitando desbloqueo de red..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Solicitud de desbloqueo de red incorrecta."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Desbloqueo de red correcto."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"La configuración de la red móvil no está disponible para este usuario."</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"La configuración de la red móvil no está disponible para este usuario."</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Config. de llam. GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Configuración de llamadas de GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Configuración de llamadas de CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Correo de voz"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Buzón de voz (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"Correo de voz:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Notificaciones"</string>
     <string name="networks" msgid="8873030692174541976">"Operadores de red"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Transmisiones de emergencia"</string>
     <string name="call_settings" msgid="6112441768261754562">"Configuración de llamada"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Cuando no esté disponible"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Número cuando no se puede establecer la llamada"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Reenviar a <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Desactivado"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Desactivar"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Tu proveedor no admite la inhabilitación del desvío de llamadas cuando no se puede acceder a tu teléfono."</string>
     <string name="updating_title" msgid="6146755386174019046">"Config. de llamada"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Solo el usuario administrador puede cambiar la configuración de llamadas."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"El nuevo PIN contiene caracteres no válidos."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"No se puede cambiar el PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Tipo de mensaje no compatible. Llama al <xliff:g id="NUMBER">%s</xliff:g> para escucharlo."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Configuración de la red móvil"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Configuración de red móvil"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Red móvil"</string>
     <string name="label_available" msgid="1181658289009300430">"Redes disponibles"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Buscando..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"No se encontraron redes."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g>máximo excedido\nLa velocidad de la transferencia de datos se redujo a <xliff:g id="USED_1">%2$d</xliff:g> kb/seg."</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>% del ciclo transcurrido\nEl siguiente período comienza en <xliff:g id="USED_1">%2$d</xliff:g> días (<xliff:g id="USED_2">%3$s</xliff:g>)."</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"La velocidad de la transferencia de datos se reduce a <xliff:g id="USED">%1$d</xliff:g> Kb/seg. si se excede el límite de utilización de datos."</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Más información sobre la política de uso de datos móviles del proveedor"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Más información acerca de la política de utilización de datos de la red móvil de tu proveedor de servicios de telefonía móvil"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS de emisión celular"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS de emisión celular"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"SMS de emisión celular activado"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Agregar contacto"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Editar contacto"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Eliminar contacto"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Llamar al contacto"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Ingresar el PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Nombre"</string>
     <string name="number" msgid="7905950798349903858">"Número"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Eliminando número de marcación fija..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Número de marcación fija eliminado"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"No se actualizó el FDN porque ingresaste un PIN incorrecto."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"No se actualizó el FDN porque el número no puede superar los 20 dígitos."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"El NMF no se actualizó porque el número está vacío o excede los 20 dígitos."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"No se actualizó el FDN. El PIN2 era incorrecto o se rechazó el número de teléfono."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Ocurrió un error de funcionamiento con el número de marcado fijo."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Leyendo la tarjeta SIM..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Desactivar el modo de avión o conectarse a una red inalámbrica para hacer una llamada"</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Para realizar una llamada que no sea de emergencia, sal del modo de devolución de llamada de emergencia."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"No registrado en la red."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Red móvil no disponible"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"La red móvil no está disponible. Conéctate a una red inalámbrica para realizar una llamada."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"La red móvil no está disponible."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"La red móvil no está disponible. Conéctate a una red inalámbrica para realizar una llamada."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Para realizar una llamada, ingresa un número válido."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Error en la llamada"</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"No se puede agregar la llamada en este momento."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Iniciar la secuencia de MMI"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Servicio no compatible"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"No se puede cambiar llamadas."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"No se puede desviar la llamada."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Modo de devolución de llamada de emergencia ingresado"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Modo de devolución de llamada de emergencia"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"La conexión de datos se ha desactivado"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Sin conexión de datos por <xliff:g id="COUNT_1">%s</xliff:g> minutos</item>
-      <item quantity="one">Sin conexión de datos por <xliff:g id="COUNT_0">%s</xliff:g> minuto</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Hora de restablecimiento de conexión de datos: <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">El teléfono estará en el modo de llamada de emergencia durante <xliff:g id="COUNT_1">%s</xliff:g> minutos. Mientras esté en este modo, no se podrá utilizar ninguna aplicación que utilice una conexión de datos. ¿Quieres salir ahora?</item>
       <item quantity="one">El teléfono estará en el modo de llamada de emergencia durante <xliff:g id="COUNT_0">%s</xliff:g> minuto. Mientras esté en este modo, no se podrá utilizar ninguna aplicación que utilice una conexión de datos. ¿Quieres salir ahora?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"seleccionar contacto"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"No admite llamadas de voz."</string>
     <string name="description_dial_button" msgid="7459705245418435351">"marcar"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibrar"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibrar"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Buzón de voz visual"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Establecer PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Cambiar PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Sonido"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Tono y vibración"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Tarjetas SIM integradas"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Activar videollamadas"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Se produjo un error al decodificar el mensaje."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Una tarjeta SIM activó tu servicio y actualizó las capacidades de roaming del teléfono."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Hay demasiadas llamadas activas. Finaliza o combina las llamadas existentes antes de realizar una llamada nueva."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"No se pudo conectar. Inserta una tarjeta SIM válida."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Se perdió la conexión Wi-Fi. La llamada finalizó."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Cambiar el PIN del buzón de voz"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Continuar"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Cancelar"</string>
diff --git a/res/values-es/config.xml b/res/values-es/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-es/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index b0a316a..94706c1 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Datos móviles"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Datos móviles"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Servicios del teléfono"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Llamada de emergencia"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Teléfono"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Falta el número del buzón de voz."</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"No se ha almacenado ningún número de buzón de voz en la tarjeta SIM."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Añadir número"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"El usuario principal es el único que puede modificar los ajustes del buzón de voz."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"La tarjeta SIM se ha desbloqueado. El teléfono se está desbloqueando..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN de desbloqueo de red de tarjeta SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Desbloquear"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Solicitando desbloqueo de red..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"La solicitud de desbloqueo de red no se ha realizado correctamente."</string>
     <string name="unlock_success" msgid="6770085622238180152">"El desbloqueo de red se ha realizado correctamente."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Los ajustes de red móvil no están disponibles para este usuario"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Los ajustes de red móvil no están disponibles para este usuario"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Ajustes de llamadas GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Ajustes de llamada GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Ajustes de llamadas CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Buzón de voz"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Buzón de voz (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"Buzón de voz:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Notificaciones"</string>
     <string name="networks" msgid="8873030692174541976">"Operadores de red"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Difusiones de emergencia"</string>
     <string name="call_settings" msgid="6112441768261754562">"Ajustes de llamadas"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Cuando no esté disponible"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Número cuando no se pueda establecer la llamada"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Desviando a <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Inhabilitado"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Desactivado"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Tu operador no permite inhabilitar el desvío de llamada si no se puede establecer la llamada."</string>
     <string name="updating_title" msgid="6146755386174019046">"Ajustes de llamadas"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"El administrador es el único usuario que puede cambiar los ajustes de llamada."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"El PIN nuevo contiene caracteres no válidos."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"No se puede cambiar el PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Este tipo de mensaje no se admite. Llama al <xliff:g id="NUMBER">%s</xliff:g> para escucharlo."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Ajustes de red móvil"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Ajustes de la red móvil"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Red móvil"</string>
     <string name="label_available" msgid="1181658289009300430">"Redes disponibles"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Buscando..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"No se ha encontrado ninguna red."</string>
@@ -235,7 +238,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"Máx de <xliff:g id="USED_0">%1$s</xliff:g> superado.\nFrec datos reducida a <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>% del ciclo transcurrido.\nPróx período en <xliff:g id="USED_1">%2$d</xliff:g> días (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Frec datos se reduce a <xliff:g id="USED">%1$d</xliff:g> Kb/s si se supera límite uso datos"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Más información sobre la política de uso de datos móviles de tu operador"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Más información sobre política de uso de datos móviles de tu operador"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS de difusión móvil"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS de difusión móvil"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"SMS de difusión móvil habilitado"</string>
@@ -372,6 +375,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Añadir contacto"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Editar contacto"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Eliminar contacto"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Marcar el número de un contacto"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Introducir código PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Nombre"</string>
     <string name="number" msgid="7905950798349903858">"Número"</string>
@@ -386,7 +390,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Eliminando número de marcación fija..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Se ha eliminado el número de marcación fija."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"No se ha actualizado FDN porque el código PIN que has introducido es incorrecto."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"No se ha actualizado FDN porque el número no puede superar los 20 dígitos."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"No se ha actualizado FDN porque el número está vacío o tiene más de 20 dígitos."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN no actualizado. El código PIN2 era incorrecto o se ha rechazado el número de teléfono."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Error de funcionamiento de número de marcación fija."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Leyendo desde tarjeta SIM…"</string>
@@ -448,12 +452,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Desactiva el modo avión o conéctate a una red inalámbrica para hacer llamadas."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Sal del modo de devolución de llamada de emergencia para hacer otro tipo de llamada."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"No se ha podido conectar a la red"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"La red móvil no está disponible."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"La red móvil no está disponible. Conéctate a una red inalámbrica para hacer llamadas."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"La red móvil no está disponible."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"La red móvil no está disponible. Conéctate a una para llamar."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Para realizar una llamada, introduce un número válido."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"No se ha podido llamar."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"No se puede añadir la llamada en este momento."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Iniciando secuencia MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Servicio no admitido"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"No se pueden intercambiar llamadas."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"No se pueden separar llamadas."</string>
@@ -528,10 +531,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Se ha activado el modo de devolución de llamada de emergencia."</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Modo de devolución de llamada de emergencia"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Conexión de datos inhabilitada"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Ninguna conexión de datos durante <xliff:g id="COUNT_1">%s</xliff:g> minutos</item>
-      <item quantity="one">Ninguna conexión de datos durante <xliff:g id="COUNT_0">%s</xliff:g> minuto</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"No hay conexión de datos hasta las <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Se activará el modo de devolución de llamada de emergencia en el teléfono durante <xliff:g id="COUNT_1">%s</xliff:g> minutos. En este modo, no se puede utilizar ninguna aplicación que emplee una conexión de datos. ¿Quieres salir?</item>
       <item quantity="one">Se activará el modo de devolución de llamada de emergencia en el teléfono durante <xliff:g id="COUNT_0">%s</xliff:g> minuto. En este modo, no se puede utilizar ninguna aplicación que emplee una conexión de datos. ¿Quieres salir?</item>
@@ -555,12 +555,9 @@
     <string name="selectContact" msgid="781975788478987237">"seleccionar contacto"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Llamadas de voz no admitidas"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"marcar"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibrar"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibrar"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Buzón de voz visual"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Configurar el PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Cambiar PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Sonido"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Tono y vibración"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Tarjetas SIM integradas"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Activar videollamadas"</string>
@@ -577,6 +574,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Se ha producido un error al decodificar el mensaje."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Una tarjeta SIM ha activado tu servicio y actualizado la función de itinerancia del teléfono."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Hay demasiadas llamadas activas. Finaliza o combina las llamadas que tienes antes de iniciar otra."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"No se puede establecer la conexión. Inserta una tarjeta SIM válida."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Se ha perdido la conexión Wi-Fi. La llamada ha finalizado."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Cambiar el PIN del buzón de voz"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Continuar"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Cancelar"</string>
diff --git a/res/values-et-rEE/arrays.xml b/res/values-et/arrays.xml
similarity index 100%
rename from res/values-et-rEE/arrays.xml
rename to res/values-et/arrays.xml
diff --git a/res/values-et/config.xml b/res/values-et/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-et/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-et-rEE/strings.xml b/res/values-et/strings.xml
similarity index 96%
rename from res/values-et-rEE/strings.xml
rename to res/values-et/strings.xml
index a67279a..f9b7c04 100644
--- a/res/values-et-rEE/strings.xml
+++ b/res/values-et/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobiilne andmeside"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobiilne andmeside"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefoniteenused"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Hädaabikõne valija"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Puudub kõnepostinumber"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM-kaardile pole salvestatud ühtegi kõnepostinumbrit."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Lisa number"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Kõneposti seadeid saab muuta ainult peamine kasutaja."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Teie SIM-kaardi blokeering on tühistatud. Teie telefoni avamine ..."</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM-võrgu avamise PIN-kood"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Ava"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Võrgu avamise taotlemine ..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Võrgu avamise taotlus ebaõnnestus."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Võrgu avamine õnnestus."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Mobiilsidevõrgu seaded pole selle kasutaja jaoks saadaval"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Mobiilsidevõrgu seaded pole selle kasutaja jaoks saadaval"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM-kõneseaded"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM-i kõneseaded (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA-kõneseaded"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Kõnepost"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Kõnepost (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"KP:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Märguanded"</string>
     <string name="networks" msgid="8873030692174541976">"Võrguoperaatorid"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Hädaolukorra märguanded"</string>
     <string name="call_settings" msgid="6112441768261754562">"Kõneseaded"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Kui mind ei saa kätte"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Number, kui pole kättesaadav"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Edastamine numbrile <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Keelatud"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Väljas"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Teie operaator ei toeta kõneedastuse keelamist, kui teie telefon on levist väljas."</string>
     <string name="updating_title" msgid="6146755386174019046">"Kõneseaded"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Kõne seadeid saab muuta ainult administraator."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Uus PIN-kood sisaldab sobimatuid tähemärke."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN-koodi ei õnnestu muuta"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Toetamata sõnumi tüüp, kuulamiseks helistage numbrile <xliff:g id="NUMBER">%s</xliff:g>."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Mobiilsidevõrgu seaded"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Mobiilsidevõrgu seaded"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobiilsidevõrk"</string>
     <string name="label_available" msgid="1181658289009300430">"Saadaolevad võrgud"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Otsimine ..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Võrke ei leitud."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> maksimaalne ületatud\nAndmeedastuskiirus vähendatud määrale <xliff:g id="USED_1">%2$d</xliff:g> kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>?? tsüklist möödunud\nJärgmine periood algab <xliff:g id="USED_1">%2$d</xliff:g> päeva pärast (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Kui andmete kasutuslimiit on ületatud, vähendatakse andmeedastuskiirus <xliff:g id="USED">%1$d</xliff:g> kb/s"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Lisateave teie operaatori mobiilsidevõrgu andmete kasutuse eeskirjade kohta"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Lisateave teie operaatori mobiilsidevõrgu andmete kasutuse eeskirjade kohta"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Kärjeteate-SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Kärjeteate-SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Kärjeteate-SMS-id lubatud"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Lisa kontakt"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Muuda kontakti"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Kustuta kontakt"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Kontaktile helistamine"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Sisestage PIN2-kood"</string>
     <string name="name" msgid="7329028332786872378">"Nimi"</string>
     <string name="number" msgid="7905950798349903858">"Number"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Fikseeritud valimisnumbri kustutamine…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Fikseeritud valimisnumber kustutatud."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN-i ei värskendatud, sest sisestasite vale PIN-koodi."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN-i ei värskendatud, sest number ei tohi olla pikem kui 20 kohta."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN-i ei värskendatud, sest numbrikoht on tühi või number ületab 20 kohta."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN-i ei värskendatud. PIN2 oli vale või lükati telefoninumber tagasi."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN-i toiming ebaõnnestus."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"SIM-kaardilt lugemine ..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Helistamiseks lülitage lennurežiim välja või looge ühendus traadita võrguga."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Muude kui hädaabikõne tegemiseks väljuge hädaabikõnede režiimist."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Ei ole võrku registreeritud."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mobiilsidevõrk pole saadaval."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Mobiilivõrk pole saadaval. Helistamiseks looge ühendus traadita võrguga."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobiilsidevõrk pole saadaval."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobiilsidevõrk pole saadaval. Helistamiseks looge ühendus traadita võrguga."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Helistamiseks sisestage kehtiv number."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Kõne ebaõnnestus."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Kõnet ei saa praegu lisada."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI-jada alustamine ..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Teenust ei toetata"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Kõnesid ei saa vahetada."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Kõnet ei saa eraldada."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Sisenetud hädaolukorra tagasihelistusrežiimi"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Hädaolukorra tagasihelistusrežiim"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Andmeühendus keelatud"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Andmesideühendus puudub <xliff:g id="COUNT_1">%s</xliff:g> minutit</item>
-      <item quantity="one">Andmesideühendus puudub <xliff:g id="COUNT_0">%s</xliff:g> minuti</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Kuni kella <xliff:g id="COMPLETETIME">%s</xliff:g> andmesideühendus puudub"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Telefon on <xliff:g id="COUNT_1">%s</xliff:g> minutit hädaabikõne tagasihelistamise režiimis. Selles režiimis olles ei saa kasutada ühtegi rakendust, mis kasutab andmesideühendust. Kas soovite kohe väljuda?</item>
       <item quantity="one">Telefon on <xliff:g id="COUNT_0">%s</xliff:g> minuti hädaabikõne tagasihelistamise režiimis. Selles režiimis olles ei saa kasutada ühtegi rakendust, mis kasutab andmesideühendust. Kas soovite kohe väljuda?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"vali kontakt"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Tavakõnesid ei toetata"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"helista"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibreerimine"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibreerimine"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Visuaalne kõnepost"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN-koodi määramine"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"PIN-koodi muutmine"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Heli"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Helin ja vibratsioon"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Sisseehitatud SIM-kaardid"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Videokõnede sisselülitamine"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Sõnumi dekodeerimisel ilmnes viga."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM-kaart aktiveeris teenuse ja värskendas telefoni rändlusvõimeid."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Liiga palju aktiivseid kõnesid. Enne uue kõne tegemist lõpetage mõni olemasolev kõne või ühendage mitu kõnet omavahel."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Ühendust ei saa luua, sisestage kehtiv SIM-kaart."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"WiFi-ühendus katkes. Kõne lõppes."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Muutke kõneposti PIN-koodi"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Jätka"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Tühista"</string>
diff --git a/res/values-eu-rES/arrays.xml b/res/values-eu/arrays.xml
similarity index 100%
rename from res/values-eu-rES/arrays.xml
rename to res/values-eu/arrays.xml
diff --git a/res/values-eu/config.xml b/res/values-eu/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-eu/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-eu-rES/strings.xml b/res/values-eu/strings.xml
similarity index 96%
rename from res/values-eu-rES/strings.xml
rename to res/values-eu/strings.xml
index 028c16a..6a0299f 100644
--- a/res/values-eu-rES/strings.xml
+++ b/res/values-eu/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mugikorreko datuak"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Datu mugikorrak"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefonoaren zerbitzuak"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Larrialdietarako telefonoa"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefonoa"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Erantzungailuaren zenbakia falta da"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Ez da erantzungailuaren zenbakirik gorde SIM txartelean."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Gehitu zenbakia"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Erabiltzaile nagusiak bakarrik alda ditzake erantzungailuaren ezarpenak."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"SIM txartela desblokeatu da. Telefonoa desblokeatzen…"</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM sarea desblokeatzeko PIN kodea"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Desblokeatu"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Sarea desblokeatzeko eskatzen…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Sarea desblokeatzeko eskaerak ez du arrakastarik izan."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Sarea desblokeatu egin da."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Erabiltzaile honek ez dauzka sare mugikorraren ezarpenak erabilgarri"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Erabiltzaile honek ez dauzka sare mugikorraren ezarpenak erabilgarri"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM deien ezarpenak"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM deien ezarpenak (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA deien ezarpenak"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Erantzungailua"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Erantzungailua (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"Erantzungailua:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Jakinarazpenak"</string>
     <string name="networks" msgid="8873030692174541976">"Sare-operadoreak"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Larrialdietako igorpenak"</string>
     <string name="call_settings" msgid="6112441768261754562">"Deien ezarpenak"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Konektatu gabe nagoenean"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Eskuragarri ez dagoenerako zenbakia"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> zenbakira desbideratzen"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Desgaituta"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Desaktibatuta"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Operadoreak ez du dei-desbideratzeak desgaitzea onartzen telefonoa eskuragarri ez dagoen bitartean."</string>
     <string name="updating_title" msgid="6146755386174019046">"Deien ezarpenak"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Administratzaileak soilik alda ditzake deien ezarpenak."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Balio ez duten karaktereak ditu PIN kode berriak."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Ezin da aldatu PIN kodea"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Ez dira onartzen mota honetako mezuak. Entzuteko, deitu <xliff:g id="NUMBER">%s</xliff:g> zenbakira."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Sare mugikorraren ezarpenak"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Sare mugikorren ezarpenak"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Sare mugikorra"</string>
     <string name="label_available" msgid="1181658289009300430">"Sare erabilgarriak"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Bilatzen…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Ez da sarerik aurkitu."</string>
@@ -237,7 +240,7 @@
     <!-- no translation found for throttle_time_frame_subtext (7732763021560399960) -->
     <skip />
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Datuak erabiltzeko muga gainditzen bada, datu-abiadura <xliff:g id="USED">%1$d</xliff:g> Kb/s izango da"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Informazio gehiago zure operadoreak sare mugikorretako datu-erabileraren inguruan dituen gidalerroei buruz"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Informazio gehiago zure operadoreak sare mugikorretako datu-erabileraren inguruan dituen gidalerroei buruz"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Sare mugikor bidezko SMS igorpenak"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Sare mugikor bidezko SMS igorpenak"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Sare mugikor bidezko SMS igorpena gaituta"</string>
@@ -374,6 +377,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Gehitu kontaktua"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Editatu kontaktua"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Ezabatu kontaktua"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Markatu kontaktuaren zenbakia"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Idatzi PIN2 kodea"</string>
     <string name="name" msgid="7329028332786872378">"Izena"</string>
     <string name="number" msgid="7905950798349903858">"Zenbakia"</string>
@@ -388,7 +392,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Markatze finkoko zenbakia ezabatzen…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Markatze finkoko zenbakia ezabatu da."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Ez da FDN eguneratu PIN kode okerra idatzi duzulako."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Ez da FDN eguneratu zenbakiak ezin dituelako 20 digitu baino gehiago izan."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"MFZa ez da eguneratu zenbakia hutsik dagoelako edo 20 digitu baino gehiago dituelako."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"Ez da FDN eguneratu. PIN2 kodea ez da zuzena edo telefono-zenbakia baztertu da."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN eragiketak huts egin du."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"SIM txarteletik irakurtzen…"</string>
@@ -450,12 +454,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Deia egiteko, desaktibatu hegaldi modua edo konektatu haririk gabeko sare batera."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Larrialdikoak ez diren deiak egiteko, irten larrialdi-deiak soilik jasotzeko modutik."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Ez dago sarean erregistratuta."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Sare mugikorra ez dago erabilgarri."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Sare mugikorra ez dago erabilgarri. Deia egiteko, konektatu haririk gabeko sare batera."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Sare mugikorra ez dago erabilgarri."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Sare mugikorra ez dago erabilgarri. Deia egiteko, konektatu haririk gabeko sare batera."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Deitzeko, idatzi balio duen zenbaki bat."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Ezin izan da deitu."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Une honetan ezin da gehitu deirik."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI sekuentzia hasten…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Ez da zerbitzua onartzen"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Ezin da deiz aldatu."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Ezin da deia bereizi."</string>
@@ -530,10 +533,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Larrialdi-deiak soilik jasotzeko modua aktibatu da"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Larrialdi-deiak soilik jasotzeko modua"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Datu-konexioa desgaituta"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Ez da datu-konexiorik egin <xliff:g id="COUNT_1">%s</xliff:g> minututan</item>
-      <item quantity="one">Ez da datu-konexiorik egin <xliff:g id="COUNT_0">%s</xliff:g> minutuan</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Ez duzu izango datu-konexiorik ordu honetara arte: <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Telefonoa larrialdi-deiak soilik jasotzeko moduan egongo da <xliff:g id="COUNT_1">%s</xliff:g> minutuz. Modu horretan dagoen bitartean, ezingo duzu datu-konexioa behar duen aplikaziorik erabili. Irten nahi duzu?</item>
       <item quantity="one">Telefonoa larrialdi-deiak soilik jasotzeko moduan egongo da <xliff:g id="COUNT_0">%s</xliff:g> minutuz. Modu horretan dagoen bitartean, ezingo duzu datu-konexioa behar duen aplikaziorik erabili. Irten nahi duzu?</item>
@@ -557,12 +557,9 @@
     <string name="selectContact" msgid="781975788478987237">"hautatu kontaktua"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Ez dira ahots-deiak onartzen"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"markatu"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Egin dar-dar"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Egin dar-dar"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Ikusizko erantzungailua"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Ezarri PIN kodea"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Aldatu PIN kodea"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Soinua"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Tonua eta dardara"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"SIM txartel integratuak"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Aktibatu bideo-deiak"</string>
@@ -579,6 +576,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Errore bat gertatu mezua deskodetzean."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM txartel batek zerbitzua aktibatu du eta telefonoaren ibiltaritza-gaitasunak aldatu ditu."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Dei gehiegi daude aktibo. Amaitu edo bateratu abian diren deiak beste bat egin aurretik."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Ezin da konektatu. Erabili balio duen SIM txartel bat."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Galdu egin da Wi-Fi konexioa. Amaitu da deia."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Aldatu erantzungailuaren PIN kodea"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Jarraitu"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Utzi"</string>
diff --git a/res/values-fa/config.xml b/res/values-fa/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-fa/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index f3ed4da..4e7f342 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"داده سلولی"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"داده‌های تلفن همراه"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"سرویس‌های تلفن"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"شماره گیری اضطراری"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"تلفن"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"عدم وجود شماره پست صوتی"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"شماره پست صوتی در سیم کارت ذخیره نشده است."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"افزودن شماره"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"فقط «کاربر اصلی» می‌تواند «تنظیمات پست صوتی» را تغییر دهد."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"قفل سیم کارت شما باز شده است. قفل گوشی در حال باز شدن است..."</string>
     <string name="label_ndp" msgid="780479633159517250">"پین بازگشایی قفل شبکه سیم"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"بازگشایی قفل"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"در حال درخواست بازگشایی قفل شبکه..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"درخواست قفل گشایی شبکه ناموفق بود."</string>
     <string name="unlock_success" msgid="6770085622238180152">"قفل گشایی شبکه با موفقیت انجام شد."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"تنظیمات شبکه تلفن همراه برای این کاربر در دسترس نیست"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"تنظیمات شبکه دستگاه همراه برای این کاربر در دسترس نیست"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"‏تنظیمات تماس GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"‏تنظیمات تماس GSM (‏<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"‏تنظیمات تماس CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"پست صوتی"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"پست صوتی (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"اعلان‌ها"</string>
     <string name="networks" msgid="8873030692174541976">"اپراتورهای شبکه"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"پخش هشدارهای اضطراری"</string>
     <string name="call_settings" msgid="6112441768261754562">"تنظیمات تماس"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"هنگامی که در دسترس نیست"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"شماره در صورت عدم دسترسی"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"هدایت به <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"غیر فعال شد"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"خاموش"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"شرکت مخابراتی شما از غیرفعال کردن هدایت تماس هنگامی که تلفن شما در دسترس نیست پشتیبانی نمی‌کند."</string>
     <string name="updating_title" msgid="6146755386174019046">"تنظیمات تماس"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"فقط کاربر سرپرست می‌تواند تنظیمات تماس را تغییر دهد."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"پین جدید نویسه‌های نامعتبری دارد."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"پین تغییر نکرد"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"نوع پیام پشتیبانی نمی‌شود، برای گوش کردن با <xliff:g id="NUMBER">%s</xliff:g> تماس بگیرید."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"تنظیمات شبکه تلفن همراه"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"تنظیمات شبکهٔ تلفن همراه"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"شبکه تلفن همراه"</string>
     <string name="label_available" msgid="1181658289009300430">"شبکه‌های موجود"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"در حال جستجو…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"شبکه‌ای یافت نشد."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> بیش از حداکثر مجاز\nنرخ داده به <xliff:g id="USED_1">%2$d</xliff:g> کیلو بیت در ثانیه کاهش یافت"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ از دوره سپری شده\nدوره زمانی بعدی بعد از <xliff:g id="USED_1">%2$d</xliff:g> روز شروع می‌شود (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"در صورت فراتر رفتن مصرف داده از حد مجاز، نرخ داده‌ها به <xliff:g id="USED">%1$d</xliff:g> کیلو بیت در ثانیه کاهش می‌یابد."</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"اطلاعات بیشتر درباره خط‌مشی استفاده از داده شبکه تلفن همراه شرکت مخابراتی شما"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"اطلاعات بیشتر درباره خط‌مشی استفاده از داده شبکهٔ تلفن همراه شرکت مخابراتی شما"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"پیامک پخش سلولی"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"پیامک پخش سلولی"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"پیامک پخش سلولی فعال شد"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"افزودن مخاطب"</string>
     <string name="menu_edit" msgid="7143003705504672374">"ویرایش مخاطب"</string>
     <string name="menu_delete" msgid="3977150783449642851">"حذف مخاطب"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"تماس با مخاطب"</string>
     <string name="get_pin2" msgid="8204677063922225311">"تایپ پین۲"</string>
     <string name="name" msgid="7329028332786872378">"نام"</string>
     <string name="number" msgid="7905950798349903858">"تعداد"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"در حال حذف شماره شماره گیری ثابت..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"شماره شماره گیری ثابت حذف شد."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"‏FDN به‌روز نشد زیرا یک پین نادرست تایپ کردید."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"‏FDN به‌روزرسانی نشد زیرا شماره نمی‌تواند بیشتر از 20 رقم باشد."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"‏FDN به‌روزرسانی نشد زیرا شماره نمی‌تواند خالی یا بیشتر از 20 رقم باشد."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"‏FDN به‌روز نشد. پین۲ اشتباه بود یا شماره تلفن رد شد."</string>
     <string name="fdn_failed" msgid="540018079008319747">"‏عملیات FDN ناموفق بود."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"در حال خواندن سیم کارت..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"برای برقرای تماس، حالت پرواز را خاموش کنید یا به شبکه بی‌سیم وصل شوید."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"برای برقراری تماس غیراضطراری از حالت پاسخ تماس اضطراری خارج شوید."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"در شبکه ثبت نشده است."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"شبکه تلفن همراه در دسترس نیست."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"شبکه همراه در دسترس نیست. برای برقراری تماس به یک شبکه بی‌سیم وصل شوید."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"شبکهٔ تلفن همراه موجود نیست."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"شبکه تلفن همراه دردسترس نیست. برای برقراری تماس به شبکه بی‌سیم متصل شوید."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"برای برقراری تماس، یک شماره معتبر وارد کنید."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"تماس ناموفق بود."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"فعلاً نمی‌توانید تماس اضافه کنید."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"‏شروع ترتیب MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"سرویس پشتیبانی نمی‌شود"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"نمی‌توانید بین تماس‌ها جابجا شوید."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"نمی‌توانید تماس را جدا کنید."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"حالت پاسخ تماس اضطراری وارد شده"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"حال پاسخ تماس اضطراری"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"اتصال داده غیر فعال شد"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">هیچ اتصال داده‌ای برای <xliff:g id="COUNT_1">%s</xliff:g> دقیقه موجود نیست</item>
-      <item quantity="other">هیچ اتصال داده‌ای برای <xliff:g id="COUNT_1">%s</xliff:g> دقیقه موجود نیست</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"بدون اتصال داده تا <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">تلفن برای <xliff:g id="COUNT_1">%s</xliff:g> دقیقه در حالت تماس اضطراری خواهد بود. در این حالت برنامه‌ای که از اتصال داده استفاده می‌کند، نمی‌تواند استفاده شود. می‌خواهید اکنون خارج شوید؟</item>
       <item quantity="other">تلفن برای <xliff:g id="COUNT_1">%s</xliff:g> دقیقه در حالت تماس اضطراری خواهد بود. در این حالت برنامه‌ای که از اتصال داده استفاده می‌کند، نمی‌تواند استفاده شود. می‌خواهید اکنون خارج شوید؟</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"انتخاب حساب"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"تماس صوتی پشتیبانی نمی‌شود"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"شماره گیری"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"لرزش"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"لرزش"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"پست صوتی تصویری"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"تنظیم پین"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"تغییر پین"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"صدا"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"آهنگ‌ زنگ و لرزش"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"سیم‌کارت‌های داخلی"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"روشن کردن تماس ویدئویی"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"هنگام رمزگشایی پیام، خطایی روی داد."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"یک سیم‌کارت سرویس شما را فعال کرده است و قابلیت‌های رومینگ تلفنتان را به‌روز کرده است."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"تعداد زیادی تماس فعال وجود دارد. قبل از برقراری تماس جدید، لطفاً به تماس‌های موجود پایان دهید یا آنها را ادغام کنید."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"مرتبط نشد، لطفاً سیم کارت معتبری را وارد کنید."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"اتصال وای‌فای قطع شد. تماس پایان یافت."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"تغییر پین پست صوتی"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"ادامه"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"لغو"</string>
diff --git a/res/values-fi/config.xml b/res/values-fi/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-fi/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index af90f36..3a6da64 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobiilidata"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Tiedonsiirto"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Puhelinpalvelut"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Hätäpuhelut"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Puhelin"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Puhelinvastaajan numero puuttuu"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM-kortille ei ole tallennettu puhelinvastaajan numeroa."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Lisää numero"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Vain ensisijainen käyttäjä voi muuttaa vastaajan asetuksia."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"SIM-korttisi esto on purettu. Puhelimen lukitusta poistetaan..."</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM-verkko, PIN-koodin lukituksen poisto"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Poista lukitus"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Pyydetään verkon lukituksen poistoa..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Verkon lukituksen poistopyyntö epäonnistui."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Verkon lukituksen poisto onnistui."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Tämä käyttäjä ei saa muuttaa matkapuhelinverkon asetuksia"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Mobiiliverkkoasetukset eivät ole käytettävissä tälle käyttäjälle"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM-puheluasetukset"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM-puheluasetukset (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA-puheluasetukset"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Vastaaja"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Puhelinvastaaja (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"Vast.:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Ilmoitukset"</string>
     <string name="networks" msgid="8873030692174541976">"Verkko-operaattorit"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Hätätilalähetykset"</string>
     <string name="call_settings" msgid="6112441768261754562">"Puheluasetukset"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Kun en ole tavoitettavissa"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Soita, kun numeroon ei saada yhteyttä:"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Puhelu siirretään numeroon <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Pois käytöstä"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Ei käytössä"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Operaattorisi ei tue soitonsiirtojen poistamista käytöstä puhelimesi ollessa saavuttamattomissa."</string>
     <string name="updating_title" msgid="6146755386174019046">"Puheluasetukset"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Vain järjestelmänvalvoja voi muuttaa puheluasetuksia."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Uusi PIN-koodi sisältää virheellisiä merkkejä."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN-koodin vaihtaminen epäonnistui."</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Viestin tyyppiä ei tueta. Kuuntele soittamalla numeroon <xliff:g id="NUMBER">%s</xliff:g>."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Matkapuhelinverkon asetukset"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Mobiiliverkkoasetukset"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobiiliverkko"</string>
     <string name="label_available" msgid="1181658289009300430">"Käytettävissä olevat verkot"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Haetaan…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Ei verkkoja."</string>
@@ -235,7 +238,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> enimmäismäärä ylitetty\nTiedonsiirtonopeus vähennetty nopeuteen<xliff:g id="USED_1">%2$d</xliff:g> kt/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ kierrosta valmis\nSeuraava jakso alkaa <xliff:g id="USED_1">%2$d</xliff:g> päivän kuluttua (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Tiedonsiirtonopeus vähennetään nopeuteen <xliff:g id="USED">%1$d</xliff:g> kt/s, jos tiedonkäyttöraja ylitetään"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Lisätietoja operaattorisi mobiilitiedonsiirtokäytännöstä"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Lisätietoja operaattorisi mobiiliverkon tietojenkäyttökäytännöstä"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Cell Broadcast -tekstiviesti"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Cell Broadcast -tekstiviesti"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Cell Broadcast -tekstiviestit käytössä"</string>
@@ -372,6 +375,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Lisää yhteystieto"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Muokkaa yhteystietoa"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Poista yhteystieto"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Soita yhteystiedolle"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Anna PIN2-koodi"</string>
     <string name="name" msgid="7329028332786872378">"Nimi"</string>
     <string name="number" msgid="7905950798349903858">"Numero"</string>
@@ -386,7 +390,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Poistetaan sallittua numeroa…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Sallittu numero poistettu."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Sallittuja numeroita ei päivitetty, koska annoit väärän PIN-koodin."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Sallittuja numeroita ei päivitetty, sillä numerossa voi olla enintään 20 merkkiä."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Sallittuja numeroita ei päivitetty, sillä numero on tyhjä tai siinä on yli 20 merkkiä."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN-numeroa ei päivitetty. PIN2 on virheellinen tai puhelinnumero hylättiin."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN-toiminto epäonnistui."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Luetaan SIM-korttia…"</string>
@@ -448,12 +452,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Poista lentokonetila käytöstä tai yhdistä langattomaan verkkoon, jos haluat soittaa puhelun."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Poistu hätäpuhelujen takaisinsoittotilasta soittaaksesi muun kuin hätäpuhelun."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Ei rekisteröity verkkoon."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Matkapuhelinverkko ei ole käytettävissä."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Matkapuhelinverkko ei ole käytettävissä. Yhdistä langattomaan verkkoon, jos haluat soittaa puhelun."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobiiliverkko ei käytettävissä."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobiiliverkko ei ole käytettävissä. Yhdistä langattomaan verkkoon, jos haluat soittaa puhelun."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Soita antamalla kelvollinen numero."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Puhelu epäonnistui."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Puhelua ei voi lisätä juuri nyt."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Aloitetaan MMI-koodisekvenssiä..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Palvelua ei tueta"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Puhelua ei voi vaihtaa."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Puhelua ei voi erottaa."</string>
@@ -528,10 +531,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Käytössä hätäpuhelujen takaisinsoittotila"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Hätäpuhelujen takaisinsoittotila"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Verkkoyhteys pois käytöstä"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Ei verkkoyhteyttä <xliff:g id="COUNT_1">%s</xliff:g> minuuttiin</item>
-      <item quantity="one">Ei verkkoyhteyttä <xliff:g id="COUNT_0">%s</xliff:g> minuuttiin</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Datayhteyden voi muodostaa vasta <xliff:g id="COMPLETETIME">%s</xliff:g>."</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Puhelin siirtyy hätäpuhelujen takaisinsoittotilaan <xliff:g id="COUNT_1">%s</xliff:g> minuutin ajaksi. Et voi käyttää verkkoyhteyttä hyödyntäviä sovelluksia tänä aikana. Haluatko poistua nyt?</item>
       <item quantity="one">Puhelin siirtyy hätäpuhelujen takaisinsoittotilaan <xliff:g id="COUNT_0">%s</xliff:g> minuutin ajaksi. Et voi käyttää verkkoyhteyttä hyödyntäviä sovelluksia tänä aikana. Haluatko poistua nyt?</item>
@@ -555,12 +555,9 @@
     <string name="selectContact" msgid="781975788478987237">"valitse yhteystieto"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Äänipuheluita ei tueta"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"soita"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Värinä"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Värinä"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Visuaalinen puhelinvastaaja"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Aseta PIN-koodi."</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Vaihda PIN-koodi"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Ääni"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Soittoääni ja värinä"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Sisäiset SIM-kortit"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Ota videopuhelut käyttöön"</string>
@@ -577,6 +574,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Virhe purettaessa viestiä."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM-kortti on aktivoinut palvelusi ja päivittänyt puhelimesi roaming-toiminnot."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Aktiivisia puheluja on liian monta. Lopeta puheluita tai yhdistä niitä ennen uuden puhelun aloittamista."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Yhdistäminen epäonnistui. Aseta kelvollinen SIM-kortti."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi-yhteys katkesi, ja puhelu lopetettiin."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Vaihda vastaajan PIN-koodi."</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Jatka"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Peruuta"</string>
diff --git a/res/values-fr-rCA/config.xml b/res/values-fr-rCA/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-fr-rCA/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index fb5cc0b..dd6edf8 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Données cellulaires"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Données mobiles"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Services téléphoniques"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Appels d\'urgence"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Téléphone"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Numéro de messagerie vocale manquant"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Aucun numéro de messagerie vocale n\'est enregistré sur la carte SIM."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Ajouter un numéro"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Seul l\'utilisateur principal peut modifier les paramètres de la messagerie vocale."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Votre carte SIM a été déverrouillée. Votre téléphone est en cours de déverrouillage..."</string>
     <string name="label_ndp" msgid="780479633159517250">"NIP de déblocage du réseau SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Déverrouiller"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Demande de déblocage du réseau…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Échec de la demande de déblocage du réseau"</string>
     <string name="unlock_success" msgid="6770085622238180152">"Le réseau a été débloqué."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Les paramètres de réseau cellulaire ne sont pas accessibles pour cet utilisateur"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Les paramètres de réseau cellulaire ne sont pas accessibles pour cet utilisateur"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Paramètres d\'appel GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Paramètres d\'appel GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Paramètres d\'appel CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Messagerie vocale"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Messagerie vocale (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"MV :"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Notifications"</string>
     <string name="networks" msgid="8873030692174541976">"Opérateur de réseau"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Diffusions d\'urgence"</string>
     <string name="call_settings" msgid="6112441768261754562">"Paramètres d\'appel"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Si injoignable"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Numéro de renvoi si injoignable"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Transfert vers <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Désactivé"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Désactivé"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Votre opérateur ne permet pas la désactivation du transfert d\'appel lorsque votre téléphone n\'est pas joignable."</string>
     <string name="updating_title" msgid="6146755386174019046">"Paramètres d\'appel"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Seul l\'administrateur peut modifier les paramètres d\'appel."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Le nouveau NIP contient des caractères incorrects."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Impossible de modifier le NIP"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Type de message non pris en charge. Composez le <xliff:g id="NUMBER">%s</xliff:g> pour l\'écouter."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Paramètres réseaux cellulaires"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Paramètres du réseau mobile"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Réseau cellulaire"</string>
     <string name="label_available" msgid="1181658289009300430">"Réseaux disponibles"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Recherche en cours…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Aucun réseau trouvé"</string>
@@ -235,7 +238,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> maximum dépassé\nTaux de transfert des données réduit à <xliff:g id="USED_1">%2$d</xliff:g> Ko/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g> % du cycle écoulé.\nLa prochaine période démarre dans <xliff:g id="USED_1">%2$d</xliff:g> jours (<xliff:g id="USED_2">%3$s</xliff:g>)."</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Taux de transfert des données réduit à <xliff:g id="USED">%1$d</xliff:g> Ko/s si le plafond d\'utilisation est dépassé"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"En savoir plus les politiques de votre fournisseur de services concernant l\'utilisation des données sur son réseau cellulaire"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Plus d\'informations sur les règles de votre opérateur mobile concernant l\'utilisation des données sur son réseau"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Diffusion cellulaire par SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Diffusion cellulaire par SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Option \"Diffusion cellulaire par SMS\" activée"</string>
@@ -372,6 +375,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Ajouter un contact"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Modifier un contact"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Supprimer le contact"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Appeler le contact"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Saisir le NIP2"</string>
     <string name="name" msgid="7329028332786872378">"Nom"</string>
     <string name="number" msgid="7905950798349903858">"Nombre"</string>
@@ -386,7 +390,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Suppression du numéro autorisé…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Numéro autorisé supprimé"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Le numéro autorisé n\'a pas été mis à jour, car vous avez saisi un NIP incorrect."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Le numéro autorisé n\'a pas été mis à jour, car il ne doit pas comporter plus de 20 chiffres."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Le NAF n\'a pas été mis à jour, car le numéro est vide ou il comporte plus de 20 chiffres."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"Le numéro autorisé n\'a pas été mis à jour. Soit le NIP2 est incorrect, soit le numéro de téléphone a été rejeté."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Échec de l\'opération FDN."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Lecture de la carte SIM…"</string>
@@ -448,12 +452,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Désactivez le mode Avion ou connectez-vous à un réseau Wi-Fi pour faire un appel."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Quittez le mode de rappel d\'urgence pour effectuer un appel non urgent."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Non enregistré sur le réseau"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Réseau cellulaire non disponible."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Le réseau cellulaire n\'est pas accessible. Connectez-vous à un réseau Wi-Fi pour faire un appel."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Réseau pour mobile non disponible"</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Le réseau mobile n\'est pas accessible. Connectez-vous à un réseau sans fil pour effectuer un appel."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Pour faire un appel, entrez un numéro valide."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Échec de l\'appel."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Impossible d\'ajouter l\'appel pour le moment."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Lancement de la séquence IHM..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Service non pris en charge"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Impossible de faire des appels."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Impossible de séparer les appels."</string>
@@ -528,10 +531,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Mode de rappel d\'urgence activé"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Mode de rappel d\'urgence"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Connexion des données désactivée"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">Aucune connexion de données pendant <xliff:g id="COUNT_1">%s</xliff:g> minute</item>
-      <item quantity="other">Aucune connexion de données pendant <xliff:g id="COUNT_1">%s</xliff:g> minutes</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Aucune connexion de données avant <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">Le téléphone sera en mode de rappel d\'urgence pendant <xliff:g id="COUNT_1">%s</xliff:g> minute.  Lorsque ce mode est activé, vous ne pouvez pas utiliser d\'applications nécessitant une connexion à Internet. Voulez-vous quitter l\'écran maintenant?</item>
       <item quantity="other"> Le téléphone sera en mode de rappel d\'urgence pendant <xliff:g id="COUNT_1">%s</xliff:g> minutes. Lorsque ce mode est activé, vous ne pouvez pas utiliser d\'applications nécessitant une connexion à Internet. Voulez-vous quitter l\'écran maintenant?</item>
@@ -555,12 +555,9 @@
     <string name="selectContact" msgid="781975788478987237">"sélectionner un contact"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Appels vocaux non pris en charge"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"composer"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibreur"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibreur"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Messagerie vocale visuelle"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Définir le NIP"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Modifier le NIP"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Son"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Sonnerie et vibreur"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Cartes SIM intégrées"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Activer les appels vidéo"</string>
@@ -577,6 +574,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Une erreur s\'est produite lors du décodage du message."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Une carte SIM a activé votre service et mis à jour les fonctionnalités d\'itinérance de votre téléphone."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Il y a trop d\'appels actifs. Veuillez mettre fin aux appels existants ou les fusionner avant d\'en passer un nouveau."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Échec de la connexion. Veuillez insérer une carte SIM valide."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Connexion Wi-Fi perdue. Appel terminé."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Modifier le NIP de la messagerie vocale"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Continuer"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Annuler"</string>
diff --git a/res/values-fr/config.xml b/res/values-fr/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-fr/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index a510fe8..f0307c3 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Données mobiles"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Données mobiles"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Services téléphoniques"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Appels d\'urgence"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Téléphone"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Numéro de messagerie vocale manquant"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Aucun numéro de messagerie vocale n\'est enregistré sur la carte SIM."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Ajouter un numéro"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Seul l\'utilisateur principal de la messagerie vocale peut en modifier les paramètres."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Votre carte SIM a été déverrouillée. Votre téléphone est en cours de déverrouillage..."</string>
     <string name="label_ndp" msgid="780479633159517250">"Code PIN de déblocage du réseau SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Déverrouiller"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Demande de déblocage du réseau…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Échec de la demande de déblocage du réseau."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Le réseau a bien été débloqué."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Les paramètres des réseaux mobiles ne sont pas disponibles pour cet utilisateur."</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Les paramètres des réseaux mobiles ne sont pas disponibles pour cet utilisateur."</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Paramètres d\'appel GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Paramètres d\'appel GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Paramètres d\'appel CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Messagerie vocale"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Mess. vocale (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"MV :"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Notifications"</string>
     <string name="networks" msgid="8873030692174541976">"Opérateurs de réseau"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Messages d\'urgence"</string>
     <string name="call_settings" msgid="6112441768261754562">"Paramètres d\'appel"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Si non joignable"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Numéro de renvoi si injoignable"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Transfert vers <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Désactivé"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Désactivé"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Votre opérateur ne permet pas la désactivation du transfert d\'appel lorsque votre téléphone n\'est pas joignable."</string>
     <string name="updating_title" msgid="6146755386174019046">"Paramètres d\'appel"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Seul l\'administrateur peut modifier les paramètres d\'appel."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Le nouveau code contient des caractères incorrects."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Impossible de modifier le code"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Type de message incompatible, composez le <xliff:g id="NUMBER">%s</xliff:g> pour l\'écouter."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Paramètres réseau mobile"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Paramètres du réseau mobile"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Réseau mobile"</string>
     <string name="label_available" msgid="1181658289009300430">"Réseaux disponibles"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Recherche..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Aucun réseau trouvé."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> maximum dépassé\nTaux de transfert des données réduit à <xliff:g id="USED_1">%2$d</xliff:g> Ko/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g> ٪ du cycle écoulé\nLa prochaine période démarre dans <xliff:g id="USED_1">%2$d</xliff:g> jours (<xliff:g id="USED_2">%3$s</xliff:g>)."</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Taux de transfert des données réduit à <xliff:g id="USED">%1$d</xliff:g> Ko/s si le plafond d\'utilisation est dépassé"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Plus d\'informations sur les règles de votre opérateur mobile concernant l\'utilisation des données sur son réseau"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Plus d\'informations sur les règles de votre opérateur mobile concernant l\'utilisation des données sur son réseau"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Diffusion cellulaire par SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Cell Broadcast SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Option \"Diffusion cellulaire par SMS\" activée"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Ajouter un contact"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Modifier le contact"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Supprimer le contact"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Appeler le contact"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Saisir le code PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Nom"</string>
     <string name="number" msgid="7905950798349903858">"Numéro"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Suppression du numéro autorisé…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Numéro autorisé supprimé"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Le numéro autorisé n\'a pas été mis à jour, car vous avez saisi un code PIN incorrect."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Le numéro autorisé n\'a pas été mis à jour, car il ne doit pas comporter plus de 20 chiffres."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Le numéro autorisé n\'a pas été mis à jour, car il n\'a pas été renseigné ou comporte plus de 20 chiffres."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"Le numéro autorisé n\'a pas été mis à jour. Soit le code PIN2 est incorrect, soit le numéro de téléphone a été rejeté."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Échec de l\'opération liée aux numéros autorisés."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Lecture de la carte SIM…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Désactivez le mode Avion ou connectez-vous à un réseau sans fil pour passer un appel."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Veuillez quitter le mode de rappel d\'urgence pour passer un appel standard."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Non enregistré sur le réseau."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Réseau mobile non disponible."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Le réseau mobile n\'est pas disponible. Connectez-vous à un réseau sans fil pour passer un appel."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Réseau mobile non disponible"</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Le réseau mobile n\'est pas disponible. Connectez-vous à un réseau sans fil pour passer un appel."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Pour émettre un appel, veuillez saisir un numéro valide."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Échec de l\'appel."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Impossible d\'ajouter un appel pour le moment."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Lancement de la séquence IHM..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Service incompatible"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Impossible de changer d\'appel."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Impossible d\'isoler l\'appel."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Mode de rappel d\'urgence activé"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Mode de rappel d\'urgence"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Connexion des données désactivée"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">Aucune connexion à Internet pendant <xliff:g id="COUNT_1">%s</xliff:g> minute</item>
-      <item quantity="other">Aucune connexion à Internet pendant <xliff:g id="COUNT_1">%s</xliff:g> minutes</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Aucune connexion Internet mobile jusqu\'à <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">Le téléphone sera en mode de rappel d\'urgence pendant <xliff:g id="COUNT_1">%s</xliff:g> minute. Lorsque ce mode est activé, vous ne pouvez pas utiliser d\'applications nécessitant une connexion à Internet. Voulez-vous quitter l\'écran maintenant ?</item>
       <item quantity="other">Le téléphone sera en mode de rappel d\'urgence pendant <xliff:g id="COUNT_1">%s</xliff:g> minutes. Lorsque ce mode est activé, vous ne pouvez pas utiliser d\'applications nécessitant une connexion à Internet. Voulez-vous quitter l\'écran maintenant ?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"sélectionner un contact"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Appels vocaux non pris en charge"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"composer"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibreur"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibreur"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Messagerie vocale visuelle"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Définir un code"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Modifier le code"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Son"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Sonnerie et vibreur"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Cartes SIM intégrées"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Activer les appels vidéo"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Une erreur s\'est produite lors du décodage du message."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Votre service a été activé et les fonctionnalités d\'itinérance de votre téléphone ont été mises à jour via une carte SIM."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Il y a trop d\'appels actifs. Pour passer un autre appel, vous devez mettre fin aux appels existants ou fusionner ces derniers."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Connexion impossible. Veuillez insérer une carte SIM valide."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Connexion Wi-Fi perdue. L\'appel a été interrompu."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Modifier le code de la boîte vocale"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Continuer"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Annuler"</string>
diff --git a/res/values-gl-rES/arrays.xml b/res/values-gl/arrays.xml
similarity index 100%
rename from res/values-gl-rES/arrays.xml
rename to res/values-gl/arrays.xml
diff --git a/res/values-gl/config.xml b/res/values-gl/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-gl/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-gl-rES/strings.xml b/res/values-gl/strings.xml
similarity index 96%
rename from res/values-gl-rES/strings.xml
rename to res/values-gl/strings.xml
index d1f9562..2898a92 100644
--- a/res/values-gl-rES/strings.xml
+++ b/res/values-gl/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Datos móbiles"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Datos móbiles"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Servizos de telefonía"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Marcador de emerxencia"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Teléfono"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Falta o número de correo de voz"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Non hai ningún número de correo de voz almacenado na tarxeta SIM."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Engadir número"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"O usuario principal é o único que pode modificar a configuración do correo de voz."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Desbloqueouse a tarxeta SIM. O teléfono estase desbloqueando..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN de desbloqueo da rede SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Desbloquear"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Solicitando desbloqueo da rede..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Solicitude de desbloqueo da rede realizado correctamente."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Desbloqueo da rede realizado correctamente."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"A configuración de rede móbil non está dispoñible para este usuario"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"A configuración de rede móbil non está dispoñible para este usuario"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Configuración de chamadas GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Configuración da chamada de GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Configuración de chamadas CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Correo de voz"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Correo de voz (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"CV:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Notificacións"</string>
     <string name="networks" msgid="8873030692174541976">"Operadores de rede"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Difusións de emerxencia"</string>
     <string name="call_settings" msgid="6112441768261754562">"Configuración de chamada"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Cando non se poida contactar"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Número cando non se pode contactar"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Desvío ao <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Desactivado"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Desactivado"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"O teu operador non admite a desactivación do desvío de chamadas cando non se pode acceder ao teléfono."</string>
     <string name="updating_title" msgid="6146755386174019046">"Configuración de chamada"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Só o usuario administrador pode cambiar a configuración de chamada."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"O novo PIN contén caracteres non válidos."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Non se puido cambiar o PIN."</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Tipo de mensaxe non compatible. Chama ao <xliff:g id="NUMBER">%s</xliff:g> para escoitala."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Configuración da rede móbil"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Configuración de rede móbil"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Rede de telefonía móbil"</string>
     <string name="label_available" msgid="1181658289009300430">"Redes dispoñibles"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Buscando..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Non se atopou ningunha rede."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> máximo superado\nTaxa de datos reducida a <xliff:g id="USED_1">%2$d</xliff:g> kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ do ciclo transcorrido\nO seguinte período comeza dentro de <xliff:g id="USED_1">%2$d</xliff:g> días (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"A velocidade de datos redúcese a <xliff:g id="USED">%1$d</xliff:g> kb/s se se supera o límite de uso de datos"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Máis información sobre a política de uso de datos da rede móbil do teu operador"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Máis información sobre a política de uso de datos da rede móbil do teu operador"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS de difusión móbil"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS de difusión móbil"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"SMS de difusión móbil activado"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Engadir contacto"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Editar contacto"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Eliminar contacto"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Marcar número dun contacto"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Escribe o PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Nome"</string>
     <string name="number" msgid="7905950798349903858">"Número"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Eliminando número de marcación fixa..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Eliminouse o número de marcación fixa."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Non se actualizaron os NMF porque escribiches un PIN incorrecto."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Non se actualizaron os NMF porque o número non pode superar os 20 díxitos."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"O NMF non se actualizou porque está baleiro ou supera os 20 díxitos."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"Non se actualizaron os NMF. O PIN2 era incorrecto ou rexeitouse o número de teléfono."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Produciuse un fallo no funcionamento dos NMF."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Lendo da tarxeta SIM..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Desactiva o modo avión ou conéctate a unha rede sen fíos para facer unha chamada."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Sae do modo de devolución de chamada de emerxencia para facer unha chamada que non sexa de emerxencia."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Sen rexistro na rede"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Rece móbil non dispoñible."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"A rede móbil non está dispoñible. Conéctate a unha rede sen fíos para facer unha chamada."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"A rede móbil non está dispoñible."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"A rede móbil non está dispoñible. Conéctate a unha rede sen fíos para facer unha chamada."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Para realizar unha chamada, introduce un número válido."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Produciuse un erro na chamada."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Non se pode engadir a chamada neste momento."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Iniciando secuencia MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Servizo non compatible"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Non se poden cambiar as chamadas."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Non se pode separar a chamada."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Accedeuse ao modo de devolución de chamadas de emerxencia"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Modo de devolución de chamadas de emerxencia"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Conexión de datos desactivada"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Non houbo conexión de datos durante <xliff:g id="COUNT_1">%s</xliff:g> minutos</item>
-      <item quantity="one">Non houbo conexión de datos durante <xliff:g id="COUNT_0">%s</xliff:g> minuto</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Sen conexión de datos ata: <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">O teléfono estará no modo de devolución de chamada de emerxencia durante <xliff:g id="COUNT_1">%s</xliff:g> minutos. Mentres se atope neste modo, non se poderá usar ningunha aplicación que utilice unha conexión de datos. Queres saír agora?</item>
       <item quantity="one">O teléfono estará no modo de devolución de chamada de emerxencia durante <xliff:g id="COUNT_0">%s</xliff:g> minuto. Mentres se atope neste modo, non se poderá usar ningunha aplicación que utilice unha conexión de datos. Queres saír agora?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"seleccionar contacto"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Chamadas de voz non compatibles"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"marcar"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibrar"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibrar"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Correo de voz visual"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Establecer PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Cambiar PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Son"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Ton de chamada e vibración"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Tarxetas SIM integradas"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Activar videochamadas"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Produciuse un erro durante a descodificación da mensaxe."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"A tarxeta SIM activou o teu servizo e actualizou as funcións de itinerancia do teléfono."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Hai moitas chamadas activas. Finaliza as chamadas existentes ou combínaas antes de facer unha nova."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Non se pode conectar. Insire unha tarxeta SIM válida."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Finalizouse a chamada porque se perdeu a conexión wifi."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Cambiar PIN do correo de voz"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Continuar"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Cancelar"</string>
diff --git a/res/values-gu-rIN/arrays.xml b/res/values-gu/arrays.xml
similarity index 100%
rename from res/values-gu-rIN/arrays.xml
rename to res/values-gu/arrays.xml
diff --git a/res/values-gu/config.xml b/res/values-gu/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-gu/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-gu-rIN/strings.xml b/res/values-gu/strings.xml
similarity index 96%
rename from res/values-gu-rIN/strings.xml
rename to res/values-gu/strings.xml
index cb36dad..3c9dc08 100644
--- a/res/values-gu-rIN/strings.xml
+++ b/res/values-gu/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"સેલ્યુલર ડેટા"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"મોબાઇલ ડેટા"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"ફોન સેવાઓ"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"કટોકટીનું ડાયલર"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"ફોન"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"વૉઇસમેઇલ નંબર ખૂટે છે"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM કાર્ડ પર કોઈ વૉઇસમેઇલ નંબર સંગ્રહિત નથી."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"નંબર ઉમેરો"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"વૉઇસમેઇલ સેટિંગ્સને ફક્ત પ્રાથમિક વપરાશકર્તા દ્વારા જ સંશોધિત કરી શકાય છે."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"તમારા SIM કાર્ડને અનાવરોધિત કરવામાં આવ્યું છે. તમારા ફોનને અનલૉક કરી રહ્યાં છે…"</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM નેટવર્ક અનલૉક PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"અનલૉક કરો"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"નેટવર્ક અનલૉકની વિનંતી કરી રહ્યાં છે…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"નેટવર્ક અનલૉક વિનંતી અસફળ."</string>
     <string name="unlock_success" msgid="6770085622238180152">"નેટવર્ક અનલૉક સફળ."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"સેલ્યુલર નેટવર્ક સેટિંગ્સ આ વપરાશકર્તા માટે ઉપલબ્ધ નથી"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"મોબાઇલ નેટવર્ક સેટિંગ્સ આ વપરાશકર્તા માટે ઉપલબ્ધ નથી"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM કૉલ સેટિંગ્સ"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM કૉલ સેટિંગ્સ (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA કૉલ સેટિંગ્સ"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"વૉઇસમેઇલ"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"વૉઇસમેઇલ (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"સૂચનાઓ"</string>
     <string name="networks" msgid="8873030692174541976">"નેટવર્ક ઓપરેટર્સ"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"કટોકટીના બ્રોડકાસ્ટ્સ"</string>
     <string name="call_settings" msgid="6112441768261754562">"કૉલ સેટિંગ્સ"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"જ્યારે પહોંચયોગ્ય ન હોય ત્યારે"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"જ્યારે પહોંચયોગ્ય ન હોય તે સમય માટેનો નંબર"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> પર ફોરવર્ડ કરી રહ્યાં છે"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"અક્ષમ કરેલું"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"બંધ"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"જ્યારે તમારો ફોન પહોંચયોગ્ય ન હોય ત્યારે તમારા કેરિઅર કૉલ ફોરવર્ડિંગને અક્ષમ કરવાને સમર્થન આપતા નથી."</string>
     <string name="updating_title" msgid="6146755386174019046">"કૉલ સેટિંગ્સ"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"કૉલ સેટિંગ્સને ફક્ત એડમિન વપરાશકર્તા દ્વારા જ બદલી શકાય છે."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"નવો PIN અમાન્ય અક્ષરો ધરાવે છે."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN બદલવામાં અસમર્થ"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"અસમર્થિત સંદેશ પ્રકાર, સાંભળવા માટે <xliff:g id="NUMBER">%s</xliff:g> પર કૉલ કરો."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"સેલ્યુલર નેટવર્ક સેટિંગ્સ"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"મોબાઇલ નેટવર્ક સેટિંગ્સ"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"મોબાઇલ નેટવર્ક"</string>
     <string name="label_available" msgid="1181658289009300430">"ઉપલબ્ધ નેટવર્ક્સ"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"શોધી રહ્યું છે..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"કોઈ નેટવર્ક મળ્યું નથી."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> મહત્તમ વટાવી દીધું\nડેટા રેટ <xliff:g id="USED_1">%2$d</xliff:g> Kb/s સુધી ઘટાડાશે"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ ચક્ર વીતાવ્યું\nઆગલી અવધિ <xliff:g id="USED_1">%2$d</xliff:g> દિવસમાં પ્રારંભ થાય છે (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"જો ડેટા સીમા વટાવવામાં આવે તો ડેટા રેટ <xliff:g id="USED">%1$d</xliff:g> Kb/s સુધી ઘટાડવામાં આવે છે"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"તમારા કેરિઅરની સેલ્યુલર નેટવર્ક ડેટા ઉપયોગ નીતિ વિશે વધુ માહિતી"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"તમારા કેરિઅરની મોબાઇલ નેટવર્ક ડેટા ઉપયોગ નીતિ વિશે વધુ માહિતી"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"સેલ બ્રોડકાસ્ટ SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"સેલ બ્રોડકાસ્ટ SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"સેલ બ્રોડકાસ્ટ SMS સક્ષમ કરેલ છે"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"સંપર્ક ઉમેરો"</string>
     <string name="menu_edit" msgid="7143003705504672374">"સંપર્ક સંપાદિત કરો"</string>
     <string name="menu_delete" msgid="3977150783449642851">"સંપર્ક કાઢી નાંખો"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"સંપર્ક ડાયલ કરો"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2 લખો"</string>
     <string name="name" msgid="7329028332786872378">"નામ"</string>
     <string name="number" msgid="7905950798349903858">"નંબર"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"ફિક્સ્ડ ડાયલિંગ નંબર કાઢી રહ્યાં છે..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"ફિક્સ્ડ ડાયલિંગ નંબર કાઢી નાખ્યો."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN અપડેટ થયો ન હતો કારણ કે તમે ખોટો PIN લખ્યો છે."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN અપડેટ કર્યો ન હતો, કારાણ કે નંબર 20 અંકને વટાવતો નથી."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN અપડેટ કર્યો ન હતો કારણ કે નંબર ખાલી છે અથવા તો તે 20 અંકને ઓળંગે છે."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN અપડેટ થયો ન હતો. PIN2 ખોટો હતો અથવા ફોન નંબર નકારેલ હતો."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN ઓપરેશન નિષ્ફળ થયું."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"SIM કાર્ડમાંથી વાંચી રહ્યાં છે…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"કૉલ કરવા માટે એરપ્લેન મોડ બંધ કરો અથવા વાયરલેસ નેટવર્કથી કનેક્ટ કરો."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"બિન-કટોકટીનો કૉલ કરવા માટે કટોકટી કૉલબૅક મોડમાંથી બહાર નીકળો."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"નેટવર્ક પર નોંધણી કરાયેલ નથી."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"સેલ્યુલર નેટવર્ક ઉપલબ્ધ નથી."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"સેલ્યુલર નેટવર્ક ઉપલબ્ધ નથી. કૉલ કરવા માટે વાયરલેસ નેટવર્કથી કનેક્ટ કરો."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"મોબાઇલ નેટવર્ક ઉપલબ્ધ નથી."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"મોબાઇલ નેટવર્ક ઉપલબ્ધ નથી. કૉલ કરવા માટે વાયરલેસ નેટવર્ક સાથે કનેક્ટ કરો."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"કૉલ કરવા માટે, માન્ય નંબર દાખલ કરો."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"કૉલ નિષ્ફળ થયો."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"આ સમયે કૉલ ઉમેરી શકાતો નથી."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI અનુક્રમ પ્રારંભ કરી રહ્યાં છે…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"સેવા સમર્થિત નથી"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"કૉલ્સ સ્વિચ કરી શકાતા નથી."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"અલગ કૉલ કરી શકાતો નથી."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"કટોકટી કૉલબેક મોડમાં દાખલ કર્યો"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"કટોકટી કૉલબેક મોડ"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"ડેટા કનેક્શન અક્ષમ કરેલ છે"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one"><xliff:g id="COUNT_1">%s</xliff:g> મિનિટ માટે કોઈ ડેટા કનેક્શન નથી</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> મિનિટ માટે કોઈ ડેટા કનેક્શન નથી</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> સુધી કોઈ ડેટા કનેક્શન નથી"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">ફોન <xliff:g id="COUNT_1">%s</xliff:g> મિનિટ સુધી કટોકટી કૉલબેક મોડમાં રહેશે. આ મોડમાં હોય ત્યારે ડેટા કનેક્શનનો ઉપયોગ કરતી કોઈપણ એપ્લિકેશન્સનો ઉપયોગ થઈ શકશે નહીં. શું તમે હમણાં બહાર નીકળવા માગો છો?</item>
       <item quantity="other">ફોન <xliff:g id="COUNT_1">%s</xliff:g> મિનિટ સુધી કટોકટી કૉલબેક મોડમાં રહેશે. આ મોડમાં હોય ત્યારે ડેટા કનેક્શનનો ઉપયોગ કરતી કોઈપણ એપ્લિકેશન્સનો ઉપયોગ થઈ શકશે નહીં. શું તમે હમણાં બહાર નીકળવા માગો છો?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"સંપર્ક પસંદ કરો"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"વૉઇસ કૉલિંગ સમર્થિત નથી"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"ડાયલ કરો"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"વાઇબ્રેટ"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"વાઇબ્રેટ"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"વિઝ્યુઅલ વૉઇસમેઇલ"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN સેટ કરો"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"PIN બદલો"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"ધ્વનિ"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"રિંગટોન અને વાઇબ્રેટ"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"બિલ્ટ-ઇન SIM કાર્ડ્સ"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"વિડિઓ કૉલિંગ ચાલુ કરો"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"સંદેશ ડીકોડિંગ કરતી વખતે ભૂલ આવી હતી."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"એક SIM કાર્ડ એ તમારી સેવા સક્રિય કરી છે અને તમારા ફોનની રોમિંગ ક્ષમતાઓને અપડેટ કરી છે."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"અહીં ઘણા બધા સક્રિય કૉલ્સ છે. કૃપા કરીને એક નવો કૉલ કરવા પહેલાં અસ્તિત્વમાંના કૉલ્સને સમાપ્ત કરો અથવા મર્જ કરો."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"કનેક્ટ કરવામાં અસમર્થ, કૃપા કરીને એક માન્ય SIM કાર્ડ દાખલ કરો."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi કનેક્શન ગુમાવ્યું. કૉલ સમાપ્ત થયો."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"વૉઇસમેઇલ PIN બદલો"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"ચાલુ રાખો"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"રદ કરો"</string>
diff --git a/res/values-hi/config.xml b/res/values-hi/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-hi/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index 3540b6e..13b315d 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"सेल्युलर डेटा"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"मोबाइल डेटा"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"फ़ोन सेवाएं"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"आपातकालीन डायलर"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"फ़ोन"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"गुम वॉयस मेल नंबर"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"सिम कार्ड पर कोई वॉयस मेल नंबर संग्रहित नहीं है."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"नंबर जोड़ें"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"वॉइसमेल सेटिंग को केवल प्राथमिक उपयोगकर्ता ही बदल सकता है."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"आपका सिम कार्ड अनब्लॉक कर दिया गया है. आपका फ़ोन अनलॉक किया जा रहा है..."</string>
     <string name="label_ndp" msgid="780479633159517250">"सिम नेटवर्क अनलॉक पिन"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"अनब्लॉक करें"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"नेटवर्क अनलॉक के लिए अनुरोध कर रहा है..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"नेटवर्क अनलॉक अनुरोध असफल."</string>
     <string name="unlock_success" msgid="6770085622238180152">"नेटवर्क अनलॉक सफल रहा."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"सेल्युलर नेटवर्क सेटिंग इस उपयोगकर्ता के लिए उपलब्ध नहीं हैं"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"मोबाइल नेटवर्क सेटिंग इस उपयोगकर्ता के लिए उपलब्ध नहीं हैं"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM कॉल सेटिंग"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM कॉल सेटिंग (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA कॉल सेटिंग"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"वॉयस मेल"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"वॉइसमेल (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"नोटिफ़िकेशन"</string>
     <string name="networks" msgid="8873030692174541976">"नेटवर्क ऑपरेटर"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"आपातकालीन प्रसारण"</string>
     <string name="call_settings" msgid="6112441768261754562">"कॉल सेटिंग"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"पहुंच से बाहर होने पर"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"पहुंच योग्य न होने पर नंबर"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> को अग्रेषित कर रहा है"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"अक्षम की गई"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"बंद"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"जब आपका फ़ोन पहुंच योग्य न हो, तो आपका कैरियर कॉल अग्रेषण अक्षम करने का समर्थन नहीं करता."</string>
     <string name="updating_title" msgid="6146755386174019046">"कॉल सेटिंग"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"कॉल सेटिंग केवल व्यवस्थापक उपयोगकर्ता द्वारा ही बदली जा सकती हैं."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"नए पिन में अमान्य वर्ण शामिल हैं."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"पिन बदलने में असमर्थ"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"असमर्थित संदेश प्रकार, सुनने के लिए <xliff:g id="NUMBER">%s</xliff:g> पर कॉल करें."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"सेल्युलर नेटवर्क सेटिंग"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"मोबाइल नेटवर्क सेटिंग"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"मोबाइल नेटवर्क"</string>
     <string name="label_available" msgid="1181658289009300430">"उपलब्ध नेटवर्क"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"खोज रहा है..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"कोई नेटवर्क नहीं मिला."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> अधिकतम सीमा पार हो गई\nडेटा दर <xliff:g id="USED_1">%2$d</xliff:g> Kb/s तक कम हो गई है"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"चक्र का <xliff:g id="USED_0">%1$d</xliff:g>٪ बीत चुका है\nअगली अवधि <xliff:g id="USED_1">%2$d</xliff:g> दिन में आरंभ होगी (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"यदि डेटा उपयोग की सीमा पार होती है, तो डेटा दर <xliff:g id="USED">%1$d</xliff:g> Kb/s तक कम हो जाती है."</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"आपके वाहक की सेल्युलर नेटवर्क डेटा उपयोग नीति के बारे में अधिक जानकारी"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"आपके कैरियर की मोबाइल नेटवर्क डेटा उपयोग नीति के बारे में अधिक जानकारी"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"सेल प्रसारण SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"सेल प्रसारण SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"सेल प्रसारण SMS सक्षम किया गया"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"संपर्क जोड़ें"</string>
     <string name="menu_edit" msgid="7143003705504672374">"संपर्क संपादित करें"</string>
     <string name="menu_delete" msgid="3977150783449642851">"संपर्क हटाएं"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"संपर्क डायल करें"</string>
     <string name="get_pin2" msgid="8204677063922225311">"पिन2 लिखें"</string>
     <string name="name" msgid="7329028332786872378">"नाम"</string>
     <string name="number" msgid="7905950798349903858">"नंबर"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"फ़िक्स्ड डायलिंग नंबर हटा रहा है..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"फ़िक्स्ड डायलिंग नंबर हटाया गया."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN पे नई जानकारी नहीं है क्योंकि आपने गलत पिन लिखा है."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN पे नई जानकारी नहीं है क्योंकि नंबर में 20 से अधिक अंक नहीं हो सकते."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN अपडेट नहीं हुआ क्योंकि संख्या खाली है या उसमें 20 से ज़्यादा अंक हैं."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN पे नई जानकारी नहीं है. PIN2 गलत था, या फ़ोन नंबर अस्वीकृत था."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN की कार्यवाही विफल रही."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"सिम कार्ड से पढ़ रहा है…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"कॉल करने के लिए हवाई जहाज़ मोड बंद करें या किसी वायरलेस नेटवर्क से कनेक्‍ट करें."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"गैर-आपातकालीन कॉल करने के लिए आपातकालीन कॉलबैक मोड से बाहर निकलें."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"नेटवर्क पर पंजीकृत नहीं."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"सेल्युलर नेटवर्क उपलब्ध नहीं."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"सेल्‍युलर नेटवर्क उपलब्‍ध नहीं है. कॉल करने के लिए किसी वायरलेस नेटवर्क से कनेक्‍ट करें."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"मोबाइल नेटवर्क उपलब्ध नहीं."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"मोबाइल नेटवर्क उपलब्‍ध नहीं है. कॉल करने के लिए किसी वायरलेस नेटवर्क से कनेक्‍ट करें."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"कॉल करने के लिए, मान्‍य नंबर डालें."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"कॉल विफल."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"इस समय कॉल नहीं जोड़ा जा सकता."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI अनुक्रम प्रारंभ हो रहा है…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"सेवा समर्थित नहीं है"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"कॉल स्‍विच नहीं किए जा सकते."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"कॉल अलग नहीं किया जा सकता."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"आपातकालीन कॉलबैक मोड में प्रविष्ट हुए"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"आपातकालीन कॉलबैक मोड"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"डेटा कनेक्शन अक्षम किया गया"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one"><xliff:g id="COUNT_1">%s</xliff:g> मिनट तक कोई डेटा कनेक्‍शन नहीं</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> मिनट तक कोई डेटा कनेक्‍शन नहीं</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> तक कोई डेटा कनेक्शन नहीं"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">फ़ोन <xliff:g id="COUNT_1">%s</xliff:g> मिनट तक आपातकालीन कॉलबैक मोड में रहेगा. इस मोड में रहने पर डेटा कनेक्‍शन का उपयोग करने वाले किसी भी ऐप्‍लिकेशन का उपयोग नहीं किया जा सकता. क्‍या आप अभी बाहर निकलना चाहते हैं?</item>
       <item quantity="other">फ़ोन <xliff:g id="COUNT_1">%s</xliff:g> मिनट तक आपातकालीन कॉलबैक मोड में रहेगा. इस मोड में रहने पर डेटा कनेक्‍शन का उपयोग करने वाले किसी भी ऐप्‍लिकेशन का उपयोग नहीं किया जा सकता. क्‍या आप अभी बाहर निकलना चाहते हैं?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"संपर्क को चुनें"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"ध्वनि कॉल करना समर्थित नहीं है"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"डायल करें"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"कंपन करें"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"कंपन करें"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"विज़ुअल वॉइसमेल"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"पिन सेट करें"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"पिन बदलें"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"ध्वनि"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"रिंगटोन और कंपन"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"अंतर्निहित सिम कार्ड"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"वीडियो कॉलिंग चालू करें"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"संदेश डीकोड करते समय कोई गड़बड़ी हुई थी."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"सिम कार्ड द्वारा आपकी सेवा को सक्रिय किया गया है और आपके फ़ोन की रोमिंग क्षमताओं को अपडेट किया गया है."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"बहुत अधिक कॉल सक्रिय हैं. नया कॉल करने से पहले कृपया मौजूदा कॉल समाप्त करें या उन्हें मिला दें."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"कनेक्ट नहीं हो पा रहा है, कृपया कोई मान्य SIM कार्ड डालें."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"वाई-फ़ाई कनेक्शन चला गया. कॉल समाप्त हो गया."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"वॉइसमेल पिन बदलें"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"जारी रखें"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"अभी नहीं"</string>
diff --git a/res/values-hr/config.xml b/res/values-hr/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-hr/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index fb4d808..a26f099 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobilni podaci"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobilni podaci"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefonske usluge"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Birač hitnih poziva"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Nedostaje broj govorne pošte"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Na SIM kartici nije spremljen broj govorne pošte."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Dodaj broj"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Postavke govorne pošte može izmijeniti samo primarni korisnik."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Vaša je SIM kartica odblokirana. Telefon se odblokira…"</string>
     <string name="label_ndp" msgid="780479633159517250">"Mrežni PIN za otključavanje SIM-a"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Otključaj"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Traženje mrežnog otključavanja..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Neuspješan zahtjev za otključavanje mreže."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Mrežno otključavanje bilo je uspješno."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Postavke mobilne mreže nisu dostupne za tog korisnika"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Postavke mobilne mreže nisu dostupne za tog korisnika"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Postavke GSM poziva"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Postavke GSM poziva (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Postavke CDMA poziva"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Govorna pošta"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Govorna pošta (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Obavijesti"</string>
     <string name="networks" msgid="8873030692174541976">"Mrežni operateri"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Hitna emitiranja"</string>
     <string name="call_settings" msgid="6112441768261754562">"Postavke poziva"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Kad je broj nedostupan"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Broj u slučaju nedostupnosti"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Preusmjeravanje na <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Onemogućeno"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Isključeno"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Vaš mobilni operater ne podržava onemogućavanje preusmjeravanja poziva ako je vaš telefon nedostupan."</string>
     <string name="updating_title" msgid="6146755386174019046">"Postavke poziva"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Postavke poziva može mijenjati samo korisnik koji je administrator."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Novi PIN sadrži nevažeće znakove."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN se ne može promijeniti"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Vrsta poruke nije podržana, nazovite <xliff:g id="NUMBER">%s</xliff:g> da biste je poslušali."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Postavke mobilne mreže"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Postavke mobilne mreže"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobilna mreža"</string>
     <string name="label_available" msgid="1181658289009300430">"Dostupne mreže"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Pretraživanje…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Nije pronađena mreža."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> maksimum je prekoračen\nBrzina prijenosa podataka smanjena je na <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"Proteklo je <xliff:g id="USED_0">%1$d</xliff:g>٪ ciklusa\nSljedeće razdoblje počinje za ovoliko dana: <xliff:g id="USED_1">%2$d</xliff:g> (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Brzina prijenosa podatak smanjena je na <xliff:g id="USED">%1$d</xliff:g> Kb/s ako se prekorači ograničenje korištenja podataka"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Više informacija o pravilima upotrebe mobilne podatkovne mreže vašeg davatelja mobilne usluge"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Više informacija o pravilima korištenja mobilne podatkovne mreže vašeg davatelja mobilne usluge"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS iz mobilne mreže"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS iz mobilne mreže"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Omogućen je SMS iz mobilne mreže"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Dodaj kontakt"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Uredi kontakt"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Izbriši kontakt"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Pozivanje kontakta"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Upišite PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Ime"</string>
     <string name="number" msgid="7905950798349903858">"Broj"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Brisanje broja za fiksno biranje…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Izbrisan je broj za fiksno biranje."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN nije ažuriran jer ste upisali pogrešan PIN."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN nije ažuriran jer broj ne može premašivati 20 znamenki."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN nije ažuriran jer je broj prazan ili premašuje 20 znamenki."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN nije ažuriran. PIN2 nije točan ili je telefonski broj odbijen."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Operacija FDN nije uspjela."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Čitanje sa SIM kartice…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Isključite način rada u zrakoplovu ili se povežite s bežičnom mrežom da biste uputili poziv."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Isključite način hitnih poziva da biste uputili poziv koji nije hitan."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Nije registrirano na mreži."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mobilna mreža nije dostupna."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Mobilna mreža nije dostupna. Povežite se s bežičnom mrežom da biste uputili poziv."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobilna mreža nije dostupna."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobilna mreža nije dostupna. Povežite se s bežičnom mrežom da biste uputili poziv."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Unesite važeći broj da biste uspostavili poziv."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Poziv nije uspio."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Poziv trenutačno nije moguć."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Pokretanje MMI sekvence…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Usluga nije podržana"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Prebacivanje poziva nije moguće."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Odvajanje poziva nije moguće."</string>
@@ -524,11 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Unijet je način hitnog povratnog poziva"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Način hitnog povratnog poziva"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Onemogućena je podatkovna mreža"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">Podatkovne veze neće biti <xliff:g id="COUNT_1">%s</xliff:g> minutu</item>
-      <item quantity="few">Podatkovne veze neće biti <xliff:g id="COUNT_1">%s</xliff:g> minute</item>
-      <item quantity="other">Podatkovne veze neće biti <xliff:g id="COUNT_1">%s</xliff:g> minuta</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Nema podatkovne veze do <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">Telefon će biti u načinu hitnog povratnog poziva <xliff:g id="COUNT_1">%s</xliff:g> minutu. U tom se načinu ne mogu upotrebljavati aplikacije koje upotrebljavaju podatkovnu vezu. Želite li odmah zatvoriti taj način?</item>
       <item quantity="few">Telefon će biti u načinu hitnog povratnog poziva <xliff:g id="COUNT_1">%s</xliff:g> minute. U tom se načinu ne mogu upotrebljavati aplikacije koje upotrebljavaju podatkovnu vezu. Želite li odmah zatvoriti taj način?</item>
@@ -554,12 +553,9 @@
     <string name="selectContact" msgid="781975788478987237">"odabir kontakta"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Glasovni pozivi nisu podržani"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"biraj"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibracija"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibracija"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Vizualna govorna pošta"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Postavljanje PIN-a"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Promjena PIN-a"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Zvuk"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Melodija zvona i vibracija"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Ugrađene SIM kartice"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Uključivanje videopoziva"</string>
@@ -576,6 +572,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Došlo je do pogreške prilikom dekodiranja poruke."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM kartica aktivirala je vašu uslugu i ažurirala mogućnosti telefona za roaming."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Postoji previše aktivnih poziva. Prekinite ili spojite postojeće pozive prije uspostavljanja novog poziva."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Povezivanje nije moguće, umetnite važeću SIM karticu."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi veza je prekinuta. Poziv je završen."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Promjena PIN-a govorne pošte"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Nastavi"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Odustani"</string>
diff --git a/res/values-hu/config.xml b/res/values-hu/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-hu/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index a895a1b..90f7516 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobiladatok"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobiladatok"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefonszolgáltatás"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Segélyhívó tárcsázó"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Hiányzik a hangposta száma"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Nincs hangpostaszám a SIM kártyán."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Szám hozzáadása"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"A hangposta-beállításokat csak az elsődleges felhasználó módosíthatja."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"SIM kártyája letiltása megszűnt. Feloldás folyamatban..."</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM hálózati függetlenítő PIN kódja"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Feloldás"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Függetlenítés kérése..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"A hálózatzárolás feloldására vonatkozó kérelem sikertelen volt."</string>
     <string name="unlock_success" msgid="6770085622238180152">"A függetlenítés sikerült."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Mobilhálózati beállítások nem érhetők el ennél a felhasználónál"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Mobilhálózati beállítások nem érhetők el ennél a felhasználónál"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM-hívásbeállítások"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM-hívásbeállítások (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA-hívásbeállítások"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Hangposta"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Hangposta (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"HP:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Értesítések"</string>
     <string name="networks" msgid="8873030692174541976">"Mobilszolgáltatók"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Sürgősségi adások"</string>
     <string name="call_settings" msgid="6112441768261754562">"Hívásbeállítások"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Amikor ki van kapcsolva"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Átirányítási szám, ha ki van kapcsolva"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Átirányítás ide: <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Kikapcsolva"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Ki"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Szolgáltatója nem támogatja a hívásátirányítás letiltását, ha a telefon nem érhető el."</string>
     <string name="updating_title" msgid="6146755386174019046">"Hívásbeállítások"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"A hívásbeállításokat csak a rendszergazda módosíthatja."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Az új PIN-kód érvénytelen karaktereket tartalmaz."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Nem sikerült módosítani a PIN-kódot"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Nem támogatott üzenettípus. Hívja a következő telefonszámot az üzenet meghallgatásához: <xliff:g id="NUMBER">%s</xliff:g>."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Mobilhálózati beállítások"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Mobilhálózati beállítások"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobilhálózat"</string>
     <string name="label_available" msgid="1181658289009300430">"Elérhető hálózatok"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Keresés…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Nem található hálózat."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"Elérte a felső korlátot: <xliff:g id="USED_0">%1$s</xliff:g>\nAz adatsebesség lecsökken <xliff:g id="USED_1">%2$d</xliff:g> kb/s-ra"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"A ciklus <xliff:g id="USED_0">%1$d</xliff:g>٪ -a letelt\nA következő időszak <xliff:g id="USED_1">%2$d</xliff:g> nap múlva kezdődik (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Az adatátvitel sebessége <xliff:g id="USED">%1$d</xliff:g> kb/s-ra csökken, ha átlépi az adathasználati korlátot."</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"További információk mobilszolgáltatója hálózatának adatfelhasználási irányelveiről"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"További információk mobilszolgáltatója hálózatának adatfelhasználási irányelveiről"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Cellán belüli üzenetszórás"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Cellán belüli üzenetszórás"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Cellán belüli üzenetszórás engedélyezve"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Névjegy hozzáadása"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Névjegy szerkesztése"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Névjegy törlése"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Névjegy tárcsázása"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Írja be a PIN2 kódot"</string>
     <string name="name" msgid="7329028332786872378">"Név"</string>
     <string name="number" msgid="7905950798349903858">"Szám"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Fix hívószám törlése..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"A fix hívószám törölve."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"A fix hívószám nincs frissítve, mert hibás PIN kódot írt be."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"A fix hívószám nem lett frissítve, mert a szám nem haladhatja meg a 20 számjegyet."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Az FDN nem lett frissítve, mert az érték üres vagy több mint 20 számjegyből áll."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"A fix hívószám nem lett frissítve. Hibás a PIN2 kód, vagy a telefonszámot elutasították."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Sikertelen a fix hívószámmal végzett művelet."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Beolvasás a SIM kártyáról..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Hívás indításához kapcsolja ki a repülős üzemmódot, illetve csatlakozzon egy vezeték nélküli hálózathoz."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Lépjen ki a Segélykérő visszahívása módból nem vészjellegű hívás kezdeményezéséhez."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Nincs regisztrálva a hálózaton."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"A mobilhálózat nem érhető el."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"A mobilhálózat nem érhető el. Hívás indításához csatlakozzon egy vezeték nélküli hálózathoz."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"A mobilhálózat nem érhető el."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"A mobilhálózat nem érhető el. Hívás indításához csatlakozzon egy vezeték nélküli hálózathoz."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Hívásindításhoz adjon meg egy érvényes számot."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Sikertelen hívás."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Jelenleg nem lehet hívást indítani."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI-sorozat indítása..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"A szolgáltatás nem támogatott"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"A hívások közötti váltás sikertelen."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"A híváselkülönítés sikertelen."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Segélykérő visszahívása mód bekapcsolva"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Segélykérő visszahívása mód"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Adatkapcsolat letiltva"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> perce nincs adatkapcsolat</item>
-      <item quantity="one"><xliff:g id="COUNT_0">%s</xliff:g> perce nincs adatkapcsolat</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Nincs adatkapcsolat eddig: <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">A telefon <xliff:g id="COUNT_1">%s</xliff:g> percig lesz Segélykérő visszahívása módban. Ebben az üzemmódban nem használhatók olyan alkalmazások, amelyeknél adatkapcsolatra van szükség. Szeretne kilépni most?</item>
       <item quantity="one">A telefon <xliff:g id="COUNT_0">%s</xliff:g> percig lesz Segélykérő visszahívása módban. Ebben az üzemmódban nem használhatók olyan alkalmazások, amelyeknél adatkapcsolatra van szükség. Szeretne kilépni most?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"névjegy kijelölése"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"A hanghívás nem támogatott"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"tárcsázás"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Rezgés"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Rezgés"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Vizuális hangpostaüzenet"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN-kód beállítása"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"PIN-kód módosítása"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Hang"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Csengőhang és rezgés"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Beépített SIM kártyák"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Videohívás bekapcsolása"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Hiba történt az üzenet dekódolása közben."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Egy SIM kártya aktiválta a szolgáltatást, valamint frissítette a telefon barangolási képességeit."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Túl sok aktív hívás van. Új hívás indítása előtt fejezzen be vagy vonjon össze meglévő hívásokat."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Sikertelen csatlakozás. Helyezzen be egy működő SIM-kártyát."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"A Wi-Fi-kapcsolat megszakadt. A hívás befejeződött."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"A hangposta PIN-kódjának módosítása"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Folytatás"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Mégse"</string>
diff --git a/res/values-hy-rAM/arrays.xml b/res/values-hy/arrays.xml
similarity index 100%
rename from res/values-hy-rAM/arrays.xml
rename to res/values-hy/arrays.xml
diff --git a/res/values-hy/config.xml b/res/values-hy/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-hy/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-hy-rAM/strings.xml b/res/values-hy/strings.xml
similarity index 96%
rename from res/values-hy-rAM/strings.xml
rename to res/values-hy/strings.xml
index e4e8642..2ecca26 100644
--- a/res/values-hy-rAM/strings.xml
+++ b/res/values-hy/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Բջջային տվյալներ"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Բջջային տվյալներ"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Հեռախոսի ծառայություններ"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Արտակարգ իրավիճակների համարհավաքիչ"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Հեռախոս"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Բացակայում է ձայնային փոստի համարը"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM քարտում ձայնային փոստի ոչ մի համար գրանցված չէ:"</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Ավելացնել համար"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Ձայնային փոստի կարգավորումները կարող է փոխել միայն հիմնական օգտագործողը:"</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Ձեր SIM քարտը ապակողպված է: Ձեր հեռախոսը ապակողպվում է..."</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM ցանցով PIN-ի ապակողպում"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Ապակողպել"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Հայցվում է ցանցի ապակողպում..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Ցանցի ապակողպման հարցումը խափանվեց:"</string>
     <string name="unlock_success" msgid="6770085622238180152">"Ցանցի ապակողպումը խափանվեց"</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Բջջային ցանցի կարգավորումներն անհասանելի են այս օգտատիրոջ"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Բջջային ցանցի կարգավորումներն անհասանելի են այս օգտատիրոջ"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM զանգերի կարգավորումներ"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM զանգի կարգավորումներ (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA զանգերի կարգավորումներ"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Ձայնային փոստ"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Ձայնային փոստ (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"ՁՓ՝"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Ծանուցումներ"</string>
     <string name="networks" msgid="8873030692174541976">"Կապի օպերատորներ"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Ծանուցումներ արտակարգ իրավիճակների մասին"</string>
     <string name="call_settings" msgid="6112441768261754562">"Զանգի կարգավորումներ"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Երբ անհասանելի է"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Թվել, երբ անհասանելի է"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Վերահասցեավորվում է դեպի <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Անջատված է"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Անջատված է"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Ձեր սպասարկողը չի աջակցում զանգի վերահասցեավորման կասեցում, երբ ձեր հեռախոսն անհասանելի է:"</string>
     <string name="updating_title" msgid="6146755386174019046">"Զանգի կարգավորումներ"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Զանգի կարգավորումները կարող է փոխել միայն ադմինիստրատոր հանդիսացող օգտատերը:"</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Նոր PIN-ը պարունակում է անվավեր գրանշաններ:"</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Չհաջողվեց փոխել PIN-ը"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Հաղորդագրության չաջակցվող տեսակ, զանգեք <xliff:g id="NUMBER">%s</xliff:g> համարին՝ լսելու համար:"</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Բջջային ցանցի կարգավորումները"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Բջջ. ցանցի կարգավորումներ"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Բջջային ցանց"</string>
     <string name="label_available" msgid="1181658289009300430">"Հասանելի ցանցեր"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Որոնում..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Ոչ մի ցանց չի գտնվել:"</string>
@@ -237,7 +240,7 @@
     <!-- no translation found for throttle_time_frame_subtext (7732763021560399960) -->
     <skip />
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Տվյալների ծավալը կնվազի մինչև <xliff:g id="USED">%1$d</xliff:g> կԲ/վ, եթե տվյալների օգտագործման սահմանաչափը գերազանցվի"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Լրացուցիչ տեղեկություններ ձեր օպերատորի բջջային ցանցի տվյալների օգտագործման քաղաքականության մասին"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Լրացուցիչ տեղեկություններ ձեր սպասարկողի բջջային ցանցի տվյալների օգտագործման քաղաքականության մասին"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Բջջային հեռարձակման SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Բջջային հեռարձակման SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Բջջային հեռարձակման SMS-ը միացված է"</string>
@@ -374,6 +377,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Ավելացնել կոնտակտ"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Խմբագրել կոնտակտը"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Ջնջել կոնտակտը"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Զանգել կոնտակտին"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Մուտքագրեք PIN2-ը"</string>
     <string name="name" msgid="7329028332786872378">"Անուն"</string>
     <string name="number" msgid="7905950798349903858">"Համար"</string>
@@ -388,7 +392,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Ջնջվում է ամրակայված հեռախոսահամարը ..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Թույլատրված հեռախոսահամարը ջնջված է:"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN-ը չի թարմացվել, քանի որ դուք մուտքագրել եք սխալ PIN:"</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN-ը չի թարմացվել, քանի որ համարը չի կարող գերազանցել 20 նիշը:"</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN-ը չթարմացվեց, քանի որ համարը լրացված չէ կամ գերազանցում է 20 նիշը:"</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN-ը չի թարմացվել: PIN2-ը սխալ է կամ հեռախոսահամարը մերժված է:"</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN գործողությունը ձախողվեց:"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Ընթերցում է SIM քարտից..."</string>
@@ -450,12 +454,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Զանգ կատարելու համար անջատեք Ինքնաթիռի ռեժիմը կամ միացեք անլար ցանցին:"</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Սովորական զանգ կատարելու համար դուրս եկեք շտապ կանչի ռեժիմից։"</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Ցանցում գրանցված չէ:"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Բջջային ցանցն անհասանելի է:"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Բջջային ցանցն անհասանելի է: Զանգ կատարելու համար միացեք անլար ցանցին:"</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Բջջային ցանցն անհասանելի է:"</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Բջջային ցանցն անհասանելի է: Զանգելու համար միացեք Wi-Fi ցանցին:"</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Զանգ կատարելու համար մուտքագրեք ճիշտ համար:"</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Զանգը ձախողվեց:"</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Այս պահին հնարավոր չէ զանգել:"</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Մեկնարկում է MMI հաջորդականությունը..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Ծառայությունը չի աջակցվում"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Հնարավոր չէ փոխանջատել զանգը:"</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Հնարավոր չէ առանձնացնել զանգը:"</string>
@@ -530,10 +533,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Գտնվում է արտակարգ իրավիճակների հետզանգի ռեժիմում"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Արտակարգ իրավիճակների հետզանգի ռեժիմ"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Տվյալների կապն անջատված է"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one"><xliff:g id="COUNT_1">%s</xliff:g> րոպե տվյալների միացում չկա</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> րոպե տվյալների միացում չկա</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Մինչև ժամը <xliff:g id="COMPLETETIME">%s</xliff:g> ինտերնետ կապ չի լինի"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">Հեռախոսը գտնվելու է Արտակարգ իրավիճակների հետզանգի ռեժիմում <xliff:g id="COUNT_1">%s</xliff:g> րոպե: Այդ ռեժիմում տվյալների միացում պահանջող հավելվածները չեն կարող օգտագործվել: Ցանկանո՞ւմ եք դուրս գալ հիմա:</item>
       <item quantity="other">Հեռախոսը գտնվելու է Արտակարգ իրավիճակների հետզանգի ռեժիմում <xliff:g id="COUNT_1">%s</xliff:g> րոպե: Այդ ռեժիմում տվյալների միացում պահանջող հավելվածները չեն կարող օգտագործվել: Ցանկանո՞ւմ եք դուրս գալ հիմա:</item>
@@ -557,12 +557,9 @@
     <string name="selectContact" msgid="781975788478987237">"ընտրել կոնտակտ"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Ձայնային զանգերը չեն սպասարկվում"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"համարհավաքել"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Թրթռոց"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Թրթռոց"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Տեսողական ձայնային փոստ"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Ընտրեք PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Փոխել PIN-ը"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Ձայն"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Ձայներանգ &amp; Թրթռոց"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Ներկառուցված SIM քարտեր"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Միացնել տեսազանգի գործառույթը"</string>
@@ -579,6 +576,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Հաղորդագրությունն ապակոդավորելիս սխալ առաջացավ:"</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM քարտն ակտիվացրել է ծառայությունը և թարմացրել ձեր հեռախոսի ռոումինգի հնարավորությունները:"</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Չափազանց շատ ընթացիկ զանգեր կան: Ավարտեք կամ միավորեք առկա զանգերը՝ նախքան նորն զանգ կատարելը:"</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Չհաջողվեց միանալ, տեղադրեք վավեր SIM քարտ:"</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi կապը կորավ: Զանգն ավարտվեց:"</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Փոխել ձայնային փոստի PIN-ը"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Շարունակել"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Չեղարկել"</string>
diff --git a/res/values-in/config.xml b/res/values-in/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-in/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index 7d3487a..b8d7e21 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Data Seluler"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Data Seluler"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Layanan Telepon"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Aplikasi Telepon Darurat"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telepon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Nomor kotak pesan hilang"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Tidak ada nomor kotak pesan tersimpan pada kartu SIM."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Tambahkan nomor"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Setelan Pesan Suara hanya dapat diubah oleh Pengguna Utama."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Kartu SIM Anda tidak lagi dicekal. Ponsel Anda sedang dibuka kuncinya..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN pembuka kunci jaringan SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Buka kunci"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Meminta membuka jaringan..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Permintaan buka kunci jaringan gagal."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Jaringan berhasil dibuka."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Setelan jaringan seluler tidak tersedia bagi pengguna ini"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Setelan jaringan seluler tidak tersedia bagi pengguna ini"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Setelan panggilan GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Setelan panggilan telepon GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Setelan panggilan CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Kotak Pesan"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Kotak pesan (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Notifikasi"</string>
     <string name="networks" msgid="8873030692174541976">"Operator jaringan"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Siaran darurat"</string>
     <string name="call_settings" msgid="6112441768261754562">"Setelan panggilan"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Saat tidak dapat dihubungi"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Nomor jika tidak dapat dihubungi"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Meneruskan ke <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Dinonaktifkan"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Nonaktif"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Operator Anda tidak mendukung penonaktifan penerusan panggilan ketika ponsel tidak dapat dijangkau."</string>
     <string name="updating_title" msgid="6146755386174019046">"Setelan panggilan"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Setelan panggilan telepon hanya dapat diubah oleh pengguna admin."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"PIN baru berisi karakter yang tidak valid."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Tidak dapat mengubah PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Tipe pesan tidak didukung, telepon <xliff:g id="NUMBER">%s</xliff:g> untuk mendengarkan."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Setelan jaringan seluler"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Setelan jaringan seluler"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Jaringan seluler"</string>
     <string name="label_available" msgid="1181658289009300430">"Jaringan yang tersedia"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Menelusuri…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Jaringan tidak ditemukan."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"Melebihi batas maksimum <xliff:g id="USED_0">%1$s</xliff:g>\nKecepatan data dikurangi hingga <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ dari siklus yang berlalu\nPeriode berikutnya dimulai dalam <xliff:g id="USED_1">%2$d</xliff:g> hari (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Kecepatan data dikurangi menjadi <xliff:g id="USED">%1$d</xliff:g> Kb/s jika penggunaan data melebihi batas"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Informasi selengkapnya tentang kebijakan penggunaan data jaringan seluler operator Anda"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Informasi selengkapnya tentang kebijakan penggunaan data jaringan seluler operator Anda"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS Siaran Sel"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS Siaran Sel"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Setelan SMS Siaran Sel diaktifkan"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Tambahkan kontak"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Edit kontak"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Hapus kontak"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Kontak telepon"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Ketik PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Nama"</string>
     <string name="number" msgid="7905950798349903858">"Nomor"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Menghapus nomor panggilan tetap..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Nomor panggilan tetap dihapus."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN tidak diperbarui karena Anda memasukkan PIN yang salah."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN tidak diperbarui karena nomor tersebut tidak boleh melebihi 20 digit."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"NPT tidak diupdate karena kosong atau melebihi 20 digit."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN tidak diperbarui. PIN2 salah, atau nomor telepon ditolak."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Operasi FDN gagal."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Membaca dari kartu SIM…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Nonaktifkan mode pesawat atau sambungkan ke jaringan nirkabel untuk melakukan panggilan"</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Keluar dari mode telepon balik darurat untuk melakukan panggilan non-darurat."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Tidak terdaftar pada jaringan."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Jaringan seluler tidak tersedia."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Jaringan selular tidak tersedia. Sambungkan ke jaringan nirkabel untuk melakukan panggilan."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Jaringan seluler tidak tersedia."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Jaringan seluler tidak tersedia. Sambungkan ke jaringan nirkabel untuk melakukan panggilan."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Untuk melakukan panggilan telepon, masukkan nomor yang valid."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Telepon gagal."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Panggilan tidak dapat ditambahkan untuk saat ini."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Memulai urutan MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Layanan tidak didukung"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Tidak dapat berganti panggilan telepon."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Tidak dapat memisahkan panggilan telepon."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Masukkan Mode Telepon Balik Darurat"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Mode Panggilan Balik Darurat"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Sambungan data dinonaktifkan"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Tidak ada sambungan data selama <xliff:g id="COUNT_1">%s</xliff:g> menit</item>
-      <item quantity="one">Tidak ada sambungan data selama <xliff:g id="COUNT_0">%s</xliff:g> menit</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Tidak ada koneksi data sampai <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Ponsel ini akan berada dalam mode Panggilan Balik Darurat selama <xliff:g id="COUNT_1">%s</xliff:g> menit. Saat dalam mode ini, aplikasi yang menggunakan sambungan data tidak dapat digunakan. Ingin keluar sekarang?</item>
       <item quantity="one">Ponsel ini akan berada dalam mode Panggilan Balik Darurat selama <xliff:g id="COUNT_0">%s</xliff:g> menit. Saat dalam mode ini, aplikasi yang menggunakan sambungan data tidak dapat digunakan. Ingin keluar sekarang?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"pilih kontak"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Panggilan suara tidak didukung"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"panggil"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Getar"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Getar"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Kotak Pesan Visual"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Setel PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Ubah PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Suara"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Nada dering &amp; Getar"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Kartu SIM internal"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Aktifkan video call"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Terjadi kesalahan saat mendekode pesan."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Kartu SIM telah mengaktifkan layanan dan memperbarui kemampuan roaming ponsel."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Ada terlalu banyak panggilan aktif. Akhiri atau gabungkan panggilan yang ada sebelum melakukan panggilan baru."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Tidak dapat tersambung, masukkan kartu SIM yang valid."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Sambungan Wi-Fi terputus. Panggilan diakhiri."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Ubah PIN Pesan Suara"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Lanjutkan"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Batal"</string>
diff --git a/res/values-is-rIS/arrays.xml b/res/values-is/arrays.xml
similarity index 100%
rename from res/values-is-rIS/arrays.xml
rename to res/values-is/arrays.xml
diff --git a/res/values-is/config.xml b/res/values-is/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-is/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-is-rIS/strings.xml b/res/values-is/strings.xml
similarity index 96%
rename from res/values-is-rIS/strings.xml
rename to res/values-is/strings.xml
index 1d134cf..63bfc03 100644
--- a/res/values-is-rIS/strings.xml
+++ b/res/values-is/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Farsímagögn"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Farsímagögn"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Símaþjónusta"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Neyðarnúmeraval"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Sími"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Talhólfsnúmer vantar"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Ekkert talhólfsnúmer er vistað á SIM-kortinu."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Bæta númeri við"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Aðeins aðalnotandinn má breyta talhólfsstillingum."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Opnað var fyrir SIM-kortið. Verið er að opna símann…"</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN-númer SIM-korts til að opna síma"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Taka úr lás"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Biður um að símkerfi sé opnað…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Ekki tókst að opna fyrir símkerfið."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Opnað var fyrir símkerfið."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Farsímakerfisstillingar eru ekki í boði fyrir þennan notanda"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Farsímakerfisstillingar eru ekki í boði fyrir þennan notanda"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM-símtalsstillingar"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM-símtalsstillingar (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA-símtalsstillingar"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Talhólf"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Talhólf (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"Talhólf:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Tilkynningar"</string>
     <string name="networks" msgid="8873030692174541976">"Símafyrirtæki"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Neyðarútsendingar"</string>
     <string name="call_settings" msgid="6112441768261754562">"Símtalsstillingar"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Þegar ekki næst í þig"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Númeraval þegar ekki næst í símann"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Áframsendir í <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Slökkt"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Slökkt"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Símafyrirtækið leyfir ekki að slökkt sé á símtalsflutningi þegar ekki næst í símann."</string>
     <string name="updating_title" msgid="6146755386174019046">"Símtalsstillingar"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Aðeins stjórnandinn má breyta símtalsstillingum."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Nýja PIN-númerið inniheldur ógilda stafi."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Ekki var hægt að breyta PIN-númerinu"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Óstudd skilaboðagerð, hringdu í <xliff:g id="NUMBER">%s</xliff:g> til að hlusta."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Farsímakerfisstillingar"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Stillingar farsímakerfis"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Farsímakerfi"</string>
     <string name="label_available" msgid="1181658289009300430">"Símkerfi í boði"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Leitar…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Engin símkerfi fundust."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> hámarki náð\nGagnahraði minnkaður í <xliff:g id="USED_1">%2$d</xliff:g> kB/sek."</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ af tímabili lokið\nNæsta tímabil hefst eftir <xliff:g id="USED_1">%2$d</xliff:g> daga (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Gagnahraði minnkaður í <xliff:g id="USED">%1$d</xliff:g> kB/sek. ef farið er yfir gagnanotkunarmörk"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Frekari upplýsingar um gagnanotkunarreglur símafyrirtækisins"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Frekari upplýsingar um reglur símafyrirtækisins um gagnanotkun"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS-skilaboð frá endurvarpa"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS-skilaboð frá endurvarpa"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Kveikt á SMS-skilaboðum frá endurvarpa"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Bæta tengilið við"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Breyta tengilið"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Eyða tengilið"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Hringja í tengilið"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Sláðu inn PIN2-númerið"</string>
     <string name="name" msgid="7329028332786872378">"Nafn"</string>
     <string name="number" msgid="7905950798349903858">"Símanúmer"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Eyða föstu númeravali…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Föstu númeravali eytt."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Fast númeraval var ekki uppfært því að þú slóst inn rangt PIN-númer."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Fast númeraval var ekki uppfært því að númerið getur ekki verið lengra en 20 tölustafir."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Fast númeraval var ekki uppfært því að númerið er autt eða er lengra en 20 tölustafir."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"Fast númeraval var ekki uppfært. PIN2-númerið var rangt eða símanúmerinu var hafnað."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Aðgerð fasts númeravals mistókst."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Les af SIM-korti…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Slökktu á flugstillingu eða tengstu þráðlausu neti til að hringja."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Hætta í stillingu fyrir svarhringingu neyðarsímtala til að hringja símtal sem ekki er neyðarsímtal."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Ekki skráð á símkerfi."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Farsímakerfi ekki til staðar."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Farsímakerfi er ekki í boði. Tengstu þráðlausu neti til að hringja."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Farsímakerfi ekki tiltækt."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Farsímakerfi er ekki tiltækt. Tengstu þráðlausu neti til að hringja."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Sláðu inn gilt númer til að hringja símtal."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Tókst ekki að hringja."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Ekki er hægt að bæta símtali við sem stendur."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Ræsir MMI-runu…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Þjónusta ekki studd"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Ekki hægt að skipta milli símtala."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Ekki hægt að aðskilja símtal."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Stilling fyrir svarhringingu neyðarsímtala virk"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Stilling fyrir svarhringingu neyðarsímtala"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Slökkt á gagnatengingu"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">Engin gagnatenging í <xliff:g id="COUNT_1">%s</xliff:g> mínútu</item>
-      <item quantity="other">Engin gagnatenging í <xliff:g id="COUNT_1">%s</xliff:g> mínútur</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Engin gagnatenging þangað til <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">Síminn verður í stillingu fyrir svarhringingu neyðarsímtala í <xliff:g id="COUNT_1">%s</xliff:g> mínútu. Þegar hann er í þessari stillingu er ekki hægt að nota nein forrit sem krefjast gagnatengingar. Viltu hætta núna?</item>
       <item quantity="other">Síminn verður í stillingu fyrir svarhringingu neyðarsímtala í <xliff:g id="COUNT_1">%s</xliff:g> mínútur. Þegar hann er í þessari stillingu er ekki hægt að nota nein forrit sem krefjast gagnatengingar. Viltu hætta núna?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"velja tengilið"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Símtöl eru ekki studd"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"hringja"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Titringur"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Titringur"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Myndrænt talhólf"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Stilla PIN-númer"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Breyta PIN-númeri"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Hljóð"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Hringitónn og titringur"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Innbyggð SIM-kort"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Kveikja á myndsímtölum"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Villa kom upp við að afkóða skeytið."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM-kort hefur virkjað þjónustuna þína og uppfært reikigetu símans."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Of mörg símtöl eru virk. Ljúktu eða sameinaðu fyrirliggjandi símtöl áður en þú hringir nýtt."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Ekki var hægt að tengjast, notaðu gilt SIM-kort."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi tengingin rofnaði. Símtalinu lauk."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Breyta PIN-númeri talhólfs"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Halda áfram"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Hætta við"</string>
diff --git a/res/values-it/config.xml b/res/values-it/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-it/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 31ff2e0..a44e6f0 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Dati mobili"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Dati cellulare"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Phone Services"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Chiamata di emergenza"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefono"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Numero segreteria mancante"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Nessun numero di segreteria presente nella SIM."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Aggiungi numero"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Le impostazioni della segreteria possono essere modificate solo dall\'utente principale."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"La SIM è stata sbloccata. Sblocco del telefono..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN sblocco rete SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Sblocca"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Richiesta sblocco rete..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Richiesta di sblocco della rete respinta."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Sblocco della rete riuscito."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Le impostazioni per reti cellulari non sono disponibili per questo utente"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Le impostazioni per dispositivi mobili non sono disponibili per questo utente"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Imp. chiamate GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Impostazioni di chiamata GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Impostazioni di chiamata CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Segreteria"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Segreteria (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"ST:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Notifiche"</string>
     <string name="networks" msgid="8873030692174541976">"Operatori di rete"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Trasmissioni di emergenza"</string>
     <string name="call_settings" msgid="6112441768261754562">"Impostazioni chiamate"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Quando non raggiungibile"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Numero se non raggiungibile"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Deviazione al numero <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Disattivato"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Non attiva"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Il tuo operatore non supporta la disattivazione dell\'inoltro chiamate quando il telefono non è raggiungibile."</string>
     <string name="updating_title" msgid="6146755386174019046">"Impostazioni chiamate"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Le impostazioni delle chiamate possono essere modificate solo dall\'utente amministratore."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Il nuovo PIN contiene caratteri non validi."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Impossibile cambiare il PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Tipo di messaggio non supportato, chiama <xliff:g id="NUMBER">%s</xliff:g> per ascoltare."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Impostazioni rete cellulare"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Impostazioni reti mobili"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Rete mobile"</string>
     <string name="label_available" msgid="1181658289009300430">"Reti disponibili"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Ricerca..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Nessuna rete trovata."</string>
@@ -235,7 +238,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> max superato\nVelocità dati ridotta a <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>% del ciclo trascorso\nIl periodo succ. inizia tra <xliff:g id="USED_1">%2$d</xliff:g> gg (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Velocità dati ridotta a <xliff:g id="USED">%1$d</xliff:g> Kb/s se limite utilizzo dati superato"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Informazioni su norme di utilizzo dati della rete cellulare dell\'operatore"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Informazioni sulla norme di utilizzo dati della rete cellulare del gestore"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS cell broadcast"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS cell broadcast"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"SMS cell broadcast attivato"</string>
@@ -372,6 +375,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Aggiungi contatto"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Modifica contatto"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Elimina contatto"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Componi numero contatto"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Digita PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Nome"</string>
     <string name="number" msgid="7905950798349903858">"Numero"</string>
@@ -386,7 +390,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Eliminazione numero selezione fissa..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Numero di selezione fissa eliminato."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN non aggiornato perché il PIN inserito non è corretto."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN non è stato aggiornato perché il numero non può superare 20 cifre."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN non è stato aggiornato perché il numero è vuoto o contiene più di 20 cifre."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN non aggiornato. Il codice PIN2 non era corretto o il numero di telefono è stato rifiutato."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Operazione FDN non riuscita."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Lettura da SIM..."</string>
@@ -448,12 +452,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Disattiva la modalità aereo o connettiti a una rete wireless per effettuare una chiamata."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Per effettuare chiamate non di emergenza, esci dalla modalità di richiamata di emergenza."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Non registrato sulla rete."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Rete cellulare non disponibile."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"La rete cellulare non è disponibile. Connettiti a una rete wireless per effettuare una chiamata."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Rete cellulare non disponibile."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"La rete cellulare non è disponibile. Connettiti a una rete wireless per effettuare una chiamata."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Per effettuare una chiamata, inserisci un numero valido."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Chiamata non riuscita."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Al momento non è possibile aggiungere la chiamata."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Inizio sequenza MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Servizio non supportato"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Impossibile cambiare chiamata."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Impossibile separare la chiamata."</string>
@@ -528,10 +531,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Modalità di richiamata di emergenza attivata"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Modalità di richiamata di emergenza"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Connessione dati disabilitata"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Nessuna connessione dati per <xliff:g id="COUNT_1">%s</xliff:g> minuti</item>
-      <item quantity="one">Nessuna connessione dati per <xliff:g id="COUNT_0">%s</xliff:g> minuto</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Nessuna connessione dati fino alle ore <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Il telefono sarà in modalità Richiamata di emergenza per <xliff:g id="COUNT_1">%s</xliff:g> minuti. In questa modalità non è possibile utilizzare applicazioni che impiegano una connessione dati. Vuoi uscire ora?</item>
       <item quantity="one">Il telefono sarà in modalità Richiamata di emergenza per <xliff:g id="COUNT_0">%s</xliff:g> minuto. In questa modalità non è possibile utilizzare app che impiegano una connessione dati. Vuoi uscire ora?</item>
@@ -555,12 +555,9 @@
     <string name="selectContact" msgid="781975788478987237">"seleziona contatto"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Chiamate vocali non supportate"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"componi"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibrazione"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibrazione"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Leggi la segreteria"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Imposta PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Cambia PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Suono"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Suoneria e vibrazione"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Schede SIM integrate"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Attiva videochiamata"</string>
@@ -577,6 +574,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Si è verificato un errore durante la decodifica del messaggio."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Una scheda SIM ha attivato il tuo servizio e ha aggiornato le funzionalità di roaming del telefono."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Ci sono troppe chiamate attive. Termina o unisci le chiamate esistenti prima di effettuarne una nuova."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Impossibile collegarsi. Inserisci una scheda SIM valida."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Connessione Wi-Fi interrotta. Chiamata terminata."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Cambia PIN segreteria"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Continua"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Annulla"</string>
diff --git a/res/values-iw/config.xml b/res/values-iw/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-iw/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index 93626e3..2110b55 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"נתונים סלולריים"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"נתוני נייד"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"שירותי טלפון"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"חייגן חירום"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"טלפון"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"חסר מספר של דואר קולי"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"‏בכרטיס ה-SIM לא מאוחסן מספר של דואר קולי."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"הוסף מספר"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"רק המשתמש הראשי יכול לשנות את ההגדרות של הדואר הקולי."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"‏בוטלה החסימה של כרטיס SIM. מבטל את חסימת הטלפון..."</string>
     <string name="label_ndp" msgid="780479633159517250">"‏PIN לביטול נעילה של רשת SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"בטל נעילה"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"מבקש ביטול נעילת רשת..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"הבקשה לביטול נעילת הרשת נכשלה."</string>
     <string name="unlock_success" msgid="6770085622238180152">"ביטול נעילת הרשת התבצע בהצלחה."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"הגדרות רשת סלולרית אינן זמינות עבור המשתמש הזה"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"הגדרות של רשת סלולרית אינן זמינות עבור המשתמש הזה"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"‏הגדרות שיחה של GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"‏הגדרות שיחת GSM ‏(<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"‏הגדרות שיחה של CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"דואר קולי"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"דואר קולי (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"דואר קולי:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"עדכונים"</string>
     <string name="networks" msgid="8873030692174541976">"מפעילי רשת"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"שידורי חירום"</string>
     <string name="call_settings" msgid="6112441768261754562">"הגדרות שיחה"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"כאשר לא נגיש"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"המספר לחיוג כשלא ניתן להשיג"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"מעביר אל <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"מושבת"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"כבוי"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"הספק שלך לא תומך בהשבתה של העברת שיחות כאשר הטלפון כבוי."</string>
     <string name="updating_title" msgid="6146755386174019046">"הגדרות שיחה"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"רק מנהל המערכת יכול לשנות הגדרות שיחה."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"קוד הגישה החדש מכיל תווים לא חוקיים."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"לא ניתן לשנות את קוד הגישה"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"סוג ההודעה לא נתמך. התקשר למספר <xliff:g id="NUMBER">%s</xliff:g> כדי להאזין לה."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"הגדרות רשת סלולרית"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"הגדרות רשת סלולרית"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"רשת סלולרית"</string>
     <string name="label_available" msgid="1181658289009300430">"רשתות זמינות"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"מחפש..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"לא נמצאו רשתות."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"‏<xliff:g id="USED_0">%1$s</xliff:g> חריגה מהמקסימום\nקצב הנתונים ירד ל-‏‎<xliff:g id="USED_1">%2$d</xliff:g> Kb לשנייה"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>?? מהמחזור חלפו\nהתקופה הבאה מתחילה בעוד <xliff:g id="USED_1">%2$d</xliff:g> ימים (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"‏קצב הנתונים יורד ל-‏‎<xliff:g id="USED">%1$d</xliff:g> Kb לשנייה במקרה של חריגה ממגבלת השימוש בנתונים"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"מידע נוסף על מדיניות השימוש בנתונים ברשת הסלולרית של הספק שלך"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"למידע נוסף על מדיניות השימוש בנתונים ברשת הסלולרית של הספק שלך"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"‏SMS בשידור סלולרי"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"‏SMS בשידור סלולרי"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"‏SMS בשידור סלולרי מופעל"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"הוסף איש קשר"</string>
     <string name="menu_edit" msgid="7143003705504672374">"ערוך איש קשר"</string>
     <string name="menu_delete" msgid="3977150783449642851">"מחק איש קשר"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"חיוג לאיש הקשר"</string>
     <string name="get_pin2" msgid="8204677063922225311">"‏הקלד PIN2"</string>
     <string name="name" msgid="7329028332786872378">"שם"</string>
     <string name="number" msgid="7905950798349903858">"מספר"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"מוחק מספר חיוג קבוע..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"מספר חיוג קבוע נמחק."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"רשימת מספרי חיוג קבועים לא עודכנה מכיוון שקוד הגישה שגוי."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"רשימת מספרי חיוג קבועים לא עודכנה משום שהמספר חורג ממגבלת 20 הספרות."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"‏ה-FDN לא עודכן מכיוון שהמספר ריק או ארוך מ-20 תווים."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"רשימת מספרי החיוג הקבועים לא עודכנה. קוד הגישה היה שגוי או שמספר הטלפון נדחה."</string>
     <string name="fdn_failed" msgid="540018079008319747">"‏פעולת FDN נכשלה."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"‏קורא מכרטיס SIM…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"בטל את מצב טיסה או התחבר לרשת אלחוטית כדי לבצע שיחה."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"עליך לצאת ממצב חירום של התקשרות חזרה כדי לבצע שיחות שאינן שיחות חירום."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"לא רשום ברשת."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"רשת סלולרית אינה זמינה."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"רשת סלולרית אינה זמינה. התחבר לרשת אלחוטית כדי לבצע שיחה."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"הרשת הסלולרית אינה זמינה."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"הרשת הסלולרית לא זמינה. עליך להתחבר לרשת אלחוטית כדי להתקשר."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"כדי להתקשר, הזן מספר טלפון חוקי."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"השיחה נכשלה."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"לא ניתן להוסיף את השיחה כרגע."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"‏מתחיל רצף MMI…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"שירות לא נתמך"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"לא ניתן לעבור בין שיחות."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"לא ניתן להפריד שיחה."</string>
@@ -524,12 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"נכנס למצב חירום של התקשרות חזרה"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"מצב חירום של התקשרות חזרה"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"חיבור נתונים מושבת"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="two">ללא חיבור נתונים למשך <xliff:g id="COUNT_1">%s</xliff:g> דקות</item>
-      <item quantity="many">ללא חיבור נתונים למשך <xliff:g id="COUNT_1">%s</xliff:g> דקות</item>
-      <item quantity="other">ללא חיבור נתונים למשך <xliff:g id="COUNT_1">%s</xliff:g> דקות</item>
-      <item quantity="one">ללא חיבור נתונים למשך דקה <xliff:g id="COUNT_0">%s</xliff:g></item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"אין חיבור לרשת נתונים עד <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="two">הטלפון יהיה במצב חירום של התקשרות חזרה למשך <xliff:g id="COUNT_1">%s</xliff:g> דקות. בזמן שהטלפון במצב הזה, לא ניתן להשתמש באפליקציות הזקוקות לחיבור נתונים. האם ברצונך לצאת כעת?</item>
       <item quantity="many">הטלפון יהיה במצב חירום של התקשרות חזרה למשך <xliff:g id="COUNT_1">%s</xliff:g> דקות. בזמן שהטלפון במצב הזה, לא ניתן להשתמש באפליקציות הזקוקות לחיבור נתונים. האם ברצונך לצאת כעת?</item>
@@ -557,12 +555,9 @@
     <string name="selectContact" msgid="781975788478987237">"בחר איש קשר"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"חיוג קולי אינו נתמך"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"חייג"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"רטט"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"רטט"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"דואר קולי ויזואלי"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"הגדרת קוד גישה"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"שינוי קוד הגישה"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"צליל"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"רינגטון ורטט"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"‏כרטיסי SIM מובנים"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"הפעל שיחות וידאו"</string>
@@ -579,6 +574,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"אירעה שגיאה בעת פענוח ההודעה."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"‏כרטיס SIM הפעיל את השירות שלך ועדכן את יכולות הנדידה של הטלפון."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"יש יותר מדי שיחות פעילות. כדי להתחיל שיחה חדשה עליך לסיים או למזג חלק מהשיחות הפעילות."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"‏לא ניתן להתחבר. הכנס כרטיס SIM תקין."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"‏השיחה הסתיימה כי החיבור לרשת ה-Wi-Fi נותק."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"שינוי של קוד הגישה לדואר הקולי"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"המשך"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"ביטול"</string>
diff --git a/res/values-ja/config.xml b/res/values-ja/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-ja/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 9c7b7e3..fdae773 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"モバイルデータ"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"モバイルデータ"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"電話サービス"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"緊急通報"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"電話"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"ボイスメール番号がありません"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIMカードにボイスメールの番号がありません。"</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"番号を追加"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"ボイスメール設定を変更できるのはメインユーザーのみに限られています。"</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"SIMカードロックを解除しました。端末のロックを解除しています..."</string>
     <string name="label_ndp" msgid="780479633159517250">"SIMネットワークのロック解除PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"ロック解除"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"ネットワークのロック解除をリクエスト中..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"ネットワークロックを解除できませんでした。"</string>
     <string name="unlock_success" msgid="6770085622238180152">"ネットワークロックを解除しました。"</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"このユーザーはモバイルネットワーク設定を利用できません。"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"このユーザーはモバイルネットワーク設定を利用できません。"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM通話設定"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM通話設定(<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA通話設定"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"ボイスメール"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"ボイスメール(<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"通知"</string>
     <string name="networks" msgid="8873030692174541976">"通信事業者"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"緊急速報メール"</string>
     <string name="call_settings" msgid="6112441768261754562">"通話設定"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"着信不能時"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"着信不能時の転送番号"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g>に転送する"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"無効"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"OFF"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"ご利用の携帯通信会社は着信不能時の転送の無効化をサポートしていません。"</string>
     <string name="updating_title" msgid="6146755386174019046">"通話設定"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"通話設定は管理者ユーザーのみが変更できます。"</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"新しい PIN に無効な文字が含まれています。"</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN を変更できませんでした"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"サポートされていないメッセージ タイプです。<xliff:g id="NUMBER">%s</xliff:g> 宛に電話をかけてメッセージをお聞きください。"</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"モバイルネットワーク設定"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"モバイルネットワーク設定"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"モバイル ネットワーク"</string>
     <string name="label_available" msgid="1181658289009300430">"利用可能なネットワーク"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"検索中..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"ネットワークが見つかりません。"</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"最大値<xliff:g id="USED_0">%1$s</xliff:g>を超えました\n転送速度は<xliff:g id="USED_1">%2$d</xliff:g>Kb/秒に低下"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"サイクルの٪<xliff:g id="USED_0">%1$d</xliff:g>を経過\n次の期間は<xliff:g id="USED_1">%2$d</xliff:g>日で始まります(<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"データ利用制限を超えると、転送速度が<xliff:g id="USED">%1$d</xliff:g>Kb/秒まで低下します"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"携帯通信会社のモバイルネットワークデータ利用ポリシーの詳細"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"携帯通信会社のモバイルネットワークデータ利用ポリシーの詳細"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"緊急速報メール SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"緊急速報メール SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"緊急速報メール SMS は有効になっています"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"連絡先を追加"</string>
     <string name="menu_edit" msgid="7143003705504672374">"連絡先を編集"</string>
     <string name="menu_delete" msgid="3977150783449642851">"連絡先を削除"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"連絡先に発信"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2を入力"</string>
     <string name="name" msgid="7329028332786872378">"名前"</string>
     <string name="number" msgid="7905950798349903858">"電話番号"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"発信番号制限を削除しています..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"発信番号制限を削除しました。"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"発信番号制限は更新されませんでした。入力したPINは正しくありません。"</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"発信番号制限は更新されませんでした。20桁を超える番号は指定できません。"</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"電話番号が空白になっているか、20 桁を超えているため、FDN を更新できませんでした。"</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"発信番号制限は更新されませんでした。PIN2が正しくないか、電話番号が拒否されました。"</string>
     <string name="fdn_failed" msgid="540018079008319747">"発信番号制限操作に失敗しました。"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"SIMカードから読み取り中..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"電話をかけるには、機内モードをオフにするか無線ネットワークに接続してください。"</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"緊急通報以外の通話を発信するには、緊急通報待機モードを終了してください。"</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"ご加入の通信サービスがありません"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"モバイルネットワークが利用できません。"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"モバイルネットワークが利用できません。電話をかけるには無線ネットワークに接続してください。"</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"モバイルネットワークが利用できません。"</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"モバイル ネットワークを利用できません。電話をかけるにはワイヤレス ネットワークに接続してください。"</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"発信するには、有効な番号を入力してください。"</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"発信できませんでした。"</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"現在、通話を追加できません。"</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMIシーケンスを開始中..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"サービスはサポートされていません"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"通話を切り替えられません。"</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"通話を分割できません。"</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"緊急通報待機モードになりました"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"緊急通報待機モード"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"データ接続が無効です"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g>分間データ接続できません</item>
-      <item quantity="one"><xliff:g id="COUNT_0">%s</xliff:g>分間データ接続できません</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> までデータ接続できません"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">スマートフォンはあと<xliff:g id="COUNT_1">%s</xliff:g>分間、緊急通報待機モードです。このモードではデータ通信を行うアプリは使用できません。今すぐこのモードを終了しますか?</item>
       <item quantity="one">スマートフォンはあと<xliff:g id="COUNT_0">%s</xliff:g>分間、緊急通報待機モードです。このモードではデータ通信を行うアプリは使用できません。今すぐこのモードを終了しますか?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"連絡先を選択"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"音声通話はサポートされていません"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"発信"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"バイブレーション"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"バイブレーション"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"ビジュアルボイスメール"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN の設定"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"PIN の変更"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"通知音"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"着信音とバイブレーション"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"内蔵のSIMカード"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"ビデオハングアウトを有効にする"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"メッセージのデコード中にエラーが発生しました。"</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIMカードでサービスが有効になり、スマートフォンのローミング機能が更新されています。"</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"通話中の電話の数が多すぎます。新しく通話を発信するには、まず既存の通話を終了するか、統合してグループ通話にしてください。"</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"接続できません。有効な SIM カードを挿入してください。"</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi 接続が失われたため、通話が終了しました。"</string>
     <string name="change_pin_title" msgid="7790232089699034029">"ボイスメール PIN の変更"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"続行"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"キャンセル"</string>
diff --git a/res/values-ka-rGE/arrays.xml b/res/values-ka/arrays.xml
similarity index 100%
rename from res/values-ka-rGE/arrays.xml
rename to res/values-ka/arrays.xml
diff --git a/res/values-ka/config.xml b/res/values-ka/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-ka/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-ka-rGE/strings.xml b/res/values-ka/strings.xml
similarity index 96%
rename from res/values-ka-rGE/strings.xml
rename to res/values-ka/strings.xml
index d74b80c..effa960 100644
--- a/res/values-ka-rGE/strings.xml
+++ b/res/values-ka/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"ფიჭური მონაცემები"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"მობილური ინტერნეტი"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"ტელეფონის სერვისები"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"გადაუდებელი ზარი"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"ტელეფონი"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"ხმოვანი ფოსტის ნომერი არ არის"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM ბარათზე ხმოვანი ფოსტის ნომერი შენახული არ არის."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"ნომრის დამატება"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"ხმოვანი ფოსტის პარამეტრების შეცვლა მხოლოდ ძირითად მომხმარებელს შეუძლია."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"თქვენი SIM ბარათი განიბლოკა. მიმდინარეობს თქვენი ტელეფონის განბლოკვა…"</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM ქსელის განბლოკვის PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"განბლოკვა"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"ქსელის განბლოკვის მოთხოვნა…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"ქსელის განბლოკვის მოთხოვნა წარუმატებლად დასრულდა."</string>
     <string name="unlock_success" msgid="6770085622238180152">"ქსელის განბლოკვის მოთხოვნა წარმატებით დასრულდა."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"ფიჭური ქსელის პარამეტრები ამ მომხმარებლისათვის მიუწვდომელია"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"მობილური ქსელის პარამეტრები ამ მომხმარებლისათვის მიუწვდომელია"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM ზარის პარამეტრები"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM ზარის პარამეტრები (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA ზარის პარამეტრები"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"ხმოვანი ფოსტა"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"ხმოვანი ფოსტა (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"შეტყობინებები"</string>
     <string name="networks" msgid="8873030692174541976">"ქსელის ოპერატორები"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"სასწრაფო გადაცემები"</string>
     <string name="call_settings" msgid="6112441768261754562">"ზარის პარამეტრები"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"როდესაც მიუწვდომელია"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"ნომერი, როდესაც მიუწვდომელია"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"გადამისამართება <xliff:g id="PHONENUMBER">{0}</xliff:g>-ზე"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"გამორთულია"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"გამორთული"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"თქვენს ოპერატორს ტელეფონის მიუწვდომელობის დროს ზარის გადამისამართების გაუქმების მხარდაჭერა არ გააჩნია."</string>
     <string name="updating_title" msgid="6146755386174019046">"ზარის პარამეტრები"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"ზარის პარამეტრების შეცვლა მხოლოდ მომხმარებელ-ადმინისტრატორს შეუძლია."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"ახალი PIN-კოდი არასწორ სიმბოლოებს შეიცავს."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN-კოდის შეცვლა შეუძლებელია"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"შეტყობინების ტიპი მხარდაუჭერელია. მოსასმენად დარეკეთ <xliff:g id="NUMBER">%s</xliff:g>-ზე."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"ფიჭური ქსელის პარამეტრებიჶ"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"მობილური ქსელის პარამეტრები"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"მობილური ქსელი"</string>
     <string name="label_available" msgid="1181658289009300430">"ხელმისაწვდომი ქსელები"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"ძიება..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"ქსელები ვერ მოიძებნა."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"გადაჭარბებულია <xliff:g id="USED_0">%1$s</xliff:g> მაქსიმუმი\nმონაცემთა გადაცემის სიჩქარე შემცირდა <xliff:g id="USED_1">%2$d</xliff:g> კბიტი/წმ-ზე"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"გასულია ციკლის <xliff:g id="USED_0">%1$d</xliff:g>٪\nშემდეგი პერიოდის ათვლა იწყება <xliff:g id="USED_1">%2$d</xliff:g> დღეში (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"მონაცემთა გამოყენების ლიმიტის გადაჭარბების შემთხვევაში, მონაცემთა გადაცემის სიჩქარე შემცირდება <xliff:g id="USED">%1$d</xliff:g> კბიტი/წმ-ზე"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"დამატებითი ინფორმაცია თქვენი ოპერატორის ფიჭური ინტერნეტის გამოყენების წესების შესახებ"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"დამატებითი ინფორმაცია თქვენი ოპერატორის მობილური ინტერნეტის გამოყენების წესების შესახებ"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Cell Broadcast SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Cell Broadcast SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Cell Broadcast SMS ჩართულია"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"კონტაქტის დამატება"</string>
     <string name="menu_edit" msgid="7143003705504672374">"კონტაქტის რედაქტირება"</string>
     <string name="menu_delete" msgid="3977150783449642851">"კონტაქტის წაშლა"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"კონტაქტთან დარეკვა"</string>
     <string name="get_pin2" msgid="8204677063922225311">"აკრიფეთ PIN2"</string>
     <string name="name" msgid="7329028332786872378">"სახელი"</string>
     <string name="number" msgid="7905950798349903858">"ნომერი"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"დაშვებული დარეკვის კონტაქტის წაშლა…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"დაშვებული ნომერი წაიშალა."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN არ განახლდა, რადგან არასწორი PIN შეიყვანეთ."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN ვერ განახლდა, რადგან ნომერი არ შეიძლება 20 ციფრს აღემატებოდეს."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN არ განახლებულა, რადგან ნომერი ცარიელია ან 20 ციფრზე მეტს შეიცავს."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN არ განახლდა. PIN2 არასწორია ან ტელეფონის ნომერი უარყოფილია."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN ოპერაცია ვერ განხორციელდა."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"მიმდინარეობს SIM ბარათიდან წაკითხვა…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"ზარის განსახორციელებლად, გამორთეთ თვითმფრინავის რეჟიმი ან დაუკავშირდით უსადენო ქსელს."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"გამოდით გადაუდებელი გადმორეკვის რეჟიმიდან არაგადაუდებელი ზარის განსახორციელებლად."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"ქსელში რეგისტრირებული არ არის."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"ფიჭური ქსელი მიუწვდომელია"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"ფიჭური ქსელი მიუწვდომელია. ზარის განსახორციელებლად, დაუკავშირდით უსადენო ქსელს."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"მობილური ქსელი მიუწვდომელია."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"მობილური ქსელი მიუწვდომელია. ზარის განსახორციელებლად დაუკავშირდით უსადენო ქსელს."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"ზარის განხორციელებისათვის, შეიყვანეთ მოქმედი ნომერი."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"ზარი ვერ განხორციელდა."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"ამჯერად ზარის დამატება ვერ ხერხდება."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI თანმიმდევრობის დაწყება…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"მომსახურება არ არის მხარდაჭერილი"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"ვერ ხორციელდება ზარების გადართვა."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"ვერ ხორციელდება ზარის გამოყოფა."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"გააქტიურდა გადაუდებელი გადმორეკვის რეჟიმი"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"გადაუდებელი გადმორეკვის რეჟიმი"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"მობილური ინტერნეტი გამორთულია"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other"> არ არის დაკავშირების მონაცემები <xliff:g id="COUNT_1">%s</xliff:g> წუთისათვის</item>
-      <item quantity="one"> არ არის დაკავშირების მონაცემები <xliff:g id="COUNT_0">%s</xliff:g> წუთისათვის</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"მობილურ ინტერნეტთან კავშირი მიუწვდომელია <xliff:g id="COMPLETETIME">%s</xliff:g>-მდე"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other"> ტელეფონი იქნება საგანგებო დარეკვის რეჟიმი <xliff:g id="COUNT_1">%s</xliff:g> წუთით. ამ რეჟიმის მანძილზე ვერ მოხერხდება მონაცემთა დაკავშირების გმაოყენებით აპლიკაციების გამოყენება. გსურთ ახლა გამოსვლა?</item>
       <item quantity="one"> ტელეფონი იქნება საგანგებო დარეკვის რეჟიმი <xliff:g id="COUNT_0">%s</xliff:g> წუთით. ამ რეჟიმის მანძილზე ვერ მოხერხდება მონაცემთა დაკავშირების გმაოყენებით აპლიკაციების გამოყენება. გსურთ ახლა გამოსვლა?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"კონტაქტის არჩევა"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"ხმოვანი ზარი მხარდაჭრილი არ არის"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"დარეკვა"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"ვიბრაცია"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"ვიბრაცია"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"ვიზუალური ხმოვანი ფოსტა"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"დააყენეთ PIN-კოდი"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"PIN-კოდის შეცვლა"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"ხმა"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"ზარის მელოდია &amp; ვიბრაცია"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"ჩაშენებული SIM ბარათები"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"ვიდეოზარის ჩართვა"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"შეტყობინების გაშიფრვისას წარმოიშვა შეცდომა."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM ბარათმა გაააქტიურა თქვენი სერვისი და თქვენი ტელეფონის როუმინგის შესაძლებლობები განაახლა."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"ძალიან ბევრი აქტიური ზარია. გთხოვთ, დაასრულოთ ან გააერთიანოთ არსებული ზარები ახალი ზარის განხორციელებამდე."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"დაკავშირება შეუძლებელია, გთხოვთ, ჩადოთ მოქმედი SIM ბარათი."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi კავშირი დაიკარგა. ზარი დასრულდა."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"ხმოვანი ფოსტის PIN-კოდის შეცვლა"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"გაგრძელება"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"გაუქმება"</string>
diff --git a/res/values-kk-rKZ/arrays.xml b/res/values-kk/arrays.xml
similarity index 100%
rename from res/values-kk-rKZ/arrays.xml
rename to res/values-kk/arrays.xml
diff --git a/res/values-kk/config.xml b/res/values-kk/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-kk/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-kk-rKZ/strings.xml b/res/values-kk/strings.xml
similarity index 96%
rename from res/values-kk-rKZ/strings.xml
rename to res/values-kk/strings.xml
index 496242a..88fe51c 100644
--- a/res/values-kk-rKZ/strings.xml
+++ b/res/values-kk/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Ұялы деректер"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Ұялы дерекқор"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Телефон қызметтері"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Төтенше тергіш"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Телефон"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Дауыс хабарының нөмірі жоқ"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM картасында ешқандай дауыс хабарының нөмірі сақталмаған."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Нөмір қосу"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Дауыстық пошта параметрлерін тек негізгі пайдаланушы өзгерте алады."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"SIM картаңыз ашылды. Телефоныңыздың бекітпесі ашылуда…"</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM желісін ашатын PIN код"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Бекітпесін ашу"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Желінің бекітпесін ашуды өтінуде…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Желінің бекітпесін алу өтініші орындалмады."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Желінің бекітпесін алу орындалды."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Ұялы желі параметрлері бұл пайдаланушы үшін қол жетімді емес"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Мобильдік желі параметрлері бұл пайдаланушы үшін қол жетімді емес"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM қоңырауының параметрлері"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM қоңырау параметрлері (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA қоңырауының параметрлері"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Дауыстық пошта"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Дауыстық пошта (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"ДХ:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Хабарландырулар"</string>
     <string name="networks" msgid="8873030692174541976">"Желі операторлары"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Жедел таратылымдар"</string>
     <string name="call_settings" msgid="6112441768261754562">"Қоңырау параметрлері"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Хабарласу мүмкін болмағанда"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Хабарласа алмағанда бағытталатын нөмір"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> нөміріне бағытталуда"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Өшірілген"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Өшірулі"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Телефоныңыз қол жетімсіз болғанда жабдықтаушы қоңырауды басқа нөмірге бағыттауды өшіруді қолдамайды."</string>
     <string name="updating_title" msgid="6146755386174019046">"Қоңырау параметрлері"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Қоңырау параметрлерін тек әкімші пайдаланушы өзгерте алады."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Жаңа PIN кодта жарамсыз таңбалар бар."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN кодты өзгерту мүмкін емес"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Қолдау көрсетілмейтін хабар түрі, тыңдау үшін <xliff:g id="NUMBER">%s</xliff:g> нөміріне қоңырау шалыңыз."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Ұялы желі параметрлері"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Ұялы желі параметрлері"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Мобильдік желі"</string>
     <string name="label_available" msgid="1181658289009300430">"Қол жетімді желілер"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Іздеуде…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Ешқандай желілер табылмады."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> ең көп мөлшерінен асып кетті\nДерекқор мөлшері <xliff:g id="USED_1">%2$d</xliff:g> Kб/с шамасына азайтылды"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"Мерзімі аяқталған айналым <xliff:g id="USED_0">%1$d</xliff:g>٪ \nКелесі мерзім <xliff:g id="USED_1">%2$d</xliff:g> күнде басталады (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Егер дерекқор қолдану анықталған шегінен асып кетсе, дерекқор мөлшері <xliff:g id="USED">%1$d</xliff:g> Kб/с шамасына азайтылады."</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Оператордың ұялы желі деректерін пайдалану саясаты туралы қосымша ақпарат"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Жабдықтаушының ұялы желі дерекқорын қолдану саясаты туралы толығырақ ақпарат"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Ұялы таратылымды SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Ұялы таратылымды SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Ұялы таратылымды SMS қосылған"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Байланыс қосу"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Байланыс өңдеу"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Байланыс жою"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Контактіге қоңырау шалу"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2 кодын теріңіз"</string>
     <string name="name" msgid="7329028332786872378">"Атауы"</string>
     <string name="number" msgid="7905950798349903858">"Нөмір"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Тұрақты теру нөмірін өшіруде…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Тұрақты теру нөмірі жойылды."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"ТТН жаңартылмады, себебі қате PIN код терілді."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"ТТН жаңартылмады, себебі нөмір 20 бірліктен аспауы тиіс."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN жаңартылмады, себебі нөмір 20 бірліктен аспауы тиіс."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"ТТН жаңартылмады. PIN2 қате болды немесе телефон нөмірі қабылданбады."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Тұрақты теру нөмірлерінің жұмысы орындалмады."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"SIM картасынан оқу…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Қоңырау шалу үшін ұшақ режимін өшіріңіз не сымсыз желіге қосылыңыз."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Төтенше емес қоңырау шалу үшін төтенше қоңырауды кері шалу режимінен шығыңыз."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Желіде тіркелмеген."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Ұялы желі қол жетімді емес."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Ұялы желі қол жетімді емес. Қоңырау шалу үшін сымсыз желіге қосылыңыз."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Ұялы желі қол жетімсіз."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Мобильдік желі қолжетімді емес. Қоңырау шалу үшін сымсыз желіге қосылыңыз."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Қоңырау шалу үшін жарамды нөмірді енгізіңіз."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Қоңырау шалынбады."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Қоңырауды қазіргі уақытта қосу мүмкін емес."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI қатарын бастау…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Қызметке қолдау көрсетілмейді"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Қоңырауларды ауыстыру мүмкін емес."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Қоңырауды бөлу мүмкін емес."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Төтенше қоңырауды кері шалу режиміне кірді"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Төтенше қоңырауды кері шалу режимі"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Дерекқор байланысы өшірілген"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> минут бойы деректер байланысы жоқ</item>
-      <item quantity="one"><xliff:g id="COUNT_0">%s</xliff:g> минут бойы деректер байланысы жоқ</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> дейін мобильдік байланыс болмайды."</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Телефон <xliff:g id="COUNT_1">%s</xliff:g> минут бойы жедел кері қоңырау шалу режимінде болады. Бұл режимде деректер байланысын пайдаланатын қолданбаларды пайдалану мүмкін емес. Қазір шығу керек пе?</item>
       <item quantity="one">Телефон <xliff:g id="COUNT_0">%s</xliff:g> минут бойы жедел кері қоңырау шалу режимінде болады. Бұл режимде деректер байланысын пайдаланатын қолданбаларды пайдалану мүмкін емес. Қазір шығу керек пе?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"контакт таңдау"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Дауыс арқылы қоңырау шалу қолдауы жоқ"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"теру"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Діріл"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Діріл"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Визуалды дауыс поштасы"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN кодын орнату"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"PIN кодты өзгерту"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Дыбыс"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Рингтон&amp; Діріл"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Кірістірілген SIM карталары"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Бейне қоңырауларды қосу"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Хабарды кодтан шығару кезінде қате пайда болды."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM карта қызметті белсендіріп, телефонның роуминг мүмкіндіктерін жаңартты."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Белсенді қоңыраулар тым көп. Жаңа қоңырау шалудан бұрын бар қоңырауларды аяқтаңыз немесе біріктіріңіз."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Қосылу мүмкін болмады. Жарамды SIM картасын енгізіңіз."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi байланысы үзіліп қалды. Қоңырау аяқталды."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Дауыстық пошта PIN кодын өзгерту"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Жалғастыру"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Тоқтату"</string>
diff --git a/res/values-km-rKH/arrays.xml b/res/values-km/arrays.xml
similarity index 100%
rename from res/values-km-rKH/arrays.xml
rename to res/values-km/arrays.xml
diff --git a/res/values-km/config.xml b/res/values-km/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-km/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-km-rKH/strings.xml b/res/values-km/strings.xml
similarity index 96%
rename from res/values-km-rKH/strings.xml
rename to res/values-km/strings.xml
index 4901857..ab913b4 100644
--- a/res/values-km-rKH/strings.xml
+++ b/res/values-km/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"ទិន្នន័យប្រព័ន្ធទូរស័ព្ទ"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"ទិន្នន័យ​ចល័ត"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"សេវាកម្មទូរស័ព្ទ"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"អ្នក​ហៅ​នៅ​ពេល​មាន​អាសន្ន"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"ទូរស័ព្ទ"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"បាត់​​ចំនួន​​សារ​ជា​សំឡេង"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"គ្មាន​ចំនួន​សារ​ជា​សំឡេង​​ត្រូវ​បាន​រក្សា​ទុក​នៅ​លើ​ស៊ី​ម​កាត​ទេ​។"</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"បន្ថែម​លេខ"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"មាន​តែ​អ្នក​ប្រើប្រាស់​ចម្បង​ទើប​អាច​កែប្រែ​ការ​កំណត់​សារ​ជា​សំឡេង​បាន។"</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"បាន​ដោះ​សោ​ស៊ីមកាត​របស់​អ្នក។ ទូរស័ព្ទ​របស់​អ្នក​កំពុង​ដោះ​សោ…"</string>
     <string name="label_ndp" msgid="780479633159517250">"ដោះ​សោ​​កូដ PIN បណ្ដាញ​ស៊ីមកាត"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"ដោះ​សោ"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"កំពុង​ស្នើ​​ដោះ​សោ​បណ្ដាញ…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"បាន​បរាជ័យ​ក្នុង​ការ​ស្នើ​ដោះ​សោ​បណ្ដាញ។"</string>
     <string name="unlock_success" msgid="6770085622238180152">"ដោះ​សោ​បណ្ដាញ​បាន​ជោគជ័យ។"</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"ការ​កំណត់​បណ្ដាញ​ចល័ត​គឺ​មិន​មាន​​សម្រាប់​អ្នក​ប្រើ​នេះ"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"ការ​កំណត់​បណ្ដាញ​ចល័ត​មិន​អាច​ប្រើ​បាន​​សម្រាប់​អ្នក​ប្រើ​នេះ"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"កំណត់​ការ​ហៅ GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"ការកំណត់ការហៅ GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"កំណត់​ការ​ហៅ CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"សារ​ជា​សំឡេង"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"សារជាសម្លេង (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"ការ​ជូនដំណឹង"</string>
     <string name="networks" msgid="8873030692174541976">"ប្រតិបត្តិ​ករ​​​បណ្ដាញ"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"ការ​ផ្សាយ​ពេល​មាន​អាសន្ន"</string>
     <string name="call_settings" msgid="6112441768261754562">"កំណត់​ការ​ហៅ"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"នៅពេលមិនអាចទាក់ទងបាន"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"លេខ​នៅ​ពេល​ដែល​មិន​អាច​ហៅ​ចូល"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"បញ្ជូន​បន្ត​ទៅ​ <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"បាន​បិទ"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"បិទ"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"ក្រុមហ៊ុន​បញ្ជូន​របស់​អ្នក​​មិន​គាំទ្រ​ការ​បិទ​ការ​ហៅ​​បញ្ជូន​បន្ត នៅ​ពេល​ទូរស័ព្ទ​របស់​អ្នក​មិន​អាច​ហៅ​ចូល។"</string>
     <string name="updating_title" msgid="6146755386174019046">"កំណត់​ការ​ហៅ"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"ការកំណត់ការហៅអាចផ្លាស់ប្តូរបានដោយអ្នកប្រើដែលមានសិទ្ធិគ្រប់គ្រងតែប៉ុណ្ណោះ។"</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"លេខ​កូដ PIN ថ្មី​​មាន​តួអក្សរ​មិន​ត្រឹមត្រូវ។"</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"មិន​អាច​ប្ដូរ​លេខ​កូដ PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"មិន​ស្គាល់​ប្រភេទ​សារ សូម​ហៅ​ទូរស័ព្ទ​ទៅ <xliff:g id="NUMBER">%s</xliff:g> ដើម្បី​ស្ដាប់។"</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"ការ​កំណត់​បណ្ដាញ​ចល័ត"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"ការ​កំណត់​បណ្ដាញ​ឧបករណ៍​ចល័ត"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"បណ្ដាញទូរសព្ទចល័ត"</string>
     <string name="label_available" msgid="1181658289009300430">"បណ្ដាញ​ដែល​មាន"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"កំពុង​ស្វែងរក..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"រក​មិន​ឃើញ​បណ្ដាញ។"</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> ​លើស​អតិបរមា \n បាន​កាត់​បន្ថយ​អត្រា​ទិន្នន័យ <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ ខួប​កន្លង​ទៅ\n រយៈ​ពេល​ចាប់ផ្ដើម​បន្ទាប់​​នៅ​ក្នុង <xliff:g id="USED_1">%2$d</xliff:g> ថ្ងៃ (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"បាន​កាត់​បន្ថយ​អត្រា​ទិន្នន័យ <xliff:g id="USED">%1$d</xliff:g> Kb/s ប្រសិនបើ​ទិន្នន័យ​ប្រើ​លើស​ដែន​កំណត់"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"ព័ត៌មាន​បន្ថែម​អំពី​​គោលនយោបាយ​ក្នុង​ការ​ប្រើប្រាស់​ទិន្នន័យ​បណ្ដាញ​ចល័ត​របស់​ក្រុមហ៊ុន​បញ្ជូន។"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"ព័ត៌មាន​បន្ថែម​អំពី​​គោលនយោបាយ​ក្នុង​ការ​ប្រើប្រាស់​ទិន្នន័យ​បណ្ដាញ​ឧបករណ៍​ចល័ត​ក្រុមហ៊ុន​បញ្ជូន​របស់​អ្នក"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"សារ SMS ​ផ្សព្វផ្សាយ​ចល័ត"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"សារ SMS ផ្សព្វផ្សាយ​ចល័ត"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"បាន​បើក​សារ SMS ​ផ្សព្វផ្សាយ​ចល័ត"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"បញ្ចូល​ទំនាក់ទំនង"</string>
     <string name="menu_edit" msgid="7143003705504672374">"កែ​ទំនាក់ទំនង"</string>
     <string name="menu_delete" msgid="3977150783449642851">"លុប​ទំនាក់ទំនង"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"ចុច​ហៅទៅ​ទំនាក់ទំនង"</string>
     <string name="get_pin2" msgid="8204677063922225311">"វាយ​បញ្ចូល​កូដ PIN2"</string>
     <string name="name" msgid="7329028332786872378">"ឈ្មោះ"</string>
     <string name="number" msgid="7905950798349903858">"លេខ"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"កំពុង​លុប​លេខ​​ហៅ​ថេរ…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"បាន​លុប​លេខ​ហៅ​ថេរ។"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"មិន​បាន​ធ្វើ​បច្ចុប្បន្នភាព FDN ពី​ព្រោះ​អ្នក​បាន​វាយ​បញ្ចូល​កូដ PIN មិន​ត្រឹមត្រូវ។"</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"មិន​​បាន​ធ្វើ​បច្ចុប្បន្នភាព FDN ពីព្រោះ​ចំនួន​មិន​អាច​លើស​ពី ២០ តួ​លេខ​​ទេ។"</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN មិនត្រូវ​បាន​ធ្វើ​បច្ចុប្បន្នភាពទេ ពីព្រោះ​លេខ​ទទេ ឬ​លើស​ 20 ខ្ទង់។"</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"មិន​បាន​ធ្វើ​បច្ចុប្បន្នភាព។ កូដ PIN2 មិន​ត្រឹមត្រូវ ឬ​លេខ​ទូរស័ព្ទ​ត្រូវ​បាន​ច្រានចោល។"</string>
     <string name="fdn_failed" msgid="540018079008319747">"បាន​បរាជ័យ​ក្នុង​ការ​ប្រតិបត្តិការ FDN ។"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"កំពុង​អាន​ពី​ស៊ីមកាត…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"បិទរបៀបយន្តហោះ ឬភ្ជាប់ទៅបណ្តាញឥតខ្សែដើម្បីធ្វើការហៅ។"</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"ចាកចេញពីរបៀបហៅទៅវិញពេលមានអាសន្នដើម្បីធ្វើការហៅធម្មតា។"</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"មិន​បាន​ចុះ​ឈ្មោះ​នៅ​លើ​បណ្ដាញ។"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"បណ្ដាញ​ចល័ត​មិន​អាច​ប្រើ​បាន។"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"មិនមានបណ្តាញទូរស័ព្ទទេ។ ភ្ជាប់ទៅបណ្តាញឥតខ្សែដើម្បីធ្វើការហៅ។"</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"បណ្ដាញ​​ឧបករណ៍​​ចល័ត​មិន​អាច​ប្រើ​បាន​។"</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"មិនមានបណ្តាញទូរសព្ទទេ។ ភ្ជាប់ទៅបណ្តាញឥតខ្សែ ដើម្បី​អាច​ហៅ​ទូរសព្ទ​បាន។"</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"ដើម្បីធ្វើការហៅ បញ្ចូលលេខដែលមានសុពលភាព។"</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"បាន​បរាជ័យ​ការ​ហៅ។"</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"មិន​អាច​បន្ថែម​​​ការ​ហៅ​ទូរសព្ទ​នៅ​ពេល​នេះ​​បាន​ទេ។"</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"កំពុង​ចាប់ផ្ដើម​លំដាប់ MMI ..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"សេវាកម្មមិនត្រូវបានគាំទ្រទេ។"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"មិនអាចឆ្លាស់ការហៅបានទេ។"</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"មិនអាចបំបែកការហៅបានទេ។"</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"បាន​បញ្ចូល​របៀប​ការ​ហៅ​ទៅ​វិញ​ពេល​មាន​អាសន្ន"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"របៀប​ហៅ​ទៅ​វិញ​ពេល​មាន​អាសន្ន"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"បាន​បិទ​ការ​តភ្ជាប់​ទិន្នន័យ"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">គ្មានការភ្ជាប់ទិន្នន័យរយៈពេល <xliff:g id="COUNT_1">%s</xliff:g> នាទី</item>
-      <item quantity="one">គ្មានការភ្ជាប់ទិន្នន័យរយៈពេល <xliff:g id="COUNT_0">%s</xliff:g> នាទី</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"មិន​មាន​ការតភ្ជាប់​ទិន្នន័យ រហូតដល់ <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">ទូរស័ព្ទនេះនឹងស្ថិតក្នុងរបៀប ហៅត្រលប់ពេលអាសន្ន រយៈពេល <xliff:g id="COUNT_1">%s</xliff:g> នាទី។ ខណៈពេលស្ថិតក្នុងរបៀបនេះ មិនមានកម្មវិធីដែលប្រើការភ្ជាប់ទិន្នន័យណា អាចប្រើបានបានឡើយ។ តើអ្នកចង់ចាកចេញឥឡូវនេះទេ?</item>
       <item quantity="one">ទូរស័ព្ទនេះនឹងស្ថិតក្នុងរបៀប ហៅត្រលប់ពេលអាសន្ន រយៈពេល <xliff:g id="COUNT_0">%s</xliff:g> នាទី។ ខណៈពេលស្ថិតក្នុងរបៀបនេះ មិនមានកម្មវិធីដែលប្រើការភ្ជាប់ទិន្នន័យណា អាចប្រើបានបានឡើយ។ តើអ្នកចង់ចាកចេញឥឡូវនេះទេ?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"ជ្រើស​ទំនាក់ទំនង"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"មិន​គាំទ្រ​ការ​ហៅ​ជា​សំឡេង"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"ចុច"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"ញ័រ"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"ញ័រ"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"សារជាសំឡេងអាចមើលឃើញ"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"កំណត់លេខកូដ PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"ប្ដូរ​​លេខ​កូដ PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"សំឡេង"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"សំឡេង​រោទ៍ &amp; ញ័រ"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"ស៊ីមកាត​ជាប់​ជា​មួយ"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"បើក​ការ​ហៅ​ជា​វីដេអូ"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"មានកំហុសខណៈពេលឌិកូដសារ។"</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"ស៊ីមកាតបានធ្វើឲ្យសេវាកម្មរបស់អ្នកសកម្ម និងបានធ្វើបច្ចុប្បន្នភាពសមត្ថភាពរ៉ូមីងសម្រាប់ទូរស័ព្ទរបស់អ្នក។"</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"មាន​ការ​ហៅ​ដែល​សកម្ម​ច្រើន​ពេក។ សូម​បញ្ចប់ ឬ​​ដាក់​​បញ្ចូល​គ្នា​ការ​ហៅ​ដែល​មាន​ស្រាប់​​មុន​ពេល​ដាក់​ការ​ហៅ​ថ្មី។"</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"មិន​អាច​តភ្ជាប់​បាន​ទេ សូម​បញ្ចូល​ស៊ីម​កាត​​ដែល​ប្រើ​បាន។"</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"បាត់ការភ្ជាប់ Wi-Fi។ បានបញ្ចប់ការហៅទូរស័ព្ទ។"</string>
     <string name="change_pin_title" msgid="7790232089699034029">"ប្ដូរ​លេខ​កូដ PIN ជា​​សារ​សំឡេង"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"បន្ត"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"បោះបង់"</string>
diff --git a/res/values-kn-rIN/arrays.xml b/res/values-kn/arrays.xml
similarity index 100%
rename from res/values-kn-rIN/arrays.xml
rename to res/values-kn/arrays.xml
diff --git a/res/values-kn/config.xml b/res/values-kn/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-kn/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-kn-rIN/strings.xml b/res/values-kn/strings.xml
similarity index 96%
rename from res/values-kn-rIN/strings.xml
rename to res/values-kn/strings.xml
index ccb33eb..7a1144a 100644
--- a/res/values-kn-rIN/strings.xml
+++ b/res/values-kn/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"ಸೆಲ್ಯುಲಾರ್ ಡೇಟಾ"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"ಮೊಬೈಲ್ ಡೇಟಾ"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"ಫೋನ್ ಸೇವೆಗಳು"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"ತುರ್ತು ಡಯಲರ್"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"ಫೋನ್"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"ಧ್ವನಿಮೇಲ್‌ ಸಂಖ್ಯೆಯು ಕಾಣೆಯಾಗಿದೆ"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"ಸಿಮ್‌ ಕಾರ್ಡ್‌ನಲ್ಲಿ ಯಾವುದೇ ಧ್ವನಿಮೇಲ್‌ ಸಂಖ್ಯೆಯನ್ನು ಸಂಗ್ರಹಿಸಿಲ್ಲ."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"ಸಂಖ್ಯೆಯನ್ನು ಸೇರಿಸಿ"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"ಧ್ವನಿಮೇಲ್ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಕೇವಲ ಪ್ರಾಥಮಿಕ ಬಳಕೆದಾರರು ಮಾತ್ರ ಮಾರ್ಪಡಿಸಬಹುದು."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"ನಿಮ್ಮ ಸಿಮ್‌ ಕಾರ್ಡ್‌ನ ನಿರ್ಬಂಧವನ್ನು ತೆಗೆಯಲಾಗಿದೆ. ನಿಮ್ಮ ಫೋನ್‌ ಅನ್‌ಲಾಕ್‌ ಆಗುತ್ತಿದೆ…"</string>
     <string name="label_ndp" msgid="780479633159517250">"ಸಿಮ್‌ ನೆಟ್‌ವರ್ಕ್‌ನ ಅನ್‌ಲಾಕ್‌ ಮಾಡುವ ಪಿನ್‌"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"ಅನ್‌ಲಾಕ್"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"ನೆಟ್‌ವರ್ಕ್‌ ಅನ್ನು ಅನ್‌ಲಾಕ್‌ ಮಾಡಲು ವಿನಂತಿಸಲಾಗುತ್ತಿದೆ…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"ನೆಟ್‌ವರ್ಕ್‌ ಅನ್‌ಲಾಕ್‌ ವಿನಂತಿಯು ಯಶಸ್ವಿಯಾಗಲಿಲ್ಲ."</string>
     <string name="unlock_success" msgid="6770085622238180152">"ನೆಟ್‌ವರ್ಕ್‌ ಅನ್‌ಲಾಕ್‌ ಯಶಸ್ವಿಯಾಗಿದೆ."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"ಸೆಲ್ಯುಲಾರ್‌ ನೆಟ್‌ವರ್ಕ್‌ ಸೆಟ್ಟಿಂಗ್‌ಗಳು ಈ ಬಳಕೆದಾರರಿಗೆ ಲಭ್ಯವಿಲ್ಲ"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"ಮೊಬೈಲ್ ನೆಟ್‌ವರ್ಕ್ ಸೆಟ್ಟಿಂಗ್‌ಗಳು ಈ ಬಳಕೆದಾರರಿಗೆ ಲಭ್ಯವಿಲ್ಲ"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM ಕರೆ ಸೆಟ್ಟಿಂಗ್‌ಗಳು"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM ಕರೆ ಸೆಟ್ಟಿಂಗ್‌ಗಳು (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA ಕರೆ ಸೆಟ್ಟಿಂಗ್‌ಗಳು"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"ಧ್ವನಿಮೇಲ್"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"ಧ್ವನಿಮೇಲ್ (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"ಅಧಿಸೂಚನೆಗಳು"</string>
     <string name="networks" msgid="8873030692174541976">"ನೆಟ್‌ವರ್ಕ್‌ ಆಪರೇಟರ್‌ಗಳು"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"ತುರ್ತು ಪ್ರಸಾರಗಳು"</string>
     <string name="call_settings" msgid="6112441768261754562">"ಕರೆ ಸೆಟ್ಟಿಂಗ್‌ಗಳು"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"ಅಲಭ್ಯವಿರುವಾಗ"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"ಅಲಭ್ಯವಿರುವಾಗ ಸಂಖ್ಯೆ"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> ಗೆ ಫಾರ್ವರ್ಡ್‌ ಮಾಡಲಾಗುತ್ತಿದೆ"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"ಆಫ್"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"ನಿಮ್ಮ ಫೋನ್‌ ಅನ್ನು ತಲುಪಲಾಗದಿದ್ದಾಗ ನಿಮ್ಮ ವಾಹಕ ಕರೆ ಫಾರ್ವರ್ಡ್‌ ಮಾಡುವಿಕೆ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲು ಬೆಂಬಲಿಸುವುದಿಲ್ಲ."</string>
     <string name="updating_title" msgid="6146755386174019046">"ಕರೆ ಸೆಟ್ಟಿಂಗ್‌ಗಳು"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"ಕರೆ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಕೇವಲ ನಿರ್ವಾಹಕ ಬಳಕೆದಾರರು ಮಾತ್ರ ಬದಲಾಯಿಸಬಹುದು."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"ಹೊಸ ಪಿನ್ ಅಮಾನ್ಯವಾದ ಅಕ್ಷರಗಳನ್ನು ಒಳಗೊಂಡಿದೆ."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"ಪಿನ್ ಬದಲಾಯಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"ಬೆಂಬಲಿತವಲ್ಲದ ಸಂದೇಶ ಮಾದರಿ, ಆಲಿಸಲು <xliff:g id="NUMBER">%s</xliff:g> ಗೆ ಕರೆ ಮಾಡಿ."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"ಸೆಲ್ಯುಲಾರ್‌ ನೆಟ್‌ವರ್ಕ್‌ ಸೆಟ್ಟಿಂಗ್‌ಗಳು"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"ಮೊಬೈಲ್‌ ನೆಟ್‌ವರ್ಕ್‌ ಸೆಟ್ಟಿಂಗ್‌ಗಳು"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"ಮೊಬೈಲ್‌ ನೆಟ್‌ವರ್ಕ್‌"</string>
     <string name="label_available" msgid="1181658289009300430">"ಲಭ್ಯವಿರುವ ನೆಟ್‌ವರ್ಕ್‌ಗಳು"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"ಹುಡುಕಲಾಗುತ್ತಿದೆ…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"ಯಾವುದೇ ನೆಟ್‌ವರ್ಕ್‌ಗಳು ಕಂಡುಬಂದಿಲ್ಲ."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> ಗರಿಷ್ಠ ಮಿತಿ ಮೀರಿದೆ\nಡೇಟಾ ದರವನ್ನು <xliff:g id="USED_1">%2$d</xliff:g> Kb/s ಗೆ ಕಡಿಮೆ ಮಾಡಲಾಗಿದೆ"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"ಆವರ್ತನೆಯ <xliff:g id="USED_0">%1$d</xliff:g>٪ ತೆಗೆದುಕೊಂಡಿದೆ\nಮುಂದಿನ ಅವಧಿಯು <xliff:g id="USED_1">%2$d</xliff:g> ದಿನಗಳಲ್ಲಿ ಪ್ರಾರಂಭವಾಗುತ್ತದೆ (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"ಡೇಟಾ ಬಳಕೆ ಮಿತಿ ಮೀರಿದರೆ ಡೇಟಾ ದರವನ್ನು <xliff:g id="USED">%1$d</xliff:g> Kb/s ಗೆ ಕಡಿಮೆ ಮಾಡಲಾಗುವುದು"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"ನಿಮ್ಮ ವಾಹಕದ ಸೆಲ್ಯುಲಾರ್‌ ನೆಟ್‌ವರ್ಕ್ ಡೇಟಾ ಬಳಕೆ ನೀತಿ ಕುರಿತು ಇನ್ನಷ್ಟು ಮಾಹಿತಿ"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"ನಿಮ್ಮ ವಾಹಕಗಳ ಮೊಬೈಲ್‌ ನೆಟ್‌ವರ್ಕ್ ಡೇಟಾ ಬಳಕೆ ನೀತಿ ಕುರಿತು ಇನ್ನಷ್ಟು ಮಾಹಿತಿ"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"ಸೆಲ್‌ ಪ್ರಸಾರ SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"ಸೆಲ್‌ ಪ್ರಸಾರ SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"ಸೆಲ್‌ ಪ್ರಸಾರ SMS ಸಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"ಸಂಪರ್ಕ ಸೇರಿಸಿ"</string>
     <string name="menu_edit" msgid="7143003705504672374">"ಸಂಪರ್ಕವನ್ನು ಎಡಿಟ್ ಮಾಡಿ"</string>
     <string name="menu_delete" msgid="3977150783449642851">"ಸಂಪರ್ಕವನ್ನು ಅಳಿಸಿ"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"ಸಂಪರ್ಕ ಡಯಲ್‌ ಮಾಡಿ"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2 ಅನ್ನು ಟೈಪ್‌ ಮಾಡಿ"</string>
     <string name="name" msgid="7329028332786872378">"ಹೆಸರು"</string>
     <string name="number" msgid="7905950798349903858">"ಸಂಖ್ಯೆ"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"ಸ್ಥಿರ ಡಯಲಿಂಗ್‌‌ ಸಂಖ್ಯೆಯನ್ನು ಅಳಿಸಲಾಗುತ್ತಿದೆ…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"ಸ್ಥಿರ ಡಯಲಿಂಗ್ ಸಂಖ್ಯೆಯನ್ನು ಅಳಿಸಲಾಗಿದೆ."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"ನೀವು ತಪ್ಪಾದ ಪಿನ್‌ ಟೈಪ್‌ ಮಾಡಿರುವ ಕಾರಣ ಎಫ್‌ಡಿಎನ್‌ ಅನ್ನು ನವೀಕರಿಸಲಾಗಲಿಲ್ಲ."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"ಸಂಖ್ಯೆಯು 20 ಅಂಕಿಗಳನ್ನು ಮೀರದ ಕಾರಣ ಎಫ್‌ಡಿಎನ್‌ ಅನ್ನು ನವೀಕರಿಸಲಾಗಲಿಲ್ಲ."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"ಸಂಖ್ಯೆಯು ಖಾಲಿ ಇರುವುದರಿಂದ ಅಥವಾ 20 ಅಂಕಿಗಳನ್ನು ಮೀರುವುದರಿಂದಾಗಿ ಎಫ್‌ಡಿಎನ್‌ ಅನ್ನು ಅಪ್‌ಡೇಟ್ ಮಾಡಲಾಗಿಲ್ಲ."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"ಎಫ್‌ಡಿಎನ್‌ ಅನ್ನು ನವೀಕರಿಸಲಾಗಲಿಲ್ಲ. PIN2 ತಪ್ಪಾಗಿದೆ ಅಥವಾ ಫೋನ್ ಸಂಖ್ಯೆಯನ್ನು ತಿರಸ್ಕರಿಸಲಾಗಿದೆ."</string>
     <string name="fdn_failed" msgid="540018079008319747">"ಎಫ್‌ಡಿಎನ್‌ ಕಾರ್ಯಾಚರಣೆ ವಿಫಲವಾಗಿದೆ."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"ಸಿಮ್‌ ಕಾರ್ಡ್‌ನಿಂದ ಓದಲಾಗುತ್ತಿದೆ…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"ಏರ್‌ಪ್ಲೇನ್ ಮೋಡ್ ಆಫ್ ಮಾಡಿ ಅಥವಾ ಕರೆ ಮಾಡಲು ವೈರ್‌ಲೆಸ್ ನೆಟ್‌ವರ್ಕ್‌ಗೆ ಸಂಪರ್ಕಪಡಿಸಿ."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"ತುರ್ತು ರಹಿತ ಕರೆಯನ್ನು ಮಾಡಲು ತುರ್ತು ಮರು ಕರೆಮಾಡುವಿಕೆ ಮೋಡ್ ಅನ್ನು ನಿರ್ಗಮಿಸಿ."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"ನೆಟ್‌ವರ್ಕ್‌ನಲ್ಲಿ ಇನ್ನೂ ನೋಂದಣಿಯಾಗಿಲ್ಲ."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"ಸೆಲ್ಯುಲಾರ್ ನೆಟ್‌ವರ್ಕ್‌ ಲಭ್ಯವಿಲ್ಲ."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"ಸೆಲ್ಯುಲಾರ್ ನೆಟ್‌ವರ್ಕ್ ಲಭ್ಯವಿಲ್ಲ. ಕರೆ ಮಾಡಲು ವೈರ್‌ಲೆಸ್ ನೆಟ್‌ವರ್ಕ್‌ಗೆ ಸಂಪರ್ಕಪಡಿಸಿ."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"ಮೊಬೈಲ್‌ ನೆಟ್‌ವರ್ಕ್‌ ಲಭ್ಯವಿಲ್ಲ."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"ಮೊಬೈಲ್ ನೆಟ್‌ವರ್ಕ್ ಲಭ್ಯವಿಲ್ಲ. ಕರೆ ಮಾಡಲು ವೈರ್‌ಲೆಸ್ ನೆಟ್‌ವರ್ಕ್‌ಗೆ ಸಂಪರ್ಕಪಡಿಸಿ."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"ಕರೆಯನ್ನು ಮಾಡಲು, ಮಾನ್ಯವಾದ ಸಂಖ್ಯೆಯನ್ನು ನಮೂದಿಸಿ."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"ಕರೆ ವಿಫಲವಾಗಿದೆ."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"ಕರೆಯನ್ನು ಈ ಸಮಯದಲ್ಲಿ ಸೇರಿಸಲಾಗುವುದಿಲ್ಲ."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI ಅನುಕ್ರಮ ಪ್ರಾರಂಭವಾಗುತ್ತಿದೆ…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"ಸೇವೆಯು ಬೆಂಬಲಿತವಾಗಿಲ್ಲ"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"ಕರೆಗಳನ್ನು ಬದಲಾಯಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"ಕರೆಯನ್ನು ಪ್ರತ್ಯೇಕಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"ತುರ್ತು ಕಾಲ್‌ಬ್ಯಾಕ್‌ ಮೋಡ್‌ ನಮೂದಿಸಲಾಗಿದೆ"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"ತುರ್ತು ಕಾಲ್‌ಬ್ಯಾಕ್‌ ಮೋಡ್‌"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"ಡೇಟಾ ಸಂಪರ್ಕ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one"> <xliff:g id="COUNT_1">%s</xliff:g> ನಿಮಿಷಗಳ ಕಾಲ ಯಾವುದೇ ಡೇಟಾ ಸಂಪರ್ಕವಿಲ್ಲ</item>
-      <item quantity="other"> <xliff:g id="COUNT_1">%s</xliff:g> ನಿಮಿಷಗಳ ಕಾಲ ಯಾವುದೇ ಡೇಟಾ ಸಂಪರ್ಕವಿಲ್ಲ</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> ರವರೆಗೆ ಯಾವುದೇ ಡೇಟಾ ಸಂಪರ್ಕವಿಲ್ಲ"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">ಪೋನ್‌ <xliff:g id="COUNT_1">%s</xliff:g> ನಿಮಿಷಗಳ ಕಾಲ ತುರ್ತು ಮರಳಿ ಕರೆಮಾಡು ಮೋಡ್‌ನಲ್ಲಿರುತ್ತದೆ. ಈ ಮೋಡ್‌ನಲ್ಲಿರುವಾಗ ಯಾವುದೇ ಅಪ್ಲಿಕೇಶನ್‌ಗಳನ್ನು ಡೇಟಾ ಸಂಪರ್ಕವನ್ನು ಬಳಸಿಕೊಂಡು ಬಳಸಲು ಸಾಧ್ಯವಾಗುವುದಿಲ್ಲ. ನೀವು ಇದೀಗ ನಿರ್ಗಮಿಸಲು ಬಯಸುವಿರಾ?</item>
       <item quantity="other">ಪೋನ್‌ <xliff:g id="COUNT_1">%s</xliff:g> ನಿಮಿಷಗಳ ಕಾಲ ತುರ್ತು ಮರಳಿ ಕರೆಮಾಡು ಮೋಡ್‌ನಲ್ಲಿರುತ್ತದೆ. ಈ ಮೋಡ್‌ನಲ್ಲಿರುವಾಗ ಯಾವುದೇ ಅಪ್ಲಿಕೇಶನ್‌ಗಳನ್ನು ಡೇಟಾ ಸಂಪರ್ಕವನ್ನು ಬಳಸಿಕೊಂಡು ಬಳಸಲು ಸಾಧ್ಯವಾಗುವುದಿಲ್ಲ. ನೀವು ಇದೀಗ ನಿರ್ಗಮಿಸಲು ಬಯಸುವಿರಾ?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"ಸಂಪರ್ಕವನ್ನು ಆಯ್ಕೆಮಾಡಿ"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"ಧ್ವನಿ ಕರೆ ಮಾಡುವಿಕೆ ಬೆಂಬಲಿತವಾಗಿಲ್ಲ"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"ಡಯಲ್"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"ವೈಬ್ರೇಟ್‌"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"ವೈಬ್ರೇಟ್‌"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"ದೃಶ್ಯ ಧ್ವನಿಮೇಲ್"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"ಪಿನ್ ಹೊಂದಿಸಿ"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"ಪಿನ್ ಬದಲಾಯಿಸಿ"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"ಧ್ವನಿ"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"ರಿಂಗ್‌ಟೋನ್‌‌ &amp; ವೈಬ್ರೇಟ್‌"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"ಅಂತರ್-ರಚಿತ ಸಿಮ್‌ ಕಾರ್ಡ್‌ಗಳು"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"ವೀಡಿಯೊ ಕರೆಯನ್ನು ಆನ್ ಮಾಡಿ"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"ಸಂದೇಶವನ್ನು ಡೀಕೋಡ್ ಮಾಡುವಾಗ ದೋಷವುಂಟಾಗಿದೆ."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"ನಿಮ್ಮ ಸೇವೆಯನ್ನು ಸಿಮ್‌ ಕಾರ್ಡ್‌ ಸಕ್ರಿಯಗೊಳಿಸಿದೆ ಮತ್ತು ನಿಮ್ಮ ಫೋನ್‌ನ ರೋಮಿಂಗ್ ಸಾಮರ್ಥ್ಯವನ್ನು ಅಪ್‌ಡೇಟ್‌ ಮಾಡಲಾಗಿದೆ."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"ಹಲವಾರು ಸಕ್ರಿಯ ಕರೆಗಳು. ಹೊಸ ಕರೆ ಮಾಡುವ ಮೊದಲು ಅಸ್ತಿತ್ವದಲ್ಲಿರುವ ಕರೆಗಳನ್ನು ಅಂತ್ಯಗೊಳಿಸಿ ಅಥವಾ ವಿಲೀನಗೊಳಿಸಿ."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"ಸಂಪರ್ಕಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ, ದಯವಿಟ್ಟು ಮಾನ್ಯವಾದ ಸಿಮ್ ಕಾರ್ಡ್ ಸೇರಿಸಿ."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"ವೈ-ಫೈ ಸಂಪರ್ಕ ಕಡಿತಗೊಂಡಿದೆ. ಕರೆ ಅಂತ್ಯಗೊಂಡಿದೆ."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"ಧ್ವನಿಮೇಲ್ ಪಿನ್‌ ಬದಲಾಯಿಸಿ"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"ಮುಂದುವರಿಸು"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"ರದ್ದುಮಾಡಿ"</string>
diff --git a/res/values-ko/config.xml b/res/values-ko/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-ko/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 5463bbb..c649718 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"이동통신 데이터"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"모바일 데이터"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"전화 서비스"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"긴급 통화"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"휴대전화"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"음성사서함 번호 없음"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM 카드에 저장된 음성사서함 번호가 없습니다."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"번호 추가"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"기본 사용자만 음성사서함 설정을 변경할 수 있습니다."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"SIM 카드의 잠금이 해제되었습니다. 휴대전화의 잠금해제 중..."</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM 네트워크 잠금해제 PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"잠금해제"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"네트워크 잠금해제 요청 중..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"네트워크 잠금해제 요청이 실패했습니다."</string>
     <string name="unlock_success" msgid="6770085622238180152">"네트워크의 잠금을 해제했습니다."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"이 사용자는 이동통신망 설정을 사용할 수 없습니다."</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"이 사용자는 모바일 네트워크 설정을 사용할 수 없습니다."</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM 통화 설정"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM 통화 설정(<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA 통화 설정"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"음성사서함"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"음성사서함(<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"알림"</string>
     <string name="networks" msgid="8873030692174541976">"네트워크 운영자"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"긴급 방송"</string>
     <string name="call_settings" msgid="6112441768261754562">"통화 설정"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"전화를 받을 수 없는 경우"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"전화를 받을 수 없는 경우 착신전환할 번호"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g>(으)로 착신전환"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"사용 중지됨"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"사용 안함"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"이동통신사에서 전화를 받을 수 없을 때 착신전환 사용 중지를 지원하지 않습니다."</string>
     <string name="updating_title" msgid="6146755386174019046">"통화 설정"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"관리자만 통화 설정을 변경할 수 있습니다."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"새 PIN에 잘못된 문자가 있습니다."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN을 변경할 수 없습니다."</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"지원되지 않는 메시지 유형입니다. 들으려면 <xliff:g id="NUMBER">%s</xliff:g>번으로 전화하세요."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"이동통신망 설정"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"모바일 네트워크 설정"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"모바일 네트워크"</string>
     <string name="label_available" msgid="1181658289009300430">"사용 가능한 네트워크"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"검색 중..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"네트워크를 찾을 수 없습니다."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"최대치 <xliff:g id="USED_0">%1$s</xliff:g> 초과\n데이터 속도가 <xliff:g id="USED_1">%2$d</xliff:g>Kb/s로 감소"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"주기의 <xliff:g id="USED_0">%1$d</xliff:g>٪ 경과\n다음 기간은 <xliff:g id="USED_1">%2$d</xliff:g>일 후에 시작(<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"데이터 사용량 제한을 초과하면 데이터 속도는 <xliff:g id="USED">%1$d</xliff:g>Kb/s로 줄어듭니다."</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"이동통신사의 이동통신망 데이터 사용 정책에 대한 자세한 정보"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"이동통신사의 모바일 네트워크 데이터 사용 정책에 대한 자세한 정보"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"셀 브로드캐스트 SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"셀 브로드캐스트 SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"셀 브로드캐스트 SMS 사용"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"연락처 추가"</string>
     <string name="menu_edit" msgid="7143003705504672374">"연락처 수정"</string>
     <string name="menu_delete" msgid="3977150783449642851">"연락처 삭제"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"연락처로 전화 걸기"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2 유형"</string>
     <string name="name" msgid="7329028332786872378">"이름"</string>
     <string name="number" msgid="7905950798349903858">"번호"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"발신 허용 번호를 삭제하는 중..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"발신 허용 번호가 삭제되었습니다."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"잘못된 PIN을 입력하여 FDN 업데이트 안됨"</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"숫자가 20자리를 초과할 수 없으므로 FDN을 업데이트하지 못했습니다."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"숫자가 비어있거나 20자리를 초과하여 FDN을 업데이트하지 못했습니다."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN이 업데이트되지 않았습니다. PIN2가 잘못되었거나 전화번호가 거부되었습니다."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN 작업이 실패했습니다."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"SIM 카드에서 읽는 중..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"전화를 걸려면 비행기 모드를 사용 중지하거나 무선 네트워크에 연결하세요."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"일반 전화를 걸려면 긴급 콜백 모드를 해제하세요."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"네트워크에서 등록되지 않았습니다."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"사용 가능한 이동통신망이 없습니다."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"모바일 네트워크를 사용할 수 없습니다. 전화를 걸려면 무선 네트워크에 연결하세요."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"모바일 네트워크를 사용할 수 없습니다."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"모바일 네트워크를 사용할 수 없습니다. 전화를 걸려면 무선 네트워크에 연결하세요."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"전화를 걸려면 올바른 번호를 입력하세요."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"전화 연결 실패"</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"현재 통화를 추가할 수 없습니다."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI 시퀀스 시작 중..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"지원되지 않는 서비스입니다."</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"통화를 전환할 수 없습니다."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"통화를 분리할 수 없습니다."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"긴급 콜백 모드 시작"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"긴급 콜백 모드"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"데이터 연결이 끊김"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g>분 동안 데이터 연결 없음</item>
-      <item quantity="one"><xliff:g id="COUNT_0">%s</xliff:g>분 동안 데이터 연결 없음</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g>까지 데이터 연결 없음"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">휴대전화가 <xliff:g id="COUNT_1">%s</xliff:g>분 동안 긴급 콜백 모드로 전환됩니다. 긴급 콜백 모드에서는 데이터 연결을 이용하는 애플리케이션을 사용할 수 없습니다. 지금 종료하시겠습니까?</item>
       <item quantity="one">휴대전화가 <xliff:g id="COUNT_0">%s</xliff:g>분 동안 긴급 콜백 모드로 전환됩니다. 긴급 콜백 모드에서는 데이터 연결을 이용하는 앱을 사용할 수 없습니다. 지금 종료하시겠습니까?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"연락처 선택"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"음성통화 지원되지 않음"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"전화걸기"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"진동"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"진동"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"시각적 음성사서함"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN 설정"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"PIN 변경"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"알림음"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"벨소리 및 진동"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"내장된 SIM 카드"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"화상 통화 사용"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"메시지를 디코딩하는 중에 오류가 발생했습니다."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM 카드로 서비스가 활성화되었으며 휴대전화 로밍 기능이 업데이트되었습니다."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"활성화된 통화가 너무 많습니다. 새로운 전화를 걸기 전에 기존의 통화를 끝내거나 합치세요."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"연결할 수 없습니다. 유효한 SIM 카드를 삽입하세요."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi 연결이 끊어져 통화가 종료되었습니다."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"음성사서함 PIN 변경"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"계속"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"취소"</string>
diff --git a/res/values-ky-rKG/arrays.xml b/res/values-ky/arrays.xml
similarity index 100%
rename from res/values-ky-rKG/arrays.xml
rename to res/values-ky/arrays.xml
diff --git a/res/values-ky/config.xml b/res/values-ky/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-ky/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-ky-rKG/strings.xml b/res/values-ky/strings.xml
similarity index 96%
rename from res/values-ky-rKG/strings.xml
rename to res/values-ky/strings.xml
index c751583..884ded9 100644
--- a/res/values-ky-rKG/strings.xml
+++ b/res/values-ky/strings.xml
@@ -16,7 +16,8 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Уюлдук дайындар"</string>
+    <!-- no translation found for phoneAppLabel (8576272342240415145) -->
+    <skip />
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Телефон кызматтары"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Өзгөчө кырдаалдагы тергич"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Телефон"</string>
@@ -45,6 +46,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Үн почтасынын номери жок болуп жатат"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM-картада сакталган үн почтасынын номери жок."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Номер кошуу"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Үн почта жөндөөлөрүн алгачкы колдонуучу гана өзгөртө алат."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"SIM-картаңыз бөгөттөн чыгарылган. Телефонуңуздун кулпусу ачылууда…"</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM-карта тармагынын кулпусун ачуучу PIN код"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Кулпусун ачуу"</string>
@@ -52,7 +54,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Тармак кулпусун ачуу суралууда…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Тармактын кулпусун ачуу өтүнүчү ишке ашкан жок."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Тармактын кулпусу ийгиликтүү ачылды."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Мобилдик тармак жөндөөлөрү бул колдонуучу үчүн жеткиликтүү эмес"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Бул колдонуучу мобилдик тармак жөндөөлөрүн колдоно албайт"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM чалуунун жөндөөлөрү"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM чалуунун жөндөөлөрү (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA чалуунун жөндөөлөрү"</string>
@@ -76,6 +78,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Үн почтасы"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Үн почтасы (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"ҮП:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Эскертмелер"</string>
     <string name="networks" msgid="8873030692174541976">"Тармактык операторлор"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Өзгөчө кырдаал тууралуу кулактандыруу"</string>
     <string name="call_settings" msgid="6112441768261754562">"Чалуу жөндөөлөрү"</string>
@@ -115,7 +118,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Жеткиликтүү эмес болсо"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Жеткиликтүү эмес болсо багытталчу номер"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> номерине багытталууда"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Өчүрүлгөн"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Өчүк"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Сиздин операторуңуз, телефон жеткиликсиз болгондо чалууну багыттоону токтотууну колдобойт."</string>
     <string name="updating_title" msgid="6146755386174019046">"Чалуу жөндөөлөрү"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Чалуу жөндөөлөрүн администратор гана өзгөртө алат."</string>
@@ -157,7 +160,9 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Жаңы PIN коддо жараксыз белгилер бар."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN код өзгөртүлгөн жок"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Колдоого алынбаган билдирүү, угуу үчүн <xliff:g id="NUMBER">%s</xliff:g> чалыңыз."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Мобилдик тармактын жөндөөлөрү"</string>
+    <!-- no translation found for mobile_networks (5540397602919106177) -->
+    <skip />
+    <string name="network_settings_title" msgid="514120489499925574">"Мобилдик тармак"</string>
     <string name="label_available" msgid="1181658289009300430">"Жеткиликтүү тармактар"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Изделүүдө…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Эч тармак табылган жок."</string>
@@ -231,7 +236,8 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> жогорку чегинен ашып кетти\nДайындардын ылдамдыгы <xliff:g id="USED_1">%2$d</xliff:g> кб/сек. болуп азайтылды"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"Циклдин <xliff:g id="USED_0">%1$d</xliff:g>٪ аяктады\nКийинки период <xliff:g id="USED_1">%2$d</xliff:g> күндөн кийин башталат (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Эгер дайындарды колдонуу чегинен ашып кетсе, дайындардын ылдамдыгы <xliff:g id="USED">%1$d</xliff:g> кб/сек. болуп азайтылат"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Операторуңуздун уюктук тармак дайындарын пайдалануу саясаты тууралуу көбүрөөк маалымат"</string>
+    <!-- no translation found for throttle_help_subtext (5217706521499010816) -->
+    <skip />
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Уюлдук жөнөтүү SMS\'и"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Уюлдук жөнөтүү SMS\'и"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Уюлдук жөнөтүү SMS\'и иштетилген"</string>
@@ -368,6 +374,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Байланыш кошуу"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Байланышты түзөтүү"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Байланышты жок кылуу"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Байланышка чалуу"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2 териңиз"</string>
     <string name="name" msgid="7329028332786872378">"Аталышы"</string>
     <string name="number" msgid="7905950798349903858">"Номер"</string>
@@ -382,7 +389,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Туруктуу терүү номери жок кылынууда…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Туруктуу терүү номери жок кылынды."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"БНТ жаңыртылган жок, анткени туура эмес PIN-код киргизилди."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"БНТ жаңыртылган жок, анткени номур 20 сандан ашпашы керек."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Уруксат берилген номер жаңыртылган эмес, себеби номер тилкеси бош же жазылган номердин саны 20дан ашпашы керек."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"БНТ жаңыртылган жок. PIN2 туура эмес, же телефон номуру жараксыз."</string>
     <string name="fdn_failed" msgid="540018079008319747">"БНТ иши кыйрады."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"SIM-картадан окулууда…"</string>
@@ -444,12 +451,12 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Чалуу үчүн учак режимин өчүрүңүз же зымсыз тармакка туташыңыз."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Кадимки шартта чалуу үчүн шашылыш кайра чалуу режиминен чыгыңыз."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Тармакта катталган эмес."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Мобилдик тармак жеткиликтүү эмес."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Уюлдук тармак жеткиликтүү эмес. Чалуу үчүн зымсыз тармакка туташыңыз."</string>
+    <!-- no translation found for incall_error_out_of_service (8587993036435080418) -->
+    <skip />
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Мобилдик тармак жеткиликтүү эмес. Чалуу үчүн зымсыз тармакка туташыңыз."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Чалуу үчүн, жарактуу номер киргизиңиз."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Чалынбай калды."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Бул жолу чалууну кошуу мүмкүн эмес."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI кезеги башталууда…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Кызмат колдоого алынбайт"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Чалуулар которуштурулбай жатат."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Чалуу бөлүнбөй жатат."</string>
@@ -524,10 +531,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Шашылыш кайра чалуу режими киргизилди"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Шашылыш кайра чалуу режими"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Мобилдик туташуу өчүрүлгөн"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> мүнөт бою маалыматтык туташуу болбойт</item>
-      <item quantity="one"><xliff:g id="COUNT_0">%s</xliff:g> мүнөт бою маалыматтык туташуу болбойт</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> чейин мобилдик байланыш жок"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Телефон Шашылыш кайра чалуу режиминде <xliff:g id="COUNT_1">%s</xliff:g> мүнөт бою болот. Бул режим күйүп турганда маалыматтык туташууну пайдаланган эч бир колдонмо иштетилбейт. Азыр чыгып кеткиңиз келеби?</item>
       <item quantity="one">Телефон Шашылыш кайра чалуу режиминде <xliff:g id="COUNT_0">%s</xliff:g> мүнөт бою болот. Бул режим күйүп турганда маалыматтык туташууну пайдаланган эч бир колдонмо иштетилбейт. Азыр чыгып кеткиңиз келеби?</item>
@@ -551,12 +555,9 @@
     <string name="selectContact" msgid="781975788478987237">"байланыш тандоо"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Үн менен чалуу колдоого алынбайт"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"терүү"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Дирилдөө"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Дирилдөө"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Визуалдык үн почтасы"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN код коюу"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"PIN кодду өзгөртүү"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Үнү"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Рингтон жана Титирөө"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Кыналган SIM карталар"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Видео чалууну күйгүзүү"</string>
@@ -573,6 +574,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Билдирүү дешифрленип жатканда ката кеткен."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM-карта кызматыңызды жандырып, телефонуңуздун роуминг мүмкүнчүлүктөрүн жаңыртты."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Учурда жигердүү чалуулар өтө көп. Чалуу үчүн учурдагы чалууларды бүтүрүңүз же бириктириңиз."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Байланышуу мумкүн эмес. Жарактуу SIM-картаны салыңыз."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi туташуусу үзүлүп калды. Чалуу аяктады."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Үн почтасынын PIN кодун өзгөртүү"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Улантуу"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Жокко чыгаруу"</string>
diff --git a/res/values-lo-rLA/arrays.xml b/res/values-lo/arrays.xml
similarity index 100%
rename from res/values-lo-rLA/arrays.xml
rename to res/values-lo/arrays.xml
diff --git a/res/values-lo/config.xml b/res/values-lo/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-lo/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-lo-rLA/strings.xml b/res/values-lo/strings.xml
similarity index 96%
rename from res/values-lo-rLA/strings.xml
rename to res/values-lo/strings.xml
index f263349..d7e0b4e 100644
--- a/res/values-lo-rLA/strings.xml
+++ b/res/values-lo/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"ຂໍ້​ມູນ​ເຊວ​ລູ​ລາ"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"ຂໍ້ມູນມືຖື"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"ການ​ບໍ​ລິ​ການ​ໂທ​ລະ​ສັບ"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"ໂປຣແກຣມໂທອອກສຸກເສີນ"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"ໂທລະສັບ"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"ບໍ່ມີເບີຂໍ້ຄວາມສຽງ"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"ບໍ່ມີເບີຂໍ້ຄວາມສຽງຖືກບັນທຶກໃນ SIM card."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"ເພີ່ມໝາຍເລກ"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"ການຕັ້ງຄ່າຂໍ້ຄວາມສຽງສາມາດແກ້ໄຂໄດ້ໂດຍຜູ້ໃຊ້ຫຼັກເທົ່ານັ້ນ."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"ຍົກເລີກການປິດກັ້ນ SIM card ຂອງທ່ານແລ້ວ. ໂທລະສັບຂອງທ່ານກຳລັງຖືກປົດລັອກ..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN ປົດລັອກເຄືອຂ່າຍ SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"ປົດລັອກ"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"ກຳລັງຮ້ອງຂໍການປົດລັອກເຄືອຂ່າຍ..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"ຄຳຂໍການປົດລັອກເຄືອຂ່າຍບໍ່ສຳເລັດ."</string>
     <string name="unlock_success" msgid="6770085622238180152">"ການປົດລັອກເຄືອຂ່າຍບໍ່ສຳເລັດ."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"​ການ​ຕັ້ງ​ຄ່າ​ເຄືອ​ຂ່າຍ​ມ​ື​ຖືບໍ່​ສາ​ມາດ​ໃຊ້​ໄດ້​ກັບ​ຜູ່​ໃຊ້​ນີ້"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"​ການ​ຕັ້ງ​ຄ່າ​ເຄືອ​ຂ່າຍ​ມ​ື​ຖືບໍ່​ສາ​ມາດ​ໃຊ້​ໄດ້​ກັບ​ຜູ່​ໃຊ້​ນີ້"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"ການຕັ້ງຄ່າການໂທ GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"ການ​ຕັ້ງ​ຄ່າ GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"ການຕັ້ງຄ່າໂທ CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"ຂໍ້ຄວາມສຽງ"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"ຂໍ້​ຄວາມ​ສຽງ (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM​:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"ການແຈ້ງເຕືອນ"</string>
     <string name="networks" msgid="8873030692174541976">"ຜູ່ໃຫ້ບໍລິການເຄືອຂ່າຍ"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"​ການ​ອອກອາກາດ​ສຸກ​ເສີນ"</string>
     <string name="call_settings" msgid="6112441768261754562">"ການຕັ້ງຄ່າການໂທ"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"ເມື່ອ​ບໍ່​ສາ​ມາດ​ຕິດ​ຕໍ່ໄດ້"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"ເບີໂທເມື່ອຕິດຕໍ່ບໍ່ໄດ້"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"ໂອນສາຍໄປໃຫ້ <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"ປິດການນຳໃຊ້ແລ້ວ"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"ປິດ"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"ຜູ່ໃຫ້ບໍລິການຂອງທ່ານ ບໍ່ຮອງຮັບການປິດການໂອນສາຍ ເມື່ອໂທລະສັບຂອງທ່ານບໍ່ມີສັນຍານ."</string>
     <string name="updating_title" msgid="6146755386174019046">"ການຕັ້ງຄ່າການໂທ"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"ມີ​ແຕ່​ຜູ້​ໃຊ້​ທີ່​ເປັນ​ຜູ້ດູແລລະບົບ​ເທົ່າ​ນັ້ນ​ທີ່​ສາ​ມາດ​ປ່ຽນການ​ຕັ້ງ​ຄ່າ​ການ​ໂທ​ໄດ້."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"ລະຫັດ PIN ໃໝ່ມີຕົວອັກສອນທີ່ບໍ່ຖືກຕ້ອງ."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"ບໍ່ສາມາດປ່ຽນລະຫັດ PIN ໄດ້"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"ປະເພດຂໍ້ຄວາມທີ່ບໍ່ຮອງຮັບ, ໂທ <xliff:g id="NUMBER">%s</xliff:g> ເພື່ອຟັງ."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"ການ​ຕັ້ງ​ຄ່າ​ເຄືອ​ຂ່າຍ​ມື​ຖື"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"ການຕັ້ງຄ່າເຄືອຂ່າຍມືຖື"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"ເຄືອຂ່າຍມືຖື"</string>
     <string name="label_available" msgid="1181658289009300430">"ເຄືອຂ່າຍທີ່ມີ"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"ກຳລັງຊອກຫາ..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"ບໍ່ພົບເຄືອຂ່າຍ."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> ເກີນຂີດຈຳກັດ\nອັດຕາຂໍ້ມູນຖືກຫຼຸດລົງເປັນ <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ ຂອງຮອບຜ່ານໄປ\nໄລຍະຕໍ່ໄປຈະເລີ່ມໃນອີກ <xliff:g id="USED_1">%2$d</xliff:g> ມື້ (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"ອັດຕາຂໍ້ມູນຖືກຫຼຸດລົງເປັນ <xliff:g id="USED">%1$d</xliff:g> Kb/s ຫາກໃຊ້ເກີນປະລິມານທີ່ຈຳກັດໄວ້"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"ຂໍ້ມູນ​ເພີ່ມເຕີມກ່ຽວກັບ​ນະໂຍບາຍການ​ໃຊ້​ຂໍ້ມູນເຄືອຂ່າຍມືຖື​ຂອງຜູ່ໃຫ້​ບໍລິການ​ຂອງທ່ານ"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"ຂໍ້ມູນເພີ່ມເຕີມກ່ຽວກັບ ນະໂຍບາຍການໃຊ້ຂໍ້ມູນເຄືອຂ່າຍມືຖື ຂອງຜູ່ໃຫ້ບໍລິການຂອງທ່ານ"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"ຂໍ້ຄວາມ SMS ຈາກເຄືອຂ່າຍ"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"ຂໍ້ຄວາມ SMS ຈາກເຄືອຂ່າຍ"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"ເປີດຂໍ້ຄວາມ SMS ຈາກເຄືອຂ່າຍແລ້ວ"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"ເພີ່ມລາຍຊື່ຜູ່ຕິດຕໍ່"</string>
     <string name="menu_edit" msgid="7143003705504672374">"ແກ້ໄຂລາຍຊື່ຜູ້ຕິດຕໍ່"</string>
     <string name="menu_delete" msgid="3977150783449642851">"ລຶບລາຍຊື່ຜູ້ຕິດຕໍ່"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"ໂທຫາລາຍຊື່ຜູ້ຕິດຕໍ່"</string>
     <string name="get_pin2" msgid="8204677063922225311">"ພິມລະຫັດ PIN2"</string>
     <string name="name" msgid="7329028332786872378">"ຊື່"</string>
     <string name="number" msgid="7905950798349903858">"ໝາຍເລກ"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"ກຳລັງລຶບເບີໂທຈຳກັດການໂທອອກ..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"ລຶບໝາຍເລກຈຳກັດການໂທອອກແລ້ວ."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN ບໍ່ໄດ້ອັບເດດເທື່ອ ເນື່ອງຈາກທ່ານໃສ່ລະຫັດ PIN ບໍ່ຖືກຕ້ອງ."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN ບໍ່ໄດ້ອັບເດດເທື່ອ ເນື່ອງຈາກໂຕເລກບໍ່ສາມາດມີເກີນ 20​ ໂຕໄດ້."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"ບໍ່ໄດ້ອັບເດດ FDN ເນື່ອງຈາກຈຳນວນຫວ່າງເປົ່າ ຫຼື ເກີນ 20 ຕົວເລກ."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN ບໍ່ໄດ້ອັບເດດເທື່ອ. ລະຫັດ PIN2 ບໍ່ຖືກຕ້ອງ ຫຼືເບີໂທລະສັບຖືກປະຕິເສດ."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN ເຮັດວຽກລົ້ມເຫຼວ!"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"ກຳລັງອ່ານຈາກ SIM card..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"ປິດໂໝດເຄື່ອງບິນ ຫຼືເຊື່ອມຕໍ່ກັບເຄືອຂ່າຍໄຮ້ສາຍເພື່ອເຮັດການໂທ."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"ອອກ​ຈາກໂໝດ​ໂທ​ກັບ​ສຸກ​ເສີນ ເພື່ອ​ເຮັດ​ການ​ໂທ​ປົກກະຕິ."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"ບໍ່ໄດ້ລົງທະບຽນໃນເຄືອຂ່າຍ."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"ບໍ່​ມີ​ເຄືອ​ຂ່າຍ​ມື​ຖື​ທີ່​ສາ​ມາດ​ໃຊ້​ໄດ້."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"ເຄືອຂ່າຍເຊລລູລາບໍ່ພ້ອມໃຊ້ງານ. ໃຫ້ເຊື່ອມຕໍ່ກັບເຄືອຂ່າຍໄຮ້ສາຍເພື່ອເຮັດການໂທ."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"ເຄືອຂ່າຍມືຖືບໍ່ສາມາດໃຊ້ໄດ້."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"ບໍ່ສາມາດໃຊ້ອິນເຕີເນັດມືຖືໄດ້. ກະລຸນາເຊື່ອມຕໍ່ຫາ Wi-Fi ເພື່ອໂທ."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"ເພື່ອ​ທີ່​ຈະ​ໂທ, ປ້ອນ​ເບີ​ໂທ​ທີ່​ໃຊ້​ໄດ້​ເຂົ້າ​ໄປ."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"ໂທບໍ່ສຳເລັດ."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"ບໍ່ສາມາດເພີ່ມການໂທໄດ້ໃນເວລານີ້."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"ກຳລັງເລີ່ມຕົ້ນລຳດັບ MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"ການ​ບໍ​ລິ​ການ​ບໍ່​ຮອງ​ຮັບ"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"ບໍ່​ສາ​ມາດ​ສະ​ຫຼັບ​ສາ​ຍ​ໂທ​ໄດ້."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"ບໍ່​ສາ​ມາດ​ແຍກ​ສາຍ​ໂທ​ໄດ້."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"ເຂົ້າສູ່ໂໝດໂທກັບສຸກເສີນແລ້ວ"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"ໂໝດໂທກັບສຸກເສີນ"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"ປິດການເຊື່ອມຕໍ່ຂໍ້ມູນແລ້ວ"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other"> <xliff:g id="COUNT_1">%s</xliff:g> ນາ​ທີ</item>
-      <item quantity="one">ບໍ່​ມີ​ການ​ເຊື່ອມ​ຕໍ່​ຂໍ້​ມູນ​ເປັນ​ເວ​ລາ <xliff:g id="COUNT_0">%s</xliff:g> ນາ​ທີ</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"ບໍ່ມີການເຊື່ອມຕໍ່ອິນເຕີເນັດຈົນຮອດ <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">ໂທ​ລະ​ສັບ​ຈະ​ຢູ່​ໃນ​ໂໝດ​ການ​ໂທ​​ສຸກ​ເສີນ​ເປັນ​ເວ​ລາ <xliff:g id="COUNT_1">%s</xliff:g> ນາ​ທີ. ໃນ​ຂະ​ນະ​ທີ່​ຢູ່​ໃນ​ໂໝດ​ນີ້ ບໍ່​ມີ​ແອພ​ພ​ລິ​ເຄ​ຊັນທີ່​ໃຊ້​ການ​ເຊື່ອມ​ຕໍ່​ຂໍ້​ມູນ​ທີ່​ສາ​ມາດ​ໃຊ້​ໄດ້. ທ່ານ​ຕ້ອງ​ການ​ອອກ​ດຽວ​ນີ້​ບໍ?</item>
       <item quantity="one">ໂທ​ລະ​ສັບ​ຈະ​ຢູ່​ໃນ​ໂໝດ​ການ​ໂທ​​ສຸກ​ເສີນ​ເປັນ​ເວ​ລາ <xliff:g id="COUNT_0">%s</xliff:g> ນາ​ທີ. ໃນ​ຂະ​ນະ​ທີ່​ຢູ່​ໃນ​ໂໝດ​ນີ້ ບໍ່​ມີ​ແອັບ​ທີ່​ໃຊ້​ການ​ເຊື່ອມ​ຕໍ່​ຂໍ້​ມູນ​ທີ່​ສາ​ມາດ​ໃຊ້​ໄດ້. ທ່ານ​ຕ້ອງ​ການ​ອອກ​ດຽວ​ນີ້​ບໍ?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"ເລືອກລາຍຊື່ຜູ່ຕິດຕໍ່"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"ບໍ່ຮອງຮັບການໂທດ້ວຍສຽງ"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"ປຸ່ມໂທ"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"ສັ່ນເຕືອນ"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"ສັ່ນເຕືອນ"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"ຂໍ້​ຄວາມ​ສຽງ​ປະ​ກອບ​ພາບ"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"ຕັ້ງລະຫັດ PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"​ປ່ຽນ​ລະຫັດ PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"ສຽງ"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"ຣິງໂທນ &amp; ການສັ່ນເຕືອນ"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"SIM ກາດ​ທີ່​ມາ​ກັບ​ເຄື່ອງ"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"​ເປີດ​ການ​ໂທ​ດ້ວຍ​ວິ​ດີ​ໂອ"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"ມີຂໍ້ຜິດພາດໃນລະຫວ່າງຖອດລະຫັດຂໍ້ຄວາມດັ່ງກ່າວ."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"ແຜ່ນ SIM ໄດ້ເປີດໃຊ້ງານການບໍລິການຂອງທ່ານ ແລະອັບເດດຄວາມສາມາດໃຊ້ງານຂ້າມເຂດຂອງໂທລະສັບຂອງທ່ານແລ້ວ."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"ມີສາຍຫຼາຍເກີນໄປ. ກະລຸນາວາງສາຍ ຫຼື ຮວມສາຍທີ່ກຳລັງໂທກ່ອນໂທສາຍໃໝ່."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"ບໍ່ສາມາດເຊື່ອມຕໍ່ໄດ້, ກະລຸນາໃສ່ຊິມກາດທີ່ຖືກຕ້ອງ."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"ສູນເສຍການເຊື່ອມຕໍ່ Wi-Fi. ການໂທສິ້ນສຸດລົງແລ້ວ."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"ປ່ຽນລະຫັດ PIN ຂໍ້ຄວາມສຽງ"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"ດຳເນີນການຕໍ່"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"ຍົກເລີກ"</string>
diff --git a/res/values-lt/config.xml b/res/values-lt/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-lt/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index 7e9ebe7..0423c92 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Korinio ryšio duomenys"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Duomenys mobiliesiems"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefono paslaugos"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Pagalbos numerio rinkiklis"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefonas"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Trūksta balso pašto numerio"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM kortelėje nėra išsaugoto balso pašto numerio."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Pridėti numerį"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Balso pašto nustatymus gali keisti tik pagrindinis naudotojas."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Jūsų SIM kortelė buvo atblokuota. Atrakinamas telefonas..."</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM tinklo atrakinimo PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Atblokuoti"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Pateikiama užklausa atrakinti tinklą..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Nesėkminga tinklo atrakinimo užklausa."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Tinklas sėkmingai atrakintas."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Korinio tinklo nustatymai nepasiekiami šiam naudotojui"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Mobiliojo ryšio tinklo nustatymai nepasiekiami šiam naudotojui"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM skambinimo nustatymai"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM skambučių nustatymai (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA skambučio nustatymai"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Balso paštas"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Balso paštas (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"BP:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Pranešimai"</string>
     <string name="networks" msgid="8873030692174541976">"Tinklo operatoriai"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Avarinės transliacijos"</string>
     <string name="call_settings" msgid="6112441768261754562">"Skambinimo nustatymai"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Kai nepasiekiama"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Numeris, kai nepasiekiama"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Peradresuojama į <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Išjungta"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Išjungta"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Operatorius nepalaiko skambučių peradresavimo išjungimo, kai telefonas nepasiekiamas."</string>
     <string name="updating_title" msgid="6146755386174019046">"Skambinimo nustatymai"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Skambučių nustatymus gali keisti tik administruojantis naudotojas."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Naujame PIN kode yra netinkamų simbolių."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Nepavyko pakeisti PIN kodo"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Nepalaikomas pranešimo tipas, paskambinkite numeriu <xliff:g id="NUMBER">%s</xliff:g> ir išklausykite."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Korinio tinklo nustatymai"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Mobiliojo ryšio tinklo tipas"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobiliojo ryšio tinklas"</string>
     <string name="label_available" msgid="1181658289009300430">"Galimi tinklai"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Ieškoma…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Nerasta tinklų."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"Viršytas <xliff:g id="USED_0">%1$s</xliff:g> maksimumas\nDuomenų perdavimo sparta sumažinta iki <xliff:g id="USED_1">%2$d</xliff:g> Kb / sek."</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"Praėjo <xliff:g id="USED_0">%1$d</xliff:g>٪ ciklo\nKitas laikotarpis prasidės po<xliff:g id="USED_1">%2$d</xliff:g> dienų (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Duomenų perdavimo sparta sumažinta iki <xliff:g id="USED">%1$d</xliff:g> kB / sek., jei pasiekiama duomenų naudojimo riba"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Daugiau informacijos apie operatoriaus korinio tinklo duomenų naudojimo politiką"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Daugiau informacijos apie operatoriaus mobiliojo ryšio duomenų naudojimo politiką"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS perdavimas į mobilųjį telefoną"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS perdavimas į mobilųjį telefoną"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Įgalintas SMS perdavimas į mobilųjį telefoną"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Pridėti kontaktą"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Redaguoti adresatą"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Ištrinti adresatą"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Skambinti kontaktui"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Įveskite PIN2 kodą"</string>
     <string name="name" msgid="7329028332786872378">"Pavadinimas"</string>
     <string name="number" msgid="7905950798349903858">"Numeris"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Trinamas fiksuoto rinkimo numeris..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Ištrintas fiksuoto rinkimo numeris."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN neatnaujintas, nes įvedėte neteisingą PIN kodą."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN neatnaujintas, nes numerį gali sudaryti ne daugiau kaip 20 skaitmenų."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN neatnaujintas, nes numeris nenurodytas arba viršija 20 skaitmenų apribojimą."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN nebuvo atnaujintas. Įvestas PIN2 kodas buvo netinkamas arba telefono numeris buvo atmestas."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Nepavyko atlikti FDN operacijos."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Skaitoma iš SIM kortelės..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Išjunkite lėktuvo režimą arba prisijunkite prie belaidžio ryšio tinklo, kad galėtumėte skambinti."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Jei norite skambinti ne pagalbos numeriu, išjunkite atgalinio skambinimo pagalbos numeriu režimą."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Neregistruota tinkle."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Korinis tinklas nepasiekiamas"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Mobiliojo ryšio tinklas nepasiekiamas. Prisijunkite prie belaidžio ryšio tinklo, kad galėtumėte skambinti."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobilusis tinklas negalimas."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobiliojo ryšio tinklas nepasiekiamas. Prisijunkite prie belaidžio ryšio tinklo, kad galėtumėte skambinti."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Kad galėtumėte paskambinti, įveskite tinkamą numerį."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Paskambinti nepavyko."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Šiuo metu skambučio atlikti negalima."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Paleidžiama MMI seka..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Paslauga nepalaikoma"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Nepavyko perjungti skambučių."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Nepavyko atskirti skambučio."</string>
@@ -524,12 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Įvestas atgalinio skambinimo pagalbos numeriu režimas"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Atgalinio skambinimo pagalbos numeriu režimas"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Duomenų ryšys išjungtas"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">Jokio duomenų ryšio <xliff:g id="COUNT_1">%s</xliff:g> minutę</item>
-      <item quantity="few">Jokio duomenų ryšio <xliff:g id="COUNT_1">%s</xliff:g> minutes</item>
-      <item quantity="many">Jokio duomenų ryšio <xliff:g id="COUNT_1">%s</xliff:g> minutės</item>
-      <item quantity="other">Jokio duomenų ryšio <xliff:g id="COUNT_1">%s</xliff:g> minučių</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Duomenų ryšio nebus iki <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">Telefonas veiks pagalbos tarnybos atskambinimo režimu <xliff:g id="COUNT_1">%s</xliff:g> minutę. Įgalinus šį režimą negalima naudoti jokių programų, kurioms reikalingas duomenų ryšys. Norite dabar išeiti iš šio režimo?</item>
       <item quantity="few">Telefonas veiks pagalbos tarnybos atskambinimo režimu <xliff:g id="COUNT_1">%s</xliff:g> minutes. Įgalinus šį režimą negalima naudoti jokių programų, kurioms reikalingas duomenų ryšys. Norite dabar išeiti iš šio režimo?</item>
@@ -557,12 +555,9 @@
     <string name="selectContact" msgid="781975788478987237">"pasirinkti kontaktą"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Skambinimas balsu nepalaikomas"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"rinkti numerį"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibruoti"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibruoti"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Vaizdinis balso paštas"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN kodo nustatymas"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Keisti PIN kodą"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Garsas"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Skambėjimo tonas ir vibracija"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Įtaisytosios SIM kortelės"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Įjungti vaizdo skambutį"</string>
@@ -579,6 +574,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Iškoduojant pranešimą įvyko klaida."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM kortelė suaktyvino paslaugą ir atnaujino telefono tarptinklinio duomenų ryšio funkcijas."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Yra per daug aktyvių skambučių. Prieš skambindami kitu numeriu, užbaikite ar sujunkite esamus skambučius."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Nepavyko užmegzti ryšio. Įdėkite tinkamą SIM kortelę."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"„Wi-Fi“ ryšys prarastas. Skambutis baigėsi."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Balso pašto PIN kodo keitimas"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Tęsti"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Atšaukti"</string>
diff --git a/res/values-lv/config.xml b/res/values-lv/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-lv/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index 93bfde1..c25b269 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobilie dati"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobilo ierīču dati"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Tālruņa pakalpojumi"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Ārkārtas numuru sastādītājs"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Tālrunis"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Trūkst balss pasta numura"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM kartē neviens balss pasta numurs nav saglabāts."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Pievienot numuru"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Tikai galvenais lietotājs var mainīt balss pasta iestatījumus."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"SIM karte ir atbloķēta. Notiek tālruņa atbloķēšana..."</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM tīkla atbloķēšanas PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Atbloķēt"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Notiek tīkla atbloķēšanas pieprasīšana..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Tīkla atbloķēšanas pieprasījums nav veiksmīgs."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Tīkla atbloķēšana bija veiksmīga."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Mobilā tīkla iestatījumi šim lietotājam nav pieejami."</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Mobilā tīkla iestatījumi šim lietotājam nav pieejami."</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM zvanu iestatījumi"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM zvanu iestatījumi (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA zvanu iestatījumi"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Balss pasts"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Balss pasts (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"BP:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Paziņojumi"</string>
     <string name="networks" msgid="8873030692174541976">"Tīkla operatori"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Ārkārtas paziņojumi"</string>
     <string name="call_settings" msgid="6112441768261754562">"Zvanu iestatījumi"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Kad nav sasniedzams"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Numurs, ja nav sasniedzams"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Pāradresēšana uz: <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Atspējots"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Izslēgts"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Jūsu mobilo sakaru operators neatbalsta zvanu pāradresācijas atspējošanu, ja tālrunis nav sasniedzams."</string>
     <string name="updating_title" msgid="6146755386174019046">"Zvanu iestatījumi"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Tikai lietotājs ar administratora tiesībām var mainīt zvanu iestatījumus."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Jaunajā PIN ir ietvertas nederīgas rakstzīmes."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Neizdevās mainīt PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Neatbalstīts ziņojuma veids. Lai noklausītos, zvaniet uz numuru <xliff:g id="NUMBER">%s</xliff:g>."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Mobilā tīkla iestatījumi"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Mobilā tīkla iestatījumi"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobilais tīkls"</string>
     <string name="label_available" msgid="1181658289009300430">"Pieejamie tīkli"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Notiek meklēšana…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Neviens tīkls nav atrasts."</string>
@@ -233,7 +236,7 @@
     <!-- no translation found for throttle_time_frame_subtext (7732763021560399960) -->
     <skip />
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Datu ātrums tiek samazināts līdz <xliff:g id="USED">%1$d</xliff:g> Kb/s, ja ir pārsniegts datu lietojuma ierobežojums."</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Plašāka informācija par mobilo sakaru operatora mobilā tīkla datu lietošanas politiku"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Papildinformācija par mobilo sakaru operatora mobilā tīkla datu lietošanas politiku"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Šūnu apraides īsziņa"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Šūnu apraides īsziņa"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Šūnu apraides īsziņas ir iespējotas."</string>
@@ -370,6 +373,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Pievienot kontaktpersonu"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Rediģēt kontaktpersonu"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Dzēst kontaktpersonu"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Sastādīt kontaktpersonas numuru"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Ievadiet PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Vārds"</string>
     <string name="number" msgid="7905950798349903858">"Numurs"</string>
@@ -384,7 +388,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Notiek fiksētā numuru sastādīšanas numura dzēšana…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Fiksētais numuru sastādīšanas numurs ir atspējots."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"IZSN nav atjaunināts, jo tika ievadīts nepareizs PIN."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"IZSN netika atjaunināts, jo numurā nedrīkst būt vairāk par 20 cipariem."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"IZSN netika atjaunināts, jo numura lauks ir tukšs vai numurā ir vairāk par 20 cipariem."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"IZSN netika atjaunināts. Ievadītais PIN2 nebija pareizs, vai tālruņa numurs tika noraidīts."</string>
     <string name="fdn_failed" msgid="540018079008319747">"IZSN ievadīšana neizdevās."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Notiek lasīšana no SIM kartes..."</string>
@@ -446,12 +450,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Lai veiktu zvanu, izslēdziet lidojuma režīmu vai izveidojiet savienojumu ar bezvadu tīklu."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Lai veiktu parastu zvanu, izejiet no ārkārtas atzvana režīma."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Tīklā nav reģistrēts."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mobilais tīkls nav pieejams."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Mobilais tīkls nav pieejams. Lai veiktu zvanu, izveidojiet savienojumu ar bezvadu tīklu."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobilais tīkls nav pieejams."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobilais tīkls nav pieejams. Lai veiktu zvanu, izveidojiet savienojumu ar bezvadu tīklu."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Lai veiktu zvanu, ievadiet derīgu numuru."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Zvans neizdevās."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Pašlaik nevar pievienot zvanu."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Notiek MMI secības startēšana…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Pakalpojums netiek atbalstīts"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Nevar pārslēgt zvanus."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Nevar nošķirt zvanu."</string>
@@ -526,11 +529,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Ievadītais ārkārtas atzvana režīms"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Ārkārtas atzvana režīms"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Datu savienojums ir atspējots."</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="zero"><xliff:g id="COUNT_1">%s</xliff:g> minūtes nav datu savienojuma</item>
-      <item quantity="one"><xliff:g id="COUNT_1">%s</xliff:g> minūti nav datu savienojuma</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> minūtes nav datu savienojuma</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Datu savienojums nebūs pieejams līdz plkst. <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="zero">Tālrunī <xliff:g id="COUNT_1">%s</xliff:g> minūtes būs aktivizēts ārkārtas atzvana režīms. Šajā režīmā nevar izmantot lietotnes, kurās tiek lietots datu savienojums. Vai vēlaties to aizvērt tūlīt?</item>
       <item quantity="one">Tālrunī <xliff:g id="COUNT_1">%s</xliff:g> minūti būs aktivizēts ārkārtas atzvana režīms. Šajā režīmā nevar izmantot lietotnes, kurās tiek lietots datu savienojums. Vai vēlaties to aizvērt tūlīt?</item>
@@ -556,12 +555,9 @@
     <string name="selectContact" msgid="781975788478987237">"atlasīt kontaktpersonu"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Balss zvani netiek atbalstīti"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"sastādīt numuru"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibrozvans"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibrozvans"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Vizuālais balss pasts"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN koda iestatīšana"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Mainīt PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Signāls"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Zvana signāls un vibrācija"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Iebūvētās SIM kartes"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Ieslēgt videozvanus"</string>
@@ -578,6 +574,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Atšifrējot ziņojumu, radās kļūda."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM kartē ir aktivizēts jūsu pakalpojums un atjauninātas tālruņa viesabonēšanas iespējas."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Ir pārāk daudz aktīvu zvanu. Pirms jauna zvana veikšanas pabeidziet vai apvienojiet esošos zvanus."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Nevar izveidot savienojumu. Lūdzu, ievietojiet derīgu SIM karti."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi savienojums ir zaudēts. Zvans ir pārtraukts."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Balss pasta PIN koda mainīšana"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Turpināt"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Atcelt"</string>
diff --git a/res/values-mcc208-mnc09-fr/strings.xml b/res/values-mcc208-mnc09-fr/strings.xml
new file mode 100644
index 0000000..ac5ef59
--- /dev/null
+++ b/res/values-mcc208-mnc09-fr/strings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="enhanced_4g_lte_mode_summary">Utiliser la fonction Voix 4G (HD) lorsqu\'elle est disponible</string>
+    <string name="enhanced_4g_lte_mode_title">Activer Voix 4G (HD)</string>
+</resources>
diff --git a/res/values-mcc208-mnc10-fr/strings.xml b/res/values-mcc208-mnc10-fr/strings.xml
new file mode 100644
index 0000000..ac5ef59
--- /dev/null
+++ b/res/values-mcc208-mnc10-fr/strings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="enhanced_4g_lte_mode_summary">Utiliser la fonction Voix 4G (HD) lorsqu\'elle est disponible</string>
+    <string name="enhanced_4g_lte_mode_title">Activer Voix 4G (HD)</string>
+</resources>
diff --git a/res/values-mcc262-mnc01/strings.xml b/res/values-mcc262-mnc01/strings.xml
new file mode 100644
index 0000000..85c4333
--- /dev/null
+++ b/res/values-mcc262-mnc01/strings.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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.
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Status hint label for an incoming call over a wifi network which has not been accepted yet.
+         DO NOT TRANSLATE. -->
+    <string name="status_hint_label_incoming_wifi_call">WLAN call from</string>
+    <!-- Status hint label for a call being made over a wifi network. DO NOT TRANSLATE. -->
+    <string name="status_hint_label_wifi_call">WLAN call</string>
+</resources>
diff --git a/res/values-mk-rMK/arrays.xml b/res/values-mk/arrays.xml
similarity index 100%
rename from res/values-mk-rMK/arrays.xml
rename to res/values-mk/arrays.xml
diff --git a/res/values-mk/config.xml b/res/values-mk/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-mk/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-mk-rMK/strings.xml b/res/values-mk/strings.xml
similarity index 96%
rename from res/values-mk-rMK/strings.xml
rename to res/values-mk/strings.xml
index c44c5de..a37933a 100644
--- a/res/values-mk-rMK/strings.xml
+++ b/res/values-mk/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Мобилен интернет"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Мобилен интернет"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Телефонски услуги"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Бирач за итни случаи"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Телефон"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Недостасува број на говорна пошта"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Нема мемориран број на говорна пошта на SIM картичката."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Додај број"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Поставките за говорна пошта може да ги измени само примарниот корисник."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Вашата SIM картичка е одблокирана. Вашиот телефон се отклучува..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN за отклучување мрежа на SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Отклучи"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Барање за отклучување мрежа..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Барањето за отклучување мрежа е неуспешно."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Отклучувањето мрежа е успешно."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Поставките за мобилна мрежа не се достапни за овој корисник"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Поставките на мобилната мрежа не се достапни за овој корисник"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM поставки на повик"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Поставки за повик преку GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA поставки на повик"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Говорна пошта"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Говорна пошта (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"ГП:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Известувања"</string>
     <string name="networks" msgid="8873030692174541976">"Оператори на мрежа"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Итни емитувања"</string>
     <string name="call_settings" msgid="6112441768261754562">"Поставки на повик"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Кога е недостапно"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Број кога е недостапно"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Проследување на <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Оневозможено"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Исклучено"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Вашиот оператор не поддржува оневозможување проследување повик кога вашиот телефон е недостапен."</string>
     <string name="updating_title" msgid="6146755386174019046">"Поставки на повик"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Поставките за повик може да ги измени само администраторскиот корисник."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Новиот PIN содржи погрешни знаци."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN-кодот не може да се промени"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Неподдржан тип порака. Повикајте <xliff:g id="NUMBER">%s</xliff:g> за да слушате."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Поставки за мобилна мрежа"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Поставки на мобилна мрежа"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Мобилна мрежа"</string>
     <string name="label_available" msgid="1181658289009300430">"Достапни мрежи"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Се пребарува..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Не се пронајдени мрежи."</string>
@@ -237,7 +240,7 @@
     <!-- no translation found for throttle_time_frame_subtext (7732763021560399960) -->
     <skip />
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Преносот на податоци се сведува на <xliff:g id="USED">%1$d</xliff:g> кб/с ако се надмине границата на потрошен интернет"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Повеќе информации за политиката на користање податоци на мобилната мрежа на вашиот оператор"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Повеќе информации за политиката на користање податоци на мобилната мрежа на вашиот оператор"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS за емитување од мобилен"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS за емитување од мобилен"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"SMS за емитување од мобилен е овозможено"</string>
@@ -374,6 +377,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Додај контакт"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Измени контакт"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Избриши контакт"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Повикај контакт"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Внеси PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Име"</string>
     <string name="number" msgid="7905950798349903858">"Број"</string>
@@ -388,7 +392,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Бришење број на фиксно бирање..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Бројот на фиксно бирање е избришан."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN не се ажурираше зашто внесовте погрешен PIN."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN не е ажуриран зашто бројот не може да надмине 20 цифри."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN не е ажуриран затоа што бројот е празен или содржи повеќе од 20 цифри."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN не се ажурираше. PIN2 кодот е неточен или телефонскиот број е одбиен."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Операцијата со FDN не успеа."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Се чита од SIM картичка..."</string>
@@ -450,12 +454,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Исклучете го авионскиот режим или поврзете се на безжична мрежа за да повикате."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Излезете од режимот на итен повратен повик за да направите обичен повик."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Не е регистриран на мрежа."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Не е достапна мобилна мрежа."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Не е достапна мобилна мрежа. Поврзете се на безжична мрежа за да повикате."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Не е достапна мобилна мрежа."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Не е достапна мобилна мрежа. Поврзете се на безжична мрежа за да повикате."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"За да повикате, внесете важечки број."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Повикот не успеа."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Повикот не може да се додаде во моментов."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Започнува MMI низа..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Услугата не е поддржана"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Не може да префрли повици."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Не може да оддели повик."</string>
@@ -530,10 +533,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Влезе во режим на повратни повици во итни случаи"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Режим на повратни повици во итни случаи"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Врската со податоците е оневозможена"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">Нема врска на податоци <xliff:g id="COUNT_1">%s</xliff:g> минута</item>
-      <item quantity="other">Нема врска на податоци  <xliff:g id="COUNT_1">%s</xliff:g> минути</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Нема интернет-врска до <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">Телефонот ќе биде во режим на итен повик <xliff:g id="COUNT_1">%s</xliff:g> минута. Кога е во овој режим, не може да се користат апликации што користат врска со податоци. Дали сакате да излезете сега?</item>
       <item quantity="other">Телефонот ќе биде во режим на итен повик <xliff:g id="COUNT_1">%s</xliff:g> минути. Кога е во овој режим, не може да се користат апликации што користат врска со податоци. Дали сакате да излезете сега?</item>
@@ -557,12 +557,9 @@
     <string name="selectContact" msgid="781975788478987237">"избери контакт"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Гласовното повикување не е поддржано"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"бирај"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Вибрирање"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Вибрирање"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Визуелна говорна пошта"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Поставете PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Променете PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Звук"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Мелодија и вибрации"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Вградени SIM-картички"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Вклучи видеоповикување"</string>
@@ -579,6 +576,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Настана грешка при дешифрирање на пораката."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Вашата SIM-картичка ја активираше услугата и ги ажурираше способностите за роаминг на вашиот телефон."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Има премногу активни повици. Завршете или спојте ги постоечките повици пред да започнете нов."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Не може да се поврзе. Внесете важечка SIM-картичка."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi-врската е прекината. Повикот заврши."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Променете PIN на говорната пошта"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Продолжи"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Откажи"</string>
diff --git a/res/values-ml-rIN/arrays.xml b/res/values-ml/arrays.xml
similarity index 100%
rename from res/values-ml-rIN/arrays.xml
rename to res/values-ml/arrays.xml
diff --git a/res/values-ml/config.xml b/res/values-ml/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-ml/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-ml-rIN/strings.xml b/res/values-ml/strings.xml
similarity index 96%
rename from res/values-ml-rIN/strings.xml
rename to res/values-ml/strings.xml
index a780ddc..5327c46 100644
--- a/res/values-ml-rIN/strings.xml
+++ b/res/values-ml/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"സെല്ലുലാർ ഡാറ്റ"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"മൊബൈൽ ഡാറ്റ"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"ഫോൺ സേവനങ്ങൾ"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"അടിയന്തര ഡയലർ"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"ഫോണ്‍"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"വോയ്‌സ്മെയിൽ നമ്പർ കാണുന്നില്ല"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"സിം കാർഡിൽ വോയ്‌സ്‌മെയിൽ നമ്പറൊന്നും സംഭരിച്ചിട്ടില്ല."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"നമ്പർ ചേർക്കുക"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"പ്രാഥമിക ഉപയോക്താവിന് മാത്രമേ വോയ്‌സ്‌മെയിൽ ക്രമീകരണം പരിഷ്‌ക്കരിക്കാനാവൂ."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"സിം കാർഡ് തടഞ്ഞത് മാറ്റി. നിങ്ങളുടെ ഫോൺ അൺലോക്കുചെയ്യുന്നു…"</string>
     <string name="label_ndp" msgid="780479633159517250">"സിം നെറ്റ്‌വർക്ക് അൺലോക്ക് പിൻ"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"അൺലോക്കുചെയ്യുക"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"നെറ്റ്‌വർക്ക് അൺലോക്ക് അഭ്യർത്ഥിക്കുന്നു…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"നെറ്റ്‌വർക്ക് അൺലോക്ക് അഭ്യർത്ഥന പരാജയപ്പെട്ടു."</string>
     <string name="unlock_success" msgid="6770085622238180152">"നെറ്റ്‌വർക്ക് അൺലോക്ക് വിജയിച്ചു."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"ഈ ഉപയോക്താവിന് സെല്ലുലാർ നെറ്റ്‌വർക്ക് ക്രമീകരണങ്ങൾ ലഭ്യമല്ല"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"ഈ ഉപയോക്താവിന് മൊബൈൽ നെറ്റ്‌വർക്ക് ക്രമീകരണങ്ങൾ ലഭ്യമല്ല"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM കോൾ ക്രമീകരണങ്ങൾ"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM കോൾ ക്രമീകരണം (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA കോൾ ക്രമീകരണങ്ങൾ"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"വോയ്സ് മെയില്‍"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"ശബ്ദമെയിൽ(<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"അറിയിപ്പുകൾ"</string>
     <string name="networks" msgid="8873030692174541976">"നെറ്റ്‌വർക്ക് ഓപ്പറേറ്റർമാർ"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"അടിയന്തര പ്രക്ഷേപണങ്ങൾ"</string>
     <string name="call_settings" msgid="6112441768261754562">"കോൾ ക്രമീകരണങ്ങൾ"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"ലഭ്യമല്ലാതിരിക്കുമ്പോൾ"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"പരിധിയ്‌ക്ക് പുറത്തായിരിക്കുമ്പോൾ"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> എന്നതിലേക്ക് കൈമാറുന്നു"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"പ്രവർത്തനരഹിതം"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"ഓഫ്"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"നിങ്ങളുടെ ഫോൺ പരിധിയ്ക്ക് പുറത്തായിരിക്കുമ്പോൾ കോൾ ഫോർവേഡിംഗ്  പ്രവർത്തനരഹിതമാക്കുന്നതിനെ നിങ്ങളുടെ ഓപ്പറേറ്റർ പിന്തുണയ്‌ക്കുന്നില്ല."</string>
     <string name="updating_title" msgid="6146755386174019046">"കോൾ ക്രമീകരണങ്ങൾ"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"അഡ്മിൻ ഉപയോക്താവിന് മാത്രമേ കോൾ ക്രമീകരണം മാറ്റാൻ കഴിയൂ."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"പുതിയ പിന്നിൽ അസാധുവായ പ്രതീകങ്ങൾ അടങ്ങിയിരിക്കുന്നു."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"പിൻ മാറ്റാനായില്ല"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"സന്ദേശ തരം പിന്തുണയ്‌ക്കുന്നില്ല, കേൾക്കാൻ <xliff:g id="NUMBER">%s</xliff:g> നമ്പറിൽ വിളിക്കുക."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"സെല്ലുലാർ നെറ്റ്‌വർക്ക് ക്രമീകരണങ്ങൾ"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"മൊബൈൽ നെറ്റ്‌വർക്ക് ക്രമീകരണങ്ങൾ"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"മൊബൈൽ നെറ്റ്‌വർക്ക്"</string>
     <string name="label_available" msgid="1181658289009300430">"ലഭ്യമായ നെറ്റ്‌വർക്കുകൾ"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"തിരയുന്നു…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"നെറ്റ്‌വർക്കുകളൊന്നും കണ്ടെത്തിയില്ല."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"പരമാവധി <xliff:g id="USED_0">%1$s</xliff:g> കവിഞ്ഞു\nഡാറ്റ നിരക്ക് സെക്കൻഡിൽ <xliff:g id="USED_1">%2$d</xliff:g> Kb ആയി കുറച്ചു"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ സൈക്കിൾ കഴിഞ്ഞു\nഅടുത്ത കാലയളവ് <xliff:g id="USED_1">%2$d</xliff:g> ദിവസത്തിനകം ആരംഭിക്കും (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"ഡാറ്റാ ഉപയോഗ പരിധി കവിയുകയാണെങ്കിൽ, ഡാറ്റ നിരക്ക് സെക്കൻഡിൽ <xliff:g id="USED">%1$d</xliff:g> Kb ആയി കുറയ്‌ക്കുന്നു"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"നിങ്ങളുടെ കാരിയറിന്റെ സെല്ലുലാർ നെറ്റ്‌വർക്ക് ഡാറ്റ ഉപയോഗ നയത്തെക്കുറിച്ചുള്ള കൂടുതൽ വിവരങ്ങൾ"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"നിങ്ങളുടെ കാരിയറിന്റെ മൊബൈൽ നെറ്റ്‌വർക്ക് ഡാറ്റ ഉപയോഗ നയത്തെക്കുറിച്ചുള്ള കൂടുതൽ വിവരങ്ങൾ"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"സെൽ പ്രക്ഷേപണ SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"സെൽ പ്രക്ഷേപണ SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"സെൽ പ്രക്ഷേപണ SMS പ്രവർത്തനക്ഷമമാക്കി"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"കോൺടാക്റ്റ് ചേർക്കുക"</string>
     <string name="menu_edit" msgid="7143003705504672374">"കോൺടാ‌ക്‌റ്റ് തിരുത്തുക"</string>
     <string name="menu_delete" msgid="3977150783449642851">"കോണ്‍‌ടാക്റ്റ് ഇല്ലാതാക്കുക"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"കോൺടാക്റ്റിനെ ഡയൽ ചെയ്യുക"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2 ടൈപ്പുചെയ്യുക"</string>
     <string name="name" msgid="7329028332786872378">"പേര്"</string>
     <string name="number" msgid="7905950798349903858">"അക്കം"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"സ്ഥിര ഡയലിംഗ് നമ്പർ ഇല്ലാതാക്കുന്നു…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"സ്ഥിര ഡയലിംഗ് നമ്പർ ഇല്ലാതാക്കി."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"നിങ്ങൾ തെറ്റായ പിൻ നൽകിയതിനാൽ FDN അപ്‌ഡേറ്റുചെയ്‌തില്ല."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN അപ്‌ഡേറ്റുചെയ്‌തില്ല, നമ്പർ 20 അക്കങ്ങൾ കവിയരുത്."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"നമ്പറില്ലാത്തതിനാലോ അത് 20 അക്കങ്ങളിൽ കൂടുതൽ ഉള്ളതിനാലോ, FDN അപ്‌ഡേറ്റുചെയ്‌തില്ല."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN അപ്‌ഡേറ്റുചെയ്‌തില്ല. PIN2 തെറ്റായിരുന്നു, അല്ലെങ്കിൽ ഫോൺ നമ്പർ നിരസിച്ചു."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN പ്രവർത്തനം പരാജയപ്പെട്ടു."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"സിം കാർഡിൽ നിന്നും റീഡുചെയ്യുന്നു…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"ഒരു കോൾ വിളിക്കാൻ വിമാന മോഡ് ഓഫാക്കുക അല്ലെങ്കിൽ വയർലെസ്സ് നെറ്റ്‌വർക്കിലേക്ക് കണക്റ്റുചെയ്യുക."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"അടിയന്തിരമല്ലാത്ത കോൾ ചെയ്യാൻ അടിയന്തിര കോൾബാക്ക് മോഡിൽ നിന്ന് പുറത്തുകടക്കുക."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"നെറ്റ്‌വർക്കിൽ രജിസ്റ്റർ ചെയ്‌തിട്ടില്ല."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"സെല്ലുലാർ നെറ്റ്‌വർക്ക് ലഭ്യമല്ല."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"സെല്ലുലാർ നെറ്റ്‌വർക്ക് ലഭ്യമല്ല. കോൾ വിളിക്കാൻ വയർലെസ്സ് നെറ്റ്‌വർക്കിലേക്ക് കണക്റ്റുചെയ്യുക."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"മൊബൈൽ നെറ്റ്‌വർക്ക് ലഭ്യമല്ല."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"മൊബൈൽ നെറ്റ്‌വർക്ക് ലഭ്യമല്ല. കോൾ വിളിക്കാൻ വയർലെസ്സ് നെറ്റ്‌വർക്കിലേക്ക് കണക്റ്റുചെയ്യുക."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"ഒരു കോൾ ചെയ്യുന്നതിന്, സാധുതയുള്ള നമ്പർ നൽകുക."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"കോൾ ചെയ്യാനായില്ല."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"കോൾ ഇപ്പോൾ ചേർക്കാനാകില്ല."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI സീക്വൻസ് ആരംഭിക്കുന്നു…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"സേവനം പിന്തുണയ്‌ക്കുന്നില്ല"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"കോളുകൾ മാറാനാവില്ല."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"കോൾ വേർതിരിക്കാനാവില്ല."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"അടിയന്തര കോൾബാക്ക് മോഡിൽ പ്രവേശിച്ചു"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"അടിയന്തര കോൾബാക്ക് മോഡ്"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"ഡാറ്റ കണക്ഷൻ പ്രവർത്തനരഹിതമാക്കി"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> മിനിറ്റ് നേരത്തേക്ക് ഡാറ്റ കണക്ഷൻ ലഭ്യമല്ല</item>
-      <item quantity="one"><xliff:g id="COUNT_0">%s</xliff:g> മിനിറ്റ് നേരത്തേക്ക് ഡാറ്റ കണക്ഷൻ ലഭ്യമല്ല</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> വരെ ഡാറ്റാ കണക്ഷൻ ലഭ്യമല്ല"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> മിനിറ്റിനുള്ളിൽ ഫോൺ അടിയന്തര കോൾബാക്ക് മോഡിലാകും. ഈ മോഡിലാകുമ്പോൾ ഡാറ്റ കണക്ഷൻ ഉപയോഗിക്കുന്ന അപ്ലിക്കേഷനുകളൊന്നും ഉപയോഗിക്കാനാവില്ല. നിങ്ങൾക്കിപ്പോൾ പുറത്തുപോകണോ?</item>
       <item quantity="one"><xliff:g id="COUNT_0">%s</xliff:g> മിനിറ്റിനുള്ളിൽ ഫോൺ അടിയന്തര കോൾബാക്ക് മോഡിലാകും. ഈ മോഡിലാകുമ്പോൾ ഡാറ്റ കണക്ഷൻ ഉപയോഗിക്കുന്ന അപ്ലിക്കേഷനുകളൊന്നും ഉപയോഗിക്കാനാവില്ല. നിങ്ങൾക്കിപ്പോൾ പുറത്തുപോകണോ?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"കോൺടാക്റ്റ് തിരഞ്ഞെടുക്കുക"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"വോയ്‌സ് കോൾ ചെയ്യുന്നതിനെ പിന്തുണയ്‌ക്കുന്നില്ല"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"ഡയൽ ചെയ്യുക"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"വൈബ്രേറ്റുചെയ്യുക"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"വൈബ്രേറ്റുചെയ്യുക"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"വിഷ്വൽ വോയ്‌സ്‌മെയിൽ"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"പിൻ സജ്ജമാക്കുക"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"പിൻ മാറ്റുക"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"ശബ്‌ദം"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"റിംഗ്ടോണും വൈബ്രേറ്റുചെയ്യലും"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"അന്തർ നിർമ്മിത സിം കാർഡുകൾ"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"വീഡിയോ കോളുചെയ്യൽ ഓണാക്കുക"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"സന്ദേശം ഡീകോഡുചെയ്യുമ്പോൾ ഒരു പിശകുണ്ടായി."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"ഒരു SIM കാർഡ് നിങ്ങളുടെ സേവനം സജീവമാക്കി, ഫോണിന്റെ റോമിംഗ് ശേഷികൾ അപ്‌ഡേറ്റ് ചെയ്തു."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"നിരവധി കോളുകൾ നിലവിൽ സജീവമായുണ്ട്. പുതിയ കോൾ വിളിക്കുന്നതിനുമുമ്പ് നിലവിലുള്ള കോളുകൾ അവസാനിപ്പിക്കുകയോ ലയിപ്പിക്കുകയോ ചെയ്യുക."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"കണക്റ്റുചെയ്യാനാകുന്നില്ല, ഉപയോഗിക്കാനാകുന്ന ഒരു സിം കാർഡ് ഇടുക."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi കണക്ഷൻ പോയതിനാൽ കോൾ അവസാനിച്ചു."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"വോയ്‌സ്മെയിൽ പിൻ മാറ്റുക"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"തുടരുക"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"റദ്ദാക്കുക"</string>
diff --git a/res/values-mn-rMN/arrays.xml b/res/values-mn/arrays.xml
similarity index 100%
rename from res/values-mn-rMN/arrays.xml
rename to res/values-mn/arrays.xml
diff --git a/res/values-mn/config.xml b/res/values-mn/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-mn/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-mn-rMN/strings.xml b/res/values-mn/strings.xml
similarity index 96%
rename from res/values-mn-rMN/strings.xml
rename to res/values-mn/strings.xml
index 875cebf..78e130f 100644
--- a/res/values-mn-rMN/strings.xml
+++ b/res/values-mn/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Үүрэн мэдээлэл"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Мобайл дата"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Гар утасны Үйлчилгээ"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Ослын дуудлага хийгч"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Утас"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Дуут шуудангийн дугаар байхгүй"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM карт дээр дуут шуудангийн дугаар хадгалагдаагүй байна."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Дугаар нэмэх"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Дуут шуудангийн тохиргоог зөвхөн Үндсэн хэрэглэгч өөрчлөх боломжтой."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Таны SIM карт тайлагдлаа. Таны утас тайлагдаж байна…"</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM сүлжээ тайлах PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Тайлах"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Сүлжээг тайлах хүсэлтийг илгээж байна…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Сүлжээг тайлах хүсэлт амжилтгүй боллоо."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Сүлжээг амжилттай тайллаа."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Энэ хэрэглэгчийн хувьд үүрэн сүлжээний тохиргоо ашиглах боломжгүй"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Энэ хэрэглэгч мобайл сүлжээний тохиргоог ашиглах боломжгүй"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM дуудлагын тохиргоо"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM дуудлагын тохиргоо (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA дуудлагын тохиргоо"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Дуут шуудан"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Дуут шуудан ( <xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g> )"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"ДШ:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Мэдэгдэл"</string>
     <string name="networks" msgid="8873030692174541976">"Сүлжээний операторууд"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Онцгой байдлын нэвтрүүлэг"</string>
     <string name="call_settings" msgid="6112441768261754562">"Дуудлагын тохиргоо"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Холбогдох боломжгүй бол"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Холбогдохгүй үед дугаар"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> руу дамжуулж байна"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Идэвхгүйжүүлсэн"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Идэвхгүй"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Таны үүрэн холбоо үзүүлэгчээс утас завгүй байхад дуудлагыг дамжуулахыг зогсоох үйлчилгээг дэмждэггүй."</string>
     <string name="updating_title" msgid="6146755386174019046">"Дуудлагын тохиргоо"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Дуудлагын тохиргоог зөвхөн админ хэрэглэгч солих боломжтой."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Шинэ PIN-д буруу тэмдэгт агуулагдаж байна."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN-г өөрчлөх боломжгүй"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Дэмжигдээгүй зурвасын төрөл, сонсохын тулд <xliff:g id="NUMBER">%s</xliff:g> руу залгана уу."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Үүрэн сүлжээний тохиргоо"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Мобайль сүлжээний тохиргоо"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Мобайл сүлжээ"</string>
     <string name="label_available" msgid="1181658289009300430">"Боломжтой сүлжээнүүд"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Хайж байна..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Сүлжээ олдсонгүй."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> Хэтэрсэн дээд\nДатаны хувийг <xliff:g id="USED_1">%2$d</xliff:g> Kb/s хүртэл бууруулсан"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"Циклийн <xliff:g id="USED_0">%1$d</xliff:g>٪ өнгөрсөн\nДараагийн үе <xliff:g id="USED_1">%2$d</xliff:g> өдрийн дотор эхэлнэ (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Хэрэв дата ашиглалтын хязгаараас хэтэрвэл дата хувийг <xliff:g id="USED">%1$d</xliff:g> Kb/s хүртэл бууруулах"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Таны үүрэн холбооны компанийн үүрэн сүлжээний дата ашиглалтын бодлогын талаар дэлгэрэнгүй мэдээлэл"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Таны үүрэн холбооны компанийн мобайль сүлжээний дата ашиглалтын бодлогын талаар дэлгэрэнгүй мэдээлэл"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Үүрэн нэвтрүүлгийн SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Үүрэн нэвтрүүлгийн SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Үүрэн нэвтрүүлгийн SMS идэвхжүүлсэн"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Харилцагч нэмэх"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Харилцагчийг засварлах"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Харилцагч устгах"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Харилцагч руу залгах"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2-г оруулна уу"</string>
     <string name="name" msgid="7329028332786872378">"Нэр"</string>
     <string name="number" msgid="7905950798349903858">"Дугаар"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Тогтвортой залгах дугаарыг устгаж байна…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Тогтвортой залгах дугаарыг устгав."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Та буруу PIN оруулсан учир FDN шинэчлэгдсэнгүй."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Дугаар 20 цифрээс хэтрэх боломжгүй учир FDN шинэчлэгдээгүй."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Дугаар хоосон, эсвэл 20 цифрээс хэтэрсэн учир FDN шинэчлэгдээгүй."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN шинэчлэгдсэнгүй. PIN2 буруу байсан, эсхүл утасны дугаар зөвшөөрөгдсөнгүй."</string>
     <string name="fdn_failed" msgid="540018079008319747">"ФДН ажиллуулах амжилтгүй."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"SIM картаас уншиж байна…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Дуудлага хийхийн тулд онгоцны горимыг унтраа эсвэл утасгүй интернетэд холбогдоно уу."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Яаралтай түргэн тусламжийн бус дуудлага хийхийн тулд яаралтай түргэн тусламжийн callback горимоос гарна уу."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Сүлжээнд бүртгэгдээгүй."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Үүрэн сүлжээ байхгүй."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Үүрэн сүлжээнд холбогдох боломжгүй байна. Дуудлага хийхийн тулд утасгүй интернетэд холбогдоно уу."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Мобайль сүлжээ байхгүй."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Мобайл сүлжээнд холбогдох боломжгүй байна. Дуудлага хийхийн тулд утасгүй интернетэд холбогдоно уу."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Дуудлага хийхийн тулд хүчин төгөлдөр дугаар оруулна уу."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Дуудлага амжилтгүй болсон."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Одоо дуудлага нэмэх боломжгүй."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI дарааллыг эхлүүлж байна…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Үйлчилгээг дэмждэггүй байна"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Дуудлагыг солих боломжгүй байна."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Дуудлагыг салгаж чадахгүй байна."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Ослын Дуудлага хүлээн авах төлөвт орлоо"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Ослын Дуудлага хүлээн авах Төлөв"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Дата холболтыг идэвхгүйжүүлсэн"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Интернет <xliff:g id="COUNT_1">%s</xliff:g> минут тасарсан байна</item>
-      <item quantity="one">Интернет <xliff:g id="COUNT_0">%s</xliff:g> минут тасарсан байна</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> болтол дата холболт байхгүй"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Таны гар утас яаралтай түргэн тусламжийн дуудлагын хэлбэрт<xliff:g id="COUNT_1">%s</xliff:g> минут байна. Энэ горимд байгаа тохиолдолд интернет холболт ашигладаг ямар ч програмыг ашиглаж үл болно. Та гарахыг хүсэж байна уу?</item>
       <item quantity="one">Таны гар утас яаралтай түргэн тусламжийн дуудлагын хэлбэрт <xliff:g id="COUNT_0">%s</xliff:g> минут байна. Энэ горимд байгаа тохиолдолд интернет холболт ашигладаг ямар ч програмыг ашиглаж үл болно. Та гарахыг хүсэж байна уу?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"харилцагч сонгох"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Дуугаар залгахыг дэмждэггүй"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"залгах"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Чичиргээ"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Чичиргээ"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Уншиж болохуйц дуут шуудан"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN тохируулах"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"PIN өөрчлөх"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Дуу"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Хонхны ая &amp; Чичиргээ"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Суурилагдсан SIM карт"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Видео дуудлагыг идэвхжүүлэх"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Зурвасын кодыг тайлах явцад алдаа гарсан."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM карт таны үйлчилгээг идэвхжүүлж, утасны роаминг багтаамжийг шинэчиллээ."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Хэт олон идэвхтэй дуудлага байна. Шинэ дуудлага хийхийн өмнө одоогийн дуудлагуудыг таслах буюу нэгтгэнэ үү."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Холбох боломжгүй, хүчинтэй SIM карт оруулна уу."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi холболт тасарсан. Дуудлага дууссан."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Дуут шуудангийн PIN-г өөрчлөх"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Үргэлжлүүлэх"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Цуцлах"</string>
diff --git a/res/values-mr-rIN/arrays.xml b/res/values-mr/arrays.xml
similarity index 100%
rename from res/values-mr-rIN/arrays.xml
rename to res/values-mr/arrays.xml
diff --git a/res/values-mr/config.xml b/res/values-mr/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-mr/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-mr-rIN/strings.xml b/res/values-mr/strings.xml
similarity index 96%
rename from res/values-mr-rIN/strings.xml
rename to res/values-mr/strings.xml
index 0ec9988..4ca3d06 100644
--- a/res/values-mr-rIN/strings.xml
+++ b/res/values-mr/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"सेल्‍युलर डेटा"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"मोबाईल डेटा"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"फोन सेवा"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"आणीबाणी डायलर"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"फोन"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"व्हॉइसमेल नंबर गहाळ"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"सिम कार्डवर कोणताही व्हॉइसमेल नंबर संचयित केला नाही."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"नंबर जोडा"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"केवळ प्राथमिक वापरकर्ता व्हॉइसमेल सेटिंग्ज बदलू शकतो."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"आपले सिम कार्ड अवरोधित करणे रद्द केले गेले आहे. आपला फोन अनलॉक होत आहे…"</string>
     <string name="label_ndp" msgid="780479633159517250">"सिम नेटवर्क अनलॉक पिन"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"अनलॉक करा"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"नेटवर्क अनलॉकची विनंती करत आहे..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"नेटवर्क अनलॉक विनंती अयशस्वी."</string>
     <string name="unlock_success" msgid="6770085622238180152">"नेटवर्क अनलॉक यशस्वी."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"या वापरकर्त्यासाठी सेल्युलर नेटवर्क सेटिंग्ज उपलब्ध नाहीत"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"या वापरकर्त्यासाठी मोबाईल नेटवर्क सेटिंग्ज उपलब्ध नाहीत"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM कॉल सेटिंग्ज"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM कॉल सेटिंग्ज (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA कॉल सेटिंग्ज"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"व्हॉइसमेल"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"व्हॉइसमेल (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"सूचना"</string>
     <string name="networks" msgid="8873030692174541976">"नेटवर्क ऑपरेटर"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"आणीबाणी प्रसारणे"</string>
     <string name="call_settings" msgid="6112441768261754562">"कॉल सेटिंग्ज"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"पोहचण्‍यायोग्‍य नसताना"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"नंबर पोहचण्‍यायोग्‍य नसताना"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> वर अग्रेषित करीत आहे"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"अक्षम केले"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"बंद"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"आपला फोन पोहचण्‍यायोग्‍य नसताना आपला वाहक कॉल अग्रेषण करणे अक्षम करण्‍यास समर्थन करीत नाही."</string>
     <string name="updating_title" msgid="6146755386174019046">"कॉल सेटिंग्ज"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"कॉल सेटिंग्ज केवळ प्रशासक वापरकर्त्याद्वारे बदलल्‍या जाऊ शकतात."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"नवीन पिन मध्ये अवैध वर्ण आहेत."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"पिन बदलण्यात अक्षम"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"असमर्थित संदेश प्रकार, ऐकण्यासाठी <xliff:g id="NUMBER">%s</xliff:g> वर कॉल करा."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"सेल्युलर नेटवर्क सेटिंग्ज"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"मोबाईल नेटवर्क सेटिंग्ज"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"मोबाइल नेटवर्क"</string>
     <string name="label_available" msgid="1181658289009300430">"उपलब्ध नेटवर्क"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"शोधत आहे..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"कोणतीही नेटवर्क आढळली नाहीत."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> कमाल ओलांडले\nडेटा रेट <xliff:g id="USED_1">%2$d</xliff:g> Kb/s इतका कमी झाला"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"कालचक्राचा <xliff:g id="USED_0">%1$d</xliff:g>٪ काळ लोटला\nपुढील कालावधी <xliff:g id="USED_1">%2$d</xliff:g> दिवसांमध्‍ये (<xliff:g id="USED_2">%3$s</xliff:g>) प्रारंभ होतो"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"डेटा वापर मर्यादा ओलांडल्‍यास डेटा रेट <xliff:g id="USED">%1$d</xliff:g> Kb/s इतका कमी केला"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"आपल्‍या वाहकाच्‍या सेल्युलर नेटवर्क डेटा वापर धोरणाविषयी अधिक माहिती"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"आपल्‍या वाहकाच्‍या मोबाइल नेटवर्क डेटा वापर धोरणाविषयी अधिक माहिती"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"सेल प्रसारण SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"सेल प्रसारण SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"सेल प्रसारण SMS सक्षम केले"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"संपर्क जोडा"</string>
     <string name="menu_edit" msgid="7143003705504672374">"संपर्क संपादित करा"</string>
     <string name="menu_delete" msgid="3977150783449642851">"संपर्क हटवा"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"संपर्क डायल करा"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2 टाईप करा"</string>
     <string name="name" msgid="7329028332786872378">"नाव"</string>
     <string name="number" msgid="7905950798349903858">"नंबर"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"निश्चित डायलिंग नंबर हटवित आहे..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"निश्चित डायलिंग नंबर हटविला."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"आपण चुकीचा पिन टाईप केल्‍याने FDN अद्यतनित केले नव्‍हते."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN अद्यतनित केले नव्‍हते कारण नंबर 20 अंकांपेक्षा जास्‍त असू शकत नाही."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN अद्यतनित झाले नाही कारण नंबर रिक्त आहे किंवा 20 अंकांपेक्षा मोठा आहे."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN अद्यतनित केले नव्‍हते. PIN2 चुकीचा होता किंवा फोन नंबरला नकार दिला."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN कार्य अयशस्‍वी झाले."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"सिक कार्डमधून वाचत आहे..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"कॉल करण्‍यासाठी विमान मोड बंद करा किंवा वायरलेस नेटवर्कशी कनेक्‍ट करा."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"आणीबाणी नसलेला कॉल करण्‍यासाठी आणीबाणी कॉलबॅक मोडमधून बाहेर पडा."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"नेटवर्कवर नोंदणीकृत नाही."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"सेल्युलर नेटवर्क उपलब्ध नाही."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"सेल्युलर नेटवर्क उपलब्‍ध नाही. कॉल करण्‍यासाठी वायरलेस नेटवर्कशी कनेक्‍ट करा."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"मोबाइल नेटवर्क उपलब्ध नाही."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"मोबाइल नेटवर्क उपलब्‍ध नाही. कॉल करण्‍यासाठी वायरलेस नेटवर्कशी कनेक्‍ट करा."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"कॉल करण्यासाठी, एक वैध नंबर प्रविष्ट करा."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"कॉल अयशस्वी झाला."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"यावेळी कॉल जोडला जाऊ शकत नाही."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI क्रम प्रारंभ करीत आहे..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"सेवा समर्थित नाही"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"कॉल स्विच करू शकत नाही."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"कॉल विभक्त करू शकत नाही."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"आणीबाणी कॉलबॅक मोड प्रविष्‍ट केला"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"आणीबाणी कॉलबॅक मोड"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"डेटा कनेक्शन अक्षम केले"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one"><xliff:g id="COUNT_1">%s</xliff:g> मिनिटासाठी कोणतेही डेटा कनेक्‍शन नाही</item>
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> मिनिटांसाठी कोणतेही डेटा कनेक्‍शन नाही</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> पर्यंत कोणतेही डेटा कनेक्‍शन नाही"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">फोन <xliff:g id="COUNT_1">%s</xliff:g> मिनिटासाठी आणीबाणी कॉलबॅक मोडमध्ये राहील. या मोडमध्ये असताना डेटा कनेक्शन वापरणारे कोणतेही अनुप्रयोग वापरले जाऊ शकत नाहीत. आपण आता बाहेर पडू इच्छिता?</item>
       <item quantity="other">फोन <xliff:g id="COUNT_1">%s</xliff:g> मिनिटांसाठी आणीबाणी कॉलबॅक मोडमध्ये राहील. या मोडमध्ये असताना डेटा कनेक्शन वापरणारे कोणतेही अनुप्रयोग वापरले जाऊ शकत नाहीत. आपण आता बाहेर पडू इच्छिता?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"संपर्क निवडा"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"व्‍हॉइस कॉलिंंग समर्थित नाही"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"डायल करा"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"कंपन होणे"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"कंपन होणे"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"दृश्‍यमान व्हॉइसमेल"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"पिन सेट करा"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"पिन बदला"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"ध्वनी"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"रिंगटोन आणि कंपन"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"अंगभूत सिम कार्डे"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"व्हिडिओ कॉलिंग चालू करा"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"संदेश डीकोड करताना एक त्रुटी आली."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"सिम कार्डने आपली सेवा सक्रिय केली आहे आणि आपल्या फोनच्या रोमिंग क्षमता अद्यतनित केल्या."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"बरेच सक्रिय कॉल आहेत. कृपया नवीन एक कॉल करण्यापूर्वी विद्यमान कॉल समाप्त करा किंवा विलीन करा."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"कनेक्ट करण्यात अक्षम, कृपया एक वैध सिम कार्ड घाला."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"वाय-फाय कनेक्शन गमावले. कॉल समाप्त झाला."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"व्हॉइसमेल पिन बदला"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"सुरू ठेवा"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"रद्द करा"</string>
diff --git a/res/values-ms-rMY/arrays.xml b/res/values-ms/arrays.xml
similarity index 100%
rename from res/values-ms-rMY/arrays.xml
rename to res/values-ms/arrays.xml
diff --git a/res/values-ms/config.xml b/res/values-ms/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-ms/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-ms-rMY/strings.xml b/res/values-ms/strings.xml
similarity index 96%
rename from res/values-ms-rMY/strings.xml
rename to res/values-ms/strings.xml
index 87b6415..afb35b3 100644
--- a/res/values-ms-rMY/strings.xml
+++ b/res/values-ms/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Data Selular"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Data Mudah Alih"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Perkhidmatan Telefon"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Pendail Kecemasan"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Nombor mel suara tiada"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Tidak ada nombor mel suara disimpan pada kad SIM."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Tambah nombor"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Tetapan Mel Suara hanya boleh diubah suai oleh Pengguna Utama."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Kad SIM anda telah dinyahsekat. Telefon anda dibuka kunci..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN buka kunci rangkaian SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Buka kunci"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Meminta dibukakan kunci rangkaian..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Permintaan dibukakan kunci rangkaian tidak berjaya."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Berjaya membuka kunci rangkaian."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Tetapan rangkaian selular tidak tersedia untuk pengguna ini"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Tetapan rangkaian mudah alih tidak tersedia untuk pengguna ini"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Tetapan panggilan GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Tetapan panggilan GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Tetapan panggilan CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Mel suara"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Mel suara (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Pemberitahuan"</string>
     <string name="networks" msgid="8873030692174541976">"Pengendali rangkaian"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Siaran kecemasan"</string>
     <string name="call_settings" msgid="6112441768261754562">"Tetapan panggilan"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Jika tidak dapat dihubungi"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Nombor apabila tidak dapat dihubungi"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Memajukan ke <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Dilumpuhkan"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Mati"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Pembawa anda tidak menyokong pelumpuhan pemajuan panggilan semasa telefon anda tidak boleh dihubungi."</string>
     <string name="updating_title" msgid="6146755386174019046">"Tetapan panggilan"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Tetapan panggilan hanya boleh diubah oleh pengguna pentadbir."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"PIN baharu mengandungi aksara yang tidak sah."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Tidak dapat menukar PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Jenis mesej tidak disokong, hubungi <xliff:g id="NUMBER">%s</xliff:g> untuk mendengar."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Tetapan rangkaian selular"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Tetapan rangkaian mudah alih"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Rangkaian mudah alih"</string>
     <string name="label_available" msgid="1181658289009300430">"Rangkaian sedia ada"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Mencari..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Tiada rangkaian ditemui."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"Melebihi maksimum <xliff:g id="USED_0">%1$s</xliff:g>\nKadar data dikurangkan kepada <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ daripada kitaran telah berlalu\nTempoh berikutnya bermula dalam <xliff:g id="USED_1">%2$d</xliff:g> hari (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Kadar data dikurangkan kepada <xliff:g id="USED">%1$d</xliff:g> Kb/s jika melebihi had penggunaan data"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Lagi maklumat mengenai dasar penggunaan data rangkaian selular pembawa anda"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Lagi maklumat mengenai dasar penggunaan data rangkaian mudah alih pembawa anda"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS Siaran Sel"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS Siaran Sel"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"SMS Siaran Sel didayakan"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Tambah kenalan"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Edit kenalan"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Padamkan kenalan"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Dail kenalan"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Jenis PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Nama"</string>
     <string name="number" msgid="7905950798349903858">"Nombor"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Memadamkan nombor dailan tetap..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Nombor dailan tetap dipadamkan."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN tidak dikemaskini kerana anda telah menaip PIN yang salah."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN tidak dikemas kini kerana nombor tidak boleh melebihi 20 digit."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN tidak dikemas kini kerana nombor kosong atau melebihi 20 digit."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN tidak dikemaskini. PIN2 salah atau nombor telefon telah ditolak."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Operasi FDN gagal."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Membaca daripada kad SIM..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Matikan mod pesawat atau sambungkan ke rangkaian wayarles untuk membuat panggilan."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Keluar daripada mod panggil balik kecemasan untuk membuat panggilan bukan kecemasan."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Tidak didaftarkan pada rangkaian."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Rangkaian selular tidak tersedia."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Rangkaian selular tidak tersedia. Sambungkan ke rangkaian wayarles untuk membuat panggilan."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Rangkaian mudah alih tidak tersedia."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Rangkaian selular tidak tersedia. Sambung ke rangkaian wayarles untuk membuat panggilan."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Untuk membuat panggilan, masukkan nombor yang sah."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Panggilan gagal."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Panggilan tidak boleh ditambahkan pada masa ini."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Memulakan jujukan MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Perkhidmatan tidak disokong"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Tidak dapat menukar panggilan."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Tidak dapat mengasingkan panggilan."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Telah Memasuki Mod Panggil Balik Kecemasan"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Mod Paggil Balik Kecemasan"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Sambungan data dilumpuhkan"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Tiada sambungan data selama <xliff:g id="COUNT_1">%s</xliff:g> minit</item>
-      <item quantity="one">Tiada sambungan data selama <xliff:g id="COUNT_0">%s</xliff:g> minit</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Tiada sambungan data hingga <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Telefon akan berada dalam mod Panggilan Balik Kecemasan selama <xliff:g id="COUNT_1">%s</xliff:g> minit. Semasa berada dalam mod ini tiada aplikasi yang menggunakan sambungan data boleh digunakan. Adakah anda mahu keluar sekarang?</item>
       <item quantity="one">Telefon akan berada dalam mod Panggilan Balik Kecemasan selama <xliff:g id="COUNT_0">%s</xliff:g> seminit. Semasa berada dalam mod ini tiada apl yang menggunakan sambungan data boleh digunakan. Adakah anda mahu keluar sekarang?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"pilih kenalan"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Panggilan suara tidak disokong"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"dail"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Getar"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Getar"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Mel Suara Visual"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Tetapkan PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Tukar PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Bunyi"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Nada dering &amp; Bergetar"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Kad SIM terbina dalam"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Hidupkan panggilan video"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Terdapat ralat semasa menyahkodkan mesej."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Kad SIM telah mengaktifkan perkhidmatan anda dan mengemas kini keupayaan perayauan telefon anda."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Terlalu banyak panggilan aktif. Sila tamatkan atau gabungkan panggilan yang sedia ada sebelum membuat panggilan baharu."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Tidak dapat bersambung, sila masukkan kad SIM yang sah."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Sambungan Wi-Fi terputus. Panggilan ditamatkan."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Tukar PIN Mel Suara"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Teruskan"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Batal"</string>
diff --git a/res/values-my-rMM/arrays.xml b/res/values-my/arrays.xml
similarity index 100%
rename from res/values-my-rMM/arrays.xml
rename to res/values-my/arrays.xml
diff --git a/res/values-my/config.xml b/res/values-my/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-my/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-my-rMM/strings.xml b/res/values-my/strings.xml
similarity index 96%
rename from res/values-my-rMM/strings.xml
rename to res/values-my/strings.xml
index cb79b16..7c1e747 100644
--- a/res/values-my-rMM/strings.xml
+++ b/res/values-my/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"ဆဲလ်လူလာ ဒေတာ"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"မိုဘိုင်းဒေတာ"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"ဖုန်းဝန်ဆောင်မှုများ"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"အရေးပေါ်နံပါတ်ခေါ်ဆိုနံပါတ်ကွက်"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"ဖုန်း"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"အသံစာပို့စနစ် နံပါတ် ပျောက်နေပါသည်"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"ဆင်းမ်ကဒ်ပေါ်တွင် အသံစာပို့စနစ် နံပါတ် သိမ်းဆည်ထားခြင်း မရှိပါ"</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"နံပါတ်ထပ်ထည့်ရန်"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"အသံမေးလ်ဆက်တင်များကို အဓိကအသုံးပြုသူသာ ပြင်ဆင်နိုင်ပါသည်။"</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"သင့် ဆင်းမ်ကဒ်အား ပိတ်ဆို့မှုကို ဖယ်ရှားပြီးပါပြီ။ သင့်ဖုန်းဟာ သော့ဖွင့်နေပါသည်…"</string>
     <string name="label_ndp" msgid="780479633159517250">"ဆင်းမ်ကဒ် ကွန်ရက် သော့ဖွင့်သော ပင်နံပါတ်"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"ဖွင့်ရန်"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"ကွန်ယက်သော့ဖွင့်ခြင်း တောင်းဆိုနေပါသည်…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"ကွန်ယက်ဖွင့်ရန် တောင်းဆိုမှု မအောင်မြင်ပါ"</string>
     <string name="unlock_success" msgid="6770085622238180152">"ကွန်ယက်ဖွင့်ခြင်း မအောင်မြင်ပါ"</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"ဒီအသုံးပြုသူ အတွက် မိုဘိုင်း ကွန်ရက် ဆက်တင်များ မရှိ"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"ဒီအသုံးပြုသူ အတွက် မိုဘိုင်း ကွန်ရက် ဆက်တင်များ မရှိ"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"ဂျီအက်စ်အမ် ခေါ်ဆိုမှု ဆက်တင်"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM ခေါ်ဆိုမှု ဆက်တင်များ ( <xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g> )"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA ဖုန်းခေါ်ဆိုမှု ဆက်တင်"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"အသံစာပို့စနစ်"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"အသံစာပို့စနစ် ( <xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g> )"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"အသံစာပို့နစ်အမှတ် -"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"အကြောင်းကြားချက်များ"</string>
     <string name="networks" msgid="8873030692174541976">"ကွန်ရက် အော်ပရေတာများ"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"အရေးပေါ် ထုတ်လွှင့်မှုများ"</string>
     <string name="call_settings" msgid="6112441768261754562">"ဖုန်းခေါ်ဆိုခြင်း ဆက်တင်များ"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"ဆက်သွယ်၍ မရချိန်"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"ဖုန်းခေါ်မရလျှင် ပို့ရန် နံပါတ်"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> သို့ခေါ်ဆိုမှုအား တဆင့်ထပ်ပို့နေသည်"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"သုံးမရအောင် ပိတ်ထားခြင်း"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"ပိတ်ထားရန်"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"သင့် ဖုန်း ဆက်သွယ်မှု လုပ်လို့မရစဉ် call forwarding ပြုလုပ်မှု ပယ်ဖျက်ရန် သင့် အော်ပရေတာမှ ခွင့်မပြုပါ"</string>
     <string name="updating_title" msgid="6146755386174019046">"ဖုန်းခေါ်ဆိုခြင်း ဆက်တင်များ"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"ခေါ်ဆိုမှုကြိုတင်ပြင်ဆင်ချက်များကို ကြီးကြပ်သူသာလျှင် ပြောင်းလဲနိုင်သည်။"</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"ပင်နံပါတ်အသစ်တွင် အသုံးပြု၍မရသောစာလုံးများ ပါဝင်နေပါသည်။"</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"ပင်နံပါတ်ကို ပြောင်း၍မရပါ"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"ပံ့ပိုးမထားသော မက်ဆေ့ဂျ်အမျိုးအစားဖြစ်၍ နားထောင်ရန် <xliff:g id="NUMBER">%s</xliff:g> ကို ခေါ်ဆိုပါ။"</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"ဆဲလ်လူလာ ကွန်ရက် ဆက်တင်များ"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"မိုဘိုင်းကွန်ယက် ဆက်တင်များ"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"မိုဘိုင်းကွန်ရက်"</string>
     <string name="label_available" msgid="1181658289009300430">"ရရှိနိုင်သော ကွန်ယက်များ"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"ရှာဖွေနေသည်…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"ကွန်ယက်များ မတွေ့ပါ"</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> အမြင့်ဆုံး ကျော်လွန်\nဒေတာနှုန်း <xliff:g id="USED_1">%2$d</xliff:g> Kb/s သို့လျှော့ချလိုက်သည်"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ ကုန်ဆုံးပြီး \n နောက်သတ်မှတ်ကာလစရန် <xliff:g id="USED_1">%2$d</xliff:g> ရက်(<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"ဒေတာအသုံးပြုမှု သတ်မှတ်ချက်ထက်ကျော်လွန်ပါက ဒေတာမြန်နှုန်းဟာ <xliff:g id="USED">%1$d</xliff:g> Kb/s သို့လျှော့ချပါမည်"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"သင့် အတွက် စီမံပေးသူ၏ မိုဘိုင်ကွန်ရက် ဒေတာအသုံးပြုမှု မူဝါဒ အကြောင်း အချက်အလက်များကို ပိုမိုသိရှိရန်"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"သင့်ဖုန်းလိုင်းဌာန၏ မိုဘိုင်ကွန်ယက်ဒေတာအသုံးပြုမှု မူဝါဒအချက်အလက်များကို ပိုမိုသိရှိရန်"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"စာတိုများ ဖြန့်ဝေခြင်းစနစ် စာတိုသည်"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"စာတိုများ ဖြန့်ဝေခြင်းစနစ် စာတို"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"စာတိုများ ဖြန့်ဝေခြင်းစနစ် စာတို ကို ဖွင့်ထား"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"လိပ်စာထပ်ထည့်ပါ"</string>
     <string name="menu_edit" msgid="7143003705504672374">"လိပ်စာပြင်ပါ"</string>
     <string name="menu_delete" msgid="3977150783449642851">"လိပ်စာဖျက်ပါ"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"အဆက်အသွယ်ကို ဖုန်းခေါ်ရန်"</string>
     <string name="get_pin2" msgid="8204677063922225311">"ပင် နံပါတ် ၂ ကို ရိုက်ပါ"</string>
     <string name="name" msgid="7329028332786872378">"အမည်"</string>
     <string name="number" msgid="7905950798349903858">"နံပါတ်"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"ခေါ်ဆိုသည့်အခြေစိုက်နံပါတ်အားဖျက်နေသည်"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"ပုံသေ ခေါ်ဆိုမှု နံပါတ် ဖျက်ပြီး"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"ပင်နံပါတ် မမှန်သောကြောင့် FDNကို အဆင့်မြှင့်တင်ခြင်းမပြုလုပ်နိုင်ပါ"</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"နံပါတ် အလုံးရေ (၂၀) ထက် ရှည်လို့ မရသောကြောင့် FDN ကို မပြင်ဆင်ဖြစ်ပါ"</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"နံပါတ်သည် ဗလာဖြစ်နေခြင်း (သို့) အလုံး ၂၀ ကျော်နေခြင်းကြောင့် FDN ကို မပြင်ဆင်နိုင်ပါ။"</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN ပြောင်းလဲမှု မဖြစ်ပါ။ ပင်နံပါတ် ၂ မှားယွင်းခြင်း သို့မဟုတ် ဖုန်းနံပါတ်ကို ငြင်းဖယ်ခံရခြင်း တစ်ခုခုဖြစ်ပါသည်"</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN လုပ်ဆောင်ချက် မအောင်မြင်ပါ"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"ဆင်းမ်ကဒ်မှ ဖတ်နေပါသည်..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"ဖုန်းခေါ်ရန် လေယာဉ်ပျံမုဒ် ပိတ်ပါ သို့မဟုတ် ကြိုးမဲ့ကွန်ယက်သို့ ချိတ်ဆက်ပါ။"</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"အရေးပေါ် မဟုတ်သည့် ခေါ်ဆိုမှုကို ပြုလုပ်ရန် အရေးပေါ် ဖုန်းခေါ်မှုမှ ထွက်ပါ။"</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"ကွန်ယက်ပေါ်မှာ မှတ်ပုံတင်မှု မပြုလုပ်ထားပါ"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"ဆဲလ်လူလာ ကွန်ရက် မရှိပါ။"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"ဆဲလူလာ ကွန်ရက် မရပါ။ ဖုန်းခေါ်ရန် ကြိုးမဲ့ကွန်ရက်သို့ ချိတ်ဆက်ပါ။"</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"မိုဘိုင်းကွန်ယက်များ မရှိပါ"</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"မိုဘိုင်းကွန်ရက် မရနိုင်ပါ။ ခေါ်ဆိုမှုပြုလုပ်ရန် ကြိုးမဲ့ကွန်ရက်သို့ ချိတ်ဆက်လိုက်ပါ။"</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"ဖုန်းခေါ်ရန်အတွက်၊ သင့်လျော်သည့်နံပါတ် ရိုက်ထည့်ပါ။"</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"ခေါ်ဆို၍ မရပါ။"</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"ယခုအချိန်တွင် ခေါ်ဆိုမှု ထပ်မထည့်နိုင်ပါ။"</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI အမှတ်စဉ်ကို စတင်နေပါသည်…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"ဤဝန်ဆောင်မှုအား မပံ့ပိုးပါ။"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"ဖုန်းခေါ်ခြင်းများကြား မကူးပ​ြောင်းနိုင်ပါ။"</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"ဖုန်းခေါ်ခြင်းအား မခွဲထုတ်နိုင်ပါ။"</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"အရေးပေါ်ပြန်လည်ခေါ်ဆိုမှုအား ရိုက်သွင်းပြီး"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"အရေးပေါ်ပြန်လည်ခေါ်ဆိုမှု"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"ဒေတာဆက်သွယ်မှု မရှိပါ"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other"> ဒေတာဆက်သွယ်မှု <xliff:g id="COUNT_1">%s</xliff:g> မိနစ်မရှိပါ</item>
-      <item quantity="one"> ဒေတာဆက်သွယ်မှု <xliff:g id="COUNT_0">%s</xliff:g> မိနစ်မရှိပါ</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> အထိ ဒေတာချိတ်ဆက်မှု မရှိပါ"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other"> ဖုန်းသည် <xliff:g id="COUNT_1">%s</xliff:g> မိနစ်လောက် အရေးပေါ် ပြန်ခေါ်ခြင်းမုဒ်တွင် ရှိနေလိမ့်မည်။ ဤမုဒ်တွင် ဒေတာချိတ်ဆက်မှုအသုံးပြုသည့် အက်ပ်များကို အသုံးပြု၍ ရနိုင်မည်မဟုတ်ပါ။ ယခုထွက်လိုပါသလား? </item>
       <item quantity="one"> ဖုန်းသည် <xliff:g id="COUNT_0">%s</xliff:g> မိနစ်လောက် အရေးပေါ် ပြန်ခေါ်ခြင်းမုဒ်တွင် ရှိနေလိမ့်မည်။ ဤမုဒ်တွင် ဒေတာချိတ်ဆက်မှုအသုံးပြုသည့် အက်ပ်များကို အသုံးပြု၍ ရနိုင်မည်မဟုတ်ပါ။ ယခုထွက်လိုပါသလား?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"လိပ်စာရွေးပါ"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"အသံခေါ်ဆိုမှု ထောက်ံပံ့ခြင်းမရှိပါ"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"ဖုန်းခေါ်ခြင်း"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"တုန်ခါခြင်း"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"တုန်ခါခြင်း"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"အမြင် အသံမေးလ်"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"ပင်နံပါတ်သတ်မှတ်ရန်"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"ပင်နံပါတ်ပြောင်းပါ"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"အသံ"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"ဖုန်းမြည်သံ &amp; တုန်ခါသံ"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"တပ်ဆင်ပြီး ဆင်းမ် ကဒ်များ"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"ဗီဒီယို ခေါ်ဆိုမှုများကို ဖွင့်ထားရန်"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"စာကို ကုဒ်ဖွင့်နေစဉ် အမှားရှိခဲ့သည်။"</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM ကဒ်သည် သင့် ဖုန်းဝန်ဆောင်မှုအား အသက်သွင်းခဲ့ပြီး သင့်ဖုန်း၏ ကွန်ယက်ပြင်ပဒေတာသုံးနိုင်စွမ်းအား ပြင်ဆင်မွမ်းမံပြီးဖြစ်၏။"</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"လက်ရှိခေါ်ဆိုမှုများ အလွန်များနေပါသည်။ ခေါ်ဆိုမှုအသစ်တစ်ခု မပြုလုပ်ခင် လက်ရှိဖုန်းခေါ်ဆိုမှုများကို အဆုံးသတ် (သို့) ပေါင်း လိုက်ပါ။"</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"ချိတ်ဆက် မရပါ၊ ကျေးဇူးပြုပြီး မှန်ကန်သည့် SIM ကဒ်ကို ထည့်ပေးပါ။"</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi ချိတ်ဆက်မှု ပြတ်တောက်သွားပါသည်။ ခေါ်ဆိုမှု ရပ်တန့်သွားပါပြီ။"</string>
     <string name="change_pin_title" msgid="7790232089699034029">"အသံမေးလ်ပင်နံပါတ် ပြောင်းရန်"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"ဆက်လုပ်ရန်"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"မလုပ်တော့"</string>
diff --git a/res/values-nb/config.xml b/res/values-nb/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-nb/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 930b884..0d85453 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobildata"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobildata"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefontjenester"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Nødnummer"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Mangler nummer til talepostkasse"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Det er ikke lagret noe nummer for talepostkasse på SIM-kortet."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Legg til nummer"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Talepost-innstillinger kan bare endres av hovedbrukeren."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"SIM-kortet er blitt avblokkert. Telefonen låses opp…"</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN-kode for å fjerne operatørlås"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Lås opp"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Spør om fjerning av operatørlås…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Fikk ikke fjerne operatørlås."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Operatørlåsen er fjernet."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Innstillingene for mobilnettverk er ikke tilgjengelige for denne brukeren"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Innstillinger for mobilnettverk er ikke tilgjengelig for denne brukeren"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Innstillinger for GSM-samtaler"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Anropsinnstillinger for GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Innstillinger for CDMA-samtaler"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Talepostkasse"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Talepostkasse (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"Svarer:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Varsler"</string>
     <string name="networks" msgid="8873030692174541976">"Nettoperatører"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Nødvarsler"</string>
     <string name="call_settings" msgid="6112441768261754562">"Samtaleinnstillinger"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Når jeg ikke kan nås"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Nummer når jeg ikke kan nås"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Viderekobler til <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Slått av"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Av"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Operatøren støtter ikke deaktivering av viderekobling når telefonen er utenfor dekning."</string>
     <string name="updating_title" msgid="6146755386174019046">"Samtaleinnstillinger"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Anropsinnstillinger kan bare endres av administratoren."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Den nye PIN-koden inneholder ugyldige tegn."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Kan ikke bytte PIN-kode"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Meldingstypen støttes ikke. Ring <xliff:g id="NUMBER">%s</xliff:g> for å høre."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Mobilnettinnstillinger"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Innstillinger for mobilnettverk"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobilnettverk"</string>
     <string name="label_available" msgid="1181658289009300430">"Tilgjengelige nettverk"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Søker …"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Fant ingen nettverk."</string>
@@ -237,7 +240,7 @@
     <!-- no translation found for throttle_time_frame_subtext (7732763021560399960) -->
     <skip />
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Datahastigheten reduseres til <xliff:g id="USED">%1$d</xliff:g> Kb/s hvis databruken overskrider grenseverdien"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Mer informasjon om mobiloperatørens retningslinjer for bruk av nettverksdata"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Les mer om mobiloperatørens retningslinjer for bruk av nettverksdata"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Kringkastings-SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Kringkastings-SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Kringkastings-SMS aktivert"</string>
@@ -374,6 +377,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Legg til kontakt"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Rediger kontakt"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Fjern kontakt"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Ring kontakten"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Skriv inn PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Navn"</string>
     <string name="number" msgid="7905950798349903858">"Nummer"</string>
@@ -388,7 +392,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Sletter programmert telefonnummer ..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Programmert telefonnummer er slettet."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN er ikke oppdatert fordi du skrev inn feil PIN-kode."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN ble ikke oppdatert fordi tallet ikke kan overstige 20 sifre."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Det programmerte telefonnummeret kan ikke oppdateres fordi det er er tomt eller inneholder over 20 sifre."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"Fast nummer ble ikke oppdatert. PIN2 var feil, eller telefonnummeret ble avvist."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN-handlingen mislyktes."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Leser fra SIM-kort …"</string>
@@ -450,12 +454,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Slå av flymodus eller koble til et trådløst nettverk for å ringe."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Avslutt modusen for nødanrop for å gjøre et vanlig anrop."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Ikke registrert på nettverket."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mobilnettverket er ikke tilgjengelig."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Mobilnettverk er ikke tilgjengelig. Koble til et trådløst nettverk for å ringe."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobilnettverket er ikke tilgjengelig."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobilnettverk er ikke tilgjengelig. Koble til et trådløst nettverk for å ringe."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Skriv inn et gyldig nummer for å plassere en samtale."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Anropet mislyktes."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Anropet kan ikke legges til akkurat nå."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Begynner MMI-sekvens…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Tjenesten støttes ikke"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Kan ikke bytte samtaler."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Kan ikke splitte opp samtale."</string>
@@ -530,10 +533,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Startet modusen nødsamtale-tilbakeringing"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Modusen nødsamtale-tilbakeringing"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Datatilkobling deaktivert"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Ingen datatilkobling i <xliff:g id="COUNT_1">%s</xliff:g> minutter</item>
-      <item quantity="one">Ingen datatilkobling i <xliff:g id="COUNT_0">%s</xliff:g> minutt</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Ingen datatilkobling før <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Telefonen er i nødsamtalemodus i <xliff:g id="COUNT_1">%s</xliff:g> minutter. Når telefonen er i denne modusen, kan du ikke bruke apper som krever datatilkobling. Vil du avslutte nå?</item>
       <item quantity="one">Telefonen er i nødsamtalemodus i <xliff:g id="COUNT_0">%s</xliff:g> minutt. Når telefonen er i denne modusen, kan du ikke bruke apper som krever datatilkobling. Vil du avslutte nå?</item>
@@ -557,12 +557,9 @@
     <string name="selectContact" msgid="781975788478987237">"velg kontakt"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Taleanrop støttes ikke"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"ring"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibrering"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibrering"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Visuell talepostkasse"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Angi PIN-kode"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Bytt PIN-kode"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Lyd"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Ringetone og vibrering"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Innebygde SIM-kort"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Slå på videosamtaler"</string>
@@ -579,6 +576,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Det oppsto en feil under dekoding av meldingen."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Et SIM-kort har aktivert tjenesten din og oppdatert roamingfunksjonene for telefonen din."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Du har for mange aktive samtaler. Avslutt eller slå sammen eksisterende samtaler før du starter en ny samtale."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Kunne ikke koble til. Sett inn et gyldig SIM-kort."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Samtalen ble avsluttet fordi Wi-Fi-forbindelsen ble brutt."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Endre PIN-kode for talemeldinger"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Fortsett"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Avbryt"</string>
diff --git a/res/values-ne-rNP/arrays.xml b/res/values-ne/arrays.xml
similarity index 100%
rename from res/values-ne-rNP/arrays.xml
rename to res/values-ne/arrays.xml
diff --git a/res/values-ne/config.xml b/res/values-ne/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-ne/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-ne-rNP/strings.xml b/res/values-ne/strings.xml
similarity index 96%
rename from res/values-ne-rNP/strings.xml
rename to res/values-ne/strings.xml
index cab280c..b44a43e 100644
--- a/res/values-ne-rNP/strings.xml
+++ b/res/values-ne/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"सेलुलर डेटा"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"मोबाइल डेटा"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"फोन सेवाहरू"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"आपतकालीन डायल गर्ने"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"फोन"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"भ्वाइसमेल नम्बर हराइरहेको छ"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM कार्डमा कुनै पनि भ्वाइसमेल नम्बर भण्डारण भएको छैन।"</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"नम्बर थप्नुहोस्"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"प्राथमिक प्रयोगकर्ताले मात्र भ्वाइस मेल सेटिङहरू परिमार्जन गर्न सक्नुहुन्छ।"</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"तपाईँको SIM कार्ड अनब्लक गरिएको छ। तपाईँको फोन अनलक हुँदैछ ..."</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM नेटवर्क अनलक PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"अनलोक गर्नुहोस्"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"नेटवर्क अनलक गर्न अनुरोध गर्दै..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"नेटवर्क अनलक अनुरोध असफल"</string>
     <string name="unlock_success" msgid="6770085622238180152">"नेटवर्क अनलक सफल।"</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"सेलुलर सञ्जाल सेटिङहरू यस प्रयोगकर्ताको लागि उपलब्ध छैनन्"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"मोबाइल सञ्जाल सेटिङ्हरू यस प्रयोगकर्ताको लागि उपलब्ध छैनन्"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM कल सेटिङहरू"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM कल सेटिङहरू (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA कल सेटिङहरू"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"भ्वाइसमेल"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"भ्वाइस मेल (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"सूचनाहरू"</string>
     <string name="networks" msgid="8873030692174541976">"नेटवर्क संचालकहरू"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"आपतकालीन प्रसारणहरू"</string>
     <string name="call_settings" msgid="6112441768261754562">"कल सेटिङहरू"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"पहुँचयोग्य नहुँदा"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"पहुँचयोग्य हुँदाको नम्बर"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> मा फर्वाड गर्दै"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"असक्षम पारियो"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"बन्द गर्नुहोस्"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"तपाईंको फोन पहुँचयोग्य नहुँदा तपाईंको केरियरले कल-फर्वार्डिङ असक्षम बनाउँदा समर्थन गर्दैन।"</string>
     <string name="updating_title" msgid="6146755386174019046">"कल सेटिङहरू"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"कल सेटिङहरू केवल प्रशासकीय प्रयोगकर्ताद्वारा परिवर्तन गर्न सकिन्छ।"</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"नयाँ PIN मा अमान्य वर्णहरू छन्।"</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN परिवर्तन गर्न सकिएन"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"सन्देशको असमर्थित प्रकार, सुन्नका लागि <xliff:g id="NUMBER">%s</xliff:g> मा कल गर्नुहोस्।"</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"सेलुलर सञ्जाल सेटिङहरू"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"मोबाइल नेटवर्क सेटिहरू"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"मोबाइल नेटवर्क"</string>
     <string name="label_available" msgid="1181658289009300430">"उपलब्ध नेटवर्कहरू"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"खोजी गर्दै..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"कुनै नेटवर्कहरू भेटिएनन्।"</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> अधिकतम बढीमा \n डेटा दरमा कम <xliff:g id="USED_1">%2$d</xliff:g> KB /s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ को चक्र बितेको \nअर्को समय <xliff:g id="USED_1">%2$d</xliff:g> दिनमा सुरु हुन्छ (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"यदि डेटाको प्रयोग गर्न सिमित पार भएको छ भने  <xliff:g id="USED">%1$d</xliff:g> Kb/s मा डेटा दर घटेको छ"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"तपाईँको केरियरक मोबाइल सञ्जाल डेटाको प्रयोग नीतिको बारेमा थप जानकारी"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"तपाईंको केरियरको मोबाइल नेटवर्क डेटाको प्रयोग नीतिको बारेमा अधिक जानकारी"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"सेल प्रसारण SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"सेल प्रसारण SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"सेल प्रसारण SMS सक्षम"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"सम्पर्क थप्नुहोस्"</string>
     <string name="menu_edit" msgid="7143003705504672374">"सम्पर्क सम्पादन गर्नुहोस्"</string>
     <string name="menu_delete" msgid="3977150783449642851">"सम्पर्क मेटाउनुहोस्"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"डायल गर्ने सम्पर्क"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2 प्रकार"</string>
     <string name="name" msgid="7329028332786872378">"नाम"</string>
     <string name="number" msgid="7905950798349903858">"नम्बर"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"स्थिर डायल गर्ने नम्बर मेट्दै..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"स्थिर डायल गर्ने नम्बर मेटियो।"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN अद्यावधिक भएको थिएन किनकि तपाईंले गलत PIN टाइप गर्नुभयो।"</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN अद्यावधिक गरिएन किनकि नम्बर २० अङ्कभन्दा माथि हुन सक्दैन।"</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"नम्बर प्रविष्ट नगरिएकाले वा २० अङ्कको सीमा नाघेकाले FDN अद्यावधिक गरिएन।"</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN अद्यावधिक भएको थिएन। PIN2 गलत थियो वा फोन नम्बर अस्वीकार भएको थियो।"</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN कार्य बिफल भयो।"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"SIM कार्ड पढ्दै..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"एक कल गर्न हवाइजहाज मोड बन्द गर्नुहोस् वा एक ताररहितको सञ्जालमा जडान गर्नुहोस्।"</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"गैर-आपतकालीन कल गर्न आपतकालीन कलब्याक मोडबाट निस्कनुहोस्।"</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"नेटवर्कमा दर्ता भएको छैन।"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"सेलुलर सञ्जाल उपलब्ध छैन।"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"सेलुलर सञ्जाल उपलब्ध छैन। एक कल गर्न ताररहितको सञ्जालमा जडान गर्नुहोस्।"</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"मोबाइल नेटवर्क उपलब्ध छैन।"</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"मोबाइल नेटवर्क उपलब्ध छैन। कल गर्न तारविनाको नेटवर्कमा जडान गर्नुहोस्।"</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"एक कल गर्नको लागि, एक वैध नम्बर प्रविष्ट गर्नुहोस्।"</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"कल विफल भयो।"</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"यतिबेला कल थप गर्न सकिँदैन।"</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI अनुक्रम सुरु गर्दै..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"सेवा समर्थित छैन"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"कल स्विच गर्न सक्दैन।"</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"कल अलग गर्न सक्दैन।"</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"आपतकालीन कलब्याक मोड प्रविष्टि गरियो"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"आपतकालीन कलब्याक मोड"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"डेटा जडान अक्षम भयो"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other"> <xliff:g id="COUNT_1">%s</xliff:g> मिनेटको लागि कुनै डेटा जडान छैन</item>
-      <item quantity="one"> <xliff:g id="COUNT_0">%s</xliff:g> मिनेटको लागि कुनै डेटा जडान छैन</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> सम्म डेटा जडान भएको छैन"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other"> फोन आपतकालीन कलब्याक मोडमा <xliff:g id="COUNT_1">%s</xliff:g> मिनेटको लागि हुनेछ। यस मोडको अवस्थामा एक डेटा जडान प्रयोग गरेर कुनै पनि अनुप्रयोगहरू प्रयोग गर्न सकिँदैन। के तपाईं अहिले निस्कन चाहनुहुन्छ?</item>
       <item quantity="one"> फोन आपतकालीन कलब्याक मोडमा <xliff:g id="COUNT_0">%s</xliff:g> मिनेटको लागि हुनेछ। यस मोडको समयमा एक डेटा जडान प्रयोग गरेर कुनै पनि अनुप्रयोगहरू प्रयोग गर्न सकिँदैन। के तपाईं अहिले निस्कन चाहनुहुन्छ?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"सम्पर्क चयन गर्नुहोस्"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"भ्वाइस कल गर्ने समर्थित छैन"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"डायल"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"भाइब्रेट"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"भाइब्रेट"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"भिजुअल भ्वाइस मेल"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN सेट गर्नुहोस्"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"PIN परिवर्तन गर्नुहोस्"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"आवाज:"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"रिङ्गटोन र भाइब्रेट"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"निर्मित SIM कार्डहरू"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"भिडियो कल खोल्नुहोस्"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"सन्देश डिकोड गर्दा एउटा समस्या भयो।"</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM कार्डले तपाईँको सेवा सक्रिय गर्नुका तथा फोनको रोमिङ क्षमताहरू पनि अद्यावधिक गरिदिएको छ।"</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"धेरै सक्रिय कलहरू छन्। कृपया कुनै नयाँ राख्नु अघि विद्यमान कलहरूलाई अन्त्य वा मर्ज गर्नुहोस्।"</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"जडान गर्न सकिएन, कृपया मान्य SIM कार्ड सम्मिलित गर्नुहोस्।"</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi जडान विच्छेद भयो। कल समाप्त भयो।"</string>
     <string name="change_pin_title" msgid="7790232089699034029">"भ्वाइस मेलको PIN परिवर्तन गर्नुहोस्"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"जारी राख्नुहोस्"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"रद्द गर्नुहोस्"</string>
diff --git a/res/values-nl/config.xml b/res/values-nl/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-nl/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 62798f4..5a2831a 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobiele data"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobiele data"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefoonservices"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Kiezer noodoproep"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefoon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Voicemailnummer ontbreekt"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Er is geen voicemailnummer op de simkaart opgeslagen."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Nummer toevoegen"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Voicemailinstellingen kunnen alleen worden gewijzigd door de primaire gebruiker."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Je simkaart is gedeblokkeerd. Je telefoon wordt ontgrendeld..."</string>
     <string name="label_ndp" msgid="780479633159517250">"Pincode voor ontgrendelen SIM-netwerk"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Ontgrendelen"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Verzoek om ontgrendelen netwerk..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Verzoek voor ontgrendelen netwerk mislukt."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Het netwerk is ontgrendeld."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Instellingen voor mobiele netwerken zijn niet beschikbaar voor deze gebruiker"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Instellingen voor mobiele netwerken zijn niet beschikbaar voor deze gebruiker"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM-oproepinstellingen"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM-oproepinstellingen (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA-oproepinstellingen"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Voicemail"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Voicemail (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Meldingen"</string>
     <string name="networks" msgid="8873030692174541976">"Mobiele providers"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Nooduitzendingen"</string>
     <string name="call_settings" msgid="6112441768261754562">"Oproepinstellingen"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Indien niet bereikbaar"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Nummer indien onbereikbaar"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Doorschakelen naar <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Uitgeschakeld"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Uit"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Je provider biedt geen ondersteuning voor het uitschakelen van oproepdoorschakelingen wanneer je telefoon niet bereikbaar is."</string>
     <string name="updating_title" msgid="6146755386174019046">"Oproepinstellingen"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Oproepinstellingen kunnen alleen worden gewijzigd door de beheerder."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"De nieuwe pincode bevat ongeldige tekens."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Kan pincode niet wijzigen"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Niet-ondersteund berichttype, bel <xliff:g id="NUMBER">%s</xliff:g> om te luisteren."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Instellingen voor mobiele netwerken"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Instellingen mobiel netwerk"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobiel netwerk"</string>
     <string name="label_available" msgid="1181658289009300430">"Beschikbare netwerken"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Zoeken..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Geen netwerken gevonden."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"Maximum van <xliff:g id="USED_0">%1$s</xliff:g> overschreden\nGegevenssnelheid verlaagd tot <xliff:g id="USED_1">%2$d</xliff:g>  KB/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">" ٪<xliff:g id="USED_0">%1$d</xliff:g>van cyclus verstreken\nDe volgende periode start over <xliff:g id="USED_1">%2$d</xliff:g> dagen (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Gegevenssnelheid wordt verlaagd tot <xliff:g id="USED">%1$d</xliff:g>  KB/s als de limiet voor gegevensgebruik wordt overschreden"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Meer informatie over het beleid voor gegevensgebruik van je mobiele provider"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Meer informatie over het beleid voor gegevensgebruik van je mobiele provider"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Infodienstbericht"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS Infodienstbericht"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"SMS Infodienstbericht ingeschakeld"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Contact toevoegen"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Contact bewerken"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Contact verwijderen"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Contact bellen"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Type PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Naam"</string>
     <string name="number" msgid="7905950798349903858">"Nummer"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Vast nummer verwijderen..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Vast nummer verwijderd."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN is niet bijgewerkt omdat je een onjuiste pincode hebt ingevoerd."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN is niet bijgewerkt omdat het nummer niet langer kan zijn dan 20 tekens."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN is niet geüpdatet omdat het nummer leeg is of langer is dan twintig tekens."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN is niet bijgewerkt. De PIN2 was onjuist of het telefoonnummer is geweigerd."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN-bewerking mislukt."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Lezen vanaf simkaart..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Schakel de vliegtuigmodus uit of maak verbinding met een draadloos netwerk om te bellen."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Sluit de modus voor noodoproepen af om een niet-noodoproep te plaatsen."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Niet geregistreerd op netwerk."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mobiel netwerk niet beschikbaar."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Mobiel netwerk is niet beschikbaar. Maak verbinding met een draadloos netwerk om te bellen."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobiel netwerk niet beschikbaar."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobiel netwerk is niet beschikbaar. Maak verbinding met een draadloos netwerk om te bellen."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Als je wilt bellen, moet je een geldig nummer invoeren."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Oproep mislukt."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Oproep kan momenteel niet worden toegevoegd."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI-reeks starten..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Service wordt niet ondersteund"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Kan niet overschakelen tussen oproepen."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Kan oproep niet scheiden."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Modus voor noodoproepen ingeschakeld"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Modus voor noodoproepen"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Gegevensverbinding uitgeschakeld"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Er is al <xliff:g id="COUNT_1">%s</xliff:g> minuten geen gegevensverbinding</item>
-      <item quantity="one">Er is al <xliff:g id="COUNT_0">%s</xliff:g> minuut geen gegevensverbinding</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Geen dataverbinding tot <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">De telefoon bevindt zich <xliff:g id="COUNT_1">%s</xliff:g> minuten in de modus voor noodoproepen. In deze modus kunnen geen apps worden gebruikt waarvoor een gegevensverbinding nodig is. Wil je nu afsluiten?</item>
       <item quantity="one">De telefoon bevindt zich <xliff:g id="COUNT_0">%s</xliff:g> minuut in de modus voor noodoproepen. In deze modus kunnen geen apps worden gebruikt waarvoor een gegevensverbinding nodig is. Wil je nu afsluiten?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"contact selecteren"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Spraakoproepen worden niet ondersteund"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"bellen"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Trillen"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Trillen"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Visuele voicemail"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Pincode instellen"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Pincode wijzigen"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Geluid"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Beltoon en trillen"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Ingebouwde simkaarten"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Videogesprekken inschakelen"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Er is een fout opgetreden tijdens het decoderen van het bericht."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Een simkaart heeft je service geactiveerd en heeft de roaming-mogelijkheden van je telefoon geüpdatet."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Er zijn te veel actieve oproepen. Beëindig bestaande oproepen of voeg ze samen voordat je een nieuwe oproep start."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Kan geen verbinding maken. Plaats een geldige simkaart."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wifi-verbinding verbroken. Oproep beëindigd."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Voicemailpincode wijzigen"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Doorgaan"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Annuleren"</string>
diff --git a/res/values-pa-rIN/arrays.xml b/res/values-pa/arrays.xml
similarity index 100%
rename from res/values-pa-rIN/arrays.xml
rename to res/values-pa/arrays.xml
diff --git a/res/values-pa/config.xml b/res/values-pa/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-pa/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-pa-rIN/strings.xml b/res/values-pa/strings.xml
similarity index 96%
rename from res/values-pa-rIN/strings.xml
rename to res/values-pa/strings.xml
index 7acadb3..c825fd8 100644
--- a/res/values-pa-rIN/strings.xml
+++ b/res/values-pa/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"ਸੈਲਿਊਲਰ ਡਾਟਾ"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"ਮੋਬਾਈਲ ਡਾਟਾ"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"ਫ਼ੋਨ ਸੇਵਾਵਾਂ"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"ਐਮਰਜੈਂਸੀ ਡਾਇਲਰ"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"ਫੋਨ"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"ਲੁਪਤ ਵੌਇਸਮੇਲ ਨੰਬਰ"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM ਕਾਰਡ ਤੇ ਕੋਈ ਵੌਇਸਮੇਲ ਨੰਬਰ ਸਟੋਰ ਨਹੀਂ ਕੀਤਾ ਗਿਆ ਹੈ।"</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"ਨੰਬਰ ਜੋੜੋ"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"ਵੌਇਸਮੇਲ ਸੈਟਿੰਗਾਂ ਸਿਰਫ਼ ਪ੍ਰਾਇਮਰੀ ਵਰਤੋਂਕਾਰ ਦੁਆਰਾ ਹੀ ਸੰਸ਼ੋਧਿਤ ਕੀਤੀਆਂ ਜਾ ਸਕਦੀਆਂ ਹਨ।"</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"ਤੁਹਾਡਾ SIM ਕਾਰਡ ਅਨਬਲੌਕ ਕਰ ਦਿੱਤਾ ਗਿਆ ਹੈ। ਤੁਹਾਡਾ ਫੋਨ ਅਨੌਲਕ ਹੋ ਰਿਹਾ ਹੈ..."</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM ਨੈਟਵਰਕ ਅਨਲੌਕ PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"ਅਨਲੌਕ ਕਰੋ"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"ਨੈਟਵਰਕ ਅਨਲੌਕ ਦੀ ਬੇਨਤੀ ਕਰ ਰਿਹਾ ਹੈ…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"ਨੈਟਵਰਕ ਅਨਲੌਕ ਬੇਨਤੀ ਅਸਫਲ।"</string>
     <string name="unlock_success" msgid="6770085622238180152">"ਨੈਟਵਰਕ ਅਨਲੌਕ ਸਫਲ।"</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"ਸੈਲਿਊਲਰ ਨੈਟਵਰਕ ਸੈਟਿੰਗਾਂ ਇਸ ਉਪਭੋਗਤਾ ਲਈ ਉਪਲਬਧ ਨਹੀਂ ਹਨ"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"ਇਸ ਵਰਤੋਂਕਾਰ ਲਈ ਮੋਬਾਈਲ ਨੈੱਟਵਰਕ ਸੈਟਿੰਗਾਂ ਉਪਲਬਧ ਨਹੀਂ ਹਨ"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM ਕਾਲ ਸੈਟਿੰਗਾਂ"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM ਕਾਲ ਸੈਟਿੰਗਾਂ (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA ਕਾਲ ਸੈਟਿੰਗਾਂ"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"ਵੌਇਸਮੇਲ"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"ਵੌਇਸਮੇਲ (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"ਸੂਚਨਾਵਾਂ"</string>
     <string name="networks" msgid="8873030692174541976">"ਨੈਟਵਰਕ ਓਪਰੇਟਰ"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"ਐਮਰਜੈਂਸੀ ਪ੍ਰਸਾਰਨ"</string>
     <string name="call_settings" msgid="6112441768261754562">"ਕਾਲ ਸੈਟਿੰਗਾਂ"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"ਜਦੋਂ ਪਹੁੰਚਯੋਗ ਨਾ ਹੋਵੇ"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"ਜਦੋਂ ਨਾ ਪਹੁੰਚਯੋਗ ਹੋਵੇ ਤਾਂ ਨੰਬਰ"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> ਨੂੰ ਫੌਰਵਾਰਡ ਕਰ ਰਿਹਾ ਹੈ"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"ਅਯੋਗ ਬਣਾਇਆ"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"ਬੰਦ"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"ਜਦੋਂ ਤੁਹਾਡਾ ਫੋਨ ਨਾਪਹੁੰਚਯੋਗ ਹੁੰਦਾ ਹੈ ਤਾਂ ਤੁਹਾਡਾ ਕੈਰੀਅਰ ਕਾਲ ਫੌਰਵਾਰਡਿੰਗ ਨੂੰ ਅਸਮਰੱਥ ਬਣਾਉਣ ਦਾ ਸਮਰਥਨ ਨਹੀਂ ਕਰਦਾ।"</string>
     <string name="updating_title" msgid="6146755386174019046">"ਕਾਲ ਸੈਟਿੰਗਾਂ"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"ਕਾਲ ਸੈਟਿੰਗਾਂ ਸਿਰਫ਼ ਪ੍ਰਸ਼ਾਸਕ ਵਰਤੋਂਕਾਰ ਵੱਲੋਂ ਹੀ ਬਦਲੀਆਂ ਜਾ ਸਕਦੀਆਂ ਹਨ।"</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"ਨਵੇਂ PIN ਵਿੱਚ ਅਵੈਧ ਅੱਖਰ-ਚਿੰਨ੍ਹ ਹਨ।"</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN ਨੂੰ ਬਦਲਣ ਵਿੱਚ ਅਸਮਰੱਥ"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"ਅਸਮਰਥਿਤ ਸੁਨੇਹਾ ਕਿਸਮ, ਸੁਣਨ ਲਈ <xliff:g id="NUMBER">%s</xliff:g> \'ਤੇ ਕਾਲ ਕਰੋ।"</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"ਸੈਲਿਊਲਰ ਨੈਟਵਰਕ ਸੈਟਿੰਗਾਂ"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"ਮੋਬਾਈਲ ਨੈਟਵਰਕ ਸੈਟਿੰਗਾਂ"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"ਮੋਬਾਈਲ ਨੈੱਟਵਰਕ"</string>
     <string name="label_available" msgid="1181658289009300430">"ਉਪਲਬਧ ਨੈਟਵਰਕ"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"ਖੋਜ ਰਿਹਾ ਹੈ..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"ਕੋਈ ਨੈਟਵਰਕ ਨਹੀਂ ਮਿਲੇ।"</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> ਅਧਿਕਤਮ ਸੀਮਾ ਵਧ ਗਈ\nਡਾਟਾ ਰੇਟ <xliff:g id="USED_1">%2$d</xliff:g> Kb/s ਤੱਕ ਘਟ ਗਿਆ"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ ਚੱਕਰ ਪੂਰਾ ਹੋਇਆ\nਅਗਲੀ ਮਿਆਦ <xliff:g id="USED_1">%2$d</xliff:g> ਦਿਨਾਂ ਵਿੱਚ ਸ਼ੁਰੂ ਹੁੰਦੀ ਹੈ (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"ਜੇਕਰ ਡਾਟਾ ਵਰਤੋਂ ਸੀਮਾ ਵਧਦੀ ਹੈ ਤਾਂ ਡਾਟਾ ਰੇਟ <xliff:g id="USED">%1$d</xliff:g> Kb/s ਤੱਕ ਘਟਿਆ"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"ਤੁਹਾਡੇ ਕੈਰੀਅਰ ਦੀ ਸੈਲਿਊਲਰ ਨੈਟਵਰਕ ਡਾਟਾ ਵਰਤੋਂ ਨੀਤੀ ਬਾਰੇ ਹੋਰ ਜਾਣਕਾਰੀ"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"ਤੁਹਾਡੇ ਕੈਰੀਅਰ ਦੀ ਮੋਬਾਈਲ ਨੈਟਵਰਕ ਡਾਟਾ ਵਰਤੋਂ ਨੀਤੀ ਬਾਰੇ ਹੋਰ ਜਾਣਕਾਰੀ"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"ਸੈਲ ਪ੍ਰਸਾਰਨ SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"ਸੈਲ ਪ੍ਰਸਾਰਨ SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"ਸੈਲ ਪ੍ਰਸਾਰਨ SMS ਸਮਰਥਿਤ"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"ਸੰਪਰਕ ਸ਼ਾਮਲ ਕਰੋ"</string>
     <string name="menu_edit" msgid="7143003705504672374">"ਸੰਪਰਕ ਸੰਪਾਦਿਤ ਕਰੋ"</string>
     <string name="menu_delete" msgid="3977150783449642851">"ਸੰਪਰਕ ਮਿਟਾਓ"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"ਸੰਪਰਕ ਨੂੰ ਕਾਲ ਕਰੋ"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2 ਟਾਈਪ ਕਰੋ"</string>
     <string name="name" msgid="7329028332786872378">"ਨਾਮ"</string>
     <string name="number" msgid="7905950798349903858">"ਨੰਬਰ"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"ਫਿਕਸਡ ਡਾਇਲਿੰਗ ਨੰਬਰ ਮਿਟਾ ਰਿਹਾ ਹੈ…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"ਫਿਕਸਡ ਡਾਇਲਿੰਗ ਨੰਬਰ ਮਿਟਾਇਆ।"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN ਅਪਡੇਟ ਨਹੀਂ ਕੀਤਾ ਗਿਆ ਸੀ ਕਿਉਂਕਿ ਤੁਸੀਂ ਇੱਕ ਗ਼ਲਤ PIN ਟਾਈਪ ਕੀਤਾ ਸੀ।"</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN ਅਪਡੇਟ ਨਹੀਂ ਕੀਤਾ ਗਿਆ ਸੀ ਕਿਉਂਕਿ ਨੰਬਰ 20 ਅੰਕਾਂ ਤੋਂ ਵੱਧ ਨਹੀਂ ਹੋ ਸਕਦਾ।"</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN ਅੱਪਡੇਟ ਨਹੀਂ ਕੀਤਾ ਗਿਆ ਸੀ ਕਿਉਂਕਿ ਨੰਬਰ ਖਾਲੀ ਹੈ ਜਾਂ 20 ਅੰਕਾਂ ਤੋਂ ਵੱਧ ਹੈ।"</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN ਅਪਡੇਟ ਨਹੀਂ ਕੀਤਾ ਗਿਆ ਸੀ। PIN2 ਗ਼ਲਤ ਸੀ ਜਾਂ ਫ਼ੋਨ ਨੰਬਰ ਅਸਵੀਕਾਰ ਕੀਤਾ ਗਿਆ ਸੀ।"</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN ਓਪਰੇਸ਼ਨ ਅਸਫਲ।"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"SIM ਕਾਰਡ ਤੋਂ ਪੜ੍ਹ ਰਿਹਾ ਹੈ…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"ਏਅਰਪਲੇਨ ਮੋਡ ਬੰਦ ਕਰੋ ਜਾਂ ਇੱਕ ਕਾਲ ਕਰਨ ਲਈ ਇੱਕ ਵਾਇਰਲੈਸ ਨੈਟਵਰਕ ਨਾਲ ਕਨੈਕਟ ਕਰੋ।"</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"ਇੱਕ ਗ਼ੈਰ-ਅਪਾਤਕਾਲ ਕਾਲ ਕਰਨ ਲਈ ਅਪਾਤਕਾਲ ਕਾਲਬੈਕ ਮੋਡ ਤੋਂ ਬਾਹਰ ਆਓ।"</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"ਨੈਟਵਰਕ ਤੇ ਰਜਿਸਟਰ ਨਹੀਂ ਕੀਤਾ।"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"ਸੈਲਿਊਲਰ ਨੈਟਵਰਕ ਉਪਲਬਧ ਨਹੀਂ"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"ਸੈਲਿਊਲਰ ਨੈਟਵਰਕ ਉਪਲਬਧ ਨਹੀਂ ਹੈ। ਇੱਕ ਕਾਲ ਕਰਨ ਲਈ ਇੱਕ ਵਾਇਰਲੈਸ ਨੈਟਵਰਕ ਨਾਲ ਕਨੈਕਟ ਕਰੋ।"</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"ਮੋਬਾਈਲ ਨੈਟਵਰਕ ਉਪਲਬਧ ਨਹੀਂ।"</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"ਮੋਬਾਈਲ ਨੈੱਟਵਰਕ ਉਪਲਬਧ ਨਹੀਂ ਹੈ। ਕਾਲ ਕਰਨ ਲਈ ਕਿਸੇ ਵਾਇਰਲੈੱਸ ਨੈੱਟਵਰਕ ਨਾਲ ਕਨੈਕਟ ਕਰੋ।"</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"ਇੱਕ ਕਾਲ ਕਰਨ ਲਈ, ਇੱਕ ਪ੍ਰਮਾਣਿਕ ਨੰਬਰ ਦਰਜ ਕਰੋ।"</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"ਕਾਲ ਕਰਨਾ ਅਸਫਲ ਰਿਹਾ।"</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"ਇਸ ਵੇਲੇ ਕਾਲ ਸ਼ਾਮਲ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕਦੀ।"</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI ਕੜੀ ਚਾਲੂ ਕਰ ਰਿਹਾ ਹੈ…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"ਸੇਵਾ ਸਮਰਥਿਤ ਨਹੀਂ"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"ਕਾਲਾਂ ਸਵਿਚ ਨਹੀਂ ਕਰ ਸਕਦਾ।"</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"ਕਾਲ ਵੱਖ ਨਹੀਂ ਕਰ ਸਕਦਾ।"</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"ਐਮਰਜੈਂਸੀ ਕਾਲਬੈਕ ਮੋਡ ਦਰਜ ਕੀਤਾ"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"ਐਮਰਜੈਂਸੀ ਕਾਲਬੈਕ ਮੋਡ"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"ਡਾਟਾ ਕਨੈਕਸ਼ਨ ਅਸਮਰਥਿਤ"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one"> <xliff:g id="COUNT_1">%s</xliff:g> ਮਿੰਟਾਂ ਲਈ ਕੋਈ ਡਾਟਾ ਕਨੈਕਸ਼ਨ ਨਹੀਂ</item>
-      <item quantity="other"> <xliff:g id="COUNT_1">%s</xliff:g> ਮਿੰਟਾਂ ਲਈ ਕੋਈ ਡਾਟਾ ਕਨੈਕਸ਼ਨ ਨਹੀਂ</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> ਤੱਕ ਕੋਈ ਡੈਟਾ ਕਨੈਕਸ਼ਨ ਨਹੀਂ"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">ਫੋਨ <xliff:g id="COUNT_1">%s</xliff:g> ਮਿੰਟਾਂ ਲਈ ਐਮਰਜੈਂਸੀ ਕਾਲਬੈਕ ਮੋਡ ਵਿੱਚ ਹੋ ਜਾਏਗਾ। ਇਸ ਮੋਡ ਵਿੱਚ ਹੋਣ ਵੇਲੇ ਇੱਕ ਡਾਟਾ ਕਨੈਕਸ਼ਨ ਵਰਤ ਰਹੇ ਕੋਈ ਵੀ ਐਪਲੀਕੇਸ਼ਨ ਵਰਤੇ ਨਹੀਂ ਜਾ ਸਕਦੇ ਹਨ।  ਕੀ ਤੁਸੀਂ ਹੁਣ ਬਾਹਰ ਜਾਣਾ ਚਾਹੁੰਦੇ ਹੋ?</item>
       <item quantity="other">ਫੋਨ <xliff:g id="COUNT_1">%s</xliff:g> ਮਿੰਟਾਂ ਲਈ ਐਮਰਜੈਂਸੀ ਕਾਲਬੈਕ ਮੋਡ ਵਿੱਚ ਹੋ ਜਾਏਗਾ। ਇਸ ਮੋਡ ਵਿੱਚ ਹੋਣ ਵੇਲੇ ਇੱਕ ਡਾਟਾ ਕਨੈਕਸ਼ਨ ਵਰਤ ਰਹੇ ਕੋਈ ਵੀ ਐਪਲੀਕੇਸ਼ਨ ਵਰਤੇ ਨਹੀਂ ਜਾ ਸਕਦੇ ਹਨ।  ਕੀ ਤੁਸੀਂ ਹੁਣ ਬਾਹਰ ਜਾਣਾ ਚਾਹੁੰਦੇ ਹੋ?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"ਸੰਪਰਕ ਚੁਣੋ"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"ਵੌਇਸ ਕਾਲਿੰਗ ਸਮਰਥਿਤ ਨਹੀਂ"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"ਡਾਇਲ ਕਰੋ"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"ਥਰਥਰਾਹਟ ਕਰੋ"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"ਥਰਥਰਾਹਟ ਕਰੋ"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"ਵਿਜੁਅਲ ਵੌਇਸਮੇਲ"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN ਸੈੱਟ ਕਰੋ"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"PIN ਬਦਲੋ"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"ਅਵਾਜ਼"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"ਰਿੰਗਟੋਨ ਅਤੇ ਥਰਥਰਾਹਟ"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"ਬਿਲਟ-ਇਨ SIM ਕਾਰਡ"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"ਵੀਡੀਓ ਕਾਲਿੰਗ ਚਾਲੂ ਕਰੋ"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"ਸੁਨੇਹਾ ਡੀਕੋਡ ਕਰਦੇ ਸਮੇਂ ਇੱਕ ਅਸ਼ੁੱਧੀ ਹੋਈ ਸੀ।"</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"ਇੱਕ SIM ਕਾਰਡ ਨੇ ਤੁਹਾਡੀ ਸੇਵਾ ਸਕਿਰਿਆ ਕੀਤੀ ਹੈ ਅਤੇ ਤੁਹਾਡੇ ਫੋਨ ਦੀਆਂ ਰੋਮਿੰਗ ਸਮਰੱਥਤਾਵਾਂ ਅਪਡੇਟ ਕੀਤੀਆਂ ਹਨ।"</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"ਇੱਥੇ ਬਹੁਤ ਸਾਰੀਆਂ ਕਿਰਿਆਸ਼ੀਲ ਕਾਲਾਂ ਹਨ। ਕਿਰਪਾ ਕਰਕੇ ਇੱਕ ਨਵੀਂ ਕਾਲ ਕਰਨ ਤੋਂ ਪਹਿਲਾਂ ਮੌਜੂਦਾ ਕਾਲਾਂ ਨੂੰ ਸਮਾਪਤ ਜਾਂ ਮਿਲਾਓ।"</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"ਕਨੈਕਟ ਕਰਨ ਦੇ ਅਯੋਗ, ਕਿਰਪਾ ਕਰਕੇ ਇੱਕ ਵੈਧ ਸਿਮ ਕਾਰਡ ਦਾਖਲ ਕਰੋ।"</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi ਕਨੈਕਸ਼ਨ ਚਲਾ ਗਿਆ ਹੈ। ਕਾਲ ਸਮਾਪਤ ਹੋਈ।"</string>
     <string name="change_pin_title" msgid="7790232089699034029">"ਵੌਇਸਮੇਲ PIN ਬਦਲੋ"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"ਜਾਰੀ ਰੱਖੋ"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"ਰੱਦ ਕਰੋ"</string>
diff --git a/res/values-pl/config.xml b/res/values-pl/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-pl/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 8dfbde1..7b252ca 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Dane komórkowe"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobile Data"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefon – usługi"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Numery alarmowe"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Brakuje numeru poczty głosowej"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Na karcie SIM nie ma zapisanego numeru poczty głosowej."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Dodaj numer"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Ustawienia poczty głosowej może zmienić tylko użytkownik główny."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Karta SIM została odblokowana. Odblokowywanie telefonu..."</string>
     <string name="label_ndp" msgid="780479633159517250">"Kod PIN do karty SIM odblokowujący sieć"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Odblokuj"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Żądanie odblokowania sieci..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Żądanie odblokowania sieci zakończyło się niepowodzeniem."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Sieć została pomyślnie odblokowana."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Ustawienia sieci komórkowej są niedostępne dla tego użytkownika"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Ustawienia sieci mobilnej są niedostępne dla tego użytkownika"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Ustawienia połączenia GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Ustawienia połączenia GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Ustawienia połączenia CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Poczta głosowa"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Poczta głosowa (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"Poczta głosowa:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Powiadomienia"</string>
     <string name="networks" msgid="8873030692174541976">"Operatorzy sieci"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Komunikaty alarmowe"</string>
     <string name="call_settings" msgid="6112441768261754562">"Ustawienia połączeń"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Gdy niedostępny"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Przekieruj na numer"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Przekierowanie na <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Wyłączone"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Wył."</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Twój operator nie umożliwia wyłączenia przekazywania połączeń, gdy numer jest nieosiągalny."</string>
     <string name="updating_title" msgid="6146755386174019046">"Ustawienia połączeń"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Ustawienia połączeń może zmieniać tylko użytkownik będący administratorem."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Nowy PIN zawiera nieprawidłowe znaki."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Nie udało się zmienić kodu PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Nieobsługiwany typ wiadomości – aby ją odsłuchać, zadzwoń pod numer <xliff:g id="NUMBER">%s</xliff:g>."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Ustawienia sieci komórkowej"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Ustawienia sieci komórkowej"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Sieć komórkowa"</string>
     <string name="label_available" msgid="1181658289009300430">"Dostępne sieci"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Wyszukiwanie..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Nie znaleziono sieci."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"Przekroczono limit: <xliff:g id="USED_0">%1$s</xliff:g>\nSzybkość transmisji zmniejszona do <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"Minęło <xliff:g id="USED_0">%1$d</xliff:g>٪ cyklu\nNastępny okres za: <xliff:g id="USED_1">%2$d</xliff:g> dni (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Zmniejsz transfer do <xliff:g id="USED">%1$d</xliff:g> Kb/s jeśli przekroczę limit użycia danych"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Więcej informacji o zasadach korzystania z transmisji danych przez sieć komórkową operatora"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Więcej informacji na temat zasad dotyczących użycia danych w sieci komórkowej tego operatora"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Komunikaty SMS z sieci komórkowej"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Komunikaty SMS z sieci komórkowej"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Komunikaty SMS z sieci komórkowej są włączone"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Dodaj kontakt"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Edytuj kontakt"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Usuń kontakt"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Zadzwoń do kontaktu"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Wpisz PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Nazwa"</string>
     <string name="number" msgid="7905950798349903858">"Numer"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Trwa usuwanie ustalonego numeru…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Usunięto ustalony numer."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Nie zaktualizowano usługi FDN, ponieważ wpisano nieprawidłowy kod PIN."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Nie zaktualizowano usługi FDN, ponieważ numer nie może być dłuższy niż 20 cyfr."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Nie zaktualizowano usługi FDN, ponieważ numer jest pusty lub zawiera ponad 20 cyfr."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"Nie zaktualizowano FDN. PIN2 był niepoprawny lub numer telefonu został odrzucony."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Operacja FDN nie udała się."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Czytanie z karty SIM..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Wyłącz tryb samolotowy lub połącz się z siecią bezprzewodową, by zadzwonić."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Aby zadzwonić normalnie, wyjdź z trybu alarmowego połączenia zwrotnego."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Nie zarejestrowano w sieci"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Sieć komórkowa jest niedostępna."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Sieć komórkowa jest niedostępna. Połącz się z siecią bezprzewodową, by zadzwonić."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Sieć komórkowa jest niedostępna."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Sieć komórkowa jest niedostępna. Połącz się z siecią bezprzewodową, by zadzwonić."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Aby zadzwonić, wybierz prawidłowy numer."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Nie udało się połączyć."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Nie można w tej chwili dodać połączenia."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Rozpoczynanie sekwencji MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Usługa nie jest obsługiwana"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Nie można przełączyć połączeń."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Nie można rozdzielić połączenia."</string>
@@ -524,12 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Włączono tryb alarmowego połączenia zwrotnego"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Tryb alarmowego połączenia zwrotnego"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Połączenie transmisji danych jest wyłączone"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="few">Brak połączenia transmisji danych przez <xliff:g id="COUNT_1">%s</xliff:g> minuty</item>
-      <item quantity="many">Brak połączenia transmisji danych przez <xliff:g id="COUNT_1">%s</xliff:g> minut</item>
-      <item quantity="other">Brak połączenia transmisji danych przez <xliff:g id="COUNT_1">%s</xliff:g> minuty</item>
-      <item quantity="one">Brak połączenia transmisji danych przez <xliff:g id="COUNT_0">%s</xliff:g> minutę</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Brak połączenia transmisji danych do <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="few">Telefon będzie w trybie alarmowego połączenia zwrotnego przez <xliff:g id="COUNT_1">%s</xliff:g> minuty. W tym trybie nie można używać aplikacji, które korzystają z połączenia transmisji danych. Chcesz zakończyć tryb teraz?</item>
       <item quantity="many">Telefon będzie w trybie alarmowego połączenia zwrotnego przez <xliff:g id="COUNT_1">%s</xliff:g> minut. W tym trybie nie można używać aplikacji, które korzystają z połączenia transmisji danych. Chcesz zakończyć tryb teraz?</item>
@@ -557,12 +555,9 @@
     <string name="selectContact" msgid="781975788478987237">"wybierz kontakt"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Połączenia głosowe nie są obsługiwane"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"wybierz numer"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Wibracje"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Wibracje"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Wizualna poczta głosowa"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Ustaw kod PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Zmień PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Dźwięk"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Dzwonek i wibracje"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Wbudowane karty SIM"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Włącz rozmowy wideo"</string>
@@ -579,6 +574,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Podczas dekodowania wiadomości wystąpił błąd."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Karta SIM aktywowała usługę i zaktualizowała funkcje roamingowe telefonu."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Masz za dużo aktywnych połączeń. Scal lub zakończ istniejące połączenia, aby nawiązać nowe."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Nie udało się nawiązać połączenia. Włóż prawidłową kartę SIM."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Utracono połączenie Wi-Fi. Rozmowa została zakończona."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Zmień kod PIN poczty głosowej"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Dalej"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Anuluj"</string>
diff --git a/res/values-pt-rPT/config.xml b/res/values-pt-rPT/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-pt-rPT/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index f190ffa..76c81b1 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Dados móveis"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Dados móveis"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Serviços de telemóvel"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Marcador de emergência"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefone"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Número do correio de voz em falta"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Não existe um número de correio de voz armazenado no cartão SIM."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Adicionar número"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"As definições do correio de voz só podem ser modificadas pelo utilizador principal."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"O cartão SIM foi desbloqueado. O telefone está a ser desbloqueado..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN para desbloqueio de rede do cartão SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Desbloquear"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"A pedir desbloqueio de rede..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"O pedido de desbloqueio de rede falhou."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Desbloqueio de rede bem sucedido."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"As definições de rede móvel não estão disponíveis para este utilizador"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"As definições de rede móvel não estão disponíveis para este utilizador"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Definições de chamadas GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Definições de chamadas GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Definições de chamada CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Correio de voz"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Correio de voz (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"Correio de voz:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Notificações"</string>
     <string name="networks" msgid="8873030692174541976">"Operadores de rede"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Transmissões de emergência"</string>
     <string name="call_settings" msgid="6112441768261754562">"Definições de chamada"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Quando estiver inacessível"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Número no caso de estar inacessível"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"A encaminhar para <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Desativado"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Desativado"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"O seu operador não suporta a desativação do reencaminhamento de chamadas quando o telemóvel não está acessível."</string>
     <string name="updating_title" msgid="6146755386174019046">"Definições de chamadas"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"As definições de chamadas só podem ser alteradas pelo utilizador administrador."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"O novo PIN contém carateres inválidos."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Não é possível alterar o PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Tipo de mensagem não suportada, ligue para o número <xliff:g id="NUMBER">%s</xliff:g> para ouvir."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Definições de rede móvel"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Definições da rede móvel"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Rede móvel"</string>
     <string name="label_available" msgid="1181658289009300430">"Redes disponíveis"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"A pesquisar..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Nenhuma rede encontrada."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> máximo excedido\nVelocidade de transmissão de dados reduzida para <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ do ciclo decorrido\nO período seguinte tem início dentro de <xliff:g id="USED_1">%2$d</xliff:g> dias (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Velocidade de transmissão de dados reduzida para <xliff:g id="USED">%1$d</xliff:g> Kb/s se o limite de utilização de dados for excedido"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Mais informações acerca da política de utilização de dados da rede móvel do seu operador."</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Mais informações sobre a política de utilização de dados da rede móvel do seu operador."</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Transmissão Celular SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Transmissão Celular SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Definições da transmissão celular SMS ativada"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Adicionar contacto"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Editar contacto"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Eliminar contacto"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Ligar para o contacto"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Introduzir PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Nome"</string>
     <string name="number" msgid="7905950798349903858">"Número"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"A eliminar números autorizados..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Números autorizados eliminados."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Os números autorizados não foram atualizados porque introduziu um PIN incorreto."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Os números autorizados não foram atualizados porque o número não pode exceder 20 dígitos."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"O FDN não foi atualizado porque o número está vazio ou excede os 20 dígitos."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"Não foram atualizados os números autorizados. O PIN2 estava errado ou o número de telefone foi rejeitado."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Falha de FDN."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"A ler a partir do cartão SIM..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Desative o modo de avião ou ligue-se a uma rede sem fios para fazer uma chamada."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Sair do modo de chamada de retorno de emergência para efetuar uma chamada que não é de emergência."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Sem registo na rede."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Rede móvel não disponível."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"A rede móvel não está disponível. Ligue-se a uma rede sem fios para fazer uma chamada."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Rede móvel não disponível."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"A rede móvel não está disponível. Ligue-se a uma rede sem fios para efetuar uma chamada."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Para telefonar, introduza um número válido."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"A chamada falhou."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Não é possível adicionar a chamada neste momento."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"A iniciar sequência de MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Serviço não suportado"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Não é possível alternar chamadas."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Não é possível separar a chamada."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Entrou em Modo de Chamada de Retorno de Emergência"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Modo de Chamada de Retorno de Emergência"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Ligação de dados desativada"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Sem ligação de dados durante <xliff:g id="COUNT_1">%s</xliff:g> minutos</item>
-      <item quantity="one">Sem ligação de dados durante <xliff:g id="COUNT_0">%s</xliff:g> minuto</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Sem ligação de dados até à(s) <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">O telemóvel fica no modo de Chamada de emergência durante <xliff:g id="COUNT_1">%s</xliff:g> minutos. Neste modo, não é possível utilizar aplicações com uma ligação de dados. Pretende sair agora?</item>
       <item quantity="one">O telemóvel fica no modo de Chamada de emergência durante <xliff:g id="COUNT_0">%s</xliff:g> minuto. Neste modo, não é possível utilizar aplicações com uma ligação de dados. Pretende sair agora?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"seleccionar contacto"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Chamadas de voz não suportadas"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"marcar"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibrar"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibrar"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Correio de voz visual"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Definir PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Alterar PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Som"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Tocar e Vibrar"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Cartões SIM incorporados"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Ativar videochamada"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Ocorreu um erro durante a descodificação da mensagem."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Um cartão SIM ativou o seu serviço e atualizou as capacidades de roaming do seu telemóvel."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Existem demasiadas chamadas ativas. Termine ou intercale as chamadas existentes antes de efetuar uma nova chamada."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Não é possível estabelecer ligação, introduza um cartão SIM válido."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"A ligação Wi-Fi foi perdida. A chamada foi terminada."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Alterar o PIN do correio de voz"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Continuar"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Cancelar"</string>
diff --git a/res/values-pt/config.xml b/res/values-pt/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-pt/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index fcac097..87b4cf9 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Dados celulares"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Dados móveis"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Serviços do smartphone"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Discador de emergência"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefone"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Número correio de voz ausente"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Não há um número correio de voz armazenado no cartão SIM."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Adicionar número"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"As configurações do correio de voz só podem ser modificadas pelo usuário principal."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"O seu cartão SIM foi desbloqueado. O seu telefone está desbloqueando…"</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN de desbloqueio da rede SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Desbloquear"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Solicitando o desbloqueio de rede…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Falha na solicitação de desbloqueio de rede."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Desbloqueio de rede bem-sucedido."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"As configurações da rede celular não estão disponíveis para este usuário"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"As configurações de rede para dispositivos móveis não estão disponíveis para este usuário"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Configurações de chamada GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Configurações de chamada GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Configurações de chamada CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Correio de voz"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Correio de voz (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Notificações"</string>
     <string name="networks" msgid="8873030692174541976">"Operadoras de rede"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Transmissões de emergência"</string>
     <string name="call_settings" msgid="6112441768261754562">"Configurações de chamadas"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Quando inacessível"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Número quando inacessível"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Encaminhar para <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Desativado"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Desativado"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Sua operadora não suporta a desativação do encaminhamento de chamada quando seu telefone não está acessível."</string>
     <string name="updating_title" msgid="6146755386174019046">"Configurações de chamadas"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"As configurações de chamada só podem ser alteradas pelo usuário administrador."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"O novo PIN contém caracteres inválidos."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Não foi possível alterar o PIN."</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Tipo de mensagem incompatível, para ouvi-la, ligue para <xliff:g id="NUMBER">%s</xliff:g>."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Configurações de rede celular"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Configurações de rede móvel"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Rede móvel"</string>
     <string name="label_available" msgid="1181658289009300430">"Redes disponíveis"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Pesquisando..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Nenhuma rede encontrada."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"Máximo de <xliff:g id="USED_0">%1$s</xliff:g> excedido\nTaxa de dados reduzida para <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ do ciclo expirou\nO próximo período começa em <xliff:g id="USED_1">%2$d</xliff:g> dias (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Taxa de dados reduzida para <xliff:g id="USED">%1$d</xliff:g> Kb/s se o limite de uso de dados for excedido"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Mais informações sobre a política de uso de dados da rede celular de sua operadora"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Mais informações sobre a política de uso de dados da rede móvel da sua operadora"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS de difusão celular"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS de difusão celular"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"SMS de difusão celular ativado"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Adicionar contato"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Editar contato"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Excluir contato"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Discar"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Digitar PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Nome"</string>
     <string name="number" msgid="7905950798349903858">"Número"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Excluindo número de chamadas fixas…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Número de chamadas fixas excluído."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"O FDN não foi atualizado porque você digitou um PIN incorreto."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"O FDN não foi atualizado porque o número não pode exceder 20 dígitos."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"O FDN não foi atualizado porque o número está vazio ou excede 20 dígitos."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"O FDN não foi atualizado. O PIN2 estava incorreto, ou o número de telefone foi rejeitado."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Falha na operação de FDN."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Lendo a partir do cartão SIM…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Desative o modo avião ou conecte-se a uma rede sem fio para fazer uma chamada."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Saia do modo de retorno de chamada de emergência para fazer uma chamada que não seja de emergência."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Não registrado na rede."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Rede celular não disponível."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"A rede celular não está disponível. Conecte-se a uma rede sem fio para fazer uma chamada."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Rede móvel não disponível."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"A rede móvel não está disponível. Conecte-se a uma rede sem fio para fazer uma chamada."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Para realizar uma chamada, digite um número válido."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Falha na chamada."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"No momento, não é possível adicionar a chamada."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Iniciando sequência MMI…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Serviço não suportado"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Não é possível alternar as chamadas."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Não é possível separar a chamada."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Modo de retorno de chamada de emergência acessado"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Modo de retorno de chamada de emergência"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Conexão de dados desativada"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">Nenhuma conexão de dados durante <xliff:g id="COUNT_1">%s</xliff:g> minutos</item>
-      <item quantity="other">Nenhuma conexão de dados durante <xliff:g id="COUNT_1">%s</xliff:g> minutos</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Sem conexão de dados até <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">O smartphone ficará no modo de retorno de chamada de emergência por <xliff:g id="COUNT_1">%s</xliff:g> minutos. Nesse modo, não será possível usar apps que utilizem conexão de dados. Deseja sair agora?</item>
       <item quantity="other">O smartphone ficará no modo de retorno de chamada de emergência por <xliff:g id="COUNT_1">%s</xliff:g> minutos. Nesse modo, não será possível usar apps que utilizem conexão de dados. Deseja sair agora?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"selecionar contato"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Chamada de voz não compatível"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"discar"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibrar"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibrar"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Correio de voz visual"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Definir PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Alterar PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Som"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Toque e vibração"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Cartões SIM integrados"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Ativar chamadas de vídeo"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Ocorreu um erro ao decodificar a mensagem."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Um cartão SIM ativou seu serviço e atualizou os recursos de roaming do smartphone."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Há muitas chamadas ativas. Finalize ou mescle as chamadas existentes antes de fazer uma nova."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Não é possível conectar-se, insira um cartão SIM válido."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Conexão Wi-Fi perdida. Chamada encerrada."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Alterar o PIN do correio de voz"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Continuar"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Cancelar"</string>
diff --git a/res/values-ro/config.xml b/res/values-ro/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-ro/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index e9f982c..1f6b2f4 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Date mobile"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Date pentru mobil"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefon – Servicii"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Telefon de urgență"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Lipsește numărul mesageriei vocale"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Niciun număr de mesagerie vocală nu este stocat pe cardul SIM."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Adăugați numărul"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Setările pentru mesagerie vocală pot fi modificate numai de utilizatorul principal."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Cardul dvs. SIM a fost deblocat. Telefonul dvs. se deblochează..."</string>
     <string name="label_ndp" msgid="780479633159517250">"Codul PIN de deblocare a rețelei SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Deblocați"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Se solicită deblocarea rețelei..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Cererea de deblocare a rețelei a eșuat."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Rețeaua a fost deblocată."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Setările pentru rețeaua mobilă nu sunt disponibile pentru acest utilizator"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Setările pentru rețeaua mobilă nu sunt disponibile pentru acest utilizator"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Setările apelului GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Setări pentru apeluri GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Setările apelului CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Mesagerie vocală"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Mesagerie vocală (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"MV:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Notificări"</string>
     <string name="networks" msgid="8873030692174541976">"Operatori de rețea"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Transmisiuni de urgență"</string>
     <string name="call_settings" msgid="6112441768261754562">"Setări pentru apeluri"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Când nu este accesibil"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Număr de redirecționare dacă telefonul nu este accesibil"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Se redirecționează la <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Dezactivat"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Dezactivat"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Operatorul dvs. nu acceptă ca redirecționarea apelurilor să fie dezactivată atunci când telefonul nu este accesibil."</string>
     <string name="updating_title" msgid="6146755386174019046">"Setări pentru apeluri"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Numai administratorul poate să modifice setările pentru apeluri."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Codul PIN nou conține caractere nevalide."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Nu se poate schimba codul PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Tip de mesaj neacceptat. Apelează numărul <xliff:g id="NUMBER">%s</xliff:g> pentru a-l asculta."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Setările pentru rețeaua mobilă"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Setări pentru rețeaua mobilă"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Rețea mobilă"</string>
     <string name="label_available" msgid="1181658289009300430">"Rețele disponibile"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Se caută…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Nicio rețea găsită."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> maximum depășit\nRata de transfer se reduce la <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ din ciclul trecut\nPerioada următoare începe în <xliff:g id="USED_1">%2$d</xliff:g> zile (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Rata de transfer a datelor se reduce la <xliff:g id="USED">%1$d</xliff:g> Kb/s, dacă limita de utilizare este depășită."</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Mai multe informații despre politica de utilizare a datelor aplicată de operatorul dvs. de telefonie mobilă"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Mai multe informații despre politica de utilizare a datelor aplicată de operatorul dvs. de telefonie mobilă"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Transmisie celulară a mesajelor SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Transmisie celulară a mesajelor SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Transmisie celulară a mesajelor SMS activată"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Adăugați o persoană"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Modificați informațiile despre persoana din agendă"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Ștergeți persoana din agendă"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Apelați persoana de contact"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Introduceți codul PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Nume"</string>
     <string name="number" msgid="7905950798349903858">"Număr"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Se șterge numărul cu apelări restricționate..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Numărul cu apelări restricționate a fost șters."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"NAR nu a fost actualizat, deoarece ați introdus un cod PIN incorect."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"NAR nu a fost actualizat, deoarece numărul nu poate depăși 20 de cifre."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Lista FDN nu a fost actualizată deoarece numărul nu a fost completat sau depășește 20 de cifre."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"NAR nu a fost actualizat. Codul PIN2 a fost incorect sau numărul de telefon a fost respins."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Operațiunea NAR nu a reușit."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Se citește de pe cardul SIM..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Pentru a apela, dezactivați modul Avion sau conectați-vă la o rețea wireless."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Ieșiți din modul de apelare inversă de urgență pentru a efectua un apel care nu este de urgență."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Neînregistrat în rețea."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Rețeaua mobilă nu este disponibilă"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Rețeaua mobilă nu este disponibilă. Pentru a apela, conectați-vă la o rețea wireless."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Rețeaua mobilă nu este disponibilă."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Rețeaua mobilă nu este disponibilă. Pentru a apela, conectați-vă la o rețea wireless."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Pentru a apela, introduceți un număr valid."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Apelul nu a fost inițiat."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Apelul nu poate fi adăugat în acest moment."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Se pornește secvența MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Serviciul nu este compatibil"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Apelurile nu pot fi comutate."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Apelul nu poate fi separat."</string>
@@ -524,11 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"S-a activat modul de apelare inversă de urgență"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Mod de apelare inversă de urgență"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Conexiune de date dezactivată"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="few">Nicio conexiune de date timp de <xliff:g id="COUNT_1">%s</xliff:g> minute</item>
-      <item quantity="other">Nicio conexiune de date timp de <xliff:g id="COUNT_1">%s</xliff:g> de minute</item>
-      <item quantity="one">Nicio conexiune de date timp de <xliff:g id="COUNT_0">%s</xliff:g> minut</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Nicio conexiune de date până la <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="few">Telefonul va fi în modul Apelare inversă de urgență pentru <xliff:g id="COUNT_1">%s</xliff:g> minute. Când telefonul este în acest mod, nu se poate folosi nicio aplicație care necesită o conexiune de date. Doriți să ieșiți acum?</item>
       <item quantity="other">Telefonul va fi în modul Apelare inversă de urgență pentru <xliff:g id="COUNT_1">%s</xliff:g> de minute. Când telefonul este în acest mod, nu se poate folosi nicio aplicație care necesită o conexiune de date. Doriți să ieșiți acum?</item>
@@ -554,12 +553,9 @@
     <string name="selectContact" msgid="781975788478987237">"selectarea unei persoane din agendă"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Apelarea vocală nu este acceptată"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"apelare"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibrații"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibrații"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Mesagerie vocală vizuală"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Setați codul PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Schimbați codul PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Sunet"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Ton de apel și vibrare"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Carduri SIM încorporate"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Activați apelurile video"</string>
@@ -576,6 +572,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"A apărut o eroare la decodificarea mesajului."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Un card SIM a activat serviciul și a actualizat funcțiile de roaming ale telefonului."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Prea multe apeluri active. Încheiați sau îmbinați apeluri existente înainte de a iniția unul nou."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Nu v-ați conectat. Inserați un card SIM valid."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Conexiunea Wi-Fi s-a pierdut. Apelul a fost încheiat."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Schimbați codul PIN pentru mesageria vocală"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Continuați"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Anulați"</string>
diff --git a/res/values-ru/config.xml b/res/values-ru/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-ru/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index d52ccb2..8e36b43 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Мобильные данные"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Данные для мобильных устройств"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Телефон – сервисы"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Экстренный вызов"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Телефон"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Не указан номер голосовой почты"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"На SIM-карте нет ни одного номера голосовой почты."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Добавить номер"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Настройки голосовой почты может изменить только основной пользователь"</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"SIM-карта разблокирована. Осуществляется разблокировка телефона..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN для разблокировки сети SIM-карты"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Разблокировать"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Запрос разблокировки сети..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Запрос на разблокировку сети не выполнен."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Разблокировка сети успешно завершена."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Настройки мобильных сетей недоступны этому пользователю."</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Настройки мобильных сетей недоступны этому пользователю"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Настройки вызовов GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Настройки вызовов GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Настройки вызовов CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Голосовая почта"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Голосовая почта (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"ГП:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Уведомления"</string>
     <string name="networks" msgid="8873030692174541976">"Операторы связи"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Уведомления о чрезвычайных ситуациях"</string>
     <string name="call_settings" msgid="6112441768261754562">"Вызовы"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Если номер недоступен"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Переадресовывать на этот номер"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Переадресация на номер <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Отключено"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Выкл."</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Ваш оператор не позволяет отключать переадресацию вызовов, если телефон находится вне зоны доступа."</string>
     <string name="updating_title" msgid="6146755386174019046">"Настройки вызовов"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Настройки вызовов может изменить только основной пользователь"</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Новый PIN-код содержит недопустимые символы"</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Не удалось сменить PIN-код"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Неподдерживаемый тип сообщения. Чтобы его прослушать, позвоните по телефону <xliff:g id="NUMBER">%s</xliff:g>."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Настройки мобильных сетей"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Настройки мобильной сети"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Мобильная сеть"</string>
     <string name="label_available" msgid="1181658289009300430">"Доступные сети"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Поиск…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Сети не найдены."</string>
@@ -233,7 +236,7 @@
     <!-- no translation found for throttle_time_frame_subtext (7732763021560399960) -->
     <skip />
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Превышение лимита снижает скорость передачи данных до <xliff:g id="USED">%1$d</xliff:g> кбит/с"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Подробнее о политике передачи данных вашего оператора мобильной связи…"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Подробнее о политике передачи данных вашего оператора мобильной связи..."</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Широковещательные SMS-службы"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Широковещательные SMS-службы"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Широковещательные SMS-службы включены"</string>
@@ -370,6 +373,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Добавить контакт"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Изменить контакт"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Удалить контакт"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Позвонить контакту"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Тип кода PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Имя"</string>
     <string name="number" msgid="7905950798349903858">"Номер"</string>
@@ -384,7 +388,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Выполняется удаление номера ограниченного набора…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Номер ограниченного набора удален."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Разрешенный номер не обновлен, так как введен неверный PIN-код."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Разрешенный номер не обновлен, т. к. не может содержать более 20 цифр."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Разрешенный номер не обновлен, так как он не может быть пустым или содержать более 20 цифр"</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"Список разрешенных номеров не обновлен. Указан неверный PIN2 или номер телефона."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Не удалось включить FDN"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Считывание с SIM-карты…"</string>
@@ -446,12 +450,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Чтобы позвонить, отключите режим полета и подключитесь к Wi-Fi."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Чтобы сделать обычный звонок, выйдите из режима экстренных обратных вызовов."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Нет регистрации в сети."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Мобильная сеть недоступна."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Мобильная сеть недоступна. Чтобы позвонить, подключитесь к Wi-Fi."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Мобильная сеть недоступна."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Мобильная сеть недоступна. Чтобы позвонить, подключитесь к Wi-Fi."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Недействительный номер."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Не удалось отправить вызов."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Невозможно позвонить в данный момент."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Запуск последовательности MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Сервис не поддерживается"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Не удалось переключить вызов."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Не удалось разделить вызов."</string>
@@ -526,12 +529,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Телефон переведен в режим экстренных обратных вызовов"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Режим экстренных обратных вызовов"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Передача данных отключена"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">Подключение для передачи данных отсутствует <xliff:g id="COUNT_1">%s</xliff:g> минуту</item>
-      <item quantity="few">Подключение для передачи данных отсутствует <xliff:g id="COUNT_1">%s</xliff:g> минуты</item>
-      <item quantity="many">Подключение для передачи данных отсутствует <xliff:g id="COUNT_1">%s</xliff:g> минут</item>
-      <item quantity="other">Подключение для передачи данных отсутствует <xliff:g id="COUNT_1">%s</xliff:g> минуты</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Подключения для передачи данных не будет до <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">Режим экстренных обратных вызовов будет действовать ещё <xliff:g id="COUNT_1">%s</xliff:g> минуту. При этом будут недоступны приложения с поддержкой передачи данных. Выйти?</item>
       <item quantity="few">Режим экстренных обратных вызовов будет действовать ещё <xliff:g id="COUNT_1">%s</xliff:g> минуты. При этом будут недоступны приложения с поддержкой передачи данных. Выйти?</item>
@@ -559,12 +557,9 @@
     <string name="selectContact" msgid="781975788478987237">"выбрать контакт"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Голосовые вызовы не поддерживаются"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"набор номера"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Вибросигнал"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Вибросигнал"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Визуальная голосовая почта"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Установка PIN-кода"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Изменение PIN-кода"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Звук"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Рингтон и вибросигнал"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Встроенные SIM-карты"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Включить видеовстречи"</string>
@@ -581,6 +576,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"При расшифровке сообщения произошла ошибка."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"В вашем телефоне уже настроен роуминг и активирована SIM-карта."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Слишком много активных вызовов. Чтобы выполнить новый вызов, завершите или объедините существующие."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Ошибка подключения. Вставьте поддерживаемую SIM-карту."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Соединение по Wi-Fi разорвано. Вызов завершен."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Сменить PIN-код голосовой почты"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Продолжить"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Отмена"</string>
diff --git a/res/values-si-rLK/arrays.xml b/res/values-si/arrays.xml
similarity index 100%
rename from res/values-si-rLK/arrays.xml
rename to res/values-si/arrays.xml
diff --git a/res/values-si/config.xml b/res/values-si/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-si/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-si-rLK/strings.xml b/res/values-si/strings.xml
similarity index 96%
rename from res/values-si-rLK/strings.xml
rename to res/values-si/strings.xml
index 400c9ae..bdd3c08 100644
--- a/res/values-si-rLK/strings.xml
+++ b/res/values-si/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"සෙල්‍යුලර් දත්ත"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"ජංගම දත්ත"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"දුරකථන සේවා"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"හදිසි අමතනය"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"දුරකථනය"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"හඬ තැපැල් අංකය නැත"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM කාඩ් පතෙහි හඬ තැපැල් අංකයක් ආචිත වී නැත."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"අංකයක් එක් කරන්න"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"හඬ තැපැල් සැකසීම් මූලික පරිශීලක විසින් පමණක් වෙනස් කිරීමට හැකිය."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"ඔබගේ SIM කාඩ්පත අඟුළු හැර තිබේ. ඔබගේ දුරකතනයේ අඟුළු හරිමින්…"</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM ජාල අඟුළු හැරීමේ PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"අඟුල අරින්න"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"ජාල අඟුළු ඇරීමක් ඉල්ලුම් කරමින්…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"ජාලය අඟුළු හැරීමේ ඉල්ලීම අසාර්ථකයි."</string>
     <string name="unlock_success" msgid="6770085622238180152">"ජාලය අඟුළු හරිම සාර්ථකයි."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"මෙම පරිශීලකයා සඳහා සෙලියුලර් ජාල සැකසීම් නැත"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"මෙම පරිශීලකයා සඳහා ජංගම ජාල සැකසීම් නැත"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM ඇමතුම් සැකසුම්"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM ඇමතුම් සැකසීම් (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA ඇමතුම් සැකසුම්"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"හඬ තැපෑල"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"හඬ තැපෑල (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"දැනුම්දීම්"</string>
     <string name="networks" msgid="8873030692174541976">"ජාල ක්‍රියාකරුවන්"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"හදිසි විකාශන"</string>
     <string name="call_settings" msgid="6112441768261754562">"ඇමතුම් සැකසුම්"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"ළඟා වීමට නොහැකි විට"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"ළඟා විය නොහැකි විට අංකය"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> වෙත ඉදිරියට යවමින්"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"අබලයි"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"අක්‍රියයි"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"ඔබගේ වාහකය ඔබගේ දුරකථනය ළඟා විය නොහැකි විට ඇමතුම් ඉදිරියට ගෙනයාම අබල කිරීමට සහාය නොදක්වයි."</string>
     <string name="updating_title" msgid="6146755386174019046">"ඇමතුම් සැකසීම්"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"ඇමතුම් සැකසීම් වෙනස් කළ හැක්කේ පරිපාලක පරිශීලකයාට පමණි."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"නව PIN අංකයෙහි අවලංගු අනුලකුණු අන්තර්ගත වේ."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN අංකය මාරු කිරීමට නොහැකිය"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"සහාය නොදක්වන පණිවිඩය වර්ගය, සවන් දීමට <xliff:g id="NUMBER">%s</xliff:g> අමතන්න."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"සෙලියුලර් ජාල සැකසීම්"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"ජංගම ජාල සැකසුම්"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"ජංගම ජාලය"</string>
     <string name="label_available" msgid="1181658289009300430">"තිබෙන ජාල"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"සොයමින්..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"කිසිඳු ජාලයක් සොයාගත නොහැකි විය."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> උපරිමය ඉක්මවා ඇත\nදත්ත සිඝ්‍රතාවය <xliff:g id="USED_1">%2$d</xliff:g> Kb/s වෙත අඩු කෙරෙන ලදි"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ චක්‍ර ඉක්ම ගොස්ය\nඊළඟ සීමාව ආරම්භ වන්නේ දින <xliff:g id="USED_1">%2$d</xliff:g> කිනි (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"දත්ත භාවිතා සීමාව ඉක්මවුවහොත් දත්ත සිඝ්‍රතාවය <xliff:g id="USED">%1$d</xliff:g> Kb/s වෙත අඩුවේ"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"ඔබගේ ක්‍රියාකරුගේ සෙලියුලර් ජාලය දත්ත භාවිත ප්‍රතිපත්තිය පිලිබඳ තවත් තොරතුරු"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"ඔබගේ ක්‍රියාකරුගේ ජංගම ජාලය දත්ත භාවිත ප්‍රතිපත්තිය පිලිබඳ තවත් තොරතුරු"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"සෙල් විකාශන SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"සෙල් විකාශන SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"සෙල් විකාශන SMS සබලයි"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"සම්බන්ධතාවය එක් කරන්න"</string>
     <string name="menu_edit" msgid="7143003705504672374">"සම්බන්ධතාව සංස්කරණය කරන්න"</string>
     <string name="menu_delete" msgid="3977150783449642851">"සම්බන්ධතාවය මකා දමන්න"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"සම්බන්ධතාව ඩයල් කරන්න"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2 ටයිප් කරන්න"</string>
     <string name="name" msgid="7329028332786872378">"නම‍"</string>
     <string name="number" msgid="7905950798349903858">"අංකය"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"ස්ථිර ඇමතුම් අංකය මකමින්..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"ස්ථාවර ඇමතුම් අංකය මකන ලදි."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"ඔබ වැරදි PIN එකක් ඇතුලත් කළ බැවින් FDN යාවත්කාලින නොවුණි."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"අංකය ඉලක්කම් 20 ඉක්මවිය නොහැකි බැවින් FDN යාවත්කාල නොවුණි."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"අංකය හිස් නිසා හෝ ඉලක්කම් 20ක් ඉක්මවන නිසා FDN යාවත්කාලීන නොවීය."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN යාවත්කාලින නොවුණි. PIN2 වැරදියි, නැති නම් දුරකථන අංකය ප්‍රතික්ෂේප විය."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN ක්‍රියාවලිය අසමත්."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"SIM කාඩ් පතෙන් කියවමින්…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"ඇමතුමක් ලබා ගැනීමට ගුවන් යානා මෝඩය අක්‍රිය කරන්න හෝ රැහැන් රහිත ජාලයකට සම්බන්ධ වෙන්න."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"හදිසි-නොවන ඇමතුමක් සිදු කිරීමට හදිසි අවස්ථා පසු ඇමතුම් ප්‍රකාරයෙන් ඉවත් වන්න."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"ජාලය මත ලියාපදිංචි වී නැත."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"සෙලියුලර් ජාලය නොමැත"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"සෙලියුලර් ජාලය ලබාගත නොහැක. ඇමතුමක් ගැනීමට රැහැන් රහිත ජාලයකට සම්බන්ධ වෙන්න."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"ජංගම ජාලය නොමැත."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"ජංගම ජාලය ලබා ගැනීමට නොහැකිය. ඇමතුමක් කිරීමට රැහැන් රහිත ජාලයකට සම්බන්ධ කරන්න."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"ඇමතුමක් ලබාගැනීමට, වලංගු අංකයක් ලබාගන්න."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"ඇමතුම අසාර්ථක විය."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"ඇමතුම මේ අවස්ථාවේදී එක් කළ නොහැකිය."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI අනුපිළිවෙල ආරම්භ කරමින්…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"සේවාවට සහාය දක්වන්නේ නැත"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"ඇමතුම් මාරු කිරීම කළ නොහැක."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"ඇමතුම වෙන් කිරීම කළ නොහැක."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"හදිසි ආපසු ඇමතුම් ආකාරයට ඇතුලත් විණි"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"හදිසි ආපසු ඇමතුම් ආකාරය"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"දත්ත සම්බන්ධතාවය අබලයි"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">මිනිත්තු <xliff:g id="COUNT_1">%s</xliff:g> ක් දත්ත සම්බන්ධතාවයක් නැත</item>
-      <item quantity="other">මිනිත්තු <xliff:g id="COUNT_1">%s</xliff:g> ක් දත්ත සම්බන්ධතාවයක් නැත</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> තෙක් දත්ත සම්බන්ධතාවක් නැත"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">දුරකථනය මිනිත්තු <xliff:g id="COUNT_1">%s</xliff:g> ක් හදිසි ආපසු ඇමතුම් ආකාරය තුළ වනු ඇත. මෙම ආකාරය තුළ සිටින අතරතුර දත්ත සම්බන්ධයක් භාවිත කරන යෙදුම් කිසිවක් භාවිත කළ නොහැකිය. ඔබට දැන් පිටවීමට අවශ්යද?</item>
       <item quantity="other">දුරකථනය මිනිත්තු <xliff:g id="COUNT_1">%s</xliff:g> ක් හදිසි ආපසු ඇමතුම් ආකාරය තුළ වනු ඇත. මෙම ආකාරය තුළ සිටින අතරතුර දත්ත සම්බන්ධයක් භාවිත කරන යෙදුම් කිසිවක් භාවිත කළ නොහැකිය. ඔබට දැන් පිටවීමට අවශ්යද?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"සම්බන්ධතාවය තෝරාගන්න"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"හඬ ඇමතීම සඳහා සහාය නොදක්වයි"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"අමතන්න"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"කම්පනය වීම"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"කම්පනය වීම"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"දෘශ්‍ය හඬ තැපෑල"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN අංකය සකසන්න"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"PIN අංකය වෙනස් කරන්න"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"ශබ්දය"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"රිගින් ටෝන් සහ කම්පනය කරන්න"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"තිළැලි SIM කාඩ් පත්"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"වීඩියෝ ඇමතීම සක්‍රිය කරමින්"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"පණිවිඩය විකේතනය කරන අතරතුර දෝෂයක් සිදු විය."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM කාඩ්පතක් ඔබේ සේවාව සක්‍රිය කර ඔබේ දුරකථනයේ රෝමිං හැකියා යාවත්කාලීන කර තිබේ."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"සක්‍රිය ඇමතුම් ඉතා විශාල ගණනක් ඇත. කරුණාකර නව ඇමතුමක් ගැනීමට පෙර පවතින ඇමතුම් අවසන් හෝ ඒකාබද්ධ කරන්න."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"සම්බන්ධ වීමට නොහැකිය, කරුණාකර වලංගු SIM කාඩ්පතක් ඇතුළු කරන්න."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi සම්බන්ධතාවය අහිමි විය. ඇමතුම අවසන් විය."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"හඬ තැපැල් PIN අංකය වෙනස් කරන්න"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"දිගටම කර ගෙන යන්න"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"අවලංගු කරන්න"</string>
diff --git a/res/values-sk/config.xml b/res/values-sk/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-sk/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index 99b0ccf..122f9d8 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobilné dáta"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobilné dáta"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefónne služby"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Tiesňové vytáčanie"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefón"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Chýba číslo hlasovej schránky"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Na SIM karte nie je uložené žiadne číslo hlasovej schránky."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Pridať číslo"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Nastavenia hlasovej schránky môže zmeniť iba primárny používateľ."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"SIM karta bola odblokovaná. Prebieha odomykanie telefónu..."</string>
     <string name="label_ndp" msgid="780479633159517250">"Kód PIN odomknutia siete pre SIM kartu"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Odomknúť"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Žiadosť o odomknutie siete..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Žiadosť o odomknutie siete nebola úspešná."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Sieť bola odomknutá."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Nastavenia mobilnej siete nie sú pre tohto používateľa dostupné"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Nastavenia mobilnej siete nie sú pre tohto používateľa dostupné"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Nastavenia hovorov GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Nastavenia hovorov v sieti GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Nastavenia hovorov CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Hlasová schránka"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Hlasová schránka (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"HS:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Upozornenia"</string>
     <string name="networks" msgid="8873030692174541976">"Sieťoví operátori"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Núdzové vysielania"</string>
     <string name="call_settings" msgid="6112441768261754562">"Nastavenia hovorov"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Pri nedostupnosti"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Číslo pri nedostupnosti"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Presmerovanie na <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Vypnuté"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Vypnuté"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Váš operátor neumožňuje zakázanie presmerovaní, keď je telefón nedostupný."</string>
     <string name="updating_title" msgid="6146755386174019046">"Nastavenia hovorov"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Nastavenia hovorov môže zmeniť iba používateľ s povoleniami správcu."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Nový PIN obsahuje neplatné znaky."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN nie je možné zmeniť"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Nepodporovaný typ správy, zavolajte na číslo <xliff:g id="NUMBER">%s</xliff:g> a vypočujte si správu."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Nastavenia mobilnej siete"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Nastavenia mobilnej siete"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobilná sieť"</string>
     <string name="label_available" msgid="1181658289009300430">"Dostupné siete"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Hľadá sa…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Nebola nájdená žiadna sieť."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"Bol prekročený limit <xliff:g id="USED_0">%1$s</xliff:g>\nPrenosová rýchlosť bola znížená na <xliff:g id="USED_1">%2$d</xliff:g> kB/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"Uplynulo <xliff:g id="USED_0">%1$d</xliff:g>٪ cyklu\nPočet dní do začiatku ďalšieho obdobia: <xliff:g id="USED_1">%2$d</xliff:g> (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"V prípade prekročenia limitu využitia dát sa prenosová rýchlosť zníži na <xliff:g id="USED">%1$d</xliff:g> kB/s"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Ďalšie informácie o pravidlách využitia dát v mobilnej sieti vášho mobilného operátora"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Ďalšie informácie o pravidlách využitia dát v mobilnej sieti vášho mobilného operátora"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS Cell Broadcast"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS Cell Broadcast"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"SMS Cell Broadcast povolené"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Pridať kontakt"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Upraviť kontakt"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Odstrániť kontakt"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Vytočiť kontakt"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Zadajte kód PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Meno"</string>
     <string name="number" msgid="7905950798349903858">"Číslo"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Odstraňuje sa povolené číslo…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Povolené číslo bolo odstránené."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Povolené čísla neboli aktualizované. Zadali ste nesprávny kód PIN."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Povolené čísla neboli aktualizované. Číslo nemôže mať viac ako 20 číslic."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Režim povolených čísel nebol aktualizovaný, pretože číslo je prázdne alebo obsahuje viac než 20 číslic."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"Povolené čísla neboli aktualizované. Kód PIN2 je nesprávny alebo bolo telefónne číslo odmietnuté."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Operácia s povolenými číslami zlyhala."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Prebieha čítanie zo SIM karty..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Ak chcete volať, vypnite režim v lietadle alebo sa pripojte k bezdrôtovej sieti"</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Ak chcete volať štandardným spôsobom, ukončite režim tiesňového spätného volania."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Prihlásenie do siete nebolo úspešné."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mobilná sieť nie je k dispozícii."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Mobilná sieť nie je k dispozícii. Ak chcete volať, pripojte sa k bezdrôtovej sieti."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobilná sieť nie je k dispozícii."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobilná sieť nie je k dispozícii. Ak chcete volať, pripojte sa k bezdrôtovej sieti."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Ak chcete volať, zadajte platné číslo"</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Hovor zlyhal."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Hovor momentálne nie je možné pridať."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Prebieha spúšťanie sekvencie MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Služba nie je podporovaná"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Nedajú sa prepínať hovory"</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Nedá sa rozdeliť hovor"</string>
@@ -524,12 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Bol aktivovaný režim tiesňového spätného volania"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Režim tiesňového spätného volania"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Dátové pripojenie zakázané"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="few">Žiadne dátové pripojenie – <xliff:g id="COUNT_1">%s</xliff:g> min</item>
-      <item quantity="many">Žiadne dátové pripojenie – <xliff:g id="COUNT_1">%s</xliff:g> min</item>
-      <item quantity="other">Žiadne dátové pripojenie – <xliff:g id="COUNT_1">%s</xliff:g> min</item>
-      <item quantity="one">Žiadne dátové pripojenie – <xliff:g id="COUNT_0">%s</xliff:g> min</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Dátové pripojenie nebude dostupné do <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="few">Telefón bude <xliff:g id="COUNT_1">%s</xliff:g> minúty v režime spätného tiesňového volania. Keď bude v tomto režime, nesmiete používať žiadne aplikácie využívajúce dátové pripojenie. Chcete ho ukončiť?</item>
       <item quantity="many">Telefón bude <xliff:g id="COUNT_1">%s</xliff:g> minúty v režime spätného tiesňového volania. Keď bude v tomto režime, nesmiete používať žiadne aplikácie využívajúce dátové pripojenie. Chcete ho ukončiť?</item>
@@ -557,12 +555,9 @@
     <string name="selectContact" msgid="781975788478987237">"vybrať kontakt"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Hlasové volanie nie je podporované"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"vytáčanie"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibrovať"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibrovať"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Vizuálna hlasová schránka"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Nastavenie kódu PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Zmena kódu PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Zvuk"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Tón zvonenia a vibrovanie"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Vstavané SIM karty"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Zapnúť videohovory"</string>
@@ -579,6 +574,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Pri dekódovaní správy sa vyskytla chyba"</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM karta aktivovala vašu službu a aktualizovala možnosti roamingu vášho telefónu"</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Prebieha príliš veľa aktívnych hovorov. Skôr ako uskutočníte nový hovor, ukončite existujúce hovory alebo ich zlúčte."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Nedá sa pripojiť, vložte platnú SIM kartu."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Pripojenie Wi-Fi bolo stratené. Hovor bol ukončený."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Zmena kódu PIN hlasovej schránky"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Pokračovať"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Zrušiť"</string>
diff --git a/res/values-sl/config.xml b/res/values-sl/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-sl/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index 77d9d19..d4b9052 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Prenos podatkov v mobilnih omrežjih"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobilni podatki"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Storitve telefona"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Klicalnik za nujne primere"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Manjkajoča številka glasovne pošte"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Na kartici SIM ni shranjena številka glasovne pošte."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Dodaj številko"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Nastavitve odzivnika lahko spremeni samo primarni uporabnik."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Kartica SIM je bila deblokirana. Telefon se odklepa ..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN za odklep omrežja kartice SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Odkleni"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Zahteva za odklepanje omrežja ..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Zahteva za odklepanje omrežja neuspešna."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Odklepanje omrežja uspešno."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Nastavitve mobilnega omrežja niso na voljo za tega uporabnika"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Nastavitve mobilnega omrežja niso na voljo za tega uporabnika"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Nastavitve klicev GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Nastavitve klicanja za GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Nastavitve klicev CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Glasovna pošta"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Odzivnik (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Obvestila"</string>
     <string name="networks" msgid="8873030692174541976">"Omrežni operaterji"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Oddaje v sili"</string>
     <string name="call_settings" msgid="6112441768261754562">"Nastavitve klicev"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Pri nedosegljivosti"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Številka, ko nisem dosegljiv"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Preusmerjanje na <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Onemogočeno"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Izklopljeno"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Vaš operater ne podpira izklopa preusmeritve klicev, kadar je telefon nedosegljiv."</string>
     <string name="updating_title" msgid="6146755386174019046">"Nastavitve klicev"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Nastavitve klicanja lahko spremeni samo uporabnik s skrbniškim dostopom."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Nova koda PIN vsebuje neveljavne znake."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Ni mogoče spremeniti kode PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Nepodprta vrsta sporočila, za poslušanje pokličite <xliff:g id="NUMBER">%s</xliff:g>."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Nastavitve mobilnega omrežja"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Nastavitve mobi. omrežja"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobilno omrežje"</string>
     <string name="label_available" msgid="1181658289009300430">"Razpoložljiva omrežja"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Iskanje ..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Najdeno ni bilo nobeno omrežje."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> omejitev presežena\nPodatki omejeni na <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ cikla potečenega\nNaslednje obdobje se začne čez <xliff:g id="USED_1">%2$d</xliff:g> dni (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Če je presežena omejitev porabe podatkov, se podatkovna hitrost zmanjša na <xliff:g id="USED">%1$d</xliff:g> Kb/s."</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Več informacij o pravilniku o uporabi podatkov v mobilnem omrežju vašega operaterja"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Več informacij o pravilniku o uporabi podatkov v mobilnem omrežju vašega operaterja"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Oddajni vmesnik SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Oddajni vmesnik SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Oddajni vmesnik SMS omogočen"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Dodaj stik"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Urejanje stika"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Izbriši stik"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Pokliči stik"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Vnesite kodo PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Ime"</string>
     <string name="number" msgid="7905950798349903858">"Številka"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Brisanje zapore odhodnega klica ..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Zapora odhodnega klica izbrisana."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN ni bil posodobljen, ker ste vnesli napačno kodo PIN."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN ni bil posodobljen, ker število ne sme presegati 20 mest."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Funkcija FDN ni bila posodobljena, ker je številka prazna ali ima več kot 20 mest."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN ni bil posodobljen. Koda PIN2 je bila napačna ali pa je bila telefonska številka zavrnjena."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Postopek za omejeno klicanje ni uspel."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Branje kartice SIM ..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Izklopite način za letalo ali se povežite v omrežje Wi-Fi, če želite opraviti klic."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Če ne gre za klic v sili, zaprite način za povratni klici v sili."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Ni registrirano v omrežju."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mobilno omrežje ni na voljo."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Mobilno omrežje ni na voljo. Povežite se v omrežje Wi-Fi, če želite opraviti klic."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Omrežje prenosnega telefona ni na voljo."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobilno omrežje ni na voljo. Če želite opraviti klic, vzpostavite povezavo z brezžičnim omrežjem."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Če želite opraviti klic, vnesite veljavno številko."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Klic ni uspel."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Klica trenutno ni mogoče dodati."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Začetek zaporedja MMI ..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Storitev ni podprta"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Preklop med klici ni mogoč."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Ločitev klica ni mogoča."</string>
@@ -524,12 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Vnesen način za povratni klic v sili"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Način povratnega klica v sili"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Podatkovno povezovanje onemogočeno"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">Podatkovne povezave ni <xliff:g id="COUNT_1">%s</xliff:g> minuto</item>
-      <item quantity="two">Podatkovne povezave ni <xliff:g id="COUNT_1">%s</xliff:g> minuti</item>
-      <item quantity="few">Podatkovne povezave ni <xliff:g id="COUNT_1">%s</xliff:g> minute</item>
-      <item quantity="other">Podatkovne povezave ni <xliff:g id="COUNT_1">%s</xliff:g> minut</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Podatkovne povezave ne bo do <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">Telefon bo v načinu povratnega klica v sili <xliff:g id="COUNT_1">%s</xliff:g> minuto. V tem načinu ni mogoče uporabljati aplikacij, ki uporabljajo podatkovno povezavo. Ali želite zapreti?</item>
       <item quantity="two">Telefon bo v načinu povratnega klica v sili <xliff:g id="COUNT_1">%s</xliff:g> minuti. V tem načinu ni mogoče uporabljati aplikacij, ki uporabljajo podatkovno povezavo. Ali želite zapreti?</item>
@@ -557,12 +555,9 @@
     <string name="selectContact" msgid="781975788478987237">"izbira stika"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Glasovno klicanje ni podprto"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"klicanje"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibriraj"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibriraj"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Vizualno sporočilo v odzivniku"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Nastavitev kode PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Sprememba kode PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Zvok"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Zvonjenje in vibriranje"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Vgrajene kartice SIM"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Vklop videoklicev"</string>
@@ -579,6 +574,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Napaka pri dekodiranju sporočila."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Kartica SIM je aktivirala vašo storitev in posodobila zmožnosti telefona za gostovanje."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Preveč aktivnih klicev. Preden začnete nov klic, končajte ali združite obstoječe klice."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Povezave ni mogoče vzpostaviti, vstavite veljavno kartico SIM."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Povezava Wi-Fi je bila prekinjena. Klic je končan."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Sprememba kode PIN za sporočila v odzivniku"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Naprej"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Prekliči"</string>
diff --git a/res/values-sq-rAL/arrays.xml b/res/values-sq/arrays.xml
similarity index 100%
rename from res/values-sq-rAL/arrays.xml
rename to res/values-sq/arrays.xml
diff --git a/res/values-sq/config.xml b/res/values-sq/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-sq/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-sq-rAL/strings.xml b/res/values-sq/strings.xml
similarity index 96%
rename from res/values-sq-rAL/strings.xml
rename to res/values-sq/strings.xml
index 78a7c4b..383012c 100644
--- a/res/values-sq-rAL/strings.xml
+++ b/res/values-sq/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Të dhëna celulare"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Të dhëna celulare"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Shërbimet e telefonit"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Formuesi i numrit të urgjencës"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefoni"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Mungon numri i postës zanore"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Nuk ka numër të ruajtur në kartën SIM."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Shto numër"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Cilësimet e postës zanore mund të modifikohen vetëm nga \"Përdoruesi kryesor\""</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Karta jote SIM u zhbllokua. Telefoni yt po shkyçet..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN-i i shkyçjes së rrjetit të kartës SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Shkyçe"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Po kërkon shkyçjen e rrjetit…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Kërkesa për shkyçjen e rrjetit ishte e pasuksesshme."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Shkyçja e rrjetit ishte e suksesshme."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Cilësimet e rrjetit celular nuk mundësohen për këtë përdorues"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Cilësimet e rrjetit celular nuk ofrohen për këtë përdorues"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Cilësimet e telefonatës GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Cilësimet e telefonatës GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Cilësimet e telefonatës CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Posta zanore"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Posta zanore (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Njoftimet"</string>
     <string name="networks" msgid="8873030692174541976">"Operatorët e rrjetit"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Transmetimet e urgjencës"</string>
     <string name="call_settings" msgid="6112441768261754562">"Cilësimet e telefonatës"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Kur është e paarritshme"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Numri, nëse linja është e paarritshme"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Transferim te <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Çaktivizuar"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Çaktivizuar"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Operatori yt nuk mbështet çaktivizimin e transferimit të telefonatës kur telefoni është i paarritshëm."</string>
     <string name="updating_title" msgid="6146755386174019046">"Cilësimet e telefonatës"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Cilësimet e telefonatës mund të ndryshohen vetëm nga administratori."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Kodi PIN i ri përmban karaktere të pavlefshme."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Kodi PIN nuk u ndryshua."</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Lloj mesazhi i pambështetur, telefono <xliff:g id="NUMBER">%s</xliff:g> për ta dëgjuar."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Cilësimet e rrjetit celular"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Cilësimet e rrjetit celular"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Rrjeti celular"</string>
     <string name="label_available" msgid="1181658289009300430">"Rrjete të arritshme"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Po kërkon..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Nuk u gjetën rrjete."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"U kapërcye maksimumi i <xliff:g id="USED_0">%1$s</xliff:g>\nShpejtësia e të dhënave u pakësua deri në <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"Ka kaluar <xliff:g id="USED_0">%1$d</xliff:g>٪ të ciklit\nPeriudha tjetër fillon për <xliff:g id="USED_1">%2$d</xliff:g> ditë (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Shpejtësia e të dhënave pakësohet në <xliff:g id="USED">%1$d</xliff:g> Kb/s nëse tejkalohet kufiri i përdorimit të të dhënave"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Më shumë informacion rreth politikës së përdorimit të të dhënave të rrjetit celular të operatorit tënd"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Më shumë informacion rreth politikës së përdorimit të të dhënave të rrjetit celular të operatorit tënd"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS-ja e \"Transmetimit celular\""</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS-ja e transmetimit celular"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"SMS-ja e \"Transmetimit celular\" është e aktivizuar"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Shto kontakt"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Redakto kontaktin"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Fshi kontaktin"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Telefono kontaktin"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Shkruaj PIN2-shin"</string>
     <string name="name" msgid="7329028332786872378">"Emri"</string>
     <string name="number" msgid="7905950798349903858">"Numri"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Po fshin numrin me telefonim të përzgjedhur..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Numri me telefonim të përzgjedhur u fshi."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN-ja nuk u përditësua sepse shkrove një PIN të pasaktë."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN-ja nuk ishte i përditësuar sepse numri nuk mund të kalojë 20 shifra."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Funksioni FDN nuk u përditësua sepse numri është bosh ose i kalon 20 shifra."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN-ja nuk u përditësua. PIN2-shi ishte i pasaktë ose numri i telefonit u refuzua."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Operacioni FDN dështoi"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Po lexon nga karta SIM..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Çaktivizo modalitetin e aeroplanit ose lidhu me ndonjë rrjet interneti valor për të bërë telefonata."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Dil nga modaliteti i kthimit të telefonatës së urgjencës për të bërë një telefonatë jo urgjente."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"I paregjistruar në rrjet."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Rrjeti celular nuk mundësohet."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Rrjeti celular nuk mundësohet. Lidhu me një rrjet me valë për të bërë një telefonatë."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Rrjeti celular nuk mundësohet."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Rrjeti celular nuk ofrohet. Lidhu me një rrjet pa tel për të bërë një telefonatë."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Për të kryer një telefonatë, fut një numër të vlefshëm."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Thirrja dështoi."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Telefonata nuk mund të shtohet këtë herë."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Po fillon sekuencën MMI…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Shërbimi nuk mbështetet"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Nuk mund të ndryshojë telefonatat."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Nuk mund të ndajë telefonatën."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Hyri në modalitetin e \"Kthimit të telefonatës së urgjencës\""</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Modaliteti i \"Kthimit të telefonatës së urgjencës\""</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Lidhja me të dhënat është çaktivizuar"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Nuk ka të dhëna të lidhura për <xliff:g id="COUNT_1">%s</xliff:g> minuta</item>
-      <item quantity="one">Nuk ka të dhëna të lidhura për <xliff:g id="COUNT_0">%s</xliff:g> minutë</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Nuk ka lidhje të të dhënave deri në <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Telefoni do të përdoret në modalitetin e \"Kthimit të Telefonatës së Urgjencës\" për <xliff:g id="COUNT_1">%s</xliff:g> minuta. Ndërkohë që është në këtë modalitet, nuk mund të përdoret asnjë aplikacion duke përdorur lidhje të dhënash. Dëshiron të dalësh tani?</item>
       <item quantity="one">Telefoni do të jetë në modalitetin e \"Kthimit të telefonatës së urgjencës\" për <xliff:g id="COUNT_0">%s</xliff:g> minuta. Ndërkohë që është në këtë modalitet, nuk mund të përdoret asnjë aplikacion duke përdorur lidhje të dhënash. Dëshiron të dalësh tani?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"përzgjidh kontaktin"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Telefonata zanore nuk mbështetet"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"formo numrin"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Dridhja"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Dridhja"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Posta zanore vizuale"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Konfiguro kodin PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Ndrysho kodin PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Tingulli"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Me zile dhe me dridhje"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Kartat e integruara SIM"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Aktivizo telefonatën me video"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Ndodhi një gabim gjatë dekodimit të mesazhit."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Një kartë SIM ka aktivizuar shërbimin tënd dhe ka përditësuar aftësitë e roaming-ut të telefonit tënd."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Ka shumë thirrje aktive. Përfundo ose të bashko thirrjet ekzistuese para kryerjes së një thirrjeje të re."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Nuk mund të lidhet. Fut një kartë SIM të vlefshme."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Lidhja Wi-Fi ka humbur. Telefonata u mbyll."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Ndrysho kodin PIN të postës zanore"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Vazhdo"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Anulo"</string>
diff --git a/res/values-sr/config.xml b/res/values-sr/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-sr/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index f1e78f0..e9a4ef8 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Мобилни подаци"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Мобилни подаци"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Телефонске услуге"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Хитни позиви"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Телефон"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Недостаје број за говорну пошту"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Није ускладиштен ниједан број говорне поште на SIM картици."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Додај број"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Само примарни корисник може да мења подешавања говорне поште."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Ваша SIM картица је одблокирана. Телефон се откључава..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN за откључавање мреже на SIM картици"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Откључај"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Тражење откључавања мреже"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Неуспешан захтев за закључавање мреже."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Успешно откључавање мреже"</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Подешавања мобилне мреже нису доступна за овог корисника"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Подешавања мобилне мреже нису доступна за овог корисника"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Подешавања GSM позива"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Подешавања GSM позива (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA подешавања позива"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Говорна пошта"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Гласовна пошта (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Обавештења"</string>
     <string name="networks" msgid="8873030692174541976">"Мрежни оператери"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Хитни преноси"</string>
     <string name="call_settings" msgid="6112441768261754562">"Подешавања позива"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Кад сам недоступан/а"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Број кад је недоступно"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Прослеђује се на <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Онемогућено"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Искључено"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Мобилни оператер не подржава онемогућавање преусмеравања позива када је телефон недоступан."</string>
     <string name="updating_title" msgid="6146755386174019046">"Подешавања позива"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Само кориснику са администраторским правима је дозвољено да мења подешавања позива."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Нови PIN садржи неважеће знакове."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Промена PIN-а није успела"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Неподржани тип поруке. Позовите <xliff:g id="NUMBER">%s</xliff:g> да бисте је преслушали."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Подешавања мобилне мреже"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Подешавања за моб. мрежу"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Мобилна мрежа"</string>
     <string name="label_available" msgid="1181658289009300430">"Доступне мреже"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Претражује се…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Нису пронађене мреже."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> максимум је премашен\nСтопа преноса података смањена је на <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪  је протекло од циклуса\nСледећи период почиње за <xliff:g id="USED_1">%2$d</xliff:g> дана (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Брзина преноса података смањена је на <xliff:g id="USED">%1$d</xliff:g> Kb/s ако је премашено ограничење за коришћење података"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Више информација о смерницама за коришћење података мобилне мреже оператера"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Више информација о смерницама за коришћење података мобилне мреже оператера"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS инфо сервиса"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS инфо сервиса"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Омогућен је SMS инфо сервиса"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Додај контакт"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Измени контакт"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Избриши контакт"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Позови контакт"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Унесите PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Име"</string>
     <string name="number" msgid="7905950798349903858">"Број"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Брисање броја за фиксно бирање…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Избрисан је број за фиксно бирање."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Број за фиксно бирање није ажуриран јер сте унели нетачан PIN кôд."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Број за фиксно бирање није ажуриран јер број не сме да премашује 20 цифара."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Број за фиксно бирање није ажуриран јер је празан или има више од 20 цифара."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN није ажуриран. PIN2 је нетачан или је број телефона одбачен."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Радња са бројем за фиксно бирање није успела."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Чита се са SIM картице…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Искључите режим рада у авиону или се повежите на бежичну мрежу да бисте упутили позив."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Изађите из режима хитног повратног позива да бисте упутили позив који није хитан."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Није регистровано на мрежи."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Мобилна мрежа није доступна."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Мобилна мрежа није доступна. Повежите се на бежичну мрежу да бисте упутили позив."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Мобилна мрежа није доступна."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Мобилна мрежа није доступна. Повежите се на бежичну да бисте упутили позив."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Да бисте упутили позив, унесите важећи број."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Позив није успео."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Тренутно није могуће додати позив."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Покретање MMI секвенце"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Услуга није подржана"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Замена позива није успела."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Раздвајање позива није успело."</string>
@@ -524,11 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Унет је режим за хитан повратни позив"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Режим за хитан повратни позив"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Веза за пренос података је онемогућена"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">Нема везе за пренос података <xliff:g id="COUNT_1">%s</xliff:g> минута</item>
-      <item quantity="few">Нема везе за пренос података <xliff:g id="COUNT_1">%s</xliff:g> минута</item>
-      <item quantity="other">Нема везе за пренос података <xliff:g id="COUNT_1">%s</xliff:g> минута</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Веза за пренос података неће бити доступна до <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">Телефон ће бити у Режиму хитног повратног позива <xliff:g id="COUNT_1">%s</xliff:g> минут. Док је у овом режиму не можете да користите апликације које користе везу за пренос података. Желите ли одмах да изађете из овог режима?</item>
       <item quantity="few">Телефон ће бити у Режиму хитног повратног позива <xliff:g id="COUNT_1">%s</xliff:g> минута. Док је у овом режиму не можете да користите апликације које користе везу за пренос података. Желите ли одмах да изађете из овог режима?</item>
@@ -554,12 +553,9 @@
     <string name="selectContact" msgid="781975788478987237">"изаберите контакт"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Аудио позиви нису подржани"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"бирање"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Вибрација"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Вибрација"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Визуелна говорна пошта"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Подесите PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Промените PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Звук"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Мелодија звона и вибрација"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Уграђене SIM картице"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Укључи видео позиве"</string>
@@ -576,6 +572,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Дошло је до грешке при декодирању поруке."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM картица је активирала услугу и ажурирала функције роминга на телефону."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Има превише активних позива. Завршите или обједините постојеће позиве пре него што упутите нови."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Повезивање није успело, убаците важећу SIM картицу."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi веза је прекинута. Позив је завршен."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Промените PIN кôд говорне поште"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Настави"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Откажи"</string>
diff --git a/res/values-sv/config.xml b/res/values-sv/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-sv/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 93784d1..dfc297c 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobildata"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobildata"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefontjänster"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Nödsamtal"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Nummer till röstbrevlåda saknas"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Det finns inget nummer till röstbrevlådan sparat på SIM-kortet."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Lägg till nummer"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Endast den primära användaren får ändra röstbrevlådans inställningar."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"SIM-kortets spärr har tagits bort. Låser upp telefonen…"</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN-kod för upplåsning av SIM-nätverk"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Lås upp"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Försöker låsa upp nätverket…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Det gick inte att låsa upp nätverket."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Nätverket upplåst"</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Inställningarna för mobilnätverk är inte tillgängliga för den här användaren"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Inställningarna för mobilnätverk är inte tillgängliga för den här användaren"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Samtalsinst. för GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Samtalsinställningar för GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Samtalsinst. för CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Röstbrevlåda"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Röstbrevlåda (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"RB:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Aviseringar"</string>
     <string name="networks" msgid="8873030692174541976">"Nätverksoperatörer"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Nödsändningar"</string>
     <string name="call_settings" msgid="6112441768261754562">"Samtalsinställningar"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"När jag inte kan nås"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Använd nummer"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Vidarebefordrar till <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Inaktiverat"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Av"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Operatören stöder inte inaktivering av vidarebefordran av samtal när det inte går att nå telefonen."</string>
     <string name="updating_title" msgid="6146755386174019046">"Samtalsinställningar"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Det är bara administratören som kan ändra samtalsinställningar."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Den nya pinkoden innehåller ogiltiga tecken."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Det gick inte att ändra pinkoden"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Meddelandetypen stöds inte, ring <xliff:g id="NUMBER">%s</xliff:g> om du vill lyssna."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Inställningar för mobilnätverk"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Mobila nätverksinställningar"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobilnätverk"</string>
     <string name="label_available" msgid="1181658289009300430">"Tillgängliga nätverk"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Söker…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Hittade inga nätverk."</string>
@@ -237,7 +240,7 @@
     <!-- no translation found for throttle_time_frame_subtext (7732763021560399960) -->
     <skip />
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Datahastigheten sänks till <xliff:g id="USED">%1$d</xliff:g> kbit/s om dataanvändningsgränsen överskrids"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Mer information om operatörens dataanvändningspolicy för mobilnätverket"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Mer information om operatörens dataanvändningspolicy för mobilnätverket"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Cell Broadcast SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Cell Broadcast SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Cell Broadcast SMS aktiverat"</string>
@@ -374,6 +377,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Lägg till kontakt"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Redigera kontakt"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Ta bort kontakt"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Ring kontakt"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Ange PIN2-kod"</string>
     <string name="name" msgid="7329028332786872378">"Namn"</string>
     <string name="number" msgid="7905950798349903858">"Nummer"</string>
@@ -388,7 +392,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Tar bort fast nummer…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Det fasta numret har tagits bort."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN uppdaterades inte eftersom du skrev en felaktig PIN-kod."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN uppdaterades inte eftersom numret inte får ha mer än 20 siffror."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Det fasta uppringningsnumret (FDN) uppdaterades inte eftersom det är tomt eller överskriver 20 siffror."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN uppdaterades inte. Antingen har du angivit fel PIN2, eller så avvisades telefonnumret."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Det gick inte att ringa till fast uppringningsnummer."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Läser från SIM-kort…"</string>
@@ -450,12 +454,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Inaktivera flygplansläget eller anslut till ett trådlöst nätverk om du vill ringa."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Avsluta läget för återuppringning vid nödsamtal om du vill ringa ett vanligt samtal."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Inte registrerat på nätverk."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Det finns inget mobilnät tillgängligt."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Det finns inga tillgängliga mobilnätverk. Anslut till ett trådlöst nätverk om du vill ringa."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Inget mobilt nätverk är tillgängligt."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Det finns inga tillgängliga mobilnätverk. Anslut till ett trådlöst nätverk om du vill ringa."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Ange ett giltigt nummer om du vill ringa ett samtal."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Det gick inte att koppla samtalet."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Det går inte att lägga till samtalet just nu."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Startar sekvens för MMI-kod…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Tjänsten stöds inte"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Det gick inte att växla mellan samtal."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Det gick inte att koppla isär samtalen."</string>
@@ -530,10 +533,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Starta läget Återuppringning vid nödsamtal"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Läget Återuppringning vid nödsamtal"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Dataanslutning inaktiverad"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Ingen dataanslutning i <xliff:g id="COUNT_1">%s</xliff:g> minuter</item>
-      <item quantity="one">Ingen dataanslutning i <xliff:g id="COUNT_0">%s</xliff:g> minut</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Ingen dataanslutning förrän <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Mobilen försätts i nödsamtalsläge i <xliff:g id="COUNT_1">%s</xliff:g> minuter. I det här läget går det inte att använda några appar där en dataanslutning används. Vill du avsluta nu?</item>
       <item quantity="one">Mobilen försätts i nödsamtalsläge i <xliff:g id="COUNT_0">%s</xliff:g> minut. I det här läget går det inte att använda några appar där en dataanslutning används. Vill du avsluta nu?</item>
@@ -557,12 +557,9 @@
     <string name="selectContact" msgid="781975788478987237">"välj kontakt"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Röstsamtal stöds inte"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"ring upp"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Vibrera"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Vibrera"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Visuell röstbrevlåda"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Ställ in pinkod"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Byt pinkod"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Ljud"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Ringsignal och vibrera"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Inbyggda SIM-kort"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Aktivera videosamtal"</string>
@@ -579,6 +576,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Ett fel inträffade när meddelandet avkodades."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Ett SIM-kort har använts för att aktivera tjänsten och uppdatera roamingfunktionerna i mobilen."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Det finns för många aktiva samtal. Avsluta eller slå samman pågående samtal innan du ringer ett nytt."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Det går inte att ansluta. Sätt i ett giltigt SIM-kort."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi-anslutningen bruten. Samtal avslutat."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Ändra röstbrevlådans pinkod"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Fortsätt"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Avbryt"</string>
diff --git a/res/values-sw/config.xml b/res/values-sw/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-sw/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index 2bd8f97..6af9e40 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Data ya Simu za Mkononi"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Data ya Simu"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Huduma za Simu"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Kipigaji cha Dhararu"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Simu"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Nambari ya sauti inayokosekana"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Hakuna nambari ya ujumbe wa sauti iliyohifadhiwa katika SIM kadi."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Ongeza nambari"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Mipangilio ya ujumbe wa sauti inaweza kubadilishwa na Mtumiaji wa Msingi Pekee."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Kadi yako ya simu imefunguliwa. Simu yangu inafungua…."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN ya kufungua mtandao wa SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Fungua"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Inaomba mtandao ufunguliwe…."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Ombi la kufungua mtandao halijafaulu."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Umefaulu kufungua mtandao."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Mipangilio ya mitandao ya simu za mkononi haipatikani kwa mtumiaji huyu"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Mipangilio ya mtandao wa simu za mkononi haipatikani kwa mtumiaji huyu"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Mipangilio ya simu ya GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Mipangilio ya simu ya GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Mipangilio ya simu ya CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Ujumbe wa sauti"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Ujumbe wa sauti (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Arifa"</string>
     <string name="networks" msgid="8873030692174541976">"Kampuni zinazotoa huduma"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Matangazo ya dharura"</string>
     <string name="call_settings" msgid="6112441768261754562">"Mipangilio ya simu"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Ikiwa sipatikani"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Wakati namba haipatikani"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Inasambaza kwa <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Kimezimwa"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Imezimwa"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Mtoa huduma wako haauni ulemezaji wa kusambaza simu wakati simu yako haifikiwi."</string>
     <string name="updating_title" msgid="6146755386174019046">"Mipangilio ya simu"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Mipangilio ya simu inaweza kubadilishwa na mtumiaji wa akaunti ya msimamizi."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"PIN mpya ina herufi zisizostahiki."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Imeshindwa kubadilisha PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Huwezi kuona ujumbe wa aina hii; piga <xliff:g id="NUMBER">%s</xliff:g> ili uusikilize."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Mipangilio ya mitandao ya simu"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Mipangilio ya mtandao wa simu"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mtandao wa simu"</string>
     <string name="label_available" msgid="1181658289009300430">"Mitandao inayopatikana"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Inatafuta…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Hakuna mitandao iliyopatikana."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"Upeo wa <xliff:g id="USED_0">%1$s</xliff:g> umepitwa\nKasi ya data imepunguzwa hadi kilobaiti <xliff:g id="USED_1">%2$d</xliff:g> kwa sekunde"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ ya mzunguko imekamilika\nMuda ufuatao unaanza baada ya siku <xliff:g id="USED_1">%2$d</xliff:g> (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Kasi ya data imepunguzwa hadi kilibaiti <xliff:g id="USED">%1$d</xliff:g> kwa sekunde kama kiwango cha matumizi ya data kimepitwa"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Maelezo zaidi kuhusu sera ya matumizi ya data ya mtandao wa simu za mkononi ya mtoa huduma wako"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Maelezo zaidi kuhusu sera ya matumizi ya data ya mtandao wa mtoa huduma wako"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS ya Matangazo ya Simu"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS ya Kutangaza Seli"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"SMS ya Kutangaza Seli imewezeshwa"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Ongeza anwani"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Hariri anwani"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Futa anwani"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Piga nambari ya unayewasiliana naye"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Chapa PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Jina"</string>
     <string name="number" msgid="7905950798349903858">"Nambari"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Inafuta nambari ya upigaji simu uliobanwa..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Nambari ya upigaji simu uliobanwa imefutwa"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN haikusasishwa kwa sababu uliweka PIN isiyo sahihi."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN haikusasishwa kwa sababu namba haiwezi kuzidisha herufi 20."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN haikusasishwa kwa sababu nambari haina kitu au inazidi tarakimu 20."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN haikusasishwa. PIN2 haikuwa sahihi, au namba ya simu ilikataliwa."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Utendakazi wa FDN ulishindwa."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Inasoma kutoka kwa SIM kadi…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Zima hali ya ndegeni au uunganishe kwenye mtandao pasiwaya ili upige simu."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Ondoka kwenye hali ya kupiga simu za dharura ili upige simu zisizokuwa za dharura."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Haijasajiliwa kwa mitandao"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mitandao ya simu za mkononi haipatikani"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Huduma ya mtandao wa simu za mkononi haupatikani. Unganisha kwenye mtandao pasiwaya ili upige simu."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mtandao wa simu haupatikani."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mtandao wa simu za mkononi haupatikani. Unganisha kwenye mtandao pasiwaya ili upige simu."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Ili upige simu, weka nambari sahihi."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Imeshindwa kupiga simu."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Hangout haiwezi kuongezwa kwa wakati huu."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Inaanzisha msururu wa MMI…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Huduma haiwezi kutumika."</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Haiwezi kubadili simu."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Haiwezi kutenganisha simu."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Umeingia katika gumzo ya kupiga tena simu ya Dharura"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"hali ya kupiga tena simu ya Dharura"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Muunganisho wa data umelemazwa"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Hakuna muunganisho wa data kwa dakika <xliff:g id="COUNT_1">%s</xliff:g></item>
-      <item quantity="one">Hakuna muunganisho wa data kwa dakika <xliff:g id="COUNT_0">%s</xliff:g> </item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Hakuna muunganisho wa data mpaka <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Simu itakuwa katika hali ya Simu ya Dharura kwa dakika <xliff:g id="COUNT_1">%s</xliff:g>. Ukiwa katika hali hii hakuna programu zinazotumia muunganisho wa data zinazoweza kutumiwa. Je, unataka kuondoka sasa?</item>
       <item quantity="one">Simu itakuwa katika hali ya Simu ya Dharura kwa dakika <xliff:g id="COUNT_0">%s</xliff:g>. Ukiwa katika hali hii hakuna programu zinazotumia muunganisho wa data zinazoweza kutumiwa. Je, unataka kuondoka sasa?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"chagua anwani"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Upigaji simu za sauti hauhimiliwi"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"piga simu"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Mtetemo"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Mtetemo"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Ujumbe wa Sauti Unaoonekana"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Weka PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Badilisha PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Sauti"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Mlio wa simu na Mtetemo"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"SIM kadi zilizojengewa ndani"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Washa Hangout ya video"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Hitilafu imetokea wakati wa usimbuaji wa ujumbe."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM kadi yako imeanzisha huduma yako na kusasisha uwezo wa simu yako wa kutumia mitandao mingine."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Kuna simu nyingi mno zinazoendelea. Tafadhali kata au uunganishe simu zinazoendelea kabla hujapiga nyingine."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Imeshindwa kuunganisha, tafadhali ingiza SIM kadi sahihi."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Muunganisho wa Wi-Fi umekatika. Simu imekatika."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Badilisha PIN ya Ujumbe wa Sauti"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Endelea"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Ghairi"</string>
diff --git a/res/values-ta-rIN/arrays.xml b/res/values-ta/arrays.xml
similarity index 100%
rename from res/values-ta-rIN/arrays.xml
rename to res/values-ta/arrays.xml
diff --git a/res/values-ta/config.xml b/res/values-ta/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-ta/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-ta-rIN/strings.xml b/res/values-ta/strings.xml
similarity index 96%
rename from res/values-ta-rIN/strings.xml
rename to res/values-ta/strings.xml
index 7d967a2..8fc7303 100644
--- a/res/values-ta-rIN/strings.xml
+++ b/res/values-ta/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"செல்லுலார் தரவு"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"மொபைல் தரவு"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"ஃபோன் சேவைகள்"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"அவசரகால டயலர்"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"மொபைல்"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"குரலஞ்சல் எண் இல்லை"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"சிம் கார்டில் குரலஞ்சலுக்கான எண் எதுவும் சேமிக்கப்படவில்லை."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"எண்ணைச் சேர்"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"முதன்மை பயனர் மட்டுமே குரலஞ்சல் அமைப்புகளை மாற்ற முடியும்."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"சிம் கார்டின் தடுப்பு நீக்கப்பட்டது. மொபைல் திறக்கப்படுகிறது…"</string>
     <string name="label_ndp" msgid="780479633159517250">"சிம் நெட்வொர்க்கின் தடைநீக்க பின்"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"தடைநீக்கு"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"நெட்வொர்க் தடைநீக்கத்தைக் கோருகிறது…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"நெட்வொர்க் தடைநீக்கத்திற்கான கோரிக்கை தோல்வி."</string>
     <string name="unlock_success" msgid="6770085622238180152">"நெட்வொர்க்கின் தடைநீக்கப்பட்டது."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"இவரால் செல்லுலார் நெட்வொர்க் அமைப்புகளை மாற்ற முடியாது"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"இவரால் மொபைல் நெட்வொர்க் அமைப்புகளை மாற்ற முடியாது"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM அழைப்பு அமைப்பு"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM அழைப்பு அமைப்புகள் (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA அழைப்பு அமைப்பு"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"குரலஞ்சல்"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"குரலஞ்சல் (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"அறிவிப்புகள்"</string>
     <string name="networks" msgid="8873030692174541976">"நெட்வொர்க் ஆபரேட்டர்கள்"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"அவசரகால அலைபரப்புகள்"</string>
     <string name="call_settings" msgid="6112441768261754562">"அழைப்பு அமைப்பு"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"தொடர்புகொள்ள முடியாமல் இருக்கும்போது"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"தொடர்பு கிடைக்காதபோது:"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> க்குப் பகிர்"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"முடக்கப்பட்டது"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"முடக்கப்பட்டுள்ளது"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"மொபைல் தொடர்புகொள்ள முடியாத இடத்தில் இருக்கும்போது, அழைப்பு பகிர்தலை முடக்குவதை ஆபரேட்டர் ஆதரிக்கவில்லை."</string>
     <string name="updating_title" msgid="6146755386174019046">"அழைப்பு அமைப்பு"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"நிர்வாகிப் பயனர் மட்டுமே அழைப்பிற்கான அமைப்புகளை மாற்ற முடியும்."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"புதிய பின்னில் தவறான எழுத்துக்குறிகள் உள்ளன."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"பின்னை மாற்ற முடியவில்லை"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"ஆதரிக்கப்படாத செய்தி வகை, தகவலைக் கேட்க <xliff:g id="NUMBER">%s</xliff:g> என்ற எண்ணிற்கு அழைக்கவும்."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"செல்லுலார் நெட்வொர்க் அமைப்பு"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"மொபைல் நெட்வொர்க் அமைப்பு"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"மொபைல் நெட்வொர்க்"</string>
     <string name="label_available" msgid="1181658289009300430">"கிடைக்கின்ற நெட்வொர்க்குகள்"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"தேடுகிறது..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"நெட்வொர்க்குகள் இல்லை."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> அதிகபட்சத்தை மீறிவிட்டது\n<xliff:g id="USED_1">%2$d</xliff:g> Kb/s க்குத் தரவு கட்டணம் குறைந்தது"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ சுழற்சி கடந்துவிட்டன\nஅடுத்த காலம் <xliff:g id="USED_1">%2$d</xliff:g> நாட்களில் தொடங்கும் (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"தரவு பயன்பாட்டிற்கான வரம்பு மீறிவிட்டால், தரவு மதிப்பு <xliff:g id="USED">%1$d</xliff:g> Kb/s இல் குறையும்"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"மொபைல் நிறுவனத்தின் செல்லுலார் நெட்வொர்க் தரவு பயன்பாட்டிற்கான கொள்கை குறித்த கூடுதல் தகவல்"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"மொபைல் நிறுவனத்தின் மொபைல் நெட்வொர்க் தரவு பயன்பாட்டிற்கான கொள்கை குறித்து மேலும் அறிக"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"செல் பிராட்காஸ்ட் SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"மொபைல் அலைபரப்பு SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"செல் பிராட்காஸ்ட் SMS இயக்கப்பட்டது"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"தொடர்பைச் சேர்"</string>
     <string name="menu_edit" msgid="7143003705504672374">"தொடர்பை மாற்று"</string>
     <string name="menu_delete" msgid="3977150783449642851">"தொடர்பை நீக்கு"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"தொடர்பை அழை"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2 ஐ உள்ளிடுக"</string>
     <string name="name" msgid="7329028332786872378">"பெயர்"</string>
     <string name="number" msgid="7905950798349903858">"எண்"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"நிலையான அழைப்பு எண்ணை நீக்குகிறது…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"நிலையான அழைப்பு எண் நீக்கப்பட்டது."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"தவறான பின்னை உள்ளிட்டுள்ளதால், FDN புதுப்பிக்கப்படவில்லை."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"20 இலக்கங்களுக்கு மேல் எண் இருக்கக்கூடாது என்பதால், FDN புதுப்பிக்கப்படவில்லை."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"எண் எதையும் உள்ளிடாததால் அல்லது உள்ளிட்ட எண் 20 இலக்கங்களுக்கும் அதிகமாக உள்ளதால் FDN புதுப்பிக்கப்படவில்லை."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN புதுப்பிக்கப்படவில்லை. PIN2 தவறானது அல்லது மொபைல் எண் நிராகரிக்கப்பட்டது."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN செயல்பாடு தோல்வி."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"சிம் கார்டில் இருப்பதைப் படிக்கிறது…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"அழைக்க, விமானப் பயன்முறையை முடக்கவும் அல்லது வயர்லெஸ் நெட்வொர்க்குடன் இணைக்கவும்."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"வழக்கமான அழைப்பிற்கு, அவசரகாலத் திரும்ப அழைக்கும் பயன்முறையிலிருந்து வெளியேறவும்."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"நெட்வொர்க்கில் பதிவுசெய்யப்படவில்லை."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"செல்லுலார் நெட்வொர்க் கிடைக்கவில்லை."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"செல்லுலார் நெட்வொர்க் கிடைக்கவில்லை. அழைக்க, வயர்லெஸ் நெட்வொர்க்குடன் இணைக்கவும்."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"மொபைல் நெட்வொர்க் கிடைக்கவில்லை."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"மொபைல் நெட்வொர்க் கிடைக்கவில்லை. அழைக்க, வயர்லெஸ் நெட்வொர்க்குடன் இணைக்கவும்."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"அழைக்க, சரியான எண்ணை உள்ளிடவும்."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"அழைப்பு தோல்வியடைந்தது."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"இப்போது அழைப்பைச் சேர்க்க முடியாது."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI வரிசையைத் தொடங்குகிறது..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"சேவை ஆதரிக்கப்படவில்லை"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"அழைப்புகளில் மாற முடியாது."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"அழைப்பைப் பிரிக்க முடியாது."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"அவசரகால திரும்ப அழைக்கும் பயன்முறை இயக்கப்பட்டது"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"அவசரகால திரும்ப அழைக்கும் பயன்முறை"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"தரவு இணைப்பு முடக்கப்பட்டது"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> நிமிடங்களுக்குத் தரவு இணைப்பு இருக்காது</item>
-      <item quantity="one"><xliff:g id="COUNT_0">%s</xliff:g> நிமிடத்திற்குத் தரவு இணைப்பு இருக்காது</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> வரை தரவு இணைப்பு இருக்காது"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> நிமிடங்களுக்கு மொபைல் அவசரகால திரும்ப அழைக்கும் பயன்முறையில் இருக்கும். இந்தப் பயன்முறையில், தரவு இணைப்பைப் பயன்படுத்தாத பயன்பாடுகளைப் பயன்படுத்தலாம். இப்போது வெளியேற விரும்புகிறீர்களா?</item>
       <item quantity="one"><xliff:g id="COUNT_0">%s</xliff:g> நிமிடத்திற்கு மொபைல் அவசரகால திரும்ப அழைக்கும் பயன்முறையில் இருக்கும். இந்தப் பயன்முறையில், தரவு இணைப்பைப் பயன்படுத்தாத பயன்பாடுகளைப் பயன்படுத்தலாம். இப்போது வெளியேற விரும்புகிறீர்களா?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"தொடர்பைத் தேர்ந்தெடுக்கவும்"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"குரல் அழைப்பு ஆதரிக்கப்படவில்லை"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"டயல்"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"அதிர்வு"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"அதிர்வு"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"விஷூவல் குரலஞ்சல்"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"பின்னை அமை"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"பின்னை மாற்றவும்"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"ஒலி"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"ரிங்டோன் &amp; அதிர்வு"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"உள்ளமைந்த சிம் கார்டுகள்"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"வீடியோ அழைப்பை இயக்கு"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"செய்தியைக் குறிவிலக்கும்போது பிழை ஏற்பட்டது."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"ஏற்கனவே சிம் கார்டைப் பயன்படுத்தி சேவை இயக்கப்பட்டது மற்றும் மொபைலின் ரோமிங் செயல்திறன்கள் புதுப்பிக்கப்பட்டன."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"மிகவும் அதிக அளவிலான அழைப்புகள் செயலில் உள்ளன. புதிய அழைப்பை மேற்கொள்ளும் முன், ஏற்கனவேயுள்ள அழைப்புகளைத் துண்டிக்கவும் அல்லது ஒன்றாகப் பிணைக்கவும்."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"இணைக்க முடியவில்லை, சரியான சிம் கார்டைச் செருகவும்."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"வைஃபை இணைப்பு துண்டிக்கப்பட்டதால், அழைப்பு முடிந்தது."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"குரலஞ்சல் பின்னை மாற்றவும்"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"தொடர்க"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"ரத்துசெய்"</string>
diff --git a/res/values-te-rIN/arrays.xml b/res/values-te/arrays.xml
similarity index 100%
rename from res/values-te-rIN/arrays.xml
rename to res/values-te/arrays.xml
diff --git a/res/values-te/config.xml b/res/values-te/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-te/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-te-rIN/strings.xml b/res/values-te/strings.xml
similarity index 96%
rename from res/values-te-rIN/strings.xml
rename to res/values-te/strings.xml
index be6e700..f767443 100644
--- a/res/values-te-rIN/strings.xml
+++ b/res/values-te/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"సెల్యులార్ డేటా"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"మొబైల్ డేటా"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"ఫోన్ సేవలు"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"అత్యవసర డయలర్"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"ఫోన్"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"వాయిస్ మెయిల్ నంబర్ లేదు"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"సిమ్ కార్డులో వాయిస్ మెయిల్ నంబర్ ఏదీ నిల్వ చేయబడలేదు."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"నంబర్‌ను జోడించు"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"వాయిస్ మెయిల్ సెట్టింగ్‌లను ప్రాథమిక వినియోగదారు మాత్రమే సవరించగలరు."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"మీ SIM కార్డు అన్‌బ్లాక్ చేయబడింది. మీ ఫోన్ అన్‌లాక్ చేయబడుతోంది…"</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM నెట్‌వర్క్ అన్‌లాక్ పిన్‌"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"అన్‌లాక్ చేయి"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"నెట్‌వర్క్ అన్‌లాక్‌ను అభ్యర్థిస్తోంది…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"నెట్‌వర్క్ అన్‌లాక్ అభ్యర్థన విఫలమైంది."</string>
     <string name="unlock_success" msgid="6770085622238180152">"నెట్‌వర్క్ అన్‌లాక్ విజయవంతమైంది."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"ఈ వినియోగదారుకి సెల్యులార్ నెట్‌వర్క్ సెట్టింగ్‌లు అందుబాటులో లేవు"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"ఈ వినియోగదారుకు మొబైల్ నెట్‌వర్క్ సెట్టింగ్‌లు అందుబాటులో లేవు"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM కాల్ సెట్టింగ్‌లు"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM కాల్ సెట్టింగ్‌లు (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA కాల్ సెట్టింగ్‌లు"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"వాయిస్ మెయిల్"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"వాయిస్ మెయిల్ (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"నోటిఫికేషన్‌లు"</string>
     <string name="networks" msgid="8873030692174541976">"నెట్‌వర్క్ ఆపరేటర్‌లు"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"అత్యవసర ప్రసారాలు"</string>
     <string name="call_settings" msgid="6112441768261754562">"కాల్ సెట్టింగ్‌లు"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"చేరుకోలేనప్పుడు"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"చేరుకోవడం సాధ్యపడనప్పుడు నంబర్"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g>కి ఫార్వార్డ్ చేస్తోంది"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"నిలిపివేయబడింది"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"ఆఫ్‌లో ఉంది"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"మీ ఫోన్‌ను చేరుకోవడం సాధ్యపడనప్పుడు కాల్ ఫార్వర్డింగ్‌ను నిలిపివేయడానికి మీ క్యారియర్ మద్దతు ఇవ్వదు."</string>
     <string name="updating_title" msgid="6146755386174019046">"కాల్ సెట్టింగ్‌లు"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"కాల్ సెట్టింగ్‌లను నిర్వాహక వినియోగదారు మాత్రమే మార్చగలరు."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"కొత్త PIN చెల్లని అక్షరాలను కలిగి ఉంది."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PINని మార్చడం సాధ్యపడలేదు"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"మద్దతులేని సందేశ రకం, వినడానికి <xliff:g id="NUMBER">%s</xliff:g>కి కాల్ చేయండి."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"సెల్యులార్ నెట్‌వర్క్ సెట్టింగ్‌లు"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"మొబైల్ నెట్‌వర్క్ సెట్టింగ్‌లు"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"మొబైల్ నెట్‌వర్క్"</string>
     <string name="label_available" msgid="1181658289009300430">"అందుబాటులో ఉన్న నెట్‌వర్క్‌లు"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"శోధిస్తోంది..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"నెట్‌వర్క్‌లు కనుగొనబడలేదు."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> గరిష్ట పరిమితి మించిపోయింది\nడేటా రేట్ <xliff:g id="USED_1">%2$d</xliff:g> Kb/sకి తగ్గించబడింది"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"సైకిల్‌లో <xliff:g id="USED_0">%1$d</xliff:g>٪ గడిచిపోయింది\nతదుపరి వ్యవధి <xliff:g id="USED_1">%2$d</xliff:g> రోజుల్లో (<xliff:g id="USED_2">%3$s</xliff:g>) ప్రారంభమవుతుంది"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"డేటా వినియోగ పరిమితి మించిపోయినప్పుడు డేటా రేట్ <xliff:g id="USED">%1$d</xliff:g> Kb/sకి తగ్గించబడుతుంది"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"మీ క్యారియర్ యొక్క సెల్యులార్ నెట్‌వర్క్ డేటా వినియోగ విధానం గురించి మరింత సమాచారం"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"మీ క్యారియర్ యొక్క మొబైల్ నెట్‌వర్క్ డేటా వినియోగ విధానం గురించి మరింత సమాచారం"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"సెల్ ప్రసార SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"సెల్ ప్రసార SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"సెల్ ప్రసార SMS ప్రారంభించబడింది"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"పరిచయాన్ని జోడించు"</string>
     <string name="menu_edit" msgid="7143003705504672374">"పరిచయాన్ని సవరించు"</string>
     <string name="menu_delete" msgid="3977150783449642851">"పరిచయాన్ని తొలగించు"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"పరిచయానికి డయల్ చేయి"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2ని టైప్ చేయండి"</string>
     <string name="name" msgid="7329028332786872378">"పేరు"</string>
     <string name="number" msgid="7905950798349903858">"నంబర్"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"ఫిక్స్‌డ్ డయలింగ్ నంబర్‌ను తొలగిస్తోంది..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"ఫిక్స్‌డ్ డయలింగ్ నంబర్ తొలగించబడింది."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"మీరు చెల్లని PINను టైప్ చేసినందున FDN నవీకరించబడలేదు."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"నంబర్ 20 అంకెలను మించి లేనందున FDN నవీకరించబడలేదు."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"నంబర్ ఖాళీగా వదలిపెట్టినందున లేదా 20 అంకెలను మించినందున FDN నవీకరించబడలేదు."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN నవీకరించబడలేదు. PIN2 చెల్లదు లేదా ఫోన్ నంబర్ తిరస్కరించబడింది."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN చర్య విఫలమైంది."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"SIM కార్డు నుండి చదువుతోంది…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"కాల్ చేయడానికి ఎయిర్‌ప్లైన్ మోడ్‌ను ఆఫ్ చేయండి లేదా వైర్‌లెస్ నెట్‌వర్క్‌కు కనెక్ట్ చేయండి."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"సాధారణ కాల్ చేయడానికి అత్యవసర కాల్‌బ్యాక్ మోడ్ నుండి నిష్క్రమించండి."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"నెట్‌వర్క్‌లో నమోదు కాలేదు."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"సెల్యులార్ నెట్‌వర్క్ అందుబాటులో లేదు."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"సెల్యులార్ నెట్‌వర్క్ అందుబాటులో లేదు. కాల్ చేయడానికి వైర్‌లెస్ నెట్‌వర్క్‌కి కనెక్ట్ చేయండి."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"మొబైల్ నెట్‌వర్క్ అందుబాటులో లేదు."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"మొబైల్ నెట్‌వర్క్ అందుబాటులో లేదు. కాల్ చేయడానికి వైర్‌లెస్ నెట్‌వర్క్‌కు కనెక్ట్ చేయండి."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"కాల్ చేయడానికి, చెల్లుబాటు అయ్యే నంబర్‌ను నమోదు చేయండి."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"కాల్ విఫలమైంది."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"ఈ సమయంలో కాల్‌ను జోడించడం సాధ్యపడదు."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI శ్రేణిని ప్రారంభిస్తోంది…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"సేవకు మద్దతు లేదు"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"కాల్‌లను మార్చలేరు."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"కాల్‌ను వేరు చేయలేరు."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"అత్యవసర కాల్‌బ్యాక్ మోడ్‌లోకి ప్రవేశించింది"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"అత్యవసర కాల్‌బ్యాక్ మోడ్"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"డేటా కనెక్షన్ నిలిపివేయబడింది"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> నిమిషాల పాటు డేటా కనెక్షన్ ఉండదు</item>
-      <item quantity="one"><xliff:g id="COUNT_0">%s</xliff:g> నిమిషం పాటు డేటా కనెక్షన్ ఉండదు</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> వరకు డేటా కనెక్షన్ ఉండదు"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">ఫోన్ <xliff:g id="COUNT_1">%s</xliff:g> నిమిషాల పాటు అత్యవసర కాల్‌బ్యాక్ మోడ్‌లో ఉంటుంది. ఈ మోడ్‌లో ఉన్నప్పుడు, డేటా కనెక్షన్‌ను ఉపయోగించే అనువర్తనాలు ఏవీ ఉపయోగించబడవు. మీరు ఇప్పుడు నిష్క్రమించాలనుకుంటున్నారా?</item>
       <item quantity="one">ఫోన్ <xliff:g id="COUNT_0">%s</xliff:g> నిమిషం పాటు అత్యవసర కాల్‌బ్యాక్ మోడ్‌లో ఉంటుంది. ఈ మోడ్‌లో ఉన్నప్పుడు, డేటా కనెక్షన్‌ను ఉపయోగించే అనువర్తనాలు ఏవీ ఉపయోగించబడవు. మీరు ఇప్పుడు నిష్క్రమించాలనుకుంటున్నారా?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"పరిచయాన్ని ఎంచుకోండి"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"వాయిస్ కాలింగ్‌కు మద్దతు లేదు"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"డయల్ చేయి"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"వైబ్రేట్"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"వైబ్రేట్"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"దృశ్యమాన వాయిస్‌మెయిల్"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PINని సెట్ చేయండి"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"PINను మార్చు"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"ధ్వని"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"రింగ్‌టోన్ &amp; వైబ్రేట్"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"అంతర్నిర్మిత SIM కార్డులు"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"వీడియో కాలింగ్‌ని ఆన్ చేయండి"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"సందేశాన్ని డీకోడ్ చేస్తున్నప్పుడు లోపం సంభవించింది."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM కార్డ్ మీ సేవను సక్రియం చేసింది మరియు మీ ఫోన్ రోమింగ్ సామర్థ్యాలను నవీకరించింది."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"చాలా ఎక్కువ కాల్‌లు సక్రియంగా ఉన్నాయి. దయచేసి మరొక కొత్త కాల్ చేసే ముందు ఇప్పటికే ఉన్న కాల్‌లను ముగించండి లేదా విలీనం చేయండి."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"కనెక్ట్ చేయడం సాధ్యపడలేదు, దయచేసి చెల్లుబాటు అయ్యే SIM కార్డ్‌ను చొప్పించండి."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi కనెక్షన్ పోయింది. కాల్ ముగిసింది."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"వాయిస్ మెయిల్ PINని మార్చండి"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"కొనసాగించు"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"రద్దు చేయి"</string>
diff --git a/res/values-th/config.xml b/res/values-th/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-th/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index b71297a..e937887 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"ข้อมูลมือถือ"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"ข้อมูลมือถือ"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"บริการโทรศัพท์"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"โปรแกรมโทรออกฉุกเฉิน"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"โทรศัพท์"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"ไม่มีหมายเลขข้อความเสียง"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"ไม่มีหมายเลขข้อความเสียงจัดเก็บอยู่ในซิมการ์ด"</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"เพิ่มหมายเลข"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"ผู้ใช้หลักเท่านั้นที่สามารถเปลี่ยนการตั้งค่าข้อความเสียงได้"</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"ยกเลิกการปิดกั้นซิมการ์ดแล้ว กำลังปลดล็อกโทรศัพท์ของคุณ..."</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN ปลดล็อกเครือข่ายซิม"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"ปลดล็อก"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"กำลังขอปลดล็อกเครือข่าย..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"คำขอปลดล็อกเครือข่ายไม่สำเร็จ"</string>
     <string name="unlock_success" msgid="6770085622238180152">"ปลดล็อกเครือข่ายไม่สำเร็จ"</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"การตั้งค่าเครือข่ายมือถือไม่พร้อมใช้งานสำหรับผู้ใช้รายนี้"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"การตั้งค่าเครือข่ายมือถือไม่พร้อมใช้งานสำหรับผู้ใช้รายนี้"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"การตั้งค่าการโทร GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"การตั้งค่าการโทร GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"การตั้งค่าการโทร CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"ข้อความเสียง"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"ข้อความเสียง (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"การแจ้งเตือน"</string>
     <string name="networks" msgid="8873030692174541976">"ผู้ให้บริการเครือข่าย"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"การเผยแพร่ข้อมูลฉุกเฉิน"</string>
     <string name="call_settings" msgid="6112441768261754562">"การตั้งค่าการโทร"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"เมื่อติดต่อไม่ได้"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"หมายเลขเมื่อติดต่อไม่ได้"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"โอนสายไปที่ <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"ถูกปิดใช้งาน"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"ปิด"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"ผู้ให้บริการของคุณไม่สนับสนุนการปิดใช้งานการโอนสายเมื่อติดต่อไม่ได้"</string>
     <string name="updating_title" msgid="6146755386174019046">"การตั้งค่าการโทร"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"ผู้ใช้ระดับผู้ดูแลระบบเท่านั้นที่สามารถเปลี่ยนแปลงการตั้งค่าการโทรได้"</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"PIN ใหม่มีอักขระที่ไม่ถูกต้อง"</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"ไม่สามารถเปลี่ยน PIN ได้"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"ไม่รองรับข้อความประเภทนี้ โปรดโทร <xliff:g id="NUMBER">%s</xliff:g> เพื่อฟังข้อความเสียง"</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"การตั้งค่าเครือข่ายมือถือ"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"การตั้งค่าเครือข่ายมือถือ"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"เครือข่ายมือถือ"</string>
     <string name="label_available" msgid="1181658289009300430">"เครือข่ายที่ใช้งานได้"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"กำลังค้นหา…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"ไม่พบเครือข่าย"</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g>เกินจำนวนสูงสุด\nอัตราการส่งข้อมูลถูกลดเหลือ<xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ ของรอบผ่านไป \n ช่วงถัดไปจะเริ่มในอีก <xliff:g id="USED_1">%2$d</xliff:g> วัน (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"อัตราการส่งข้อมูลถูกลดเหลือ <xliff:g id="USED">%1$d</xliff:g> Kb/s เมื่อใช้ข้อมูลเกินขีดจำกัดแล้ว"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"ข้อมูลเพิ่มเติมเกี่ยวกับนโยบายการใช้ข้อมูลผ่านเครือข่ายมือถือของผู้ให้บริการ"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"ข้อมูลเพิ่มเติมเกี่ยวกับนโยบายการใช้ข้อมูลของเครือข่ายมือถือจากผู้ให้บริการของคุณ"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS แจ้งเครือข่ายที่ใช้งาน"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS แจ้งเครือข่ายที่ใช้งาน"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"เปิดการใช้งาน SMS แจ้งเครือข่ายที่ใช้งานแล้ว"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"เพิ่มรายชื่อติดต่อ"</string>
     <string name="menu_edit" msgid="7143003705504672374">"แก้ไขรายชื่อติดต่อ"</string>
     <string name="menu_delete" msgid="3977150783449642851">"ลบรายชื่อติดต่อ"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"โทรติดต่อ"</string>
     <string name="get_pin2" msgid="8204677063922225311">"พิมพ์ PIN2"</string>
     <string name="name" msgid="7329028332786872378">"ชื่อ"</string>
     <string name="number" msgid="7905950798349903858">"หมายเลข"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"กำลังลบการจำกัดหมายเลขโทรออก…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"ลบการจำกัดหมายเลขโทรออกแล้ว"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN ไม่อัปเดตเพราะคุณป้อน PIN ไม่ถูกต้อง"</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN ไม่อัปเดตเพราะหมายเลขจะมีจำนวนเกิน 20 หลักไม่ได้"</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN ไม่อัปเดตเพราะหมายเลขว่างเปล่าหรือมีจำนวนเกิน 20 หลัก"</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"ไม่ได้อัปเดต FDN เพราะ PIN2 ไม่ถูกต้องหรือหมายเลขโทรศัพท์ถูกปฏิเสธ"</string>
     <string name="fdn_failed" msgid="540018079008319747">"การปลดล็อกด้วย FDN ล้มเหลว"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"กำลังอ่านจากซิมการ์ด…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"ปิดโหมดบนเครื่องบินหรือเชื่อมต่อเครือข่ายไร้สายเพื่อโทรออก"</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"โปรดออกจากโหมดการโทรกลับกรณีฉุกเฉินเพื่อโทรไปยังหมายเลขที่ไม่ใช่หมายเลขฉุกเฉิน"</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"ยังไม่ได้ลงทะเบียนบนเครือข่าย"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"เครือข่ายมือถือใช้งานไม่ได้"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"เครือข่ายมือถือไม่พร้อมใช้งาน โปรดเชื่อมต่อเครือข่ายไร้สายเพื่อโทรออก"</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"เครือข่ายมือถือใช้งานไม่ได้"</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"เครือข่ายมือถือไม่พร้อมใช้งาน โปรดเชื่อมต่อเครือข่ายไร้สายเพื่อโทรออก"</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"หากต้องการโทรออก โปรดป้อนหมายเลขที่ถูกต้อง"</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"การโทรล้มเหลว"</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"ไม่สามารถเพิ่มสายได้ในขณะนี้"</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"กำลังเริ่มต้นลำดับ MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"บริการนี้ไม่ได้รับการสนับสนุน"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"ไม่สามารถสลับสายได้"</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"ไม่สามารถแยกสายได้"</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"เข้าสู่โหมดติดต่อกลับฉุกเฉิน"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"โหมดติดต่อกลับฉุกเฉิน"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"ปิดใช้งานการเชื่อมต่อเครือข่าย"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">ไม่มีการเชื่อมต่อข้อมูลนาน <xliff:g id="COUNT_1">%s</xliff:g> นาที</item>
-      <item quantity="one">ไม่มีการเชื่อมต่อข้อมูลนาน <xliff:g id="COUNT_0">%s</xliff:g> นาที</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"ไม่มีการเชื่อมต่ออินเทอร์เน็ตมือถือจนถึง <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">โทรศัพท์จะเข้าโหมดติดต่อกลับฉุกเฉินเป็นเวลา <xliff:g id="COUNT_1">%s</xliff:g> นาที ขณะใช้โหมดนี้ จะไม่สามารถใช้แอปพลิเคชันที่ใช้การเชื่อมต่อข้อมูลได้ คุณต้องการออกตอนนี้ไหม</item>
       <item quantity="one">โทรศัพท์จะเข้าโหมดติดต่อกลับฉุกเฉินเป็นเวลา <xliff:g id="COUNT_0">%s</xliff:g> นาที ขณะใช้โหมดนี้ จะไม่สามารถใช้แอปที่ใช้การเชื่อมต่อข้อมูลได้ คุณต้องการออกตอนนี้ไหม</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"เลือกรายชื่อติดต่อ"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"ไม่สนับสนุนการโทรออกด้วยเสียง"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"หมุนหมายเลข"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"สั่น"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"สั่น"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"ข้อความเสียงพร้อมภาพ"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"ตั้งค่า PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"เปลี่ยน PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"เสียง"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"เสียงเรียกเข้าและสั่น"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"ซิมการ์ดในตัว"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"เปิดแฮงเอาท์วิดีโอ"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"เกิดข้อผิดพลาดขณะถอดรหัสข้อความ"</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"ซิมการ์ดได้เปิดใช้บริการของคุณและอัปเดตความสามารถในการโรมมิ่งของโทรศัพท์"</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"มีสายที่ใช้งานอยู่มากเกินไป โปรดวางสายหรือรวมสายที่มีก่อนโทรออกครั้งใหม่"</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"ไม่สามารถเชื่อมต่อ โปรดใส่ซิมการ์ดที่ถูกต้อง"</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"การเชื่อมต่อ Wi-Fi ถูกตัด วางสายแล้ว"</string>
     <string name="change_pin_title" msgid="7790232089699034029">"เปลี่ยน PIN ข้อความเสียง"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"ดำเนินการต่อ"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"ยกเลิก"</string>
diff --git a/res/values-tl/config.xml b/res/values-tl/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-tl/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index fd07fd7..084039a 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Cellular Data"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Data sa Mobile"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Mga Serbisyo sa Telepono"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Pang-emergency na Dialer"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telepono"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Nawawala ang numero ng voicemail"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Walang nakaimbak na numero ng voicemail sa SIM card."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Magdagdag ng numero"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Maaari lang baguhin ng Pangunahing User ang Mga Setting ng Voicemail."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Naalis sa pagkaka-block ang iyong SIM card. Nag-a-unlock ang iyong telepono…"</string>
     <string name="label_ndp" msgid="780479633159517250">"PIN na pang-unlock ng SIM network"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"I-unlock"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Humihiling ng pag-unlock sa network…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Hindi matagumpay ang kahilingan na i-unlock ang network."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Matagumpay ang pag-unlock ng network."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Hindi available ang mga setting ng cellular network para sa user na ito"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Hindi available ang mga setting ng mobile network para sa user na ito"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Mga setting ng tawag ng GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Mga setting ng tawag gamit ang GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Mga setting ng CDMA na tawag"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Voicemail"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Voicemail (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Mga Notification"</string>
     <string name="networks" msgid="8873030692174541976">"Mga network operator"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Mga pang-emergency na broadcast"</string>
     <string name="call_settings" msgid="6112441768261754562">"Mga setting ng tawag"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Kapag hindi makontak"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Numero kapag hindi makontak"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Pinapasa sa <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Hindi pinagana"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Naka-off"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Hindi sinusuportahan ng iyong carrier ang hindi pagpapagana ng pagpasa ng tawag kapag hindi maabot ang iyong telepono."</string>
     <string name="updating_title" msgid="6146755386174019046">"Mga setting ng tawag"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Ang admin user lang ang maaaring magbago sa mga setting ng tawag."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Ang bagong PIN ay naglalaman ng mga di-wastong character."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Hindi nabago ang PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Hindi sinusuportahang uri ng mensahe, tawagan ang <xliff:g id="NUMBER">%s</xliff:g> upang pakinggan."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Setting ng cellular network"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Mga setting ng mobile network"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobile network"</string>
     <string name="label_available" msgid="1181658289009300430">"Mga available na network"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Naghahanap…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Walang nakitang mga network."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"Ang <xliff:g id="USED_0">%1$s</xliff:g> na maximum ay lumagpas sa\nBinabaan ang rate ng data sa <xliff:g id="USED_1">%2$d</xliff:g> Kb/s"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ ng cycle ay lumagpas sa\nMagsisimula ang susunod na tagal ng panahon sa loob ng <xliff:g id="USED_1">%2$d</xliff:g> (na) araw (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Ibinaba ang rate ng data sa <xliff:g id="USED">%1$d</xliff:g> Kb/s kung nalagpasan ang limitasyon sa paggamit ng data"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Higit pang impormasyon tungkol sa patakaran sa paggamit ng data sa cellular network ng iyong carrier"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Higit pang impormasyon tungkol sa patakaran sa paggamit ng data sa mobile network ng iyong carrier"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Cell Broadcast SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Cell Broadcast SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Pinagana ang Cell Broadcast SMS"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Magdagdag ng contact"</string>
     <string name="menu_edit" msgid="7143003705504672374">"I-edit ang contact"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Tanggalin ang contact"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"I-dial ang contact"</string>
     <string name="get_pin2" msgid="8204677063922225311">"I-type ang PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Pangalan"</string>
     <string name="number" msgid="7905950798349903858">"Numero"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Tinatanggal ang fixed dialing number…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Tinanggal ang fixed dialing number."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Hindi na-update ang FDN dahil maling PIN ang iyong na-type."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Hindi pa na-update ang FDN dahil hindi maaaring humigit sa 20 digit ang numero."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Hindi na-update ang FDN dahil walang inilagay na numero o lampas ito sa 20 digit."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"Hindi na-update ang FDN. Hindi wasto ang PIN2, o tinanggihan ang numero ng telepono."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Nagbigo ang operasyon ng FDN."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Nagbabasa mula sa SIM card…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"I-off ang airplane mode o kumonekta sa isang wireless network upang makatawag."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Lumabas sa emergency callback mode upang makapagsagawa ng hindi pang-emergency na pagtawag."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Hindi nakarehistro sa network."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Hindi available ang cellular network"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Hindi available ang cellular network. Kumonekta sa isang wireless network upang makatawag."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Hindi available ang mobile network."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Hindi available ang mobile network. Kumonekta sa isang wireless network upang tumawag."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Upang tumawag, maglagay ng wastong numero."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Nabigo ang tawag."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Hindi maidaragdag ang tawag sa oras na ito."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Sinisimulan ang pagkakasunud-sunod ng MMI…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Hindi sinusuportahan ang serbisyo"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Hindi mailipat ang mga tawag."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Hindi mapaghiwalay ang tawag"</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Ipinasok na Emergency Callback Mode"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Emergency Callback Mode"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Hindi pinagana ang koneksyon ng data"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">Walang koneksyon ng data sa loob ng <xliff:g id="COUNT_1">%s</xliff:g> minuto</item>
-      <item quantity="other">Walang koneksyon ng data sa loob ng <xliff:g id="COUNT_1">%s</xliff:g> na minuto</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Walang koneksyon sa data hanggang <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">Mapupunta sa Emergency Callback mode ang telepono sa loob ng <xliff:g id="COUNT_1">%s</xliff:g> minuto. Habang nasa mode na ito, walang magagamit na mga application na gumagamit ng koneksyon ng data. Gusto mo bang lumabas ngayon?</item>
       <item quantity="other">Mapupunta sa Emergency Callback mode ang telepono sa loob ng <xliff:g id="COUNT_1">%s</xliff:g> na minuto. Habang nasa mode na ito, walang magagamit na mga application na gumagamit ng koneksyon ng data. Gusto mo bang lumabas ngayon?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"pumili ng contact"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Hindi suportado ang voice calling"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"Mag-dial"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Mag-vibrate"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Mag-vibrate"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Visual Voicemail"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Magtakda ng PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Baguhin ang PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Tunog"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Ringtone at Pag-vibrate"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Mga built-in na SIM card"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"I-on ang video calling"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Nagkaroon ng error habang dine-decode ang mensahe."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Na-activate ng isang SIM card ang iyong serbisyo at na-update ang mga kakayahang roaming ng iyong telepono."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Masyadong maraming aktibong tawag. Mangyaring tapusin o pagsamahin ang mga umiiral na tawag bago gumawa ng bago."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Hindi nakakonekta, pakipasok ang isang wastong SIM card."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Nawala ang koneksyon sa Wi-Fi. Natapos ang tawag."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Baguhin ang PIN sa Voicemail"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Magpatuloy"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Kanselahin"</string>
diff --git a/res/values-tr/config.xml b/res/values-tr/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-tr/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 0b2f01a..4d2e515 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Hücresel Veriler"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobil Veriler"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefon Hizmetleri"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Acil Durum Çeviricisi"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Eksik sesli mesaj numarası"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM kartta depolanan sesli mesaj numarası yok."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Numara ekle"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Sesli Mesaj Ayarları yalnızca Birincil Kullanıcı tarafından değiştirilebilir."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"SIM kartınızın engellemesi kaldırıldı. Telefonunuzun kilidi açılıyor..."</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM ağı kilit açma PIN kodu"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Kilit Aç"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Ağ kilidini açma isteği yapılıyor..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Ağ kilidi açma isteği başarısız."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Ağ kilidi açılamadı."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Bu kullanıcı için hücresel ağ ayarları kullanılamıyor"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Bu kullanıcı için mobil ağ ayarları kullanılamıyor"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM çağrı ayarları"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM çağrı ayarları (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA çağrı ayarları"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Sesli mesaj"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Sesli mesaj (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Bildirimler"</string>
     <string name="networks" msgid="8873030692174541976">"Ağ operatörleri"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Acil durum yayınları"</string>
     <string name="call_settings" msgid="6112441768261754562">"Çağrı ayarları"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Ulaşılamadığında"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Ulaşılamadığında kullanılacak numara"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Şuraya yönlendiriliyor: <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Devre dışı"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Kapalı"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Operatörünüz, telefonunuza ulaşılamadığında çağrı yönlendirmenin devre dışı bırakılmasını desteklemiyor."</string>
     <string name="updating_title" msgid="6146755386174019046">"Çağrı ayarları"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Çağrı ayarları sadece yönetici tarafından değiştirilebilir."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Yeni PIN, geçersiz karakterler içeriyor."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN değiştirilemedi"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Desteklenmeyen mesaj türü. Dinlemek için <xliff:g id="NUMBER">%s</xliff:g> numaralı telefonu arayın."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Hücresel ağ ayarları"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Mobil ağ ayarları"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobil ağ"</string>
     <string name="label_available" msgid="1181658289009300430">"Kullanılabilir ağlar"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Aranıyor..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Hiçbir ağ bulunamadı."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"Maksimum değer <xliff:g id="USED_0">%1$s</xliff:g> aşıldı\nVeri hızı <xliff:g id="USED_1">%2$d</xliff:g> Kb/s\'ye düşürüldü"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"Dönemin tamamlanan bölümü:٪ <xliff:g id="USED_0">%1$d</xliff:g>\nBir sonraki dönem <xliff:g id="USED_1">%2$d</xliff:g> gün sonra başlıyor (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Veri kullanım sınırı aşılırsa veri hızı <xliff:g id="USED">%1$d</xliff:g> Kb/s\'ye düşürülür"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Operatörünüzün hücresel ağ üzerinden veri kullanımı politikası hakkında daha fazla bilgi edinin"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Operatörünüzün mobil ağ üzerinden veri kullanımı politikası hakkında daha fazla bilgi edinin"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Hücre Yayını SMS\'i"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Hücre Yayını SMS\'i"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Hücre Yayını SMS\'si etkinleştirildi"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Kişi ekle"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Kişiyi düzenle"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Kişiyi sil"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Kişiye telefon et"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2\'yi yazın"</string>
     <string name="name" msgid="7329028332786872378">"Ad"</string>
     <string name="number" msgid="7905950798349903858">"Numara"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Sabit arama numarası siliniyor..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Sabit arama numarası silindi."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Yanlış PIN girdiğiniz için FDN güncellenmedi."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Sayı 20 basamaktan uzun olamayacağından FDN güncellenmedi."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Sayı boş veya 20 basamaktan uzun olduğundan FDN güncellenmedi."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN güncellenmedi. PIN2 doğru değildi veya telefon numarası reddedildi."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN işlemi başarısız oldu."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"SIM karttan okunuyor..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Telefon etmek için uçak modunu kapatın veya kablosuz ağa bağlanın."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Acil durum çağrısı dışında bir çağrı yapmak için acil durumda geri aranma modundan çıkın."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Ağda kayıtlı değil."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Hücresel ağ kullanılamıyor."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Hücresel ağ kullanılamıyor. Telefon etmek için kablosuz ağa bağlanın."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mobil ağ kullanılamıyor."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobil ağ kullanılamıyor. Telefon etmek için kablosuz ağa bağlanın."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Arama yapmak için geçerli bir numara girin."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Sesli arama başarısız oldu."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Çağrı şu anda eklenemiyor."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI dizisi başlatılıyor..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Hizmet desteklenmiyor"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Çağrı geçişi yapılamıyor."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Çağrı ayrılamıyor."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Acil Geri Arama Moduna Girildi"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Acil Geri Arama Modu"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Veri bağlantısı devre dışı bırakıldı"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> dakika boyunca veri bağlantısı yok</item>
-      <item quantity="one"><xliff:g id="COUNT_0">%s</xliff:g> dakika boyunca veri bağlantısı yok</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Şu saate kadar veri bağlantısı olmayacak: <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Telefon <xliff:g id="COUNT_1">%s</xliff:g> dakika boyunca bu modda olacak. Bu moddayken veri bağlantısı kullanan hiçbir uygulama kullanılamaz. Şimdi çıkmak istiyor musunuz?</item>
       <item quantity="one">Telefon <xliff:g id="COUNT_0">%s</xliff:g> dakika boyunca bu modda olacak. Bu moddayken veri bağlantısı kullanan hiçbir uygulama kullanılamaz. Şimdi çıkmak istiyor musunuz?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"kişi seçin"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Sesli arama desteklenmiyor"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"çevir"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Titreşim"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Titreşim"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Görsel Sesli Mesaj"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN\'i ayarlayın"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"PIN\'i değiştirin"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Ses"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Zil Sesi ve Titreşim"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Yerleşik SIM kartlar"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Video görüşmesini aç"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"İletinin kodu çözülürken bir hata oluştu."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Bir SIM kart, hizmetinizi etkinleştirdi ve telefonunuzun dolaşım özelliklerini güncelledi."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Etkin çağrıların sayısı çok fazla. Yeni bir çağrı yapmadan önce lütfen mevcut çağrıları sonlandırın veya birleştirin."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Bağlantı kurulamadı. Lütfen geçerli bir SIM kart takın."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Kablosuz bağlantı koptu. Çağrı sona erdi."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Sesli Mesaj PIN\'ini Değiştirin"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Devam"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"İptal"</string>
diff --git a/res/values-uk/config.xml b/res/values-uk/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-uk/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index 85a0bac..d0ba741 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Мобільні дані"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Мобільні дані"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Телефонні служби"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Аварійний телефон"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Телефон"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Відстуній номер голосової пошти"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"На SIM-карті немає збереж. номерів голос. пошти."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Додати номер"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Налаштування голосової пошти може змінювати лише основний користувач."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Вашу SIM-карту розблоковано. Ваш телефон розблоковується..."</string>
     <string name="label_ndp" msgid="780479633159517250">"Розбл. PIN-код мережі SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Розблок."</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Запитув. розблок. мережі..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Не здійсн. запит розблокування мережі"</string>
     <string name="unlock_success" msgid="6770085622238180152">"Мережу успішно розблоковано."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Налаштування мобільної мережі недоступні для цього користувача"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Налаштування мобільної мережі недоступні для цього користувача"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Налаштування викликів GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Налаштування викликів GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Налашт. викл. в CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Голосова пошта"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Голосова пошта (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"ГП:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Сповіщення"</string>
     <string name="networks" msgid="8873030692174541976">"Оператори мережі"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Повідомлення екстрених служб"</string>
     <string name="call_settings" msgid="6112441768261754562">"Виклики"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Коли недоступно"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Переадресовувати на цей номер"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Переадресація на <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Вимкнено"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Вимкнено"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Ваш оператор не підтримує вимкнення переадресації викликів, коли телефон недосяжний."</string>
     <string name="updating_title" msgid="6146755386174019046">"Налаштування викликів"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Налаштування викликів може змінювати лише адміністратор."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Новий PIN-код містить недійсні символи"</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Не вдалося змінити PIN-код"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Повідомлення непідтримуваного типу. Зателефонуйте на номер <xliff:g id="NUMBER">%s</xliff:g>, щоб прослухати."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Налаштування моб. мереж"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Налаштування мобільної мережі"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Мобільна мережа"</string>
     <string name="label_available" msgid="1181658289009300430">"Доступні мережі"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Пошук…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Не знайд. жодних мереж."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> макс. перевищ.\nШв. перед. дан. скор. до <xliff:g id="USED_1">%2$d</xliff:g> КБ/сек"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ з циклу здійсн.\nНаст. період почин. через <xliff:g id="USED_1">%2$d</xliff:g> дн. (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Шв. перед. скор. до <xliff:g id="USED">%1$d</xliff:g> КБ/сек, якщо перев. ліміт викор. даних"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Докладніше про політику використання мобільних даних вашого оператора"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Докладніше про політику викор. даних мобільної мережі вашого оператора"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Ф-ц. Cell Broadcast SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Ф-ц. Cell Broadcast SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Ф-ц/ Cell Broadcast SMS увімк."</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Додати контакт"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Змінити контакт"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Видалити контакт"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Зателефонувати контакту"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Введіть PIN2-код"</string>
     <string name="name" msgid="7329028332786872378">"Ім\'я"</string>
     <string name="number" msgid="7905950798349903858">"Номер"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Видалення номеру фікс. набору…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Номер фікс. набору видалено."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"Фіксований номер (FDN) не оновлено, оскільки введено неправильний PIN-код."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"Фіксований номер (FDN) не оновлено, оскільки кількість цифр не може перевищувати 20."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN не оновлено (номер не вказаний або довший за 20 цифр)."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"Фіксований номер (FDN) не оновлено. PIN2-код неправильний або номер телефону відхилено."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Помилка набору фіксованого номера."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Читання із SIM-карти…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Щоб зателефонувати, вимкніть режим польоту або під’єднайтеся до бездротової мережі."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Щоб зателефонувати на звичайний номер, вимкніть режим екстрених викликів."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Не зареєстровано в мережі."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Мобільна мережа недоступна."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Мобільна мережа недоступна. Щоб зателефонувати, під’єднайтеся до бездротової мережі."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Мобільна мережа недоступна."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Мобільна мережа недоступна. Щоб зателефонувати, під’єднайтеся до бездротової мережі."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Щоб зателефонувати, введіть дійсний номер."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Не вдалося здійснити виклик."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Зараз не можна додати виклик."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Запуск ряду MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Служба не підтримується"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Неможливо переключитися між викликами."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Неможливо розділити виклик."</string>
@@ -524,12 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Увійд. в реж. авар. зворот. виклику"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Реж. авар. зворот. виклику"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Передавання даних вимкнено"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">Передавання даних недоступне протягом <xliff:g id="COUNT_1">%s</xliff:g> хвилини</item>
-      <item quantity="few">Передавання даних недоступне протягом <xliff:g id="COUNT_1">%s</xliff:g> хвилин</item>
-      <item quantity="many">Передавання даних недоступне протягом <xliff:g id="COUNT_1">%s</xliff:g> хвилин</item>
-      <item quantity="other">Передавання даних недоступне протягом <xliff:g id="COUNT_1">%s</xliff:g> хвилин</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Немає мобільного Інтернету до <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">Телефон перебуватиме в режимі екстреного виклику протягом <xliff:g id="COUNT_1">%s</xliff:g> хвилини. У цьому режимі не працюватимуть додатки, які передають дані. Вийти?</item>
       <item quantity="few">Телефон перебуватиме в режимі екстреного виклику протягом <xliff:g id="COUNT_1">%s</xliff:g> хвилин. У цьому режимі не працюватимуть додатки, які передають дані. Вийти?</item>
@@ -557,12 +555,9 @@
     <string name="selectContact" msgid="781975788478987237">"вибрати контакт"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Голосові дзвінки не підтримуються"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"дзвонити"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Вібросигнал"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Вібросигнал"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Візуальна голосова пошта"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Установити PIN-код"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Змінити PIN-код"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Звук"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Сигнал дзвінка та вібросигнал"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Вбудовані SIM-карти"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Увімкнути відеодзвінки"</string>
@@ -579,6 +574,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Під час розшифрування повідомлення сталася помилка."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Коли ви вставили SIM-карту, було активовано мобільний зв’язок і оновлено можливості роумінгу вашого телефона."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Забагато активних викликів. Перш ніж зателефонувати новому абоненту, завершіть або об’єднайте поточні виклики."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Не вдається підключитися. Вставте дійсну SIM-карту."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Утрачено з’єднання Wi-Fi. Виклик завершено."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Змінити PIN-код голосової пошти"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Продовжити"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Скасувати"</string>
diff --git a/res/values-ur-rPK/arrays.xml b/res/values-ur/arrays.xml
similarity index 100%
rename from res/values-ur-rPK/arrays.xml
rename to res/values-ur/arrays.xml
diff --git a/res/values-ur/config.xml b/res/values-ur/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-ur/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-ur-rPK/strings.xml b/res/values-ur/strings.xml
similarity index 96%
rename from res/values-ur-rPK/strings.xml
rename to res/values-ur/strings.xml
index f46332b..6e69fad 100644
--- a/res/values-ur-rPK/strings.xml
+++ b/res/values-ur/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"سیلولر ڈیٹا"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"موبائل ڈیٹا"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"فون سروسز"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"ہنگامی ڈائلر"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"فون"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"صوتی میل نمبر درج نہیں ہے"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"‏SIM کارڈ پر کوئی بھی صوتی میل نمبر اسٹور نہیں ہے۔"</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"نمبر شامل کریں"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"صرف بنیادی صارف ہی صوتی میل کی ترتیبات تبدیل کر سکتا ہے۔"</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"‏آپ کا SIM کارڈ غیر مسدود ہوگیا ہے۔ آپ کا فون غیر مقفل ہو رہا ہے…"</string>
     <string name="label_ndp" msgid="780479633159517250">"‏SIM نیٹ ورک غیر مقفل کرنے کا PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"غیر مقفل کریں"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"نیٹ ورک غیر مقفل کرنے کی درخواست کر رہا ہے…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"نیٹ ورک غیر مقفل کرنے کی درخواست ناکام ہوگئی۔"</string>
     <string name="unlock_success" msgid="6770085622238180152">"نیٹ ورک غیر مقفل کرنا کامیاب رہا۔"</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"اس صارف کیلئے سیلولر نیٹ ورک کی ترتیبات دستیاب نہیں ہیں"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"اس صارف کیلئے موبائل نیٹ ورک کی ترتیبات دستیاب نہیں ہیں"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"‏GSM کال کی ترتیبات"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"‏GSM کال کی ترتیبات (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"‏CDMA کال کی ترتیبات"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"صوتی میل"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"صوتی میل (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"اطلاعات"</string>
     <string name="networks" msgid="8873030692174541976">"نیٹ ورک آپریٹرز"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"ہنگامی براڈکاسٹس"</string>
     <string name="call_settings" msgid="6112441768261754562">"کال کی ترتیبات"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"ناقابل رسائی ہونے پر"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"ناقابل رسائی ہونے پر نمبر"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> کو آگے بھیج رہا ہے"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"غیر فعال"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"آف"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"آپ کا کیریئر آپ کا فون ناقابل رسائی ہونے پر کال آگے منتقل کرنے کو غیر فعال کرنے کا تعاون نہیں کرتا ہے۔"</string>
     <string name="updating_title" msgid="6146755386174019046">"کال کی ترتیبات"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"صرف منتظم صارف ہی کال کی ترتیبات تبدیل کر سکتا ہے۔"</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"‏نئے PIN میں غلط کریکٹرز شامل ہیں۔"</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"‏PIN تبدیل کرنے سے قاصر"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"پیغام کی غیر تعاون یافتہ قسم، سننے کیلئے <xliff:g id="NUMBER">%s</xliff:g> پر کال کریں۔"</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"سیلولر نیٹ ورک کی ترتیبات"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"موبائل نیٹ ورک کی ترتیبات"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"موبائل نیٹ ورک"</string>
     <string name="label_available" msgid="1181658289009300430">"دستیاب نیٹ ورکس"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"تلاش کر رہا ہے…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"کوئی نیٹ ورکس نہیں ملے۔"</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"‏<xliff:g id="USED_0">%1$s</xliff:g> زیادہ سے زیادہ سے تجاوز کرگیا\nڈیٹا کی شرح گھٹ کر <xliff:g id="USED_1">%2$d</xliff:g> Kb/s ہوگئی"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ از دور ختم ہوگیا\nاگلی مدت <xliff:g id="USED_1">%2$d</xliff:g> دنوں میں شروع ہو گی (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"‏اگر ڈیٹا کے استعمال کی حد سے تجاوز ہو جاتا ہے تو ڈیٹا شرح گھٹ کر <xliff:g id="USED">%1$d</xliff:g> Kb/s ہوجاتی ہے"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"آپ کے کیریئر کے سیلولر نیٹ ورک کے ڈیٹا کے استعمال کی پالیسی کے بارے میں مزید معلومات"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"آپ کے کیریئر کے موبائل نیٹ ورک کے ڈیٹا کے استعمال کی پالیسی کے بارے میں مزید معلومات"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"‏سیل نشریہ SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"‏سیل نشریہ SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"‏سیل نشریہ SMS فعال ہوگیا"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"رابطہ شامل کریں"</string>
     <string name="menu_edit" msgid="7143003705504672374">"رابطہ میں ترمیم کریں"</string>
     <string name="menu_delete" msgid="3977150783449642851">"رابطہ حذف کریں"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"رابطہ ڈائل کریں"</string>
     <string name="get_pin2" msgid="8204677063922225311">"‏PIN2 ٹائپ کریں"</string>
     <string name="name" msgid="7329028332786872378">"نام"</string>
     <string name="number" msgid="7905950798349903858">"نمبر"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"فکسڈ ڈائلنگ نمبر حذف کر رہا ہے…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"فکسڈ ڈائلنگ نمبر حذف ہوگیا۔"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"‏FDN اپ ڈیٹ نہیں ہوا تھا کیونکہ آپ نے ایک غلط PIN ٹائپ کر دیا۔"</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"‏FDN اپ ڈیٹ نہیں ہوا تھا کیونکہ نمبر 20 ہندسوں سے زائد نہیں ہوسکتا۔"</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"‏FDN اپ ڈیٹ نہیں ہوا کیونکہ نمبر خالی ہے یا 20 ہندسوں سے زائد ہے۔"</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"‏FDN اپ ڈیٹ نہیں ہوا تھا کیونکہ PIN2 غلط تھا یا فون نمبر مسترد کر دیا گیا تھا۔"</string>
     <string name="fdn_failed" msgid="540018079008319747">"‏FDN کا عمل ناکام ہوگیا۔"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"‏SIM کارڈ سے پڑھ رہا ہے…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"کال کرنے کیلئے ہوائی جہاز وضع آف کریں یا کسی وائرلیس نیٹ ورک سے منسلک ہوں۔"</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"غیر ہنگامی کال کرنے کیلئے ہنگامی کال بیک موڈ سے اخراج کریں۔"</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"نیٹ ورک پر رجسٹرڈ نہیں ہے۔"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"سیلولر نیٹ ورک دستیاب نہیں ہے۔"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"سیلولر نیٹ ورک دستیاب نہیں ہے۔ کال کرنے کیلئے کسی وائرلیس نیٹ ورک سے منسلک ہوں۔"</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"موبائل نیٹ ورک دستیاب نہیں ہے۔"</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"موبائل نیٹ ورک دستیاب نہیں ہے۔ کال کرنے کیلئے کسی وائرلیس نیٹ ورک سے منسلک ہوں۔"</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"کال کرنے کیلئے، ایک درست نمبر درج کریں۔"</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"کال ناکام ہوگئی۔"</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"اس وقت کال شامل نہیں ہو سکتی۔"</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"‏MMI ترتیب شروع ہو رہی ہے…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"سروس تعاون یافتہ نہیں ہے"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"کالز سوئچ نہیں کر سکتے۔"</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"کال کو الگ نہیں کر سکتے۔"</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"ہنگامی کال بیک طرز میں داخل ہو گیا"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"ہنگامی کال بیک طرز"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"ڈیٹا کنکشن غیر فعال ہوگیا"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> منٹ تک کوئی ڈیٹا کنکشن نہیں ہے</item>
-      <item quantity="one"><xliff:g id="COUNT_0">%s</xliff:g> منٹ تک کوئی ڈیٹا کنکشن نہیں ہے</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> تک کوئی ڈیٹا کنکشن نہیں"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">فون <xliff:g id="COUNT_1">%s</xliff:g> منٹ تک ہنگامی کال بیک وضع میں رہے گا۔ اس وضع میں رہتے ہوئے ڈیٹا کنکشن کا استعمال کرنے والی کسی بھی ایپلیکیشنز کا استعمال نہیں کیا جا سکتا ہے۔ کیا آپ ابھی باہر نکلنا چاہتے ہیں؟</item>
       <item quantity="one">فون <xliff:g id="COUNT_0">%s</xliff:g> منٹ تک ہنگامی کال بیک وضع میں رہے گا۔ اس وضع میں رہتے ہوئے ڈیٹا کنکشن کا استعمال کرنے والی کسی بھی ایپس کا استعمال نہیں کیا جا سکتا ہے۔ کیا آپ ابھی باہر نکلنا چاہتے ہیں؟</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"رابطہ منتخب کریں"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"صوتی کالنگ تعاون یافتہ نہیں ہے"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"ڈائل کریں"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"وائبریٹ"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"وائبریٹ"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"بصری صوتی میل"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"‏PIN سیٹ کریں"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"‏PIN تبدیل کریں"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"آواز"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"رنگ ٹون اور وائبریٹ"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"‏پہلے سے شامل SIM کارڈز"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"ویڈیو کالنگ کو آن کریں"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"پیغام کو ڈیکوڈ کرتے وقت ایک خرابی پیش آ گئی۔"</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"‏ایک SIM کارڈ نے آپ کی سروس فعال کر دی ہے اور آپ کے فون کی رومنگ اہلیتیں اپ ڈیٹ کر دی ہیں۔"</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"بہت زیادہ فعال کالیں ہیں۔ براہ کرم نئی کال کرنے سے پہلے موجودہ کالوں کو ضم کریں یا ختم کریں۔"</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"‏منسلک کرنے سے قاصر، براہ کرم ایک درست SIM کارڈ داخل کریں۔"</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"‏Wi-Fi کنکشن کھو گیا۔ کال ختم ہو گئی۔"</string>
     <string name="change_pin_title" msgid="7790232089699034029">"‏صوتی میل PIN تبدیل کریں"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"جاری رکھیں"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"منسوخ کریں"</string>
diff --git a/res/values-uz-rUZ/arrays.xml b/res/values-uz/arrays.xml
similarity index 100%
rename from res/values-uz-rUZ/arrays.xml
rename to res/values-uz/arrays.xml
diff --git a/res/values-uz/config.xml b/res/values-uz/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-uz/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-uz-rUZ/strings.xml b/res/values-uz/strings.xml
similarity index 96%
rename from res/values-uz-rUZ/strings.xml
rename to res/values-uz/strings.xml
index cfdedad..f6d3934 100644
--- a/res/values-uz-rUZ/strings.xml
+++ b/res/values-uz/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Mobil internet"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Mobil internet"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Telefon – xizmatlar"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Favqulodda chaqiruv"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Telefon"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Ovozli pochta raqami ko‘rsatilmagan"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM kartada birorta ham ovozli pochta raqami yo‘q."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Raqam qo‘shish"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Ovozli pochta sozlamalarini faqat bosh foydalanuvchi o‘zgartira oladi."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"To‘sib qo‘yilgan SIM kartangiz ochildi. Telefoningiz qulfdan chiqarilmoqda…"</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM kartani tarmoqdagi qulfidan chiqarish PIN kodi"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Qulfdan chiqarish"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Tarmoqni qulfdan chiqarish so‘ralmoqda…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Tarmoqni qulfdan chiqarish so‘rovi muvaffaqiyatli amalga oshmadi."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Tarmoqni qulfdan chiqarish muvaffaqiyatli amalga oshdi."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Ushbu foydalanuvchi uchun mobil tarmoq sozlamalari mavjud emas"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Ushbu foydalanuvchi uchun mobil tarmoq sozlamalari mavjud emas"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM tarmog‘i qo‘ng‘iroq sozlamalari"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM qo‘ng‘iroq sozlamalari (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA qo‘ng‘iroq sozlamalari"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Ovozli pochta"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Ovozli pochta (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Bildirishnomalar"</string>
     <string name="networks" msgid="8873030692174541976">"Tarmoq operatorlari"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Favqulodda tarqatma xabarlar"</string>
     <string name="call_settings" msgid="6112441768261754562">"Chaqiruv sozlamalari"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Agar raqamga tushib bo‘lmasa"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Ushbu raqamga yo‘naltirilsin"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"<xliff:g id="PHONENUMBER">{0}</xliff:g> raqamiga yo‘naltiriladi"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"O‘chiq"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"O‘chiq"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Telefoningiz o‘chiq bo‘lganida qo‘ng‘iroqlarni boshqa raqamga yo‘naltirishni o‘chirish xususiyati tarmoq operatoringizda yo‘q."</string>
     <string name="updating_title" msgid="6146755386174019046">"Chaqiruv sozlamalari"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Faqat administrator qo‘ng‘iroq sozlamalarini o‘zgartirishi mumkin."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Yangi PIN kodda yaroqsiz belgilar mavjud."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"PIN kodni o‘zgartirib bo‘lmadi"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Bu xabar turi qo‘llab-quvvatlanmaydi. Uni eshitish uchun <xliff:g id="NUMBER">%s</xliff:g> raqamiga qo‘ng‘iroq qiling."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Mobil tarmoq sozlamalari"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Uyali tarmoq sozlamalari"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mobil tarmoq"</string>
     <string name="label_available" msgid="1181658289009300430">"Mavjud tarmoqlar"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Qidirilmoqda…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Birorta ham tarmoq topilmadi."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"<xliff:g id="USED_0">%1$s</xliff:g> maksimal darajadan oshib ketdi\nTrafik tezligi <xliff:g id="USED_1">%2$d</xliff:g> Kb/s’ga pasaydi"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ o‘tgan bosqichdan\nKeyingi bosqich <xliff:g id="USED_1">%2$d</xliff:g> kunda boshlanadi (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Agar trafik sarfi cheklovdan oshsa, ma’lumot uzatish tezligi <xliff:g id="USED">%1$d</xliff:g> Kb/s’ga pasayadi"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Aloqa operatoringizning mobil internetidan foydalanish qoidalari haqida batafsil ma’lumot"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Tarmoq operatoringizning uyali tarmoq ma’lumotidan foydalanish siyosati haqida ko‘proq ma’lumot"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"Uyali tarmoqdagi SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"Uyali tarmoqdagi SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Uyali tarmoqdagi SMS yoqilb qo‘yilgan"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Kontakt saqlash"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Kontaktni tahrirlash"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Kontaktni o‘chirish"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Kontaktga qo‘ng‘iroq qilish"</string>
     <string name="get_pin2" msgid="8204677063922225311">"PIN2 kodni kiriting"</string>
     <string name="name" msgid="7329028332786872378">"Nomi"</string>
     <string name="number" msgid="7905950798349903858">"Raqam"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Ruxsat berilgan raqamlar o‘chirilmoqda…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Ruxsat berilgan raqamlar o‘chirildi."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN yangilanmadi, chunki siz PIN-kodni noto‘g‘ri kiritdingiz."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN yangilanmadi, chunki raqam 20 tadan oshmasligi kerak."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"Ruxsat etilgan raqam bo‘sh yoki o‘rnatilgan 20 xonali cheklovdan oshganligi uchun yangilanmadi."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN yangilanmadi. PIN2 kodi xato yoki telefon raqami rad qilingan."</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN jarayoni amalga oshmadi."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"SIM-kartadan o‘qilmoqda…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Qo‘ng‘iroq qilish uchun parvoz rejimini o‘chiring yoki simsiz tarmoqqa ulaning."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Odatiy qo‘ng‘iroq qilish uchun favqulodda qayta qo‘ng‘iroq rejimidan chiqing."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Tarmoqda ro‘yxatdan o‘tmagan."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Mobil tarmoq mavjud emas."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Mobil tarmoq mavjud emas. Qo‘ng‘iroq qilish uchun simsiz tarmoqqa ulaning."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Uyali tarmoq mavjud emas."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Mobil tarmoqdan foydalanib bo‘lmaydi. Qo‘ng‘iroq qilish uchun Wi-Fi tarmog‘iga ulaning."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Qo‘ng‘iroq qilish uchun raqamni to‘g‘ri kiriting."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Qo‘ng‘iroq amalga oshmadi."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Hozirgi vaqtda qo‘ng‘iroq qo‘shib bo‘lmaydi."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"MMI tartibi ishga tushmoqda..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Bu xizmat qo‘llab-quvvatlanmaydi"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Qo‘ng‘iroqlarni almashtirib bo‘lmadi."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Qo‘ng‘iroqni ajratib bo‘lmadi."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Favqulodda teskari qo‘ng‘iroq rejimi kiritildi"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Favqulodda teskari qo‘ng‘iroq rejimi"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Internetga ulanish o‘chirildi"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other"><xliff:g id="COUNT_1">%s</xliff:g> daqiqa davomida internetga ulanib bo‘lmaydi</item>
-      <item quantity="one"><xliff:g id="COUNT_0">%s</xliff:g> daqiqa davomida internetga ulanib bo‘lmaydi</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> gacha internetga ulanib bo‘lmaydi"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Telefon <xliff:g id="COUNT_1">%s</xliff:g> daqiqa davomida Favqulodda teskari qo‘ng‘iroq rejimida bo‘ladi. Ushbu rejimda internet bilan ishlaydigan hech qanday ilovadan foydalanib bo‘lmaydi. Bu rejimdan chiqishni xohlaysizmi?</item>
       <item quantity="one">Telefon <xliff:g id="COUNT_0">%s</xliff:g> daqiqa davomida Favqulodda teskari qo‘ng‘iroq rejimida bo‘ladi. Ushbu rejimda internet bilan ishlaydigan hech qanday ilovadan foydalanib bo‘lmaydi. Bu rejimdan chiqishni xohlaysizmi?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"kontaktni tanlash"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Ovozli qo‘ng‘iroq ishlamaydi"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"terish"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Tebranish"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Tebratish"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Vizual ovozli pochta"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"PIN kodni o‘rnatish"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"PIN kodni o‘zgartirish"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Ovoz"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Qo‘ng‘iroq ohangi &amp; tebranish"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Ichki o‘rnatilgan SIM kartalar"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Video qo\'ng\'iroqni yoqib qo\'yish"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Xabarni kodsizlashda xatolik yuz berdi."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Telefoningizda rouming xizmati sozlangan va SIM karta faollashtirilgan."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Hozir bir nechta qo‘ng‘iroqlar amalda. Boshqa abonentga qo‘ng‘iroq qilishdan avval, amaldagi qo‘ng‘iroqlarni tugating yoki ularni konferens-aloqaga birlashtiring."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Ulanishda xato. Mos SIM kartani soling."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi tarmog‘iga ulanish uzildi va qo‘ng‘iroq tugatildi."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Ovozli pochta PIN kodini o‘zgartirish"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Davom etish"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Bekor qilish"</string>
diff --git a/res/values-vi/config.xml b/res/values-vi/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-vi/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 5b5cb9b..f88b178 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Dữ liệu di động"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Dữ liệu di động"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Dịch vụ điện thoại"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Trình quay số Khẩn cấp"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Điện thoại"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Thiếu số thư thoại"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Không có số thư thoại nào được lưu trữ trên thẻ SIM."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Thêm số điện thoại"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Chỉ người dùng chính mới có thể sửa đổi Cài đặt thư thoại."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Thẻ SIM của bạn đã được bỏ chặn. Điện thoại của bạn đang mở khóa…"</string>
     <string name="label_ndp" msgid="780479633159517250">"Mã PIM mở khóa mạng SIM"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Mở khóa"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Đang yêu cầu mở khóa mạng..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Yêu cầu mở khóa mạng không thành công."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Mở khóa mạng thành công."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Không có cài đặt mạng di động cho người dùng này"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Cài đặt mạng di động không khả dụng cho người dùng này"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Cài đặt cuộc gọi GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Cài đặt cuộc gọi GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Cài đặt cuộc gọi CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Thư thoại"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Thư thoại (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"Thư thoại:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Thông báo"</string>
     <string name="networks" msgid="8873030692174541976">"Nhà cung cấp dịch vụ mạng"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Phát sóng trong tình huống khẩn cấp"</string>
     <string name="call_settings" msgid="6112441768261754562">"Cài đặt cuộc gọi"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Khi không liên lạc được"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Số khi không liên lạc được"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Chuyển tiếp tới <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Đã tắt"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Tắt"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Nhà cung cấp dịch vụ của bạn không hỗ trợ vô hiệu hóa chuyển tiếp cuộc gọi khi điện thoại của bạn không thể truy cập được."</string>
     <string name="updating_title" msgid="6146755386174019046">"Cài đặt cuộc gọi"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Chỉ người dùng quản trị mới có thể thay đổi cài đặt cuộc gọi."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"Mã PIN mới chứa các ký tự không hợp lệ."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Không thể thay đổi mã PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Loại tin nhắn không được hỗ trợ, hãy gọi số <xliff:g id="NUMBER">%s</xliff:g> để nghe."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Cài đặt mạng di động"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Cài đặt mạng di động"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Mạng di động"</string>
     <string name="label_available" msgid="1181658289009300430">"Mạng khả dụng"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Đang tìm kiếm…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Không tìm thấy mạng nào."</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"Đã vượt quá tối đa <xliff:g id="USED_0">%1$s</xliff:g>\nTốc độ dữ liệu bị giảm xuống <xliff:g id="USED_1">%2$d</xliff:g> Kb/giây"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"<xliff:g id="USED_0">%1$d</xliff:g>٪ của chu kỳ đã qua\nThời gian tiếp theo sẽ bắt đầu trong <xliff:g id="USED_1">%2$d</xliff:g> ngày (<xliff:g id="USED_2">%3$s</xliff:g>)"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Tốc độ dữ liệu bị giảm xuống <xliff:g id="USED">%1$d</xliff:g> Kb/s nếu vượt quá giới hạn sử dụng dữ liệu"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Thông tin thêm về chính sách sử dụng dữ liệu mạng di động của nhà cung cấp dịch vụ của bạn"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Thêm thông tin về chính sách sử dụng dữ liệu mạng dành cho điện thoại di động của nhà cung cấp dịch vụ của bạn"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"SMS Phát trên Di động"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"SMS Phát trên Di động"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"Đã bật SMS Phát trên Di động"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Thêm liên hệ"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Chỉnh sửa liên hệ"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Xóa liên hệ"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Quay số liên hệ"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Nhập PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Tên"</string>
     <string name="number" msgid="7905950798349903858">"Số"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Đang xóa số quay định sẵn…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Đã thêm số quay định sẵn."</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"FDN không được cập nhật do bạn đã nhập PIN không chính xác."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"FDN chưa được cập nhật do số đã vượt quá 20 chữ số."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"FDN chưa được cập nhật do số trống hoặc vượt quá 20 chữ số."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN không được cập nhật. Mã PIN2 không đúng hoặc số điện thoại đã bị từ chối."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Thao tác FDN không thành công."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Đang đọc từ thẻ SIM…"</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Tắt chế độ trên máy bay hoặc kết nối với mạng không dây để thực hiện cuộc gọi."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Thoát khỏi chế độ gọi lại khẩn cấp để thực hiện cuộc gọi không khẩn cấp."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Chưa được đăng ký trên mạng."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Không có mạng di động."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Hiện không có mạng di động. Hãy kết nối với mạng không dây để thực hiện cuộc gọi."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Mạng di động không khả dụng."</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Hiện không có mạng di động. Hãy kết nối với mạng không dây để thực hiện cuộc gọi."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Để thực hiện cuộc gọi, hãy nhập một số hợp lệ."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Cuộc gọi không thành công."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Không thể thêm cuộc gọi tại thời điểm này."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Khởi động chuỗi MMI…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Dịch vụ không được hỗ trợ"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Không chuyển đổi được cuộc gọi."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Không tách được cuộc gọi."</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Đã vào Chế độ Gọi lại Khẩn cấp"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Chế độ Gọi lại Khẩn cấp"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Đã tắt kết nối mạng"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">Không có kết nối dữ liệu trong <xliff:g id="COUNT_1">%s</xliff:g> phút</item>
-      <item quantity="one">Không có kết nối dữ liệu trong <xliff:g id="COUNT_0">%s</xliff:g> phút</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Không có kết nối dữ liệu cho đến <xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">Điện thoại sẽ ở chế độ Gọi lại khẩn cấp trong <xliff:g id="COUNT_1">%s</xliff:g> phút. Khi ở chế độ này, không thể dùng bất kỳ ứng dụng nào sử dụng kết nối dữ liệu. Bạn có muốn thoát chế độ này ngay bây giờ không?</item>
       <item quantity="one">Điện thoại sẽ ở chế độ Gọi lại khẩn cấp trong <xliff:g id="COUNT_0">%s</xliff:g> phút. Khi ở chế độ này, không thể dùng bất kỳ ứng dụng nào sử dụng kết nối dữ liệu. Bạn có muốn thoát chế độ này ngay bây giờ không?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"chọn địa chỉ liên hệ"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Không hỗ trợ tính năng gọi thoại"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"quay số"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Rung"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Rung"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Thư thoại kèm theo hình ảnh"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Đặt mã PIN"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Thay đổi mã PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Âm thanh"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Nhạc chuông và rung"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Thẻ SIM tích hợp sẵn"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Bật gọi điện video"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Đã xảy ra lỗi khi giải mã tin nhắn."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Thẻ SIM đã kích hoạt dịch vụ của bạn và đã cập nhật chức năng chuyển vùng của điện thoại."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Có quá nhiều cuộc gọi hiện hoạt. Vui lòng kết thúc hoặc hợp nhất các cuộc gọi hiện có trước khi thực hiện cuộc gọi mới."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Không thể kết nối, vui lòng lắp thẻ SIM hợp lệ."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Mất kết nối Wi-Fi. Đã kết thúc cuộc gọi."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Thay đổi mã PIN thư thoại"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Tiếp tục"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Hủy"</string>
diff --git a/res/values-zh-rCN/config.xml b/res/values-zh-rCN/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-zh-rCN/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index a72ebca..220acee 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"移动数据网络"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"移动数据"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"电话服务"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"紧急拨号器"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"电话"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"缺少语音信箱号码"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM卡上未存储语音信箱号码。"</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"添加号码"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"只有主用户才能修改语音信箱设置。"</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"您的SIM卡已解锁。正在解锁您的手机..."</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM网络解锁PIN码"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"解锁"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"正在请求网络解锁..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"网络解锁请求失败。"</string>
     <string name="unlock_success" msgid="6770085622238180152">"网络解锁成功。"</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"此用户无法修改移动网络设置"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"此用户无法修改移动网络设置"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM 通话设置"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM 通话设置(<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA 通话设置"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"语音信箱"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"语音信箱(<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"语音信箱:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"通知"</string>
     <string name="networks" msgid="8873030692174541976">"网络运营商"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"紧急广播"</string>
     <string name="call_settings" msgid="6112441768261754562">"通话设置"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"无法接通时"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"无法接通时的转接号码"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"转接到 <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"未启用"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"关闭"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"您的运营商不支持在手机无法接通时停用来电转接功能。"</string>
     <string name="updating_title" msgid="6146755386174019046">"通话设置"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"只有管理员用户才能更改通话设置。"</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"新的 PIN 码包含无效字符。"</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"无法更改 PIN 码"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"不受支持的语音邮件类型,请拨打 <xliff:g id="NUMBER">%s</xliff:g> 收听。"</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"移动网络设置"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"移动网络设置"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"移动网络"</string>
     <string name="label_available" msgid="1181658289009300430">"可用网络"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"正在搜索..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"未找到网络。"</string>
@@ -231,7 +234,7 @@
     <string name="throttle_data_rate_reduced_subtext" msgid="7492763592720107737">"已超过<xliff:g id="USED_0">%1$s</xliff:g>速率上限\n数据传输速率已降至 <xliff:g id="USED_1">%2$d</xliff:g> Kb/s。"</string>
     <string name="throttle_time_frame_subtext" msgid="7732763021560399960">"此周期已过去 <xliff:g id="USED_0">%1$d</xliff:g>٪\n下一个时段将从 <xliff:g id="USED_1">%2$d</xliff:g> 天后 (<xliff:g id="USED_2">%3$s</xliff:g>) 开始"</string>
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"如果超过了流量上限,则数据传输速率会降至 <xliff:g id="USED">%1$d</xliff:g> Kb/s"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"您的运营商的移动网络数据使用政策详情"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"有关您运营商的移动网络数据使用政策的详情"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"小区广播短信"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"小区广播短信"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"已启用小区广播短信"</string>
@@ -368,6 +371,7 @@
     <string name="menu_add" msgid="1882023737425114762">"添加联系人"</string>
     <string name="menu_edit" msgid="7143003705504672374">"编辑联系人"</string>
     <string name="menu_delete" msgid="3977150783449642851">"删除联系人"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"拨打电话给联系人"</string>
     <string name="get_pin2" msgid="8204677063922225311">"输入 PIN2 码"</string>
     <string name="name" msgid="7329028332786872378">"名称"</string>
     <string name="number" msgid="7905950798349903858">"号码"</string>
@@ -382,7 +386,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"正在删除固定拨号联系人..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"已删除固定拨号联系人。"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"固定拨号未更新,因为输入的 PIN 码有误。"</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"固定拨号未更新,因为号码不能超过 20 位。"</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"系统未更新 FDN,因为未输入号码或者输入的号码超过了 20 位。"</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"固定拨号未更新。PIN2 码有误,或电话号码遭拒。"</string>
     <string name="fdn_failed" msgid="540018079008319747">"固定拨号操作失败。"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"正在从SIM卡读取..."</string>
@@ -444,12 +448,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"需关闭飞行模式或连接至无线网络才能拨打电话。"</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"要拨打非紧急电话,请先退出紧急回拨模式。"</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"尚未注册网络。"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"无法连接到移动网络。"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"移动网络不可用。需连接至无线网络才能拨打电话。"</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"无法连接到移动网络"</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"移动网络不可用。需连接至无线网络才能拨打电话。"</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"要拨打电话,请输入有效的电话号码。"</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"无法通话。"</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"目前无法添加通话。"</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"正在启动 MMI 序列..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"服务不受支持"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"无法切换通话。"</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"无法单独通话。"</string>
@@ -524,10 +527,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"已进入紧急回拨模式"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"紧急回拨模式"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"数据连接已停用"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">持续 <xliff:g id="COUNT_1">%s</xliff:g> 分钟没有数据网络连接</item>
-      <item quantity="one">持续 <xliff:g id="COUNT_0">%s</xliff:g> 分钟没有数据网络连接</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"<xliff:g id="COMPLETETIME">%s</xliff:g> 之后才有数据网络连接"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">手机在 <xliff:g id="COUNT_1">%s</xliff:g> 分钟内都会处于紧急回拨模式。此模式下无法使用任何需要连接数据网络的应用。要立即退出吗?</item>
       <item quantity="one">手机在 <xliff:g id="COUNT_0">%s</xliff:g> 分钟内都会处于紧急回拨模式。此模式下无法使用任何需要连接数据网络的应用。要立即退出吗?</item>
@@ -551,12 +551,9 @@
     <string name="selectContact" msgid="781975788478987237">"选择联系人"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"不支持语音呼叫"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"拨号"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"振动"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"振动"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"可视语音邮箱"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"设置 PIN 码"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"更改 PIN 码"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"提示音"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"铃声和振动"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"内置SIM卡"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"开启视频通话功能"</string>
@@ -573,6 +570,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"对邮件解码时出错。"</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM 卡已启用您的服务,并更新了您手机的漫游功能。"</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"进行中的通话过多。请结束现有通话或将其合并,然后再拨打新的电话。"</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"无法连接,请插入有效的 SIM 卡。"</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"WLAN 连接中断,通话已结束。"</string>
     <string name="change_pin_title" msgid="7790232089699034029">"更改语音信箱 PIN 码"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"继续"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"取消"</string>
diff --git a/res/values-zh-rHK/config.xml b/res/values-zh-rHK/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-zh-rHK/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml
index 0e2feac..4066d27 100644
--- a/res/values-zh-rHK/strings.xml
+++ b/res/values-zh-rHK/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"流動數據"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"流動數據"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"手機服務"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"緊急撥號"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"電話"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"未填留言信箱號碼"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM 卡中沒有儲存任何留言信箱號碼。"</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"新增電話號碼"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"只有主要使用者可以修改留言設定。"</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"您的 SIM 卡已解除封鎖。您的手機正在解除鎖定..."</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM 網絡解除鎖定 PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"解除鎖定"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"正在要求解除網絡鎖定..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"無法完成解除網絡鎖定的要求"</string>
     <string name="unlock_success" msgid="6770085622238180152">"成功解除網絡鎖定。"</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"這位使用者無法修改流動網絡設定"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"此使用者無法修改流動網絡設定"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM 通話設定"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM 通話設定 (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA 通話設定"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"留言信箱"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"留言信箱 (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"留言信箱:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"通知"</string>
     <string name="networks" msgid="8873030692174541976">"網絡供應商"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"緊急廣播"</string>
     <string name="call_settings" msgid="6112441768261754562">"通話設定"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"無法接通時"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"無法接通時的轉接號碼"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"轉接至 <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"已停用"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"關閉"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"您的流動網絡供應商不支援在手機無法接通時停用轉接功能。"</string>
     <string name="updating_title" msgid="6146755386174019046">"通話設定"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"只有管理員可以變更通話設定。"</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"新的 PIN 包含無效字元。"</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"無法變更 PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"不支援的訊息類型,撥打 <xliff:g id="NUMBER">%s</xliff:g> 即可聆聽。"</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"流動網絡設定"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"流動網絡設定"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"流動網絡"</string>
     <string name="label_available" msgid="1181658289009300430">"可用的網絡"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"正在搜尋..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"找不到網絡。"</string>
@@ -237,7 +240,7 @@
     <!-- no translation found for throttle_time_frame_subtext (7732763021560399960) -->
     <skip />
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"若已達資料用量上限,資料傳輸速率會降低至 <xliff:g id="USED">%1$d</xliff:g> Kb/秒"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"更多有關流動網絡供應商流動網絡數據使用政策的資料"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"更多有關流動網絡供應商流動網絡資料使用政策的資訊"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"區域廣播 SMS"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"區域廣播 SMS"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"區域廣播 SMS 已啟用"</string>
@@ -374,6 +377,7 @@
     <string name="menu_add" msgid="1882023737425114762">"新增聯絡人"</string>
     <string name="menu_edit" msgid="7143003705504672374">"編輯聯絡人"</string>
     <string name="menu_delete" msgid="3977150783449642851">"刪除聯絡人"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"撥號給聯絡人"</string>
     <string name="get_pin2" msgid="8204677063922225311">"輸入 PIN2 碼"</string>
     <string name="name" msgid="7329028332786872378">"名稱"</string>
     <string name="number" msgid="7905950798349903858">"電話號碼"</string>
@@ -388,7 +392,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"正在刪除固定撥號…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"固定撥號已刪除。"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"您所輸入的 PIN 碼不正確,FDN 未更新。"</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"號碼超過 20 位數上限,FDN 未更新。"</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"號碼空白或超過 20 位數,FDN 未更新。"</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"FDN 無法更新。PIN2 碼不正確或電話號碼被拒。"</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN 操作失敗。"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"正在從 SIM 卡讀取..."</string>
@@ -450,12 +454,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"關閉飛行模式或連接無線網絡,以撥打電話。"</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"離開緊急回撥模式即可撥打非緊急電話。"</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"未在網絡上完成註冊。"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"無法連線至流動網絡。"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"無法使用流動網絡。連接無線網絡,以撥打電話。"</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"無法使用流動網絡。"</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"無法使用流動網絡。請連接無線網絡,以撥打電話。"</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"要撥打電話,請輸入有效的號碼。"</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"無法接通。"</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"目前無法新增通話。"</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"開始 MMI 序列..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"不支援的服務"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"無法切換通話。"</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"無法分開通話。"</string>
@@ -530,10 +533,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"已進入緊急回撥模式"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"緊急回撥模式"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"數據連線已停用"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">在接下來的 <xliff:g id="COUNT_1">%s</xliff:g> 分鐘內沒有數據連線</item>
-      <item quantity="one">接下來的 <xliff:g id="COUNT_0">%s</xliff:g> 分鐘內沒有數據連線</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"到<xliff:g id="COMPLETETIME">%s</xliff:g> 以前沒有數據連線"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">手機將在 <xliff:g id="COUNT_1">%s</xliff:g> 分鐘內處於緊急電話模式。在此模式中,無法使用需要數據連線的應用程式。您要退出嗎?</item>
       <item quantity="one">手機將在 <xliff:g id="COUNT_0">%s</xliff:g> 分鐘內處於緊急電話模式。在此模式中,無法使用需要連接數據的應用程式。您要退出嗎?</item>
@@ -557,12 +557,9 @@
     <string name="selectContact" msgid="781975788478987237">"選取聯絡人"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"不支援語音通話"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"撥號"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"震動"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"震動"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Visual Voicemail"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"設定 PIN 碼"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"變更 PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"音效"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"鈴聲與震動"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"內置 SIM 卡"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"開啟視像通話"</string>
@@ -579,6 +576,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"為訊息解碼時發生錯誤。"</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM 卡已啟動您的服務,並更新了您的手機漫遊功能。"</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"進行中的通話過多。請先結束或合併現有通話,再重新撥打。"</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"無法連線,請插入有效的 SIM 卡。"</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"已失去 Wi-Fi 連線。通話已結束。"</string>
     <string name="change_pin_title" msgid="7790232089699034029">"變更留言信箱 PIN"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"繼續"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"取消"</string>
diff --git a/res/values-zh-rTW/config.xml b/res/values-zh-rTW/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-zh-rTW/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 33c51d5..5fe0bab 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"行動數據"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"行動數據"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"電話服務"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"緊急撥號"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"電話"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"遺失語音信箱號碼"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"SIM 卡中未儲存語音信箱號碼。"</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"新增號碼"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"只有主要使用者可以修改語音信箱設定。"</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"您的 SIM 卡已解鎖。正在解鎖手機中…"</string>
     <string name="label_ndp" msgid="780479633159517250">"SIM 網路解鎖 PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"解除鎖定"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"正在要求解除網路鎖定…"</string>
     <string name="unlock_failed" msgid="6490531697031504225">"網路解鎖失敗。"</string>
     <string name="unlock_success" msgid="6770085622238180152">"網路解鎖成功。"</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"這位使用者無法修改行動網路設定"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"這位使用者無法修改行動網路設定"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"GSM 通話設定"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"GSM 通話設定 (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"CDMA 通話設定"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"語音信箱"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"語音信箱 (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"語音信箱:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"通知"</string>
     <string name="networks" msgid="8873030692174541976">"電信業者"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"緊急廣播"</string>
     <string name="call_settings" msgid="6112441768261754562">"通話設定"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"無法接通時"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"無法接通時的轉接號碼"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"轉接至 <xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"停用"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"關閉"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"您的電信業者不支援手機無收訊時停用轉接功能。"</string>
     <string name="updating_title" msgid="6146755386174019046">"通話設定"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"只有管理員使用者可以變更通話設定。"</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"新的 PIN 碼包含無效的字元。"</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"無法變更 PIN 碼"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"不支援的訊息類型,請撥打 <xliff:g id="NUMBER">%s</xliff:g> 聽取留言。"</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"行動網路設定"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"行動網路設定"</string>
+    <string name="network_settings_title" msgid="514120489499925574">"行動網路"</string>
     <string name="label_available" msgid="1181658289009300430">"可用的網路"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"搜尋中…"</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"找不到網路。"</string>
@@ -237,7 +240,7 @@
     <!-- no translation found for throttle_time_frame_subtext (7732763021560399960) -->
     <skip />
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"若已達數據用量上限,數據傳輸速率會降低至 <xliff:g id="USED">%1$d</xliff:g> Kb/秒"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"更多有關行動業者行動網路數據使用政策的資訊"</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"更多有關行動業者行動網路資料使用政策的資訊"</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"區域廣播簡訊"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"區域廣播簡訊"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"已啟用區域廣播簡訊"</string>
@@ -374,6 +377,7 @@
     <string name="menu_add" msgid="1882023737425114762">"新增聯絡人"</string>
     <string name="menu_edit" msgid="7143003705504672374">"編輯聯絡人"</string>
     <string name="menu_delete" msgid="3977150783449642851">"刪除聯絡人"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"撥打電話給聯絡人"</string>
     <string name="get_pin2" msgid="8204677063922225311">"輸入 PIN2"</string>
     <string name="name" msgid="7329028332786872378">"名稱"</string>
     <string name="number" msgid="7905950798349903858">"號碼"</string>
@@ -388,7 +392,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"正在刪除固定撥號…"</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"已刪除固定撥號。"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"您所輸入的 PIN 不正確,因此未更新 FDN。"</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"號碼超過 20 位數的上限,因此未更新 FDN。"</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"未輸入號碼或號碼超過 20 位數,因此無法更新固定撥號設定。"</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"未更新 FDN。可能是因為 PIN2 碼不正確或電話號碼遭拒。"</string>
     <string name="fdn_failed" msgid="540018079008319747">"FDN 操作失敗。"</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"正在從 SIM 卡讀取…"</string>
@@ -450,12 +454,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"關閉飛航模式或連上無線網路即可撥打電話。"</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"結束緊急回撥模式,以便撥打非緊急電話。"</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"尚未註冊網路。"</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"無法連線到行動網路。"</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"無法使用行動通訊網路。但連上 Wi-Fi 網路即可撥打電話。"</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"無法使用 Google 行動服務網路。"</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"無法使用行動網路。連上 Wi-Fi 網路即可撥打電話。"</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"如要撥打電話,請輸入有效的號碼。"</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"無法通話。"</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"目前無法新增通話。"</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"開始 MMI 序列…"</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"不支援的服務"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"無法切換通話。"</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"無法分割通話。"</string>
@@ -530,10 +533,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"已進入緊急回撥模式"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"緊急回撥模式"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"資料連線已停用"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="other">接下來的 <xliff:g id="COUNT_1">%s</xliff:g> 分鐘內沒有數據連線</item>
-      <item quantity="one">接下來的 <xliff:g id="COUNT_0">%s</xliff:g> 分鐘內沒有數據連線</item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"在<xliff:g id="COMPLETETIME">%s</xliff:g> 之前無法使用數據連線"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="other">接下來的 <xliff:g id="COUNT_1">%s</xliff:g> 分鐘內,手機會進入緊急回電模式。在此模式下,您將無法使用需要數據連線的應用程式。您要立即退出這個模式嗎?</item>
       <item quantity="one">接下來的 <xliff:g id="COUNT_0">%s</xliff:g> 分鐘內,手機會進入緊急回電模式。在此模式下,您將無法使用需要數據連線的應用程式。您要立即退出這個模式嗎?</item>
@@ -557,12 +557,9 @@
     <string name="selectContact" msgid="781975788478987237">"選取聯絡人"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"不支援語音通話"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"撥號"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"震動"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"震動"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"具有畫面的語音信箱"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"設定語音信箱密碼"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"變更 PIN 碼"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"音效"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"鈴聲與震動"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"內建 SIM 卡"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"開啟視訊通話"</string>
@@ -579,6 +576,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"為郵件解碼時發生錯誤。"</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"SIM 卡已啟用您的服務並更新了手機的漫遊功能。"</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"進行中的通話過多。請先結束或合併現有通話,再撥打新的電話。"</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"無法連線,請插入有效的 SIM 卡。"</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Wi-Fi 連線中斷,因此通話已結束。"</string>
     <string name="change_pin_title" msgid="7790232089699034029">"變更語音信箱密碼"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"繼續"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"取消"</string>
diff --git a/res/values-zu/config.xml b/res/values-zu/config.xml
new file mode 100644
index 0000000..509a3c8
--- /dev/null
+++ b/res/values-zu/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2009 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.
+ -->
+
+<!--  NOTE: Many variables that used to be in this file have been migrated to
+     CarrierConfigManager.java. Please consider whether new variables belong
+     there before adding to this file. Variables here should be more closely
+     related to devices than to networks.  -->
+
+<!--  Phone app resources that may need to be customized
+     for different hardware or product builds.  -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="system_visual_voicemail_client" msgid="1787338073957698459"></string>
+</resources>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index e1f9e24..9351809 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="phoneAppLabel" product="tablet" msgid="1107073389495104784">"Idatha yeselula"</string>
+    <string name="phoneAppLabel" product="tablet" msgid="8576272342240415145">"Idatha Yeselula"</string>
     <string name="phoneAppLabel" product="default" msgid="6790717591729922998">"Amasevisi wefoni"</string>
     <string name="emergencyDialerIconLabel" msgid="7812140032168171053">"Ukudayela Okuphuthumayo"</string>
     <string name="phoneIconLabel" msgid="2331230813161304895">"Ifoni"</string>
@@ -45,6 +45,7 @@
     <string name="no_vm_number" msgid="4164780423805688336">"Inombolo engekho yomyalezo wezwi"</string>
     <string name="no_vm_number_msg" msgid="1300729501030053828">"Ayikho inombolo yomlayezo wezwi egcinwe ekhadini le-SIM."</string>
     <string name="add_vm_number_str" msgid="4676479471644687453">"Engeza inombolo"</string>
+    <string name="voice_number_setting_primary_user_only" msgid="6596604364907022416">"Izilungiselelo zevoyisimeyili zingashintshwa kuphela umsebenzisi oyinhloko."</string>
     <string name="puk_unlocked" msgid="2284912838477558454">"Ikhadi lakho le-SIM livuliwe. Ifoni yakho iyavula..."</string>
     <string name="label_ndp" msgid="780479633159517250">"Inethiwekhi ye-SIM yokuvula i-PIN"</string>
     <string name="sim_ndp_unlock_text" msgid="683628237760543009">"Vula"</string>
@@ -52,7 +53,7 @@
     <string name="requesting_unlock" msgid="6412629401033249351">"Icela ukuvula inethiwekhi..."</string>
     <string name="unlock_failed" msgid="6490531697031504225">"Isicelo sokuvula inethiwekhi asiphumelelanga."</string>
     <string name="unlock_success" msgid="6770085622238180152">"Ukuvula inethiwekhi kuphumelele."</string>
-    <string name="mobile_network_settings_not_available" msgid="3831911315358856062">"Izilungiselelo zenethiwekhi yeselula azitholakaleli lo msebenzisi"</string>
+    <string name="mobile_network_settings_not_available" msgid="7355254462995117896">"Izilungiselelo zenethiwekhi yeselula azitholakaleli lo msebenzisi"</string>
     <string name="labelGSMMore" msgid="5930842194056092106">"Izilungiselelo zekholi ze-GSM"</string>
     <string name="labelGsmMore_with_label" msgid="2674012918829238901">"Izilungiselelo zekholi ye-GSM (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="labelCDMAMore" msgid="1630676740428229339">"Izilungiselelo zekholi ye-CDMA"</string>
@@ -76,6 +77,7 @@
     <string name="voicemail" msgid="8693759337917898954">"Ivoyisimeyili"</string>
     <string name="voicemail_settings_with_label" msgid="152724978380748296">"Ivoyisimeyili (<xliff:g id="SUBSCRIPTIONLABEL">%s</xliff:g>)"</string>
     <string name="voicemail_abbreviated" msgid="2215592488517217448">"VM:"</string>
+    <string name="voicemail_notifications_preference_title" msgid="4019728578955102213">"Izaziso"</string>
     <string name="networks" msgid="8873030692174541976">"Imisebenzi yenethiwekhi"</string>
     <string name="cell_broadcast_settings" msgid="8740238216690502563">"Ukusakazwa okuphuthumayo"</string>
     <string name="call_settings" msgid="6112441768261754562">"Izilungiselelo zekholi"</string>
@@ -115,7 +117,7 @@
     <string name="labelCFNRc" msgid="2614827454402079766">"Uma ungafinyeleleki"</string>
     <string name="messageCFNRc" msgid="6380695421020295119">"Inombolo uma ingatholakali"</string>
     <string name="sum_cfnrc_enabled" msgid="7010898346095497421">"Idlulisela ku-<xliff:g id="PHONENUMBER">{0}</xliff:g>"</string>
-    <string name="sum_cfnrc_disabled" msgid="7222141261321276464">"Khutshaziwe"</string>
+    <string name="sum_cfnrc_disabled" msgid="2684474391807469832">"Valiwe"</string>
     <string name="disable_cfnrc_forbidden" msgid="5646361343094064333">"Isiphathi sakho asisekeli ukuvimbela ukudlulisela ucingo lapho ifoni yakho ingafinyeleleki."</string>
     <string name="updating_title" msgid="6146755386174019046">"Izilungiselelo zekholi"</string>
     <string name="call_settings_admin_user_only" msgid="4526094783818216374">"Izilungiselelo zekholi zingaguqulwa kuphela ngumsebenzisi oyinhloko."</string>
@@ -157,7 +159,8 @@
     <string name="vm_change_pin_error_invalid" msgid="3972205462701668653">"I-PIN entsha iqukethe izinhlamvu ezingavumelekile."</string>
     <string name="vm_change_pin_error_system_error" msgid="6610603326230000207">"Ayikwazi ukushintsha i-PIN"</string>
     <string name="vvm_unsupported_message_format" msgid="11795090778411977">"Uhlobo lomlayezo ongasekelwa, shayela ku-<xliff:g id="NUMBER">%s</xliff:g> ukuze ulalele."</string>
-    <string name="mobile_networks" msgid="2843854043339307375">"Izilungiselelo zenethiwekhi yeselula"</string>
+    <string name="mobile_networks" msgid="5540397602919106177">"Izilungiselelo zenethiwekhi yeselula."</string>
+    <string name="network_settings_title" msgid="514120489499925574">"Inethiwekhi yeselula"</string>
     <string name="label_available" msgid="1181658289009300430">"Amanethiwekhi atholakalayo"</string>
     <string name="load_networks_progress" msgid="5230707536168902952">"Iyasesha..."</string>
     <string name="empty_networks_list" msgid="4249426905018815316">"Awekho amanethiwekhi atholakele."</string>
@@ -235,7 +238,7 @@
     <!-- no translation found for throttle_time_frame_subtext (7732763021560399960) -->
     <skip />
     <string name="throttle_rate_subtext" msgid="2149102656120726855">"Isilinganiso sedatha sehliselwe ku-<xliff:g id="USED">%1$d</xliff:g> ama-Kb uma ukusebenzisa umkhawulo wedatha ufinyelelwe"</string>
-    <string name="throttle_help_subtext" msgid="3633091498168446044">"Ulwazi oluningi mayelana nenqubomgomo yokusebenzisa idatha yenethiwekhi yenkampani yakho yefoni."</string>
+    <string name="throttle_help_subtext" msgid="5217706521499010816">"Olunye ulwazi mayelana nenqubomgomo yokusebenzisa idatha yenethiwekhi yesiphathi sakho sefoni."</string>
     <string name="cell_broadcast_sms" msgid="5584192824053625842">"I-SMS Yokusakaza Iseli"</string>
     <string name="enable_disable_cell_bc_sms" msgid="4851147873691392255">"I-SMS Yokusakaza ngeSeli"</string>
     <string name="cell_bc_sms_enable" msgid="6441688565738921084">"I-SMS Yokusakaza yeSeli ivunyelwe"</string>
@@ -372,6 +375,7 @@
     <string name="menu_add" msgid="1882023737425114762">"Engeza othintana naye"</string>
     <string name="menu_edit" msgid="7143003705504672374">"Hlela othintana naye"</string>
     <string name="menu_delete" msgid="3977150783449642851">"Susa othintana naye"</string>
+    <string name="menu_dial" msgid="3223106222819685808">"Shayela oxhumana naye"</string>
     <string name="get_pin2" msgid="8204677063922225311">"Thayipha i-PIN2"</string>
     <string name="name" msgid="7329028332786872378">"Igama"</string>
     <string name="number" msgid="7905950798349903858">"Inombolo"</string>
@@ -386,7 +390,7 @@
     <string name="deleting_fdn_contact" msgid="5669163206349319969">"Isusa othintana naye wokudayela okungaguquki..."</string>
     <string name="fdn_contact_deleted" msgid="7154162327112259569">"Othintana naye wokudayela okungaguquki ususiwe"</string>
     <string name="pin2_invalid" msgid="5470854099230755944">"I-FDN ayivuselelwanga ngoba uthayiphe i-PIN engalungile."</string>
-    <string name="fdn_invalid_number" msgid="1494755047900009147">"I-FDN ayivuselelwanga ngoba inombolo ayikwazi ukudlula ezinombolweni ezingu-20."</string>
+    <string name="fdn_invalid_number" msgid="8602417141715473998">"I-FDN ayizange ibuyekezwe ngoba inombolo ayinalutho noma idlula amadijithi angu-20."</string>
     <string name="pin2_or_fdn_invalid" msgid="6025144083384701197">"I-FDN ayibuyekeziwe. I-PIN2 kade ingalungile, noma inombolo yefoni yenqatshelwe."</string>
     <string name="fdn_failed" msgid="540018079008319747">"Umsebenzi we-FDN wehlulekile."</string>
     <string name="simContacts_emptyLoading" msgid="2203331234764498011">"Ifunda ekhadini le-SIM..."</string>
@@ -448,12 +452,11 @@
     <string name="incall_error_power_off_wfc" msgid="8711428920632416575">"Vala imodi yendiza noma xhumeka kunethiwekhi engenantambo ukuze wenze ikholi."</string>
     <string name="incall_error_ecm_emergency_only" msgid="738708660612388692">"Phuma kwimodi yokushayela emuva yesiko esiphuthumayo ukuze wenze ikholi yemodi engaphuthumi."</string>
     <string name="incall_error_emergency_only" msgid="4678640422710818317">"Ayibhalisiwe kwinethiwekhi."</string>
-    <string name="incall_error_out_of_service" msgid="4100065333878929223">"Inethiwekhi yeselula ayitholakali."</string>
-    <string name="incall_error_out_of_service_wfc" msgid="323851839058697057">"Inethiwekhi yeselula ayitholakali. Xhumeka kunethiwekhi engenantambo ukuze wenze ikholi."</string>
+    <string name="incall_error_out_of_service" msgid="8587993036435080418">"Inethiwekhi yefoni ayitholakali"</string>
+    <string name="incall_error_out_of_service_wfc" msgid="8741629779555132471">"Inethiwekhi yeselula ayitholakali. Xhumeka kunethiwekhi engenantambo ukuze wenze ikholi."</string>
     <string name="incall_error_no_phone_number_supplied" msgid="1150414018684246528">"Ukuze wenze ikholi, faka inombolo evumelekile."</string>
     <string name="incall_error_call_failed" msgid="5891978320269774095">"Ikholi ihlulekile."</string>
     <string name="incall_error_cannot_add_call" msgid="5206923515522412110">"Ikholi ayikwazi ukungezwa ngalesi sikhathi."</string>
-    <string name="incall_status_dialed_mmi" msgid="3672498861336189563">"Iqalisa ukulandelana kwe-MMI..."</string>
     <string name="incall_error_supp_service_unknown" msgid="655570339115407698">"Isevisi ayisekelwe"</string>
     <string name="incall_error_supp_service_switch" msgid="5237002176899962862">"Ayikwazi ukushintsha amakholi."</string>
     <string name="incall_error_supp_service_separate" msgid="7224393405134545246">"Ayikwazi ukuhlukanisa ikholi."</string>
@@ -528,10 +531,7 @@
     <string name="phone_entered_ecm_text" msgid="6266424252578731203">"Ingene Kwimdoi Yokuphinda Ukushayela Okuphuthumayo"</string>
     <string name="phone_in_ecm_notification_title" msgid="3226896828951687085">"Imodi Yokuphinda Ukushayela Okuphuthumayo"</string>
     <string name="phone_in_ecm_call_notification_text" msgid="4611608947314729773">"Uxhumano lwedatha luvimbelwe"</string>
-    <plurals name="phone_in_ecm_notification_time" formatted="false" msgid="8308381858502470919">
-      <item quantity="one">Alukho uxhumo ledatha amaminthi angu-<xliff:g id="COUNT_1">%s</xliff:g></item>
-      <item quantity="other">Alukho uxhumo ledatha amaminthi angu-<xliff:g id="COUNT_1">%s</xliff:g></item>
-    </plurals>
+    <string name="phone_in_ecm_notification_complete_time" msgid="7730376844178948351">"Alukho uxhumo lwedatha kuze kube ngu-<xliff:g id="COMPLETETIME">%s</xliff:g>"</string>
     <plurals name="alert_dialog_exit_ecm" formatted="false" msgid="7179911675595441201">
       <item quantity="one">Ifoni izoba kumodi yokushayela emuva yesimo esiphuthumayo amaminithi angu-<xliff:g id="COUNT_1">%s</xliff:g>. Ngenkathi ikule modi azikho izinhlelo zokusebenza ezisebenzisa uxhumo ledatha ezingasetshenziswa. Ufuna ukuphuma manje?</item>
       <item quantity="other">Ifoni izoba kumodi yokushayela emuva yesimo esiphuthumayo amaminithi angu-<xliff:g id="COUNT_1">%s</xliff:g>. Ngenkathi ikule modi azikho izinhlelo zokusebenza ezisebenzisa uxhumo ledatha ezingasetshenziswa. Ufuna ukuphuma manje?</item>
@@ -555,12 +555,9 @@
     <string name="selectContact" msgid="781975788478987237">"khetha othintana naye"</string>
     <string name="not_voice_capable" msgid="2739898841461577811">"Ukushayela ngezwi akusekelwe"</string>
     <string name="description_dial_button" msgid="7459705245418435351">"dayela"</string>
-    <string name="voicemail_notification_vibrate_when_title" msgid="8361970092063604886">"Dlidliza"</string>
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="5739583146522136440">"Dlidliza"</string>
     <string name="voicemail_visual_voicemail_switch_title" msgid="5012622186976275457">"Ivoyisimeyili ebonakalayo"</string>
     <string name="voicemail_set_pin_dialog_title" msgid="2797924461029093837">"Setha IPHINI"</string>
     <string name="voicemail_change_pin_dialog_title" msgid="6035421908626121564">"Shintsha i-PIN"</string>
-    <string name="voicemail_notification_ringtone_title" msgid="2609519527849101590">"Umsindo"</string>
     <string name="preference_category_ringtone" msgid="5197960752529332721">"Ithoni yokukhala nokudlidliza"</string>
     <string name="pstn_connection_service_label" msgid="1743245930577325900">"Amakhadi we-SIM akhelwe ngaphakathi"</string>
     <string name="enable_video_calling_title" msgid="7237253660669000899">"Vula ukushaya kwevidiyo"</string>
@@ -577,6 +574,8 @@
     <string name="message_decode_error" msgid="3456481534066924855">"Kube nephutha ngenkathi kukhishwa ikhodi kumlayezo."</string>
     <string name="callFailed_cdma_activation" msgid="2307989779233262164">"Ikhadi le-SIM lenze kwasebenza isevisi yakho laphinde labuyekeza amakhono okuzula wefoni yakho."</string>
     <string name="callFailed_cdma_call_limit" msgid="1556916577171457086">"Kunamakholi amaningi asebenzayo. Sicela uphelise noma uhlanganise amakholi akhona ngaphambi kokubeka eyodwa."</string>
+    <string name="callFailed_imei_not_accepted" msgid="132192626901238542">"Ayikwazi ukuxhumeka, sicela ufake i-SIM card evumelekile."</string>
+    <string name="callFailed_wifi_lost" msgid="5968076625137297184">"Ukuxhumeka kwe-Wi-Fi kulahlekile. Ikholi iphelile."</string>
     <string name="change_pin_title" msgid="7790232089699034029">"Shintsha IPHINI yevoyisimeyili"</string>
     <string name="change_pin_continue_label" msgid="2135088662420163447">"Qhubeka"</string>
     <string name="change_pin_cancel_label" msgid="353535488390948596">"Khansela"</string>
diff --git a/res/values/config.xml b/res/values/config.xml
index 7d5af52..2078049 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -207,12 +207,13 @@
     <!-- Flag indicating whether to allow visual voicemail if available on the device.[DO NOT TRANSLATE] -->
     <bool name="allow_visual_voicemail">true</bool>
 
+    <!-- The package to handle visual voicemail if the default dialer or the package
+    CarrierConfigManager.KEY_CARRIER_VVM_PACKAGE_NAME_STRING does not handle it -->
+    <string name="system_visual_voicemail_client"></string>
+
     <!-- Flag to enable VVM3 visual voicemail. VVM3 is used by Verizon Wireless. -->
     <bool name="vvm3_enabled">false</bool>
 
-    <!-- Component for custom voicemail notification handling. [DO NOT TRANSLATE] -->
-    <string name="config_customVoicemailComponent">@null</string>
-
     <!-- Flag indicating whether to allow pstn phone accounts [DO NOT TRANSLATE] -->
     <bool name="config_pstn_phone_accounts_enabled">true</bool>
 
@@ -222,6 +223,6 @@
     <!-- Whether the emergency only account can make emergency calls -->
     <bool name="config_pstnCanPlaceEmergencyCalls">true</bool>
 
-    <!-- Whether the cellular radio is allowed to be power down when the Bluetooth can provide the data/call capabilities -->
-    <bool name="config_allowRadioPowerDownOnBluetooth">false</bool>
+    <!-- The package name for the platform carrier config app, bundled with system image. -->
+    <string name="platform_carrier_config_package" translatable="false">com.android.carrierconfig</string>
 </resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index dad0e8b..7009fd8 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -20,7 +20,7 @@
          and other settings UIs.  This is the version of the label for
          tablet devices, where the phone app handles mobile data but not
          actual phone calls. -->
-    <string name="phoneAppLabel" product="tablet">Cellular Data</string>
+    <string name="phoneAppLabel" product="tablet">Mobile Data</string>
 
     <!-- Official label of the phone app, as seen in "Manage Applications"
          and other settings UIs. -->
@@ -95,6 +95,8 @@
     <string name="no_vm_number_msg">No voicemail number is stored on the SIM card.</string>
     <!-- Button label on the "Missing voicemail number" dialog -->
     <string name="add_vm_number_str">Add number</string>
+    <!--Toast in Call settings when asked to launch voicemail for a guest user -->
+    <string name="voice_number_setting_primary_user_only">Voicemail Settings can only be modified by the Primary User.</string>
 
     <!-- Status message displayed on SIM PIN unlock panel -->
     <string name="puk_unlocked">Your SIM card has been unblocked. Your phone is unlocking\u2026</string>
@@ -115,7 +117,7 @@
     <!-- settings strings -->
 
     <!-- Error message for users that aren't allowed to modify Mobile Network settings [CHAR LIMIT=none] -->
-    <string name="mobile_network_settings_not_available">Cellular network settings are not available for this user</string>
+    <string name="mobile_network_settings_not_available">Mobile network settings are not available for this user</string>
     <!-- GSM Call settings screen, setting option name. [CHAR LIMIT=40] -->
     <string name="labelGSMMore">GSM call settings</string>
     <!-- GSM Call settings screen, setting option name with label indicating the SIM the settings
@@ -170,6 +172,12 @@
     <string name="voicemail_settings_with_label">Voicemail (<xliff:g id="subscriptionlabel" example="Mock Carrier">%s</xliff:g>)</string>
     <!-- Call forwarding dialog box, voicemail number prefix -->
     <string name="voicemail_abbreviated">VM:</string>
+    <!-- DO NOT TRANSLATE. Internal key for a voicemail notification preference. -->
+    <string name="voicemail_notifications_key" translatable="false">voicemail_notification_key</string>
+
+    <!-- Voicemail notifications title. The user clicks on this preference navigate to the system settings screen for that channel
+    .[CHAR LIMIT=30] -->
+    <string name="voicemail_notifications_preference_title">Notifications</string>
     <!-- Mobile network settings screen, setting option name -->
     <string name="networks">Network operators</string>
     <!-- Cell Broadcast settings title.  [CHAR LIMIT=50] -->
@@ -253,7 +261,7 @@
     <!-- Call forwarding settings screen, setting summary text when forwarding to a specific number when unreachable-->
     <string name="sum_cfnrc_enabled">Forwarding to <xliff:g id="phonenumber" example="555-1212">{0}</xliff:g></string>
     <!-- Call forwarding settings screen, setting summary text when Forward when unreachable is disabled -->
-    <string name="sum_cfnrc_disabled">Disabled</string>
+    <string name="sum_cfnrc_disabled">Off</string>
     <!-- Error message displayed after failing to disable forwarding calls when the phone is unreachable -->
     <string name="disable_cfnrc_forbidden">Your carrier doesn\'t support disabling call forwarding when your phone is unreachable.</string>
 
@@ -354,7 +362,9 @@
 
     <!-- networks setting strings --><skip/>
     <!-- Mobile network settings screen title -->
-    <string name="mobile_networks">Cellular network settings</string>
+    <string name="mobile_networks">Mobile network settings</string>
+    <!-- Mobile network settings screen title/heading -->
+    <string name="network_settings_title">Mobile network</string>
     <!-- Available networks screen title/heading -->
     <string name="label_available">Available networks</string>
     <!-- Mobile network settings screen, toast when searching for available networks -->
@@ -450,11 +460,11 @@
         <item>"1"</item>
         <item>"0"</item>
     </string-array>
-    <!-- Cellular network 4G title [CHAR LIMIT=30] -->
+    <!-- Mobile network 4G title [CHAR LIMIT=30] -->
     <string name="enhanced_4g_lte_mode_title">Enhanced 4G LTE Mode</string>
     <!-- Carrier variant of Enhaced 4G LTE Mode title.  [CHAR LIMIT=50] -->
     <string name="enhanced_4g_lte_mode_title_variant">Advanced Calling</string>
-    <!-- Cellular network 4G summary [CHAR LIMIT=80] -->
+    <!-- Mobile network 4G summary [CHAR LIMIT=80] -->
     <string name="enhanced_4g_lte_mode_summary">Use LTE services to improve voice and other communications (recommended)</string>
 
     <!-- Mobile network settings screen, data enabling checkbox name -->
@@ -505,7 +515,7 @@
 
     <string name="throttle_rate_subtext">Data rate reduced to <xliff:g id="used">%1$d</xliff:g> Kb/s if data use limit is exceeded</string>
 
-    <string name="throttle_help_subtext">More information about your carrier\'s cellular network data use policy</string>
+    <string name="throttle_help_subtext">More information about your carrier\'s mobile network data use policy</string>
 
     <string name="cell_broadcast_sms">Cell Broadcast SMS</string>
 
@@ -805,6 +815,8 @@
     <string name="menu_edit">Edit contact</string>
     <!-- FDN list screen: menu item label -->
     <string name="menu_delete">Delete contact</string>
+    <!-- FDN list screen: menu item label -->
+    <string name="menu_dial">Dial contact</string>
 
     <!-- FDN related strings -->
     <!-- Label for PIN2 entry screen -->
@@ -836,7 +848,7 @@
     <!-- FDN settings: error message displayed in a popup (toast) -->
     <string name="pin2_invalid">FDN wasn\'t updated because you typed an incorrect PIN.</string>
     <!-- FDN settings: error message displayed in a popup (toast) -->
-    <string name="fdn_invalid_number">FDN wasn\'t updated because the number can\'t exceed 20 digits.</string>
+    <string name="fdn_invalid_number">FDN wasn\'t updated because the number is empty or exceeds 20 digits.</string>
     <!-- FDN settings: error message displayed in a popup (toast), when the entered
          FDN number was inappropriate, OR, PIN2 the user entered was incorrect.
          Because of API restriction, there's no way to determine which is the exact
@@ -990,17 +1002,15 @@
          This string is currently unused (see comments in InCallScreen.java.) -->
     <string name="incall_error_emergency_only">Not registered on network.</string>
     <!-- In-call screen: call failure message displayed in an error dialog -->
-    <string name="incall_error_out_of_service">Cellular network not available.</string>
+    <string name="incall_error_out_of_service">Mobile network not available.</string>
     <!-- In-call screen: call failure message displayed in an error dialog -->
-    <string name="incall_error_out_of_service_wfc">Cellular network is not available. Connect to a wireless network to make a call.</string>
+    <string name="incall_error_out_of_service_wfc">Mobile network is not available. Connect to a wireless network to make a call.</string>
     <!-- In-call screen: call failure message displayed in an error dialog -->
     <string name="incall_error_no_phone_number_supplied">To place a call, enter a valid number.</string>
     <!-- In-call screen: call failure message displayed in an error dialog -->
     <string name="incall_error_call_failed">Call failed.</string>
     <!-- In-call screen: call failure message displayed in an error dialog -->
     <string name="incall_error_cannot_add_call">Call cannot be added at this time.</string>
-    <!-- In-call screen: status message displayed in a dialog when starting an MMI -->
-    <string name="incall_status_dialed_mmi">Starting MMI sequence\u2026</string>
     <!-- In-call screen: message displayed in an error dialog -->
     <string name="incall_error_supp_service_unknown">Service not supported</string>
     <!-- In-call screen: message displayed in an error dialog -->
@@ -1183,12 +1193,8 @@
     <string name="phone_in_ecm_notification_title">Emergency Callback Mode</string>
     <!-- ECM: Notification body -->
     <string name="phone_in_ecm_call_notification_text">Data connection disabled</string>
-    <plurals name="phone_in_ecm_notification_time">
-        <!-- number of minutes is one -->
-        <item quantity="one">No data connection for <xliff:g id="count">%s</xliff:g> minute</item>
-        <!-- number of minutes is not equal to one -->
-        <item quantity="other">No data connection for <xliff:g id="count">%s</xliff:g> minutes</item>
-    </plurals>
+    <!-- ECM: Displays the time when ECM will end, Example: "No Data Connection until 10:45 AM" -->
+    <string name="phone_in_ecm_notification_complete_time">No data connection until <xliff:g id="completeTime">%s</xliff:g></string>
     <!-- ECM: Dialog box message for exiting from the notifications screen -->
     <plurals name="alert_dialog_exit_ecm">
         <!-- number of minutes is one -->
@@ -1257,11 +1263,6 @@
     -->
     <string name="description_dial_button">dial</string>
 
-    <!-- Title for the vibration settings for voicemail notifications [CHAR LIMIT=40] -->
-    <string name="voicemail_notification_vibrate_when_title" msgid="8731372580674292759">Vibrate</string>
-    <!-- Dialog title for the vibration settings for voice mail notifications [CHAR LIMIT=40]-->
-    <string name="voicemail_notification_vibarte_when_dialog_title" msgid="8995274609647451109">Vibrate</string>
-
     <!-- Visual voicemail on/off title [CHAR LIMIT=40] -->
     <string name="voicemail_visual_voicemail_switch_title">Visual Voicemail</string>
 
@@ -1270,21 +1271,6 @@
     <!-- Voicemail change PIN dialog title [CHAR LIMIT=40] -->
     <string name="voicemail_change_pin_dialog_title">Change PIN</string>
 
-    <!-- Voicemail ringtone title. The user clicks on this preference to select
-         which sound to play when a voicemail notification is received.
-         [CHAR LIMIT=30] -->
-    <string name="voicemail_notification_ringtone_title">Sound</string>
-
-    <!-- The default value value for voicemail notification. -->
-    <string name="voicemail_notification_vibrate_when_default" translatable="false">never</string>
-
-    <!-- Actual values used in our code for voicemail notifications. DO NOT TRANSLATE -->
-    <string-array name="voicemail_notification_vibrate_when_values" translatable="false">
-        <item>always</item>
-        <item>silent</item>
-        <item>never</item>
-    </string-array>
-
     <!-- Title for the category "ringtone", which is shown above ringtone and vibration
          related settings.
          [CHAR LIMIT=30] -->
@@ -1331,10 +1317,6 @@
     <!-- Status hint label for a call being made over a wifi network. [CHAR LIMIT=25] -->
     <string name="status_hint_label_wifi_call">Wi-Fi call</string>
 
-    <!-- DO NOT TRANSLATE. Internal key for a voicemail notification preference. -->
-    <string name="voicemail_notification_ringtone_key">voicemail_notification_ringtone_key</string>
-    <!-- DO NOT TRANSLATE. Internal key for a voicemail notification preference. -->
-    <string name="voicemail_notification_vibrate_key">voicemail_notification_vibrate_key</string>
     <!-- DO NOT TRANSLATE. Internal key for a visual voicemail preference. -->
     <string name="voicemail_visual_voicemail_key">voicemail_visual_voicemail_key</string>
     <!-- DO NOT TRANSLATE. Internal key for a voicemail change pin preference. -->
@@ -1363,6 +1345,17 @@
         There are too many active calls. Please end or merge existing calls before placing a new one.
     </string>
 
+    <!-- Call failure reason: If the network does not accept the emergency call request, e.g., because IMEI was used as identification and this capability is not supported -->
+    <string name="callFailed_imei_not_accepted">
+        Unable to connect, please insert a valid SIM card.
+    </string>
+
+    <!-- Call failure reason displayed when an in-progress WIFI call fails due to a loss of WIFI
+         connectivity, or the WIFI signal has degraded to the point the call cannot continue. -->
+    <string name="callFailed_wifi_lost">
+        Wi-Fi connection lost.  Call ended.
+    </string>
+
     <!-- The title for the change voicemail PIN activity -->
     <string name="change_pin_title">Change Voicemail PIN</string>
     <!-- The label for the continue button in change voicemail PIN activity -->
diff --git a/res/xml/accessibility_settings.xml b/res/xml/accessibility_settings.xml
index a67e2ad..2c007f6 100644
--- a/res/xml/accessibility_settings.xml
+++ b/res/xml/accessibility_settings.xml
@@ -26,7 +26,7 @@
         android:entries="@array/tty_mode_entries"
         android:entryValues="@array/tty_mode_values"/>
 
-    <CheckBoxPreference
+    <SwitchPreference
         android:key="button_hac_key"
         android:title="@string/hac_mode_title"
         android:persistent="true"
diff --git a/res/xml/call_feature_setting.xml b/res/xml/call_feature_setting.xml
index 6471b16..72be17c 100644
--- a/res/xml/call_feature_setting.xml
+++ b/res/xml/call_feature_setting.xml
@@ -46,13 +46,13 @@
 
     </PreferenceScreen>
 
-    <CheckBoxPreference
+    <SwitchPreference
         android:key="button_enable_video_calling"
         android:title="@string/enable_video_calling_title"
         android:persistent="true"
         android:defaultValue="true" />
 
-    <CheckBoxPreference
+    <SwitchPreference
         android:key="button_auto_retry_key"
         android:title="@string/auto_retry_mode_title"
         android:persistent="false"
diff --git a/res/xml/cdma_call_privacy.xml b/res/xml/cdma_call_privacy.xml
index f1a4c94..ca24d20 100644
--- a/res/xml/cdma_call_privacy.xml
+++ b/res/xml/cdma_call_privacy.xml
@@ -3,7 +3,7 @@
         xmlns:settings="http://schemas.android.com/apk/res/com.android.phone"
         android:title="@string/additional_cdma_call_settings">
 
-    <com.android.phone.CdmaVoicePrivacyCheckBoxPreference
+    <com.android.phone.CdmaVoicePrivacySwitchPreference
         android:key="button_voice_privacy_key"
         android:title="@string/voice_privacy"
         android:persistent="false"
diff --git a/res/xml/cdma_options.xml b/res/xml/cdma_options.xml
index 78e3630..c86787b 100644
--- a/res/xml/cdma_options.xml
+++ b/res/xml/cdma_options.xml
@@ -43,14 +43,6 @@
     </PreferenceScreen>
 
     <PreferenceScreen
-        android:key="cdma_activate_device_key"
-        android:title="@string/cdma_activate_device">
-        <intent android:action="com.android.phone.PERFORM_VOICELESS_CDMA_PROVISIONING">
-            <extra android:name="autoStart" android:value="true" />
-        </intent>
-    </PreferenceScreen>
-
-    <PreferenceScreen
         android:key="carrier_settings_key"
         android:title="@string/carrier_settings_title">
         <intent android:action="android.intent.action.MAIN"
diff --git a/res/xml/cell_broadcast_sms.xml b/res/xml/cell_broadcast_sms.xml
deleted file mode 100644
index 4b36d52..0000000
--- a/res/xml/cell_broadcast_sms.xml
+++ /dev/null
@@ -1,317 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:settings="http://schemas.android.com/apk/res/com.android.phone">
-        
-    <PreferenceCategory 
-        android:title="@string/cell_broadcast_sms">
-            
-    <CheckBoxPreference 
-        android:key="button_enable_disable_cell_bc_sms" 
-        android:title="@string/enable_disable_cell_bc_sms"
-        android:persistent="false"
-        android:summaryOn="@string/cell_bc_sms_enable"
-        android:summaryOff="@string/cell_bc_sms_disable"/>
-    
-    </PreferenceCategory>
-    
-    <PreferenceCategory
-            android:title="@string/cb_sms_settings">
-        
-        <ListPreference
-            android:key="list_language" 
-            android:title="@string/list_language_title"
-            android:summary="@string/list_language_summary"
-            android:entries="@array/list_language_entries"
-            android:entryValues="@array/list_language_values"
-            android:dialogTitle="@string/list_language_dtitle"/>
-            
-        <CheckBoxPreference 
-                android:key="button_emergency_broadcast" 
-                android:title="@string/enable_disable_emergency_broadcast"
-                android:persistent="false"
-                android:summaryOn="@string/emergency_broadcast_enable"
-                android:summaryOff="@string/emergency_broadcast_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_administrative" 
-                android:title="@string/enable_disable_administrative"
-                android:persistent="false"
-                android:summaryOn="@string/administrative_enable"
-                android:summaryOff="@string/administrative_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_maintenance" 
-                android:title="@string/enable_disable_maintenance"
-                android:persistent="false"
-                android:summaryOn="@string/maintenance_enable"
-                android:summaryOff="@string/maintenance_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_local_weather" 
-                android:title="@string/enable_disable_local_weather"
-                android:persistent="false"
-                android:summaryOn="@string/local_weather_enable"
-                android:summaryOff="@string/local_weather_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_atr" 
-                android:title="@string/enable_disable_atr"
-                android:persistent="false"
-                android:summaryOn="@string/atr_enable"
-                android:summaryOff="@string/atr_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_lafs" 
-                android:title="@string/enable_disable_lafs"
-                android:persistent="false"
-                android:summaryOn="@string/lafs_enable"
-                android:summaryOff="@string/lafs_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_restaurants" 
-                android:title="@string/enable_disable_restaurants"
-                android:persistent="false"
-                android:summaryOn="@string/restaurants_enable"
-                android:summaryOff="@string/restaurants_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_lodgings" 
-                android:title="@string/enable_disable_lodgings"
-                android:persistent="false"
-                android:summaryOn="@string/lodgings_enable"
-                android:summaryOff="@string/lodgings_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_retail_directory" 
-                android:title="@string/enable_disable_retail_directory"
-                android:persistent="false"
-                android:summaryOn="@string/retail_directory_enable"
-                android:summaryOff="@string/retail_directory_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_advertisements" 
-                android:title="@string/enable_disable_advertisements"
-                android:persistent="false"
-                android:summaryOn="@string/advertisements_enable"
-                android:summaryOff="@string/advertisements_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_stock_quotes" 
-                android:title="@string/enable_disable_stock_quotes"
-                android:persistent="false"
-                android:summaryOn="@string/stock_quotes_enable"
-                android:summaryOff="@string/stock_quotes_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_eo" 
-                android:title="@string/enable_disable_eo"
-                android:persistent="false"
-                android:summaryOn="@string/eo_enable"
-                android:summaryOff="@string/eo_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_mhh" 
-                android:title="@string/enable_disable_mhh"
-                android:persistent="false"
-                android:summaryOn="@string/mhh_enable"
-                android:summaryOff="@string/mhh_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_technology_news" 
-                android:title="@string/enable_disable_technology_news"
-                android:persistent="false"
-                android:summaryOn="@string/technology_news_enable"
-                android:summaryOff="@string/technology_news_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_multi_category" 
-                android:title="@string/enable_disable_multi_category"
-                android:persistent="false"
-                android:summaryOn="@string/multi_category_enable"
-                android:summaryOff="@string/multi_category_disable"/>
-                
-    </PreferenceCategory>
-    
-    <PreferenceCategory
-            android:title="@string/general_news_settings">
-        
-        <CheckBoxPreference 
-                android:key="button_local_general_news" 
-                android:title="@string/enable_disable_local"
-                android:persistent="false"
-                android:summaryOn="@string/local_enable"
-                android:summaryOff="@string/local_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_regional_general_news" 
-                android:title="@string/enable_disable_regional"
-                android:persistent="false"
-                android:summaryOn="@string/regional_enable"
-                android:summaryOff="@string/regional_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_national_general_news" 
-                android:title="@string/enable_disable_national"
-                android:persistent="false"
-                android:summaryOn="@string/national_enable"
-                android:summaryOff="@string/national_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_international_general_news" 
-                android:title="@string/enable_disable_international"
-                android:persistent="false"
-                android:summaryOn="@string/international_enable"
-                android:summaryOff="@string/international_disable"/>
-        <!--
-        <ListPreference 
-                android:key="list_general_news"
-                android:title="@string/general_news_title"
-                android:summary="@string/general_news_summary"
-                android:entries="@array/general_news_entries"
-                android:entryValues="@array/general_news_entryvalues"
-                android:dialogTitle="@string/general_news_dialogtitle"/> -->
-                
-    </PreferenceCategory>
-    
-    <PreferenceCategory
-            android:title="@string/bf_news_settings">
-        
-        <CheckBoxPreference 
-                android:key="button_local_bf_news" 
-                android:title="@string/enable_disable_local"
-                android:persistent="false"
-                android:summaryOn="@string/local_enable"
-                android:summaryOff="@string/local_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_regional_bf_news" 
-                android:title="@string/enable_disable_regional"
-                android:persistent="false"
-                android:summaryOn="@string/regional_enable"
-                android:summaryOff="@string/regional_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_national_bf_news" 
-                android:title="@string/enable_disable_national"
-                android:persistent="false"
-                android:summaryOn="@string/national_enable"
-                android:summaryOff="@string/national_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_international_bf_news" 
-                android:title="@string/enable_disable_international"
-                android:persistent="false"
-                android:summaryOn="@string/international_enable"
-                android:summaryOff="@string/international_disable"/>
-                
-        <!--    
-        <ListPreference 
-                android:key="list_bf"
-                android:title="@string/bf_news_title"
-                android:summary="@string/bf_news_summary"
-                android:entries="@array/bf_news_entries"
-                android:entryValues="@array/bf_news_entryvalues"
-                android:dialogTitle="@string/bf_news_dialogtitle"/> -->
-    
-    </PreferenceCategory>
-    
-    <PreferenceCategory
-            android:title="@string/sports_news_settings">
-        
-        <CheckBoxPreference 
-                android:key="button_local_sports_news" 
-                android:title="@string/enable_disable_local"
-                android:persistent="false"
-                android:summaryOn="@string/local_enable"
-                android:summaryOff="@string/local_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_regional_sports_news" 
-                android:title="@string/enable_disable_regional"
-                android:persistent="false"
-                android:summaryOn="@string/regional_enable"
-                android:summaryOff="@string/regional_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_national_sports_news" 
-                android:title="@string/enable_disable_national"
-                android:persistent="false"
-                android:summaryOn="@string/national_enable"
-                android:summaryOff="@string/national_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_international_sports_news" 
-                android:title="@string/enable_disable_international"
-                android:persistent="false"
-                android:summaryOn="@string/international_enable"
-                android:summaryOff="@string/international_disable"/>
-                
-        <!--    
-        <ListPreference 
-                android:key="list_sports_news"
-                android:title="@string/sports_news_title"
-                android:summary="@string/sports_news_summary"
-                android:entries="@array/sports_news_entries"
-                android:entryValues="@array/sports_news_entryvalues"
-                android:dialogTitle="@string/sports_news_dialogtitle"/> -->
-                
-    </PreferenceCategory>
-    
-    <PreferenceCategory
-            android:title="@string/entertainment_news_settings">
-        
-        <CheckBoxPreference 
-                android:key="button_local_entertainment_news" 
-                android:title="@string/enable_disable_local"
-                android:persistent="false"
-                android:summaryOn="@string/local_enable"
-                android:summaryOff="@string/local_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_regional_entertainment_news" 
-                android:title="@string/enable_disable_regional"
-                android:persistent="false"
-                android:summaryOn="@string/regional_enable"
-                android:summaryOff="@string/regional_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_national_entertainment_news" 
-                android:title="@string/enable_disable_national"
-                android:persistent="false"
-                android:summaryOn="@string/national_enable"
-                android:summaryOff="@string/national_disable"/>
-                
-        <CheckBoxPreference 
-                android:key="button_international_entertainment_news" 
-                android:title="@string/enable_disable_international"
-                android:persistent="false"
-                android:summaryOn="@string/international_enable"
-                android:summaryOff="@string/international_disable"/>
-                
-        <!--    
-        <ListPreference 
-                android:key="list_entertainment_news"
-                android:title="@string/entertainment_news_title"
-                android:summary="@string/entertainment_news_summary"
-                android:entries="@array/entertainment_news_entries"
-                android:entryValues="@array/entertainment_news_entryvalues"
-                android:dialogTitle="@string/entertainment_news_dialogtitle"/> -->
-                
-    </PreferenceCategory>
-
-</PreferenceScreen>   
diff --git a/res/xml/gsm_umts_additional_options.xml b/res/xml/gsm_umts_additional_options.xml
index f2234e3..33b0769 100644
--- a/res/xml/gsm_umts_additional_options.xml
+++ b/res/xml/gsm_umts_additional_options.xml
@@ -14,7 +14,7 @@
         android:summary="@string/sum_loading_settings"
         android:enabled="false"/>
 
-    <com.android.phone.CallWaitingCheckBoxPreference
+    <com.android.phone.CallWaitingSwitchPreference
         android:key="button_cw_key"
         android:title="@string/labelCW"
         android:persistent="false"
diff --git a/res/xml/network_setting.xml b/res/xml/network_setting_fragment.xml
similarity index 100%
rename from res/xml/network_setting.xml
rename to res/xml/network_setting_fragment.xml
diff --git a/res/xml/phone_account_settings.xml b/res/xml/phone_account_settings.xml
index 27da54c..8e0d17a 100644
--- a/res/xml/phone_account_settings.xml
+++ b/res/xml/phone_account_settings.xml
@@ -64,7 +64,7 @@
             android:entries="@array/sip_call_options_entries"
             android:entryValues="@array/sip_call_options_values"/>
 
-        <CheckBoxPreference
+        <SwitchPreference
             android:key="sip_receive_calls_key"
             android:title="@string/sip_receive_calls"
             android:summary="@string/sip_receive_calls_summary"
diff --git a/res/xml/voicemail_settings.xml b/res/xml/voicemail_settings.xml
index e1dafb0..021a764 100644
--- a/res/xml/voicemail_settings.xml
+++ b/res/xml/voicemail_settings.xml
@@ -50,22 +50,7 @@
 
     </PreferenceScreen>
 
-    <com.android.phone.settings.VoicemailRingtonePreference
-        android:key="@string/voicemail_notification_ringtone_key"
-        android:title="@string/voicemail_notification_ringtone_title"
-        android:persistent="false"
-        android:ringtoneType="notification" />
-
-    <CheckBoxPreference
-        android:key="@string/voicemail_notification_vibrate_key"
-        android:title="@string/voicemail_notification_vibrate_when_title"
-        android:persistent="true" />
-
-    <SwitchPreference
-        android:key="@string/voicemail_visual_voicemail_key"
-        android:title="@string/voicemail_visual_voicemail_switch_title" />"
-
     <Preference
-      android:key="@string/voicemail_change_pin_key"
-      android:title="@string/voicemail_change_pin_dialog_title" />
+        android:key="@string/voicemail_notifications_key"
+        android:title="@string/voicemail_notifications_preference_title"/>
 </PreferenceScreen>
diff --git a/res/xml/vvm_config.xml b/res/xml/vvm_config.xml
deleted file mode 100644
index 19c667e..0000000
--- a/res/xml/vvm_config.xml
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 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.
--->
-
-<list name="carrier_config_list">
-  <pbundle_as_map>
-    <!-- Test -->
-    <string-array name="mccmnc">
-      <item value="TEST"/>
-    </string-array>
-  </pbundle_as_map>
-
-  <pbundle_as_map>
-    <!-- Orange France -->
-    <string-array name="mccmnc">
-      <item value="20801"/>
-      <item value="20802"/>
-    </string-array>
-
-    <int name="vvm_port_number_int" value="20481"/>
-    <string name="vvm_destination_number_string">21101</string>
-    <string-array name="carrier_vvm_package_name_string_array">
-      <item value="com.orange.vvm"/>
-    </string-array>
-    <string name="vvm_type_string">vvm_type_omtp</string>
-    <boolean name="vvm_cellular_data_required_bool" value="true"/>
-    <string-array name="vvm_disabled_capabilities_string_array">
-      <!-- b/32365569 -->
-      <item value="STARTTLS"/>
-    </string-array>
-  </pbundle_as_map>
-
-  <pbundle_as_map>
-    <!-- T-Mobile USA-->
-    <string-array name="mccmnc">
-      <item value="310160"/>
-      <item value="310200"/>
-      <item value="310210"/>
-      <item value="310220"/>
-      <item value="310230"/>
-      <item value="310240"/>
-      <item value="310250"/>
-      <item value="310260"/>
-      <item value="310270"/>
-      <item value="310300"/>
-      <item value="310310"/>
-      <item value="310490"/>
-      <item value="310530"/>
-      <item value="310590"/>
-      <item value="310640"/>
-      <item value="310660"/>
-      <item value="310800"/>
-    </string-array>
-
-    <int name="vvm_port_number_int" value="1808"/>
-    <int name="vvm_ssl_port_number_int" value="993"/>
-    <string name="vvm_destination_number_string">122</string>
-    <string-array name="carrier_vvm_package_name_string_array">
-      <item value="com.tmobile.vvm.application"/>
-    </string-array>
-    <string name="vvm_type_string">vvm_type_cvvm</string>>
-    <string-array name="vvm_disabled_capabilities_string_array">
-      <!-- b/28717550 -->
-      <item value="AUTH=DIGEST-MD5"/>
-    </string-array>
-  </pbundle_as_map>
-
-  <pbundle_as_map>
-    <!-- Verizon USA -->
-    <string-array name="mccmnc">
-      <item value="310004"/>
-      <item value="310010"/>
-      <item value="310012"/>
-      <item value="310013"/>
-      <item value="310590"/>
-      <item value="310890"/>
-      <item value="310910"/>
-      <item value="311110"/>
-      <item value="311270"/>
-      <item value="311271"/>
-      <item value="311272"/>
-      <item value="311273"/>
-      <item value="311274"/>
-      <item value="311275"/>
-      <item value="311276"/>
-      <item value="311277"/>
-      <item value="311278"/>
-      <item value="311279"/>
-      <item value="311280"/>
-      <item value="311281"/>
-      <item value="311282"/>
-      <item value="311283"/>
-      <item value="311284"/>
-      <item value="311285"/>
-      <item value="311286"/>
-      <item value="311287"/>
-      <item value="311288"/>
-      <item value="311289"/>
-      <item value="311390"/>
-      <item value="311480"/>
-      <item value="311481"/>
-      <item value="311482"/>
-      <item value="311483"/>
-      <item value="311484"/>
-      <item value="311485"/>
-      <item value="311486"/>
-      <item value="311487"/>
-      <item value="311488"/>
-      <item value="311489"/>
-    </string-array>
-
-    <int name="vvm_port_number_int" value="0"/>
-    <string name="vvm_destination_number_string">900080006200</string>
-    <string name="vvm_type_string">vvm_type_vvm3</string>
-    <string name="vvm_client_prefix_string">//VZWVVM</string>
-    <boolean name="vvm_cellular_data_required_bool" value="true"/>
-    <boolean name="vvm_legacy_mode_enabled_bool" value="true"/>
-    <!-- VVM3 specific value for the voicemail management gateway to use if the SMS didn't provide
-         one -->
-    <string name="default_vmg_url">https://mobile.vzw.com/VMGIMS/VMServices</string>
-  </pbundle_as_map>
-</list>
diff --git a/sip/res/values-az-rAZ/strings.xml b/sip/res/values-az/strings.xml
similarity index 100%
rename from sip/res/values-az-rAZ/strings.xml
rename to sip/res/values-az/strings.xml
diff --git a/sip/res/values-b+sr+Latn/strings.xml b/sip/res/values-b+sr+Latn/strings.xml
index 740a3d7..b1a7ed2 100644
--- a/sip/res/values-b+sr+Latn/strings.xml
+++ b/sip/res/values-b+sr+Latn/strings.xml
@@ -21,8 +21,8 @@
     <string name="sip_accounts_title" msgid="2082527045326874519">"Nalozi"</string>
     <string name="sip_receive_calls" msgid="426678617137462173">"Primaj dolazne pozive"</string>
     <string name="sip_receive_calls_summary" msgid="946161517528227523">"Više troši bateriju"</string>
-    <string name="sip_call_options_title" msgid="8421210494703869806">"Koristite SIP pozive"</string>
-    <string name="sip_call_options_wifi_only_title" msgid="5112579243580893890">"Koristite SIP pozive (samo za Wi-Fi)"</string>
+    <string name="sip_call_options_title" msgid="8421210494703869806">"Koristite SIP pozivanje"</string>
+    <string name="sip_call_options_wifi_only_title" msgid="5112579243580893890">"Koristite SIP pozivanje (samo za Wi-Fi)"</string>
     <string name="sip_call_options_entry_1" msgid="7217659161237099900">"Za sve pozive kada je mreža za prenos podataka dostupna"</string>
     <string name="sip_call_options_entry_2" msgid="1815335903940609729">"Samo za SIP pozive"</string>
     <string name="sip_call_options_wifi_only_entry_1" msgid="1358513095551847314">"Za sve pozive"</string>
@@ -62,8 +62,8 @@
     <string name="auth_username_title" msgid="8262491689004708265">"Korisničko ime za potvrdu identiteta"</string>
     <string name="auth_username_summary" msgid="941160241371436473">"Za potvrdu identiteta koristi se korisničko ime"</string>
     <string name="default_preference_summary_username" msgid="8404717434312826082">"&lt;Nije podešeno&gt;"</string>
-    <string name="default_preference_summary_password" msgid="4464464672997027904">"&lt;Nije podešena&gt;"</string>
-    <string name="default_preference_summary_domain_address" msgid="4871971710197441673">"&lt;Nije podešena&gt;"</string>
+    <string name="default_preference_summary_password" msgid="4464464672997027904">"&lt;Nije podešeno&gt;"</string>
+    <string name="default_preference_summary_domain_address" msgid="4871971710197441673">"&lt;Nije podešeno&gt;"</string>
     <string name="display_name_summary" msgid="7155076491675565407">"&lt;Isto kao korisničko ime&gt;"</string>
     <string name="optional_summary" msgid="2363105560396317624">"&lt;Opcionalno&gt;"</string>
     <string name="advanced_settings_show" msgid="7838761602853998622">"▷ Dodirnite da biste prikazali sve"</string>
@@ -76,5 +76,5 @@
     <string name="no_voip" msgid="3038021971231952704">"SIP pozivanje nije podržano"</string>
     <string name="sip_system_decide" msgid="5577696249416700671">"Automatski"</string>
     <string name="sip_always_send_keepalive" msgid="4773022409239823318">"Uvek šalji"</string>
-    <string name="sip_connection_service_label" msgid="6935325004265884453">"Ugrađena funkcija SIP poziva"</string>
+    <string name="sip_connection_service_label" msgid="6935325004265884453">"Ugrađena funkcija SIP pozivanja"</string>
 </resources>
diff --git a/sip/res/values-be-rBY/strings.xml b/sip/res/values-be/strings.xml
similarity index 98%
rename from sip/res/values-be-rBY/strings.xml
rename to sip/res/values-be/strings.xml
index a848c52..1ba21bb 100644
--- a/sip/res/values-be-rBY/strings.xml
+++ b/sip/res/values-be/strings.xml
@@ -48,8 +48,8 @@
     <string name="registration_status_invalid_credentials" msgid="8406872554323334182">"Няўдалая рэгістрацыя ўліковага запісу: няправільнае імя карыстальніка або пароль."</string>
     <string name="registration_status_server_unreachable" msgid="7710275557045148634">"Няўдалая рэгістрацыя ўліковага запісу: праверце імя сервера."</string>
     <string name="third_party_account_summary" msgid="9041060473615403041">"Гэты ўліковы запіс зараз выкарыстоўваецца праграмай <xliff:g id="ACCOUNT_OWNER">%s</xliff:g>."</string>
-    <string name="sip_edit_title" msgid="1967247832635750410">"Дэталі уліковага запісу SIP"</string>
-    <string name="sip_edit_new_title" msgid="266414118302574305">"Дэталі уліковага запісу SIP"</string>
+    <string name="sip_edit_title" msgid="1967247832635750410">"Ул. запіс SIP"</string>
+    <string name="sip_edit_new_title" msgid="266414118302574305">"Ул. запіс SIP"</string>
     <string name="domain_address_title" msgid="1968479941328225423">"Сервер"</string>
     <string name="username_title" msgid="6770064611005663470">"Імя карыстальніка"</string>
     <string name="password_title" msgid="5289013731515564295">"Пароль"</string>
diff --git a/sip/res/values-bg/strings.xml b/sip/res/values-bg/strings.xml
index 97c7ef4..d6830ed 100644
--- a/sip/res/values-bg/strings.xml
+++ b/sip/res/values-bg/strings.xml
@@ -48,7 +48,7 @@
     <string name="registration_status_invalid_credentials" msgid="8406872554323334182">"Профилът не бе регистриран успешно: Неправилно потребителско име или парола."</string>
     <string name="registration_status_server_unreachable" msgid="7710275557045148634">"Профилът не бе регистриран успешно: Проверете името на сървъра."</string>
     <string name="third_party_account_summary" msgid="9041060473615403041">"Този профил понастоящем се използва от приложението <xliff:g id="ACCOUNT_OWNER">%s</xliff:g>."</string>
-    <string name="sip_edit_title" msgid="1967247832635750410">"Подробности за профила за SIP"</string>
+    <string name="sip_edit_title" msgid="1967247832635750410">"Профил за SIP"</string>
     <string name="sip_edit_new_title" msgid="266414118302574305">"Подробности за профила за SIP"</string>
     <string name="domain_address_title" msgid="1968479941328225423">"Сървър"</string>
     <string name="username_title" msgid="6770064611005663470">"Потребителско име"</string>
diff --git a/sip/res/values-bn-rBD/strings.xml b/sip/res/values-bn/strings.xml
similarity index 100%
rename from sip/res/values-bn-rBD/strings.xml
rename to sip/res/values-bn/strings.xml
diff --git a/sip/res/values-bs-rBA/strings.xml b/sip/res/values-bs/strings.xml
similarity index 100%
rename from sip/res/values-bs-rBA/strings.xml
rename to sip/res/values-bs/strings.xml
diff --git a/sip/res/values-ca/strings.xml b/sip/res/values-ca/strings.xml
index 4f6d30a..4b8661f 100644
--- a/sip/res/values-ca/strings.xml
+++ b/sip/res/values-ca/strings.xml
@@ -48,8 +48,8 @@
     <string name="registration_status_invalid_credentials" msgid="8406872554323334182">"S\'ha produït un error en registrar el compte: el nom d\'usuari o la contrasenya no són correctes."</string>
     <string name="registration_status_server_unreachable" msgid="7710275557045148634">"S\'ha produït un error en registrar el compte: comprova el nom del servidor."</string>
     <string name="third_party_account_summary" msgid="9041060473615403041">"L\'aplicació <xliff:g id="ACCOUNT_OWNER">%s</xliff:g> està utilitzant aquest compte actualment."</string>
-    <string name="sip_edit_title" msgid="1967247832635750410">"Detalls del compte SIP"</string>
-    <string name="sip_edit_new_title" msgid="266414118302574305">"Detalls del compte SIP"</string>
+    <string name="sip_edit_title" msgid="1967247832635750410">"Compte SIP"</string>
+    <string name="sip_edit_new_title" msgid="266414118302574305">"Compte SIP"</string>
     <string name="domain_address_title" msgid="1968479941328225423">"Servidor"</string>
     <string name="username_title" msgid="6770064611005663470">"Nom d\'usuari"</string>
     <string name="password_title" msgid="5289013731515564295">"Contrasenya"</string>
@@ -66,7 +66,7 @@
     <string name="default_preference_summary_domain_address" msgid="4871971710197441673">"&lt;No definit&gt;"</string>
     <string name="display_name_summary" msgid="7155076491675565407">"&lt;Igual que el nom d\'usuari&gt;"</string>
     <string name="optional_summary" msgid="2363105560396317624">"&lt;Opcional&gt;"</string>
-    <string name="advanced_settings_show" msgid="7838761602853998622">"▷ Toca per mostrar-ho tot."</string>
+    <string name="advanced_settings_show" msgid="7838761602853998622">"▷ Toca per mostrar-ho tot"</string>
     <string name="advanced_settings_hide" msgid="3480554978705290228">"▽ Toca per amagar-ho tot."</string>
     <string name="all_empty_alert" msgid="4087734950375192387">"Introdueix els detalls del compte SIP nou."</string>
     <string name="empty_alert" msgid="6659484914371384024">"<xliff:g id="INPUT_FIELD_NAME">%s</xliff:g> és obligatori i no es pot deixar en blanc."</string>
diff --git a/sip/res/values-da/strings.xml b/sip/res/values-da/strings.xml
index 6ccbaec..7016e14 100644
--- a/sip/res/values-da/strings.xml
+++ b/sip/res/values-da/strings.xml
@@ -25,7 +25,7 @@
     <string name="sip_call_options_wifi_only_title" msgid="5112579243580893890">"Anvend SIP-opkald (kun Wi-Fi)"</string>
     <string name="sip_call_options_entry_1" msgid="7217659161237099900">"Gælder alle opkald ved tilgængeligt datanetværk"</string>
     <string name="sip_call_options_entry_2" msgid="1815335903940609729">"Kun for SIP-opkald"</string>
-    <string name="sip_call_options_wifi_only_entry_1" msgid="1358513095551847314">"Gælder alle opkald"</string>
+    <string name="sip_call_options_wifi_only_entry_1" msgid="1358513095551847314">"For alle opkald"</string>
     <string name="add_sip_account" msgid="800843669753980091">"Tilføj konto"</string>
     <string name="remove_sip_account" msgid="1367664438506503690">"Fjern konto"</string>
     <string name="sip_account_list" msgid="5610858485304821480">"SIP-konti"</string>
diff --git a/sip/res/values-el/strings.xml b/sip/res/values-el/strings.xml
index 4c04b81..bed0726 100644
--- a/sip/res/values-el/strings.xml
+++ b/sip/res/values-el/strings.xml
@@ -48,8 +48,8 @@
     <string name="registration_status_invalid_credentials" msgid="8406872554323334182">"Αποτυχία εγγραφής λογαριασμού: Εσφαλμένο όνομα χρήστη ή κωδικός πρόσβασης."</string>
     <string name="registration_status_server_unreachable" msgid="7710275557045148634">"Αποτυχία εγγραφής λογαριασμού: Ελέγξτε το όνομα του διακομιστή."</string>
     <string name="third_party_account_summary" msgid="9041060473615403041">"Αυτήν τη στιγμή ο λογαριασμός χρησιμοποιείται από την εφαρμογή <xliff:g id="ACCOUNT_OWNER">%s</xliff:g>."</string>
-    <string name="sip_edit_title" msgid="1967247832635750410">"Πληροφορίες λογαριασμού SIP"</string>
-    <string name="sip_edit_new_title" msgid="266414118302574305">"Πληροφορίες λογαριασμού SIP"</string>
+    <string name="sip_edit_title" msgid="1967247832635750410">"Λογ. SIP"</string>
+    <string name="sip_edit_new_title" msgid="266414118302574305">"Λογ. SIP"</string>
     <string name="domain_address_title" msgid="1968479941328225423">"Διακομιστής"</string>
     <string name="username_title" msgid="6770064611005663470">"Όνομα χρήστη"</string>
     <string name="password_title" msgid="5289013731515564295">"Κωδικός πρόσβασης"</string>
diff --git a/sip/res/values-es-rUS/strings.xml b/sip/res/values-es-rUS/strings.xml
index 168ab60..dc0615f 100644
--- a/sip/res/values-es-rUS/strings.xml
+++ b/sip/res/values-es-rUS/strings.xml
@@ -61,9 +61,9 @@
     <string name="advanced_settings" msgid="6622996380747040711">"Configuración opcional"</string>
     <string name="auth_username_title" msgid="8262491689004708265">"Nombre de usuario de autenticación"</string>
     <string name="auth_username_summary" msgid="941160241371436473">"Nombre de usuario utilizado para autenticación"</string>
-    <string name="default_preference_summary_username" msgid="8404717434312826082">"&lt;No establecido&gt;"</string>
-    <string name="default_preference_summary_password" msgid="4464464672997027904">"&lt;No establecida&gt;"</string>
-    <string name="default_preference_summary_domain_address" msgid="4871971710197441673">"&lt;No establecida&gt;"</string>
+    <string name="default_preference_summary_username" msgid="8404717434312826082">"&lt;Sin configurar&gt;"</string>
+    <string name="default_preference_summary_password" msgid="4464464672997027904">"&lt;Sin configurar&gt;"</string>
+    <string name="default_preference_summary_domain_address" msgid="4871971710197441673">"&lt;Sin configurar&gt;"</string>
     <string name="display_name_summary" msgid="7155076491675565407">"&lt;Igual que el nombre de usuario&gt;"</string>
     <string name="optional_summary" msgid="2363105560396317624">"&lt;Opcional&gt;"</string>
     <string name="advanced_settings_show" msgid="7838761602853998622">"▷ Tocar para mostrar todo"</string>
diff --git a/sip/res/values-es/strings.xml b/sip/res/values-es/strings.xml
index 46e2021..60da3b7 100644
--- a/sip/res/values-es/strings.xml
+++ b/sip/res/values-es/strings.xml
@@ -48,8 +48,8 @@
     <string name="registration_status_invalid_credentials" msgid="8406872554323334182">"Registro de cuenta incorrecto: nombre de usuario o contraseña incorrectos."</string>
     <string name="registration_status_server_unreachable" msgid="7710275557045148634">"Error al registrar la cuenta: comprueba el nombre del servidor."</string>
     <string name="third_party_account_summary" msgid="9041060473615403041">"La aplicación <xliff:g id="ACCOUNT_OWNER">%s</xliff:g> está utilizando esta cuenta en este momento."</string>
-    <string name="sip_edit_title" msgid="1967247832635750410">"Detalles de cuenta SIP"</string>
-    <string name="sip_edit_new_title" msgid="266414118302574305">"Detalles de cuenta SIP"</string>
+    <string name="sip_edit_title" msgid="1967247832635750410">"Cuenta SIP"</string>
+    <string name="sip_edit_new_title" msgid="266414118302574305">"Cuenta SIP"</string>
     <string name="domain_address_title" msgid="1968479941328225423">"Servidor"</string>
     <string name="username_title" msgid="6770064611005663470">"Nombre de usuario"</string>
     <string name="password_title" msgid="5289013731515564295">"Contraseña"</string>
@@ -63,12 +63,12 @@
     <string name="auth_username_summary" msgid="941160241371436473">"Nombre de usuario utilizado para la autenticación"</string>
     <string name="default_preference_summary_username" msgid="8404717434312826082">"&lt;No configurado&gt;"</string>
     <string name="default_preference_summary_password" msgid="4464464672997027904">"&lt;No configurada&gt;"</string>
-    <string name="default_preference_summary_domain_address" msgid="4871971710197441673">"&lt;No configurada&gt;"</string>
+    <string name="default_preference_summary_domain_address" msgid="4871971710197441673">"&lt;No configurado&gt;"</string>
     <string name="display_name_summary" msgid="7155076491675565407">"&lt;Igual que el nombre de usuario&gt;"</string>
     <string name="optional_summary" msgid="2363105560396317624">"&lt;Opcional&gt;"</string>
     <string name="advanced_settings_show" msgid="7838761602853998622">"▷ Tocar para mostrar todo"</string>
     <string name="advanced_settings_hide" msgid="3480554978705290228">"▽ Toca para ocultar todo"</string>
-    <string name="all_empty_alert" msgid="4087734950375192387">"Introduce la información de la cuenta de SIP nueva."</string>
+    <string name="all_empty_alert" msgid="4087734950375192387">"Introduce la información de la nueva cuenta de SIP."</string>
     <string name="empty_alert" msgid="6659484914371384024">"El campo <xliff:g id="INPUT_FIELD_NAME">%s</xliff:g> es obligatorio y no se puede dejar en blanco."</string>
     <string name="not_a_valid_port" msgid="7931422555587011830">"El número de puerto debe estar comprendido entre 1.000 y 65.534."</string>
     <string name="no_internet_available" msgid="5523747991760017298">"Antes de realizar una llamada SIP, comprueba tu conexión a Internet."</string>
diff --git a/sip/res/values-et-rEE/strings.xml b/sip/res/values-et/strings.xml
similarity index 99%
rename from sip/res/values-et-rEE/strings.xml
rename to sip/res/values-et/strings.xml
index 46891c5..02379ba 100644
--- a/sip/res/values-et-rEE/strings.xml
+++ b/sip/res/values-et/strings.xml
@@ -19,7 +19,7 @@
     <string name="sip_settings" msgid="3768482698061677257">"SIP-i seaded"</string>
     <string name="sip_accounts" msgid="85559497282185405">"SIP-kontod"</string>
     <string name="sip_accounts_title" msgid="2082527045326874519">"Kontod"</string>
-    <string name="sip_receive_calls" msgid="426678617137462173">"Võta vastu sissetulevad kõned"</string>
+    <string name="sip_receive_calls" msgid="426678617137462173">"Sissetulevate kõnede vastuvõtmine"</string>
     <string name="sip_receive_calls_summary" msgid="946161517528227523">"Kasutab rohkem akut"</string>
     <string name="sip_call_options_title" msgid="8421210494703869806">"SIP-helistamise kasutus"</string>
     <string name="sip_call_options_wifi_only_title" msgid="5112579243580893890">"SIP-kõnede tegemine (ainult WiFi)"</string>
diff --git a/sip/res/values-eu-rES/strings.xml b/sip/res/values-eu/strings.xml
similarity index 100%
rename from sip/res/values-eu-rES/strings.xml
rename to sip/res/values-eu/strings.xml
diff --git a/sip/res/values-fa/strings.xml b/sip/res/values-fa/strings.xml
index d0552d9..2731021 100644
--- a/sip/res/values-fa/strings.xml
+++ b/sip/res/values-fa/strings.xml
@@ -76,5 +76,5 @@
     <string name="no_voip" msgid="3038021971231952704">"‏تماس SIP پشتیبانی نمی‌شود"</string>
     <string name="sip_system_decide" msgid="5577696249416700671">"خودکار"</string>
     <string name="sip_always_send_keepalive" msgid="4773022409239823318">"همیشه ارسال شود"</string>
-    <string name="sip_connection_service_label" msgid="6935325004265884453">"‏تماس SIP درونی"</string>
+    <string name="sip_connection_service_label" msgid="6935325004265884453">"‏تماس SIP داخلی"</string>
 </resources>
diff --git a/sip/res/values-gl-rES/strings.xml b/sip/res/values-gl/strings.xml
similarity index 99%
rename from sip/res/values-gl-rES/strings.xml
rename to sip/res/values-gl/strings.xml
index 74b9e4f..ec8b666 100644
--- a/sip/res/values-gl-rES/strings.xml
+++ b/sip/res/values-gl/strings.xml
@@ -20,7 +20,7 @@
     <string name="sip_accounts" msgid="85559497282185405">"Contas SIP"</string>
     <string name="sip_accounts_title" msgid="2082527045326874519">"Contas"</string>
     <string name="sip_receive_calls" msgid="426678617137462173">"Recibir chamadas entrantes"</string>
-    <string name="sip_receive_calls_summary" msgid="946161517528227523">"Consume máis batería"</string>
+    <string name="sip_receive_calls_summary" msgid="946161517528227523">"Consome máis batería"</string>
     <string name="sip_call_options_title" msgid="8421210494703869806">"Utilizar chamadas SIP"</string>
     <string name="sip_call_options_wifi_only_title" msgid="5112579243580893890">"Utilizar chamadas SIP (só coa wifi)"</string>
     <string name="sip_call_options_entry_1" msgid="7217659161237099900">"Para todas as chamadas cando a rede de datos está dispoñible"</string>
diff --git a/sip/res/values-gu-rIN/strings.xml b/sip/res/values-gu/strings.xml
similarity index 100%
rename from sip/res/values-gu-rIN/strings.xml
rename to sip/res/values-gu/strings.xml
diff --git a/sip/res/values-hi/strings.xml b/sip/res/values-hi/strings.xml
index 61122d5..db63b01 100644
--- a/sip/res/values-hi/strings.xml
+++ b/sip/res/values-hi/strings.xml
@@ -20,7 +20,7 @@
     <string name="sip_accounts" msgid="85559497282185405">"SIP खाते"</string>
     <string name="sip_accounts_title" msgid="2082527045326874519">"खाते"</string>
     <string name="sip_receive_calls" msgid="426678617137462173">"इनकमिंग कॉल प्राप्त करें"</string>
-    <string name="sip_receive_calls_summary" msgid="946161517528227523">"अधिक बैटरी जीवन काल का उपयोग करती है"</string>
+    <string name="sip_receive_calls_summary" msgid="946161517528227523">"अधिक बैटरीलाइफ़ काल का उपयोग करती है"</string>
     <string name="sip_call_options_title" msgid="8421210494703869806">"SIP कॉलिंग का उपयोग करें"</string>
     <string name="sip_call_options_wifi_only_title" msgid="5112579243580893890">"SIP कॉलिंग का उपयोग करें (केवल वाई-फ़ाई)"</string>
     <string name="sip_call_options_entry_1" msgid="7217659161237099900">"डेटा नेटवर्क उपलब्ध होने पर सभी कॉल के लिए"</string>
diff --git a/sip/res/values-hy-rAM/strings.xml b/sip/res/values-hy/strings.xml
similarity index 98%
rename from sip/res/values-hy-rAM/strings.xml
rename to sip/res/values-hy/strings.xml
index 8ff66c2..2cca1b7 100644
--- a/sip/res/values-hy-rAM/strings.xml
+++ b/sip/res/values-hy/strings.xml
@@ -66,7 +66,7 @@
     <string name="default_preference_summary_domain_address" msgid="4871971710197441673">"&lt;Սահմանված չէ&gt;"</string>
     <string name="display_name_summary" msgid="7155076491675565407">"&lt;Նույնը, ինչ օգտանունը&gt;"</string>
     <string name="optional_summary" msgid="2363105560396317624">"&lt;Ընտրովի&gt;"</string>
-    <string name="advanced_settings_show" msgid="7838761602853998622">"▷ Հպեք՝ ցուցադրելու ամենը"</string>
+    <string name="advanced_settings_show" msgid="7838761602853998622">"▷ Հպեք՝ տեսնելու համար"</string>
     <string name="advanced_settings_hide" msgid="3480554978705290228">"▽ Հպեք՝ թաքցնելու ամենը"</string>
     <string name="all_empty_alert" msgid="4087734950375192387">"Մուտքագրեք նոր SIP հաշվի տվյալները:"</string>
     <string name="empty_alert" msgid="6659484914371384024">"<xliff:g id="INPUT_FIELD_NAME">%s</xliff:g>-ը պարտադիր է և չի կարող լինել դատարկ:"</string>
diff --git a/sip/res/values-is-rIS/strings.xml b/sip/res/values-is/strings.xml
similarity index 100%
rename from sip/res/values-is-rIS/strings.xml
rename to sip/res/values-is/strings.xml
diff --git a/sip/res/values-iw/strings.xml b/sip/res/values-iw/strings.xml
index f358c2d..edd8d64 100644
--- a/sip/res/values-iw/strings.xml
+++ b/sip/res/values-iw/strings.xml
@@ -63,10 +63,10 @@
     <string name="auth_username_summary" msgid="941160241371436473">"שם משתמש המשמש לאימות"</string>
     <string name="default_preference_summary_username" msgid="8404717434312826082">"‏&lt;לא מוגדר&gt;"</string>
     <string name="default_preference_summary_password" msgid="4464464672997027904">"‏&lt;לא מוגדרת&gt;"</string>
-    <string name="default_preference_summary_domain_address" msgid="4871971710197441673">"‏&lt;לא מוגדרת&gt;"</string>
+    <string name="default_preference_summary_domain_address" msgid="4871971710197441673">"‏&lt;לא הוגדר&gt;"</string>
     <string name="display_name_summary" msgid="7155076491675565407">"‏&lt;זהה לשם משתמש&gt;"</string>
     <string name="optional_summary" msgid="2363105560396317624">"‏&lt;אופציונלי&gt;"</string>
-    <string name="advanced_settings_show" msgid="7838761602853998622">"גע כדי להציג את הכל"</string>
+    <string name="advanced_settings_show" msgid="7838761602853998622">"איפה כל ההגדרות?"</string>
     <string name="advanced_settings_hide" msgid="3480554978705290228">"▽ גע כדי להסתיר את הכל"</string>
     <string name="all_empty_alert" msgid="4087734950375192387">"‏הזן את פרטי חשבון ה-SIP החדש."</string>
     <string name="empty_alert" msgid="6659484914371384024">"<xliff:g id="INPUT_FIELD_NAME">%s</xliff:g> הוא שדה חובה ולא ניתן להשאיר אותו ריק."</string>
diff --git a/sip/res/values-ja/strings.xml b/sip/res/values-ja/strings.xml
index 3e48194..fdd791b 100644
--- a/sip/res/values-ja/strings.xml
+++ b/sip/res/values-ja/strings.xml
@@ -66,7 +66,7 @@
     <string name="default_preference_summary_domain_address" msgid="4871971710197441673">"&lt;未設定&gt;"</string>
     <string name="display_name_summary" msgid="7155076491675565407">"&lt;ユーザー名と同じ&gt;"</string>
     <string name="optional_summary" msgid="2363105560396317624">"&lt;オプション&gt;"</string>
-    <string name="advanced_settings_show" msgid="7838761602853998622">"▷すべて表示"</string>
+    <string name="advanced_settings_show" msgid="7838761602853998622">"▷タップしてすべて表示"</string>
     <string name="advanced_settings_hide" msgid="3480554978705290228">"▽すべて非表示"</string>
     <string name="all_empty_alert" msgid="4087734950375192387">"新しいSIPアカウントの詳細情報を入力してください。"</string>
     <string name="empty_alert" msgid="6659484914371384024">"「<xliff:g id="INPUT_FIELD_NAME">%s</xliff:g>」は必須です。空欄にはできません。"</string>
diff --git a/sip/res/values-ka-rGE/strings.xml b/sip/res/values-ka/strings.xml
similarity index 100%
rename from sip/res/values-ka-rGE/strings.xml
rename to sip/res/values-ka/strings.xml
diff --git a/sip/res/values-kk-rKZ/strings.xml b/sip/res/values-kk/strings.xml
similarity index 100%
rename from sip/res/values-kk-rKZ/strings.xml
rename to sip/res/values-kk/strings.xml
diff --git a/sip/res/values-km-rKH/strings.xml b/sip/res/values-km/strings.xml
similarity index 100%
rename from sip/res/values-km-rKH/strings.xml
rename to sip/res/values-km/strings.xml
diff --git a/sip/res/values-kn-rIN/strings.xml b/sip/res/values-kn/strings.xml
similarity index 83%
rename from sip/res/values-kn-rIN/strings.xml
rename to sip/res/values-kn/strings.xml
index c2b9583..e6896ec 100644
--- a/sip/res/values-kn-rIN/strings.xml
+++ b/sip/res/values-kn/strings.xml
@@ -16,19 +16,19 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="sip_settings" msgid="3768482698061677257">"SIP ಸೆಟ್ಟಿಂಗ್‌ಗಳು"</string>
-    <string name="sip_accounts" msgid="85559497282185405">"SIP ಖಾತೆಗಳು"</string>
+    <string name="sip_settings" msgid="3768482698061677257">"ಎಸ್‌ಐಪಿ ಸೆಟ್ಟಿಂಗ್‌ಗಳು"</string>
+    <string name="sip_accounts" msgid="85559497282185405">"ಎಸ್‌ಐಪಿ ಖಾತೆಗಳು"</string>
     <string name="sip_accounts_title" msgid="2082527045326874519">"ಖಾತೆಗಳು"</string>
     <string name="sip_receive_calls" msgid="426678617137462173">"ಒಳಬರುವ ಕರೆಗಳನ್ನು ಸ್ವೀಕರಿಸು"</string>
     <string name="sip_receive_calls_summary" msgid="946161517528227523">"ಹೆಚ್ಚು ಬ್ಯಾಟರಿಯನ್ನು ಬಳಸುತ್ತದೆ"</string>
-    <string name="sip_call_options_title" msgid="8421210494703869806">"SIP ಕರೆ ಮಾಡುವಿಕೆಯನ್ನು ಬಳಸಿ"</string>
-    <string name="sip_call_options_wifi_only_title" msgid="5112579243580893890">"SIP ಕರೆ ಮಾಡುವಿಕೆಯನ್ನು ಬಳಸಿ (ವೈ-ಫೈ ಮಾತ್ರ)"</string>
+    <string name="sip_call_options_title" msgid="8421210494703869806">"ಎಸ್‌ಐಪಿ ಕರೆ ಮಾಡುವಿಕೆಯನ್ನು ಬಳಸಿ"</string>
+    <string name="sip_call_options_wifi_only_title" msgid="5112579243580893890">"ಎಸ್‌ಐಪಿ ಕರೆ ಮಾಡುವಿಕೆಯನ್ನು ಬಳಸಿ (ವೈ-ಫೈ ಮಾತ್ರ)"</string>
     <string name="sip_call_options_entry_1" msgid="7217659161237099900">"ಡೇಟಾ ನೆಟ್‌ವರ್ಕ್‌ ಲಭ್ಯವಿರುವಾಗ ಎಲ್ಲ ಕರೆಗಳಿಗಾಗಿ"</string>
-    <string name="sip_call_options_entry_2" msgid="1815335903940609729">"ಕೇವಲ SIP ಕರೆಗಳಿಗೆ ಮಾತ್ರ"</string>
+    <string name="sip_call_options_entry_2" msgid="1815335903940609729">"ಕೇವಲ ಎಸ್‌ಐಪಿ ಕರೆಗಳಿಗೆ ಮಾತ್ರ"</string>
     <string name="sip_call_options_wifi_only_entry_1" msgid="1358513095551847314">"ಎಲ್ಲ ಕರೆಗಳಿಗಾಗಿ"</string>
     <string name="add_sip_account" msgid="800843669753980091">"ಖಾತೆ ಸೇರಿಸಿ"</string>
     <string name="remove_sip_account" msgid="1367664438506503690">"ಖಾತೆಯನ್ನು ತೆಗೆದುಹಾಕು"</string>
-    <string name="sip_account_list" msgid="5610858485304821480">"SIP ಖಾತೆಗಳು"</string>
+    <string name="sip_account_list" msgid="5610858485304821480">"ಎಸ್‌ಐಪಿ ಖಾತೆಗಳು"</string>
     <string name="saving_account" msgid="5336529880235177448">"ಖಾತೆಯನ್ನು ಉಳಿಸಲಾಗುತ್ತಿದೆ…"</string>
     <string name="removing_account" msgid="5537351356808985756">"ಖಾತೆಯನ್ನು ತೆಗೆದುಹಾಕಲಾಗುತ್ತಿದೆ…"</string>
     <string name="sip_menu_save" msgid="7882219814563869225">"ಉಳಿಸು"</string>
@@ -48,8 +48,8 @@
     <string name="registration_status_invalid_credentials" msgid="8406872554323334182">"ಖಾತೆ ನೋಂದಣಿಯು ಯಶಸ್ವಿಯಾಗಲಿಲ್ಲ: ಬಳಕೆದಾರರ ಹೆಸರು ಅಥವಾ ಪಾಸ್‌ವರ್ಡ್‌ ತಪ್ಪಾಗಿದೆ."</string>
     <string name="registration_status_server_unreachable" msgid="7710275557045148634">"ಖಾತೆ ನೋಂದಣಿಯು ಯಶಸ್ವಿಯಾಗಲಿಲ್ಲ: ಸರ್ವರ್‌ ಹೆಸರನ್ನು ಪರಿಶೀಲಿಸಿ."</string>
     <string name="third_party_account_summary" msgid="9041060473615403041">"ಈ ಖಾತೆಯನ್ನು ಪ್ರಸ್ತುತ <xliff:g id="ACCOUNT_OWNER">%s</xliff:g> ಅಪ್ಲಿಕೇಶನ್‌ ಬಳಸುತ್ತಿದೆ."</string>
-    <string name="sip_edit_title" msgid="1967247832635750410">"SIP ಖಾತೆ ವಿವರಗಳು"</string>
-    <string name="sip_edit_new_title" msgid="266414118302574305">"SIP ಖಾತೆ ವಿವರಗಳು"</string>
+    <string name="sip_edit_title" msgid="1967247832635750410">"ಎಸ್‌ಐಪಿ ಖಾತೆ ವಿವರಗಳು"</string>
+    <string name="sip_edit_new_title" msgid="266414118302574305">"ಎಸ್‌ಐಪಿ ಖಾತೆ ವಿವರಗಳು"</string>
     <string name="domain_address_title" msgid="1968479941328225423">"ಸರ್ವರ್"</string>
     <string name="username_title" msgid="6770064611005663470">"ಬಳಕೆದಾರಹೆಸರು"</string>
     <string name="password_title" msgid="5289013731515564295">"ಪಾಸ್‌ವರ್ಡ್"</string>
@@ -68,13 +68,13 @@
     <string name="optional_summary" msgid="2363105560396317624">"&lt;ಐಚ್ಛಿಕ&gt;"</string>
     <string name="advanced_settings_show" msgid="7838761602853998622">"▷ ಎಲ್ಲವನ್ನೂ ತೋರಿಸಲು ಸ್ಪರ್ಶಿಸಿ"</string>
     <string name="advanced_settings_hide" msgid="3480554978705290228">"▽ ಎಲ್ಲವನ್ನೂ ಮರೆಮಾಡಲು ಸ್ಪರ್ಶಿಸಿ"</string>
-    <string name="all_empty_alert" msgid="4087734950375192387">"ಹೊಸ SIP ಖಾತೆಯ ವಿವರಗಳನ್ನು ನಮೂದಿಸಿ."</string>
+    <string name="all_empty_alert" msgid="4087734950375192387">"ಹೊಸ ಎಸ್‌ಐಪಿ ಖಾತೆಯ ವಿವರಗಳನ್ನು ನಮೂದಿಸಿ."</string>
     <string name="empty_alert" msgid="6659484914371384024">"<xliff:g id="INPUT_FIELD_NAME">%s</xliff:g> ಅಗತ್ಯವಿದೆ ಮತ್ತು ಖಾಲಿ ಬಿಡುವಂತಿಲ್ಲ."</string>
     <string name="not_a_valid_port" msgid="7931422555587011830">"ಪೋರ್ಟ್‌ ಸಂಖ್ಯೆಯು 1000 ಮತ್ತು 65534 ರ ವ್ಯಾಪ್ತಿಯೊಳಗಿರಬೇಕು."</string>
-    <string name="no_internet_available" msgid="5523747991760017298">"SIP ಕರೆ ಮಾಡಲು, ಮೊದಲು ನಿಮ್ಮ ಇಂಟರ್ನೆಟ್ ಸಂಪರ್ಕವನ್ನು ಪರಿಶೀಲಿಸಿ."</string>
-    <string name="no_wifi_available" msgid="1955023904229673488">"SIP ಕರೆಗಳಿಗಾಗಿ ನೀವು ವೈ-ಫೈ ನೆಟ್‌ವರ್ಕ್‌ಗೆ ಸಂಪರ್ಕಗೊಂಡಿರುವ ಅಗತ್ಯವಿದೆ (ವೈರ್‌ಲೆಸ್ &amp; ನೆಟ್‌ವರ್ಕ್ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಬಳಸಿ)."</string>
-    <string name="no_voip" msgid="3038021971231952704">"SIP ಕರೆ ಮಾಡುವಿಕೆ ಬೆಂಬಲಿತವಾಗಿಲ್ಲ"</string>
+    <string name="no_internet_available" msgid="5523747991760017298">"ಎಸ್‌ಐಪಿ ಕರೆ ಮಾಡಲು, ಮೊದಲು ನಿಮ್ಮ ಇಂಟರ್ನೆಟ್ ಸಂಪರ್ಕವನ್ನು ಪರಿಶೀಲಿಸಿ."</string>
+    <string name="no_wifi_available" msgid="1955023904229673488">"ಎಸ್‌ಐಪಿ ಕರೆಗಳಿಗಾಗಿ ನೀವು ವೈ-ಫೈ ನೆಟ್‌ವರ್ಕ್‌ಗೆ ಸಂಪರ್ಕಗೊಂಡಿರುವ ಅಗತ್ಯವಿದೆ (ವೈರ್‌ಲೆಸ್ &amp; ನೆಟ್‌ವರ್ಕ್ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಬಳಸಿ)."</string>
+    <string name="no_voip" msgid="3038021971231952704">"ಎಸ್‌ಐಪಿ ಕರೆ ಮಾಡುವಿಕೆ ಬೆಂಬಲಿತವಾಗಿಲ್ಲ"</string>
     <string name="sip_system_decide" msgid="5577696249416700671">"ಸ್ವಯಂಚಾಲಿತ"</string>
     <string name="sip_always_send_keepalive" msgid="4773022409239823318">"ಯಾವಾಗಲೂ ಕಳುಹಿಸು"</string>
-    <string name="sip_connection_service_label" msgid="6935325004265884453">"ಅಂತರ್ನಿರ್ಮಿತ SIP ಕರೆ ಮಾಡುವಿಕೆ"</string>
+    <string name="sip_connection_service_label" msgid="6935325004265884453">"ಅಂತರ್ನಿರ್ಮಿತ ಎಸ್‌ಐಪಿ ಕರೆ ಮಾಡುವಿಕೆ"</string>
 </resources>
diff --git a/sip/res/values-ky-rKG/strings.xml b/sip/res/values-ky/strings.xml
similarity index 100%
rename from sip/res/values-ky-rKG/strings.xml
rename to sip/res/values-ky/strings.xml
diff --git a/sip/res/values-lo-rLA/strings.xml b/sip/res/values-lo/strings.xml
similarity index 95%
rename from sip/res/values-lo-rLA/strings.xml
rename to sip/res/values-lo/strings.xml
index f163f0a..2c202cb 100644
--- a/sip/res/values-lo-rLA/strings.xml
+++ b/sip/res/values-lo/strings.xml
@@ -45,13 +45,13 @@
     <string name="registration_status_not_running" msgid="514205414303796800">"ການ​ລົງທະບຽນ​ບັນຊີ​ບໍ່ສຳເລັດ."</string>
     <string name="registration_status_done" msgid="3264961069247314253">"ຮັບສາຍ."</string>
     <string name="registration_status_failed_try_later" msgid="2199970021756384317">"ການ​ລົງທະບຽນ​ບັນຊີ​ບໍ່ສຳເລັດ: (<xliff:g id="REGISTRATION_ERROR_MESSAGE">%s</xliff:g>); ຈະ​ລອງ​ໃໝ່​ໃນ​ພາຍຫຼັງ"</string>
-    <string name="registration_status_invalid_credentials" msgid="8406872554323334182">"ການ​ລົງທະບຽນ​ບັນຊີ​ບໍ່ສຳເລັດ: ຊື່ຜູ່ໃຊ້ ຫຼື​ລະຫັດຜ່ານ​ບໍ່ຖືກຕ້ອງ."</string>
+    <string name="registration_status_invalid_credentials" msgid="8406872554323334182">"ການ​ລົງທະບຽນ​ບັນຊີ​ບໍ່ສຳເລັດ: ຊື່ຜູ້ໃຊ້ ຫຼື​ລະຫັດຜ່ານ​ບໍ່ຖືກຕ້ອງ."</string>
     <string name="registration_status_server_unreachable" msgid="7710275557045148634">"ການ​ລົງທະບຽນ​ບັນຊີ​ບໍ່​ສຳເລັດ: ກະລຸນາ​ກວດສອບ​ຊື່​ເຊີບເວີ."</string>
     <string name="third_party_account_summary" msgid="9041060473615403041">"ແອັບຯ <xliff:g id="ACCOUNT_OWNER">%s</xliff:g> ກຳລັງໃຊ້ບັນຊີນີ້ຢູ່"</string>
     <string name="sip_edit_title" msgid="1967247832635750410">"ລາຍລະອຽດບັນຊີ SIP"</string>
     <string name="sip_edit_new_title" msgid="266414118302574305">"ລາຍລະອຽດບັນຊີ SIP"</string>
     <string name="domain_address_title" msgid="1968479941328225423">"ເຊີບເວີ"</string>
-    <string name="username_title" msgid="6770064611005663470">"ຊື່ຜູ່ໃຊ້"</string>
+    <string name="username_title" msgid="6770064611005663470">"ຊື່ຜູ້ໃຊ້"</string>
     <string name="password_title" msgid="5289013731515564295">"ລະຫັດຜ່ານ"</string>
     <string name="display_name_title" msgid="579241787583079773">"ຊື່ທີ່ສະແດງ"</string>
     <string name="proxy_address_title" msgid="6890163365640631841">"ທີ່ຢູ່ Proxy ຂາອອກ"</string>
@@ -59,12 +59,12 @@
     <string name="transport_title" msgid="889155457465372527">"ປະເພດການສົ່ງຂໍ້ມູນ"</string>
     <string name="send_keepalive_title" msgid="599627072150501159">"ສົ່ງ keep-alive"</string>
     <string name="advanced_settings" msgid="6622996380747040711">"ການ​ຕັ້ງ​ຄ່າທາງ​ເລືອກ​ເສີມ"</string>
-    <string name="auth_username_title" msgid="8262491689004708265">"ຊື່​ຜູ່ໃຊ້​ສຳລັບ​ການ​ພິສູດ​ຢືນຢັນ​ໂຕ"</string>
-    <string name="auth_username_summary" msgid="941160241371436473">"ຊື່​ຜູ່ໃຊ້​ເພື່ອ​ການ​ພິສູດ​ຢືນຢັນ​ໂຕ"</string>
+    <string name="auth_username_title" msgid="8262491689004708265">"ຊື່​ຜູ້ໃຊ້​ສຳລັບ​ການ​ພິສູດ​ຢືນຢັນ​ຕົວ"</string>
+    <string name="auth_username_summary" msgid="941160241371436473">"ຊື່​ຜູ້ໃຊ້​ເພື່ອ​ການ​ພິສູດ​ຢືນຢັນ​ຕົວ"</string>
     <string name="default_preference_summary_username" msgid="8404717434312826082">"&lt;ບໍ່ໄດ້ຕັ້ງ&gt;"</string>
     <string name="default_preference_summary_password" msgid="4464464672997027904">"&lt;ບໍ່ໄດ້ຕັ້ງ&gt;"</string>
     <string name="default_preference_summary_domain_address" msgid="4871971710197441673">"&lt;ບໍ່ໄດ້ຕັ້ງ&gt;"</string>
-    <string name="display_name_summary" msgid="7155076491675565407">"&lt;ອັນດຽວກັບຊື່ຜູ່ໃຊ້&gt;"</string>
+    <string name="display_name_summary" msgid="7155076491675565407">"&lt;ອັນດຽວກັບຊື່ຜູ້ໃຊ້&gt;"</string>
     <string name="optional_summary" msgid="2363105560396317624">"&lt;ໂຕເລືອກເສີມ&gt;"</string>
     <string name="advanced_settings_show" msgid="7838761602853998622">"▷ ແຕະ​ເພື່ອ​ສະແດງ​ທັງໝົດ"</string>
     <string name="advanced_settings_hide" msgid="3480554978705290228">"▽ ແຕະ​ເພື່ອ​ເຊື່ອງ​ທັງໝົດ"</string>
diff --git a/sip/res/values-mk-rMK/strings.xml b/sip/res/values-mk/strings.xml
similarity index 100%
rename from sip/res/values-mk-rMK/strings.xml
rename to sip/res/values-mk/strings.xml
diff --git a/sip/res/values-ml-rIN/strings.xml b/sip/res/values-ml/strings.xml
similarity index 100%
rename from sip/res/values-ml-rIN/strings.xml
rename to sip/res/values-ml/strings.xml
diff --git a/sip/res/values-mn-rMN/strings.xml b/sip/res/values-mn/strings.xml
similarity index 100%
rename from sip/res/values-mn-rMN/strings.xml
rename to sip/res/values-mn/strings.xml
diff --git a/sip/res/values-mr-rIN/strings.xml b/sip/res/values-mr/strings.xml
similarity index 100%
rename from sip/res/values-mr-rIN/strings.xml
rename to sip/res/values-mr/strings.xml
diff --git a/sip/res/values-ms-rMY/strings.xml b/sip/res/values-ms/strings.xml
similarity index 100%
rename from sip/res/values-ms-rMY/strings.xml
rename to sip/res/values-ms/strings.xml
diff --git a/sip/res/values-my-rMM/strings.xml b/sip/res/values-my/strings.xml
similarity index 99%
rename from sip/res/values-my-rMM/strings.xml
rename to sip/res/values-my/strings.xml
index 6703596..eb32dda 100644
--- a/sip/res/values-my-rMM/strings.xml
+++ b/sip/res/values-my/strings.xml
@@ -31,7 +31,7 @@
     <string name="sip_account_list" msgid="5610858485304821480">"SIP အကောင့်များ"</string>
     <string name="saving_account" msgid="5336529880235177448">"အကောင့်ကို သိမ်းဆည်းနေ…"</string>
     <string name="removing_account" msgid="5537351356808985756">"အကောင့်ကို ဖယ်ရှားနေ…"</string>
-    <string name="sip_menu_save" msgid="7882219814563869225">"သိမ်းပါ"</string>
+    <string name="sip_menu_save" msgid="7882219814563869225">"သိမ်းရန်"</string>
     <string name="sip_menu_discard" msgid="2350421645423888438">"ဖယ်ပစ်ရန်"</string>
     <string name="alert_dialog_close" msgid="1326011828713435134">"ပရိုဖိုင်ကို ပိတ်ရန်"</string>
     <string name="alert_dialog_ok" msgid="4752048404605388940">"အိုကေ"</string>
diff --git a/sip/res/values-nb/strings.xml b/sip/res/values-nb/strings.xml
index 160fbb1..0ce35ed 100644
--- a/sip/res/values-nb/strings.xml
+++ b/sip/res/values-nb/strings.xml
@@ -20,7 +20,7 @@
     <string name="sip_accounts" msgid="85559497282185405">"SIP-kontoer"</string>
     <string name="sip_accounts_title" msgid="2082527045326874519">"Kontoer"</string>
     <string name="sip_receive_calls" msgid="426678617137462173">"Motta innkommende anrop"</string>
-    <string name="sip_receive_calls_summary" msgid="946161517528227523">"Bruker mer batterilevetid"</string>
+    <string name="sip_receive_calls_summary" msgid="946161517528227523">"Bruker mer batteri"</string>
     <string name="sip_call_options_title" msgid="8421210494703869806">"Bruk SIP-anrop"</string>
     <string name="sip_call_options_wifi_only_title" msgid="5112579243580893890">"Bruk SIP-anrop (kun for Wi-Fi)"</string>
     <string name="sip_call_options_entry_1" msgid="7217659161237099900">"For alle anrop hvor datanettverk er tilgjengelige"</string>
diff --git a/sip/res/values-ne-rNP/strings.xml b/sip/res/values-ne/strings.xml
similarity index 99%
rename from sip/res/values-ne-rNP/strings.xml
rename to sip/res/values-ne/strings.xml
index 727ba5a..2f9010b 100644
--- a/sip/res/values-ne-rNP/strings.xml
+++ b/sip/res/values-ne/strings.xml
@@ -72,7 +72,7 @@
     <string name="empty_alert" msgid="6659484914371384024">"<xliff:g id="INPUT_FIELD_NAME">%s</xliff:g> चाहिन्छ र खाली छोड्न सकिँदैन।"</string>
     <string name="not_a_valid_port" msgid="7931422555587011830">"पोर्ट संख्या १००० र  ६५५३४ को बीचमा हुनुपर्छ।"</string>
     <string name="no_internet_available" msgid="5523747991760017298">"एक SIP कल गर्नका लागि पहिले तपाईंको इन्टरनेट जडान जाँच गर्नुहोस्।"</string>
-    <string name="no_wifi_available" msgid="1955023904229673488">"SIP कलका लागि तपाईँ एउटा Wi-Fi सञ्जालमा जडित हुन पर्छ (ताररहित &amp; सञ्जाल सेटिङ प्रयोग गर्नुहोस्)."</string>
+    <string name="no_wifi_available" msgid="1955023904229673488">"SIP कलका लागि तपाईं एउटा Wi-Fi सञ्जालमा जडित हुन पर्छ (ताररहित &amp; सञ्जाल सेटिङ प्रयोग गर्नुहोस्)."</string>
     <string name="no_voip" msgid="3038021971231952704">"SIP कल गर्न समर्थित छैन"</string>
     <string name="sip_system_decide" msgid="5577696249416700671">"स्वचालित"</string>
     <string name="sip_always_send_keepalive" msgid="4773022409239823318">"सधैँ पठाउनुहोस्"</string>
diff --git a/sip/res/values-nl/strings.xml b/sip/res/values-nl/strings.xml
index 1c24e0e..4715559 100644
--- a/sip/res/values-nl/strings.xml
+++ b/sip/res/values-nl/strings.xml
@@ -20,7 +20,7 @@
     <string name="sip_accounts" msgid="85559497282185405">"SIP-accounts"</string>
     <string name="sip_accounts_title" msgid="2082527045326874519">"Accounts"</string>
     <string name="sip_receive_calls" msgid="426678617137462173">"Binnenkomende oproepen ontvangen"</string>
-    <string name="sip_receive_calls_summary" msgid="946161517528227523">"Gebruikt meer acculading"</string>
+    <string name="sip_receive_calls_summary" msgid="946161517528227523">"Gebruikt meer batterijlading"</string>
     <string name="sip_call_options_title" msgid="8421210494703869806">"SIP-oproepen gebruiken"</string>
     <string name="sip_call_options_wifi_only_title" msgid="5112579243580893890">"SIP-oproepen gebruiken (alleen wifi)"</string>
     <string name="sip_call_options_entry_1" msgid="7217659161237099900">"Voor alle oproepen indien gegevensnetwerk beschikbaar is"</string>
diff --git a/sip/res/values-pa-rIN/strings.xml b/sip/res/values-pa/strings.xml
similarity index 100%
rename from sip/res/values-pa-rIN/strings.xml
rename to sip/res/values-pa/strings.xml
diff --git a/sip/res/values-si-rLK/strings.xml b/sip/res/values-si/strings.xml
similarity index 100%
rename from sip/res/values-si-rLK/strings.xml
rename to sip/res/values-si/strings.xml
diff --git a/sip/res/values-sk/strings.xml b/sip/res/values-sk/strings.xml
index 96cf144..872edcb 100644
--- a/sip/res/values-sk/strings.xml
+++ b/sip/res/values-sk/strings.xml
@@ -66,7 +66,7 @@
     <string name="default_preference_summary_domain_address" msgid="4871971710197441673">"&lt;Nenastavené&gt;"</string>
     <string name="display_name_summary" msgid="7155076491675565407">"&lt;Rovnaké ako používateľské meno&gt;"</string>
     <string name="optional_summary" msgid="2363105560396317624">"&lt;Voliteľné&gt;"</string>
-    <string name="advanced_settings_show" msgid="7838761602853998622">"▷ Klepnutím všetko zobrazíte"</string>
+    <string name="advanced_settings_show" msgid="7838761602853998622">"▷ Klepnutím zobrazíte všetky"</string>
     <string name="advanced_settings_hide" msgid="3480554978705290228">"▽ Klepnutím všetko skryjete"</string>
     <string name="all_empty_alert" msgid="4087734950375192387">"Zadajte informácie o novom účte SIP."</string>
     <string name="empty_alert" msgid="6659484914371384024">"Pole <xliff:g id="INPUT_FIELD_NAME">%s</xliff:g> je povinné a nemôže zostať prázdne."</string>
diff --git a/sip/res/values-sq-rAL/strings.xml b/sip/res/values-sq/strings.xml
similarity index 100%
rename from sip/res/values-sq-rAL/strings.xml
rename to sip/res/values-sq/strings.xml
diff --git a/sip/res/values-sr/strings.xml b/sip/res/values-sr/strings.xml
index 2ac09e3..4d38760 100644
--- a/sip/res/values-sr/strings.xml
+++ b/sip/res/values-sr/strings.xml
@@ -21,8 +21,8 @@
     <string name="sip_accounts_title" msgid="2082527045326874519">"Налози"</string>
     <string name="sip_receive_calls" msgid="426678617137462173">"Примај долазне позиве"</string>
     <string name="sip_receive_calls_summary" msgid="946161517528227523">"Више троши батерију"</string>
-    <string name="sip_call_options_title" msgid="8421210494703869806">"Користите SIP позиве"</string>
-    <string name="sip_call_options_wifi_only_title" msgid="5112579243580893890">"Користите SIP позиве (само за Wi-Fi)"</string>
+    <string name="sip_call_options_title" msgid="8421210494703869806">"Користите SIP позивање"</string>
+    <string name="sip_call_options_wifi_only_title" msgid="5112579243580893890">"Користите SIP позивање (само за Wi-Fi)"</string>
     <string name="sip_call_options_entry_1" msgid="7217659161237099900">"За све позиве када је мрежа за пренос података доступна"</string>
     <string name="sip_call_options_entry_2" msgid="1815335903940609729">"Само за SIP позиве"</string>
     <string name="sip_call_options_wifi_only_entry_1" msgid="1358513095551847314">"За све позиве"</string>
@@ -62,8 +62,8 @@
     <string name="auth_username_title" msgid="8262491689004708265">"Корисничко име за потврду идентитета"</string>
     <string name="auth_username_summary" msgid="941160241371436473">"За потврду идентитета користи се корисничко име"</string>
     <string name="default_preference_summary_username" msgid="8404717434312826082">"&lt;Није подешено&gt;"</string>
-    <string name="default_preference_summary_password" msgid="4464464672997027904">"&lt;Није подешенa&gt;"</string>
-    <string name="default_preference_summary_domain_address" msgid="4871971710197441673">"&lt;Није подешенa&gt;"</string>
+    <string name="default_preference_summary_password" msgid="4464464672997027904">"&lt;Није подешено&gt;"</string>
+    <string name="default_preference_summary_domain_address" msgid="4871971710197441673">"&lt;Није подешено&gt;"</string>
     <string name="display_name_summary" msgid="7155076491675565407">"&lt;Исто као корисничко име&gt;"</string>
     <string name="optional_summary" msgid="2363105560396317624">"&lt;Опционално&gt;"</string>
     <string name="advanced_settings_show" msgid="7838761602853998622">"▷ Додирните да бисте приказали све"</string>
@@ -76,5 +76,5 @@
     <string name="no_voip" msgid="3038021971231952704">"SIP позивање није подржано"</string>
     <string name="sip_system_decide" msgid="5577696249416700671">"Аутоматски"</string>
     <string name="sip_always_send_keepalive" msgid="4773022409239823318">"Увек шаљи"</string>
-    <string name="sip_connection_service_label" msgid="6935325004265884453">"Уграђена функција SIP позива"</string>
+    <string name="sip_connection_service_label" msgid="6935325004265884453">"Уграђена функција SIP позивања"</string>
 </resources>
diff --git a/sip/res/values-ta-rIN/strings.xml b/sip/res/values-ta/strings.xml
similarity index 100%
rename from sip/res/values-ta-rIN/strings.xml
rename to sip/res/values-ta/strings.xml
diff --git a/sip/res/values-te-rIN/strings.xml b/sip/res/values-te/strings.xml
similarity index 100%
rename from sip/res/values-te-rIN/strings.xml
rename to sip/res/values-te/strings.xml
diff --git a/sip/res/values-ur-rPK/strings.xml b/sip/res/values-ur/strings.xml
similarity index 99%
rename from sip/res/values-ur-rPK/strings.xml
rename to sip/res/values-ur/strings.xml
index 8c070e2..4fe7bd8 100644
--- a/sip/res/values-ur-rPK/strings.xml
+++ b/sip/res/values-ur/strings.xml
@@ -48,7 +48,7 @@
     <string name="registration_status_invalid_credentials" msgid="8406872554323334182">"اکاؤنٹ رجسٹریشن ناکام ہوگیا: غلط صارف نام یا پاس ورڈ۔"</string>
     <string name="registration_status_server_unreachable" msgid="7710275557045148634">"اکاؤنٹ رجسٹریشن ناکام ہوگیا: سرور کا نام چیک کریں۔"</string>
     <string name="third_party_account_summary" msgid="9041060473615403041">"یہ اکاؤنٹ فی الحال <xliff:g id="ACCOUNT_OWNER">%s</xliff:g> ایپ کے ذریعہ زیر استعمال ہے۔"</string>
-    <string name="sip_edit_title" msgid="1967247832635750410">"‏SIP اکاؤنٹ کی تفصیلات"</string>
+    <string name="sip_edit_title" msgid="1967247832635750410">"‏SIP اکاؤنٹ تفصیلات"</string>
     <string name="sip_edit_new_title" msgid="266414118302574305">"‏SIP اکاؤنٹ کی تفصیلات"</string>
     <string name="domain_address_title" msgid="1968479941328225423">"سرور"</string>
     <string name="username_title" msgid="6770064611005663470">"صارف نام"</string>
diff --git a/sip/res/values-uz-rUZ/strings.xml b/sip/res/values-uz/strings.xml
similarity index 94%
rename from sip/res/values-uz-rUZ/strings.xml
rename to sip/res/values-uz/strings.xml
index 3fb9145..1263e0c 100644
--- a/sip/res/values-uz-rUZ/strings.xml
+++ b/sip/res/values-uz/strings.xml
@@ -19,13 +19,13 @@
     <string name="sip_settings" msgid="3768482698061677257">"SIP sozlamalari"</string>
     <string name="sip_accounts" msgid="85559497282185405">"SIP hisoblari"</string>
     <string name="sip_accounts_title" msgid="2082527045326874519">"Hisoblar"</string>
-    <string name="sip_receive_calls" msgid="426678617137462173">"Kiruvchi qo‘ng‘iroqlarni qabul qilish"</string>
+    <string name="sip_receive_calls" msgid="426678617137462173">"Kiruvchi chaqiruvlarni qabul qilish"</string>
     <string name="sip_receive_calls_summary" msgid="946161517528227523">"Batareya quvvati tezroq sarflanadi"</string>
-    <string name="sip_call_options_title" msgid="8421210494703869806">"SIP orqali qo‘ng‘iroq"</string>
+    <string name="sip_call_options_title" msgid="8421210494703869806">"SIP orqali chaqiruv"</string>
     <string name="sip_call_options_wifi_only_title" msgid="5112579243580893890">"SIP-qo‘ng‘iroq (faqat Wi-Fi)"</string>
     <string name="sip_call_options_entry_1" msgid="7217659161237099900">"Tarmoq trafigi mavjud bo‘lganda barcha qo‘ng‘iroqlar uchun"</string>
-    <string name="sip_call_options_entry_2" msgid="1815335903940609729">"Faqat SIP qo‘ng‘iroqlar uchun"</string>
-    <string name="sip_call_options_wifi_only_entry_1" msgid="1358513095551847314">"Barcha qo‘ng‘iroqlar uchun"</string>
+    <string name="sip_call_options_entry_2" msgid="1815335903940609729">"Faqat SIP chaqiruvlar uchun"</string>
+    <string name="sip_call_options_wifi_only_entry_1" msgid="1358513095551847314">"Barcha chaqiruvlar uchun"</string>
     <string name="add_sip_account" msgid="800843669753980091">"Hisob qo‘shish"</string>
     <string name="remove_sip_account" msgid="1367664438506503690">"Hisobni olib tashlash"</string>
     <string name="sip_account_list" msgid="5610858485304821480">"SIP hisoblari"</string>
@@ -61,12 +61,12 @@
     <string name="advanced_settings" msgid="6622996380747040711">"Kengaytirilgan sozlamalar"</string>
     <string name="auth_username_title" msgid="8262491689004708265">"Foydalanuvchi nomi"</string>
     <string name="auth_username_summary" msgid="941160241371436473">"Haqiqiylikni tekshirish uchun foydalanuvchi nomi"</string>
-    <string name="default_preference_summary_username" msgid="8404717434312826082">"&lt;Ko‘rsatilmagan&gt;"</string>
-    <string name="default_preference_summary_password" msgid="4464464672997027904">"&lt;Ko‘rsatilmagan&gt;"</string>
-    <string name="default_preference_summary_domain_address" msgid="4871971710197441673">"&lt;Ko‘rsatilmagan&gt;"</string>
+    <string name="default_preference_summary_username" msgid="8404717434312826082">"&lt;Kiritilmagan&gt;"</string>
+    <string name="default_preference_summary_password" msgid="4464464672997027904">"&lt;Kiritilmagan&gt;"</string>
+    <string name="default_preference_summary_domain_address" msgid="4871971710197441673">"&lt;Kiritilmagan&gt;"</string>
     <string name="display_name_summary" msgid="7155076491675565407">"&lt;Foydalanuvchi nomi bilan bir xil&gt;"</string>
     <string name="optional_summary" msgid="2363105560396317624">"&lt;Ixtiyoriy&gt;"</string>
-    <string name="advanced_settings_show" msgid="7838761602853998622">"▷ Hammasini ko‘rsatish uchun bosing"</string>
+    <string name="advanced_settings_show" msgid="7838761602853998622">"▷ Hammasini ochish uchun bosing"</string>
     <string name="advanced_settings_hide" msgid="3480554978705290228">"▽ Berkitish uchun bu yerga bosing"</string>
     <string name="all_empty_alert" msgid="4087734950375192387">"Yangi SIP hisobingiz ma’lumotlarini kiriting."</string>
     <string name="empty_alert" msgid="6659484914371384024">"<xliff:g id="INPUT_FIELD_NAME">%s</xliff:g>ni to‘ldirish shart, u bo‘sh qolmasligi kerak."</string>
diff --git a/sip/res/values-vi/strings.xml b/sip/res/values-vi/strings.xml
index 0c545f2..4e4c35c 100644
--- a/sip/res/values-vi/strings.xml
+++ b/sip/res/values-vi/strings.xml
@@ -20,7 +20,7 @@
     <string name="sip_accounts" msgid="85559497282185405">"Tài khoản SIP"</string>
     <string name="sip_accounts_title" msgid="2082527045326874519">"Tài khoản"</string>
     <string name="sip_receive_calls" msgid="426678617137462173">"Nhận cuộc gọi đến"</string>
-    <string name="sip_receive_calls_summary" msgid="946161517528227523">"Sử dụng nhiều thời lượng pin hơn"</string>
+    <string name="sip_receive_calls_summary" msgid="946161517528227523">"Tốn pin hơn"</string>
     <string name="sip_call_options_title" msgid="8421210494703869806">"Sử dụng tính năng gọi điện SIP"</string>
     <string name="sip_call_options_wifi_only_title" msgid="5112579243580893890">"Sử dụng tính năng gọi điện SIP (chỉ Wi-Fi)"</string>
     <string name="sip_call_options_entry_1" msgid="7217659161237099900">"Dành cho tất cả các cuộc gọi khi mạng dữ liệu sẵn có"</string>
diff --git a/sip/res/values-zh-rHK/strings.xml b/sip/res/values-zh-rHK/strings.xml
index 49de353..f844b77 100644
--- a/sip/res/values-zh-rHK/strings.xml
+++ b/sip/res/values-zh-rHK/strings.xml
@@ -20,12 +20,12 @@
     <string name="sip_accounts" msgid="85559497282185405">"SIP 帳戶"</string>
     <string name="sip_accounts_title" msgid="2082527045326874519">"帳戶"</string>
     <string name="sip_receive_calls" msgid="426678617137462173">"接聽來電"</string>
-    <string name="sip_receive_calls_summary" msgid="946161517528227523">"消耗更多電量"</string>
+    <string name="sip_receive_calls_summary" msgid="946161517528227523">"耗電量更多"</string>
     <string name="sip_call_options_title" msgid="8421210494703869806">"使用 SIP 通話"</string>
     <string name="sip_call_options_wifi_only_title" msgid="5112579243580893890">"使用 SIP 通話 (只限 Wi-Fi)"</string>
     <string name="sip_call_options_entry_1" msgid="7217659161237099900">"數據網絡可用時,適用於所有通話"</string>
     <string name="sip_call_options_entry_2" msgid="1815335903940609729">"只限 SIP 通話"</string>
-    <string name="sip_call_options_wifi_only_entry_1" msgid="1358513095551847314">"適用於所有通話"</string>
+    <string name="sip_call_options_wifi_only_entry_1" msgid="1358513095551847314">"所有通話"</string>
     <string name="add_sip_account" msgid="800843669753980091">"新增帳戶"</string>
     <string name="remove_sip_account" msgid="1367664438506503690">"移除帳戶"</string>
     <string name="sip_account_list" msgid="5610858485304821480">"SIP 帳戶"</string>
diff --git a/sip/src/com/android/services/telephony/sip/SipEditor.java b/sip/src/com/android/services/telephony/sip/SipEditor.java
index 07e5b62..dd475e6 100644
--- a/sip/src/com/android/services/telephony/sip/SipEditor.java
+++ b/sip/src/com/android/services/telephony/sip/SipEditor.java
@@ -17,6 +17,8 @@
 package com.android.services.telephony.sip;
 
 import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.DialogFragment;
 import android.content.Intent;
 import android.net.sip.SipProfile;
 import android.os.Bundle;
@@ -67,6 +69,39 @@
     private Button mRemoveButton;
     private SipAccountRegistry mSipAccountRegistry;
 
+    /**
+     * Dialog fragment class to be used for displaying an alert dialog.
+     */
+    public static class AlertDialogFragment extends DialogFragment {
+        private static final String KEY_MESSAGE = "message";
+
+        /**
+         * Initialize the AlertDialogFragment instance.
+         *
+         * @param message the dialog message to display.
+         * @return the AlertDialogFragment.
+         */
+        public static AlertDialogFragment newInstance(String message) {
+            AlertDialogFragment frag = new AlertDialogFragment();
+            Bundle args = new Bundle();
+            args.putString(KEY_MESSAGE, message);
+            frag.setArguments(args);
+            return frag;
+        }
+
+        @Override
+        public Dialog onCreateDialog(Bundle savedInstanceState) {
+            String message = getArguments().getString(KEY_MESSAGE);
+
+            return new AlertDialog.Builder(getActivity())
+                    .setTitle(android.R.string.dialog_alert_title)
+                    .setIconAttribute(android.R.attr.alertDialogIcon)
+                    .setMessage(message)
+                    .setPositiveButton(R.string.alert_dialog_ok, null)
+                    .create();
+        }
+    }
+
     enum PreferenceKey {
         Username(R.string.username, 0, R.string.default_preference_summary_username),
         Password(R.string.password, 0, R.string.default_preference_summary_password),
@@ -285,17 +320,9 @@
             if (VERBOSE) log("Home button clicked, don't show dialog: " + message);
             return;
         }
-        runOnUiThread(new Runnable() {
-            @Override
-            public void run() {
-                new AlertDialog.Builder(SipEditor.this)
-                        .setTitle(android.R.string.dialog_alert_title)
-                        .setIconAttribute(android.R.attr.alertDialogIcon)
-                        .setMessage(message)
-                        .setPositiveButton(R.string.alert_dialog_ok, null)
-                        .show();
-            }
-        });
+
+        AlertDialogFragment newFragment = AlertDialogFragment.newInstance(message);
+        newFragment.show(getFragmentManager(), null);
     }
 
     private boolean isEditTextEmpty(PreferenceKey key) {
@@ -333,7 +360,13 @@
                             }
                     }
                 } else if (key == PreferenceKey.Port) {
-                    int port = Integer.parseInt(PreferenceKey.Port.getValue());
+                    int port;
+                    try {
+                        port = Integer.parseInt(PreferenceKey.Port.getValue());
+                    } catch (NumberFormatException e) {
+                        showAlert(getString(R.string.not_a_valid_port));
+                        return;
+                    }
                     if ((port < 1000) || (port > 65534)) {
                         showAlert(getString(R.string.not_a_valid_port));
                         return;
diff --git a/src/com/android/phone/ADNList.java b/src/com/android/phone/ADNList.java
index 2e2db31..bdc4303 100644
--- a/src/com/android/phone/ADNList.java
+++ b/src/com/android/phone/ADNList.java
@@ -170,18 +170,12 @@
         if (DBG) log("displayProgress: " + loading);
 
         mEmptyText.setText(loading ? R.string.simContacts_emptyLoading:
-            (isAirplaneModeOn(this) ? R.string.simContacts_airplaneMode :
-                R.string.simContacts_empty));
+                R.string.simContacts_empty);
         getWindow().setFeatureInt(
                 Window.FEATURE_INDETERMINATE_PROGRESS,
                 loading ? PROGRESS_VISIBILITY_ON : PROGRESS_VISIBILITY_OFF);
     }
 
-    private static boolean isAirplaneModeOn(Context context) {
-        return Settings.System.getInt(context.getContentResolver(),
-                Settings.System.AIRPLANE_MODE_ON, 0) != 0;
-    }
-
     private class QueryHandler extends AsyncQueryHandler {
         public QueryHandler(ContentResolver cr) {
             super(cr);
diff --git a/src/com/android/phone/Assert.java b/src/com/android/phone/Assert.java
index 143e66f..37ccda8 100644
--- a/src/com/android/phone/Assert.java
+++ b/src/com/android/phone/Assert.java
@@ -49,7 +49,11 @@
     }
 
     public static void fail() {
-        throw new AssertionError("Fail");
+        fail("Fail");
+    }
+
+    public static void fail(String reason) {
+        throw new AssertionError(reason);
     }
 
     /**
diff --git a/src/com/android/phone/CallController.java b/src/com/android/phone/CallController.java
index 5b08662..a5d340c 100644
--- a/src/com/android/phone/CallController.java
+++ b/src/com/android/phone/CallController.java
@@ -19,7 +19,6 @@
 import com.android.internal.telephony.CallManager;
 import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.PhoneConstants;
-import com.android.internal.telephony.TelephonyCapabilities;
 import com.android.phone.CallGatewayManager.RawGatewayInfo;
 import com.android.phone.Constants.CallStatusCode;
 
@@ -226,14 +225,6 @@
             throw new IllegalArgumentException("Unexpected action: " + action);
         }
 
-        // Check to see if this is an OTASP call (the "activation" call
-        // used to provision CDMA devices), and if so, do some
-        // OTASP-specific setup.
-        Phone phone = mApp.mCM.getDefaultPhone();
-        if (TelephonyCapabilities.supportsOtasp(phone)) {
-            checkForOtaspCall(intent);
-        }
-
         CallStatusCode status = placeCallInternal(intent);
 
         switch (status) {
@@ -670,28 +661,6 @@
         mApp.startActivity(intent);
     }
 
-    /**
-     * Checks the current outgoing call to see if it's an OTASP call (the
-     * "activation" call used to provision CDMA devices).  If so, do any
-     * necessary OTASP-specific setup before actually placing the call.
-     */
-    private void checkForOtaspCall(Intent intent) {
-        if (OtaUtils.isOtaspCallIntent(intent)) {
-            Log.i(TAG, "checkForOtaspCall: handling OTASP intent! " + intent);
-
-            // ("OTASP-specific setup" basically means creating and initializing
-            // the OtaUtils instance.  Note that this setup needs to be here in
-            // the CallController.placeCall() sequence, *not* in
-            // OtaUtils.startInteractiveOtasp(), since it's also possible to
-            // start an OTASP call by manually dialing "*228" (in which case
-            // OtaUtils.startInteractiveOtasp() never gets run at all.)
-            OtaUtils.setupOtaspCall(intent);
-        } else {
-            if (DBG) log("checkForOtaspCall: not an OTASP call.");
-        }
-    }
-
-
     //
     // Debugging
     //
diff --git a/src/com/android/phone/CallFeaturesSetting.java b/src/com/android/phone/CallFeaturesSetting.java
index a6d54ef..8386c34 100644
--- a/src/com/android/phone/CallFeaturesSetting.java
+++ b/src/com/android/phone/CallFeaturesSetting.java
@@ -25,17 +25,19 @@
 import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
+import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.ResolveInfo;
 import android.os.Bundle;
 import android.os.PersistableBundle;
 import android.os.UserHandle;
 import android.os.UserManager;
-import android.preference.CheckBoxPreference;
 import android.preference.ListPreference;
 import android.preference.Preference;
 import android.preference.PreferenceActivity;
 import android.preference.PreferenceScreen;
+import android.preference.SwitchPreference;
 import android.provider.Settings;
 import android.telecom.PhoneAccountHandle;
 import android.telecom.TelecomManager;
@@ -106,9 +108,9 @@
     private SubscriptionInfoHelper mSubscriptionInfoHelper;
     private TelecomManager mTelecomManager;
 
-    private CheckBoxPreference mButtonAutoRetry;
+    private SwitchPreference mButtonAutoRetry;
     private PreferenceScreen mVoicemailSettingsScreen;
-    private CheckBoxPreference mEnableVideoCalling;
+    private SwitchPreference mEnableVideoCalling;
 
     /*
      * Click Listeners, handle click based on objects attached to UI.
@@ -230,9 +232,11 @@
         mVoicemailSettingsScreen.setIntent(mSubscriptionInfoHelper.getIntent(
                 VoicemailSettingsActivity.class));
 
-        mButtonAutoRetry = (CheckBoxPreference) findPreference(BUTTON_RETRY_KEY);
+        maybeHideVoicemailSettings();
 
-        mEnableVideoCalling = (CheckBoxPreference) findPreference(ENABLE_VIDEO_CALLING_KEY);
+        mButtonAutoRetry = (SwitchPreference) findPreference(BUTTON_RETRY_KEY);
+
+        mEnableVideoCalling = (SwitchPreference) findPreference(ENABLE_VIDEO_CALLING_KEY);
 
         PersistableBundle carrierConfig =
                 PhoneGlobals.getInstance().getCarrierConfigForSubId(mPhone.getSubId());
@@ -249,6 +253,8 @@
 
         Preference cdmaOptions = prefSet.findPreference(BUTTON_CDMA_OPTIONS);
         Preference gsmOptions = prefSet.findPreference(BUTTON_GSM_UMTS_OPTIONS);
+        Preference fdnButton = prefSet.findPreference(BUTTON_FDN_KEY);
+        fdnButton.setIntent(mSubscriptionInfoHelper.getIntent(FdnSetting.class));
         if (carrierConfig.getBoolean(CarrierConfigManager.KEY_WORLD_PHONE_BOOL)) {
             cdmaOptions.setIntent(mSubscriptionInfoHelper.getIntent(CdmaCallOptions.class));
             gsmOptions.setIntent(mSubscriptionInfoHelper.getIntent(GsmUmtsCallOptions.class));
@@ -257,7 +263,6 @@
             prefSet.removePreference(gsmOptions);
 
             int phoneType = mPhone.getPhoneType();
-            Preference fdnButton = prefSet.findPreference(BUTTON_FDN_KEY);
             if (carrierConfig.getBoolean(CarrierConfigManager.KEY_HIDE_CARRIER_NETWORK_SETTINGS_BOOL)) {
                 prefSet.removePreference(fdnButton);
             } else {
@@ -269,7 +274,6 @@
                         addPreferencesFromResource(R.xml.cdma_call_privacy);
                     }
                 } else if (phoneType == PhoneConstants.PHONE_TYPE_GSM) {
-                    fdnButton.setIntent(mSubscriptionInfoHelper.getIntent(FdnSetting.class));
 
                     if (carrierConfig.getBoolean(
                             CarrierConfigManager.KEY_ADDITIONAL_CALL_SETTING_BOOL)) {
@@ -286,7 +290,7 @@
                 ImsManager.isVtProvisionedOnDevice(mPhone.getContext()) &&
                 (carrierConfig.getBoolean(
                         CarrierConfigManager.KEY_IGNORE_DATA_ENABLED_CHANGED_FOR_VIDEO_CALLS)
-                        || mPhone.mDcTracker.isDataEnabled(true))) {
+                        || mPhone.mDcTracker.isDataEnabled())) {
             boolean currentValue =
                     ImsManager.isEnhanced4gLteModeSettingEnabledByUser(mPhone.getContext())
                     ? PhoneGlobals.getInstance().phoneMgr.isVideoCallingEnabled(
@@ -350,6 +354,41 @@
         }
     }
 
+    /**
+     * Hides the top level voicemail settings entry point if the default dialer contains a
+     * particular manifest metadata key. This is required when the default dialer wants to display
+     * its own version of voicemail settings.
+     */
+    private void maybeHideVoicemailSettings() {
+        String defaultDialer = getSystemService(TelecomManager.class).getDefaultDialerPackage();
+        if (defaultDialer == null) {
+            return;
+        }
+        try {
+            Bundle metadata = getPackageManager()
+                    .getApplicationInfo(defaultDialer, PackageManager.GET_META_DATA).metaData;
+            if (metadata == null) {
+                return;
+            }
+            if (!metadata
+                    .getBoolean(TelephonyManager.METADATA_HIDE_VOICEMAIL_SETTINGS_MENU, false)) {
+                if (DBG) {
+                    log("maybeHideVoicemailSettings(): not disabled by default dialer");
+                }
+                return;
+            }
+            getPreferenceScreen().removePreference(mVoicemailSettingsScreen);
+            if (DBG) {
+                log("maybeHideVoicemailSettings(): disabled by default dialer");
+            }
+        } catch (NameNotFoundException e) {
+            // do nothing
+            if (DBG) {
+                log("maybeHideVoicemailSettings(): not controlled by default dialer");
+            }
+        }
+    }
+
     @Override
     protected void onNewIntent(Intent newIntent) {
         setIntent(newIntent);
diff --git a/src/com/android/phone/CallNotifier.java b/src/com/android/phone/CallNotifier.java
index 7836248..b3d8ade 100644
--- a/src/com/android/phone/CallNotifier.java
+++ b/src/com/android/phone/CallNotifier.java
@@ -16,12 +16,10 @@
 
 package com.android.phone;
 
-import com.android.internal.telephony.Call;
 import com.android.internal.telephony.CallManager;
-import com.android.internal.telephony.Connection;
+
 import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.PhoneConstants;
-import com.android.internal.telephony.TelephonyCapabilities;
 import com.android.internal.telephony.cdma.CdmaInformationRecords.CdmaDisplayInfoRec;
 import com.android.internal.telephony.cdma.CdmaInformationRecords.CdmaSignalInfoRec;
 import com.android.internal.telephony.cdma.SignalToneUtil;
@@ -30,17 +28,14 @@
 import android.bluetooth.BluetoothHeadset;
 import android.bluetooth.BluetoothProfile;
 import android.content.Context;
-import android.media.AudioAttributes;
 import android.media.AudioManager;
 import android.media.ToneGenerator;
 import android.os.AsyncResult;
 import android.os.Handler;
 import android.os.Message;
 import android.os.SystemProperties;
-import android.provider.Settings;
 import android.telecom.TelecomManager;
-import android.telephony.DisconnectCause;
-import android.telephony.PhoneNumberUtils;
+
 import android.telephony.PhoneStateListener;
 import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
@@ -103,8 +98,6 @@
     // We should store all the possible event type values in one place to make sure that
     // they don't step on each others' toes.
     public static final int INTERNAL_SHOW_MESSAGE_NOTIFICATION_DONE = 22;
-    // Other events from call manager
-    public static final int EVENT_OTA_PROVISION_CHANGE = 20;
 
     /**
      * Initialize the singleton CallNotifier instance.
@@ -177,7 +170,6 @@
      */
     private void registerForNotifications() {
         mCM.registerForDisconnect(this, PHONE_DISCONNECT, null);
-        mCM.registerForCdmaOtaStatusChange(this, EVENT_OTA_PROVISION_CHANGE, null);
         mCM.registerForDisplayInfo(this, PHONE_STATE_DISPLAYINFO, null);
         mCM.registerForSignalInfo(this, PHONE_STATE_SIGNALINFO, null);
         mCM.registerForInCallVoicePrivacyOn(this, PHONE_ENHANCED_VP_ON, null);
@@ -214,11 +206,6 @@
                 PhoneDisplayMessage.dismissMessage();
                 break;
 
-            case EVENT_OTA_PROVISION_CHANGE:
-                if (DBG) log("EVENT_OTA_PROVISION_CHANGE...");
-                mApplication.handleOtaspEvent(msg);
-                break;
-
             case PHONE_ENHANCED_VP_ON:
                 if (DBG) log("PHONE_ENHANCED_VP_ON...");
                 if (!mVoicePrivacyState) {
@@ -375,18 +362,6 @@
                     toneVolume = TONE_RELATIVE_VOLUME_HIPRI;
                     toneLengthMillis = 200;
                     break;
-                 case TONE_OTA_CALL_END:
-                    if (mApplication.cdmaOtaConfigData.otaPlaySuccessFailureTone ==
-                            OtaUtils.OTA_PLAY_SUCCESS_FAILURE_TONE_ON) {
-                        toneType = ToneGenerator.TONE_CDMA_ALERT_CALL_GUARD;
-                        toneVolume = TONE_RELATIVE_VOLUME_HIPRI;
-                        toneLengthMillis = 750;
-                    } else {
-                        toneType = ToneGenerator.TONE_PROP_PROMPT;
-                        toneVolume = TONE_RELATIVE_VOLUME_HIPRI;
-                        toneLengthMillis = 200;
-                    }
-                    break;
                 case TONE_VOICE_PRIVACY:
                     toneType = ToneGenerator.TONE_CDMA_ALERT_NETWORK_LITE;
                     toneVolume = TONE_RELATIVE_VOLUME_HIPRI;
diff --git a/src/com/android/phone/CallWaitingCheckBoxPreference.java b/src/com/android/phone/CallWaitingSwitchPreference.java
similarity index 82%
rename from src/com/android/phone/CallWaitingCheckBoxPreference.java
rename to src/com/android/phone/CallWaitingSwitchPreference.java
index bda8b3b..3f248ae 100644
--- a/src/com/android/phone/CallWaitingCheckBoxPreference.java
+++ b/src/com/android/phone/CallWaitingSwitchPreference.java
@@ -9,29 +9,27 @@
 import android.os.AsyncResult;
 import android.os.Handler;
 import android.os.Message;
-import android.preference.CheckBoxPreference;
+import android.preference.SwitchPreference;
 import android.util.AttributeSet;
 import android.util.Log;
 
-import com.android.internal.telephony.Phone;
-
-public class CallWaitingCheckBoxPreference extends CheckBoxPreference {
-    private static final String LOG_TAG = "CallWaitingCheckBoxPreference";
+public class CallWaitingSwitchPreference extends SwitchPreference {
+    private static final String LOG_TAG = "CallWaitingSwitchPreference";
     private final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
 
     private final MyHandler mHandler = new MyHandler();
     private Phone mPhone;
     private TimeConsumingPreferenceListener mTcpListener;
 
-    public CallWaitingCheckBoxPreference(Context context, AttributeSet attrs, int defStyle) {
+    public CallWaitingSwitchPreference(Context context, AttributeSet attrs, int defStyle) {
         super(context, attrs, defStyle);
     }
 
-    public CallWaitingCheckBoxPreference(Context context, AttributeSet attrs) {
-        this(context, attrs, com.android.internal.R.attr.checkBoxPreferenceStyle);
+    public CallWaitingSwitchPreference(Context context, AttributeSet attrs) {
+        this(context, attrs, com.android.internal.R.attr.switchPreferenceStyle);
     }
 
-    public CallWaitingCheckBoxPreference(Context context) {
+    public CallWaitingSwitchPreference(Context context) {
         this(context, null);
     }
 
@@ -81,9 +79,9 @@
 
             if (mTcpListener != null) {
                 if (msg.arg2 == MESSAGE_SET_CALL_WAITING) {
-                    mTcpListener.onFinished(CallWaitingCheckBoxPreference.this, false);
+                    mTcpListener.onFinished(CallWaitingSwitchPreference.this, false);
                 } else {
-                    mTcpListener.onFinished(CallWaitingCheckBoxPreference.this, true);
+                    mTcpListener.onFinished(CallWaitingSwitchPreference.this, true);
                 }
             }
 
@@ -93,7 +91,7 @@
                             ar.exception);
                 }
                 if (mTcpListener != null) {
-                    mTcpListener.onException(CallWaitingCheckBoxPreference.this,
+                    mTcpListener.onException(CallWaitingSwitchPreference.this,
                             (CommandException)ar.exception);
                 }
             } else if (ar.userObj instanceof Throwable || ar.exception != null) {
@@ -102,7 +100,7 @@
                     Log.d(LOG_TAG, "handleGetCallWaitingResponse: Exception" + ar.exception);
                 }
                 if (mTcpListener != null) {
-                    mTcpListener.onError(CallWaitingCheckBoxPreference.this, RESPONSE_ERROR);
+                    mTcpListener.onError(CallWaitingSwitchPreference.this, RESPONSE_ERROR);
                 }
             } else {
                 if (DBG) {
diff --git a/src/com/android/phone/CarrierConfigLoader.java b/src/com/android/phone/CarrierConfigLoader.java
index 159d8bc..a33324b 100644
--- a/src/com/android/phone/CarrierConfigLoader.java
+++ b/src/com/android/phone/CarrierConfigLoader.java
@@ -20,7 +20,7 @@
 import static android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE;
 
 import android.annotation.NonNull;
-import android.app.ActivityManagerNative;
+import android.app.ActivityManager;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.Context;
@@ -58,6 +58,7 @@
 import com.android.internal.telephony.PhoneFactory;
 import com.android.internal.telephony.TelephonyIntents;
 import com.android.internal.util.FastXmlSerializer;
+import com.android.internal.util.IndentingPrintWriter;
 
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
@@ -71,6 +72,9 @@
 import java.io.FilenameFilter;
 import java.io.IOException;
 import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 
 /**
@@ -79,8 +83,9 @@
 
 public class CarrierConfigLoader extends ICarrierConfigLoader.Stub {
     private static final String LOG_TAG = "CarrierConfigLoader";
-    // Package name for default carrier config app, bundled with system image.
-    private static final String DEFAULT_CARRIER_CONFIG_PACKAGE = "com.android.carrierconfig";
+
+    // Package name for platform carrier config app, bundled with system image.
+    private final String mPlatformCarrierConfigPackage;
 
     /** The singleton instance. */
     private static CarrierConfigLoader sInstance;
@@ -192,16 +197,16 @@
 
                 case EVENT_FETCH_DEFAULT:
                     iccid = getIccIdForPhoneId(phoneId);
-                    config = restoreConfigFromXml(DEFAULT_CARRIER_CONFIG_PACKAGE, iccid);
+                    config = restoreConfigFromXml(mPlatformCarrierConfigPackage, iccid);
                     if (config != null) {
-                        log("Loaded config from XML. package=" + DEFAULT_CARRIER_CONFIG_PACKAGE
+                        log("Loaded config from XML. package=" + mPlatformCarrierConfigPackage
                                 + " phoneId=" + phoneId);
                         mConfigFromDefaultApp[phoneId] = config;
                         Message newMsg = obtainMessage(EVENT_LOADED_FROM_DEFAULT, phoneId, -1);
                         newMsg.getData().putBoolean("loaded_from_xml", true);
                         mHandler.sendMessage(newMsg);
                     } else {
-                        if (bindToConfigPackage(DEFAULT_CARRIER_CONFIG_PACKAGE,
+                        if (bindToConfigPackage(mPlatformCarrierConfigPackage,
                                 phoneId, EVENT_CONNECTED_TO_DEFAULT)) {
                             sendMessageDelayed(obtainMessage(EVENT_BIND_DEFAULT_TIMEOUT, phoneId, -1),
                                     BIND_TIMEOUT_MILLIS);
@@ -226,7 +231,7 @@
                                 .asInterface(conn.service);
                         config = carrierService.getCarrierConfig(carrierId);
                         iccid = getIccIdForPhoneId(phoneId);
-                        saveConfigToXml(DEFAULT_CARRIER_CONFIG_PACKAGE, iccid, config);
+                        saveConfigToXml(mPlatformCarrierConfigPackage, iccid, config);
                         mConfigFromDefaultApp[phoneId] = config;
                         sendMessage(obtainMessage(EVENT_LOADED_FROM_DEFAULT, phoneId, -1));
                     } catch (Exception ex) {
@@ -345,6 +350,8 @@
      */
     private CarrierConfigLoader(Context context) {
         mContext = context;
+        mPlatformCarrierConfigPackage =
+                mContext.getString(R.string.platform_carrier_config_package);
 
         IntentFilter bootFilter = new IntentFilter();
         bootFilter.addAction(Intent.ACTION_BOOT_COMPLETED);
@@ -388,10 +395,10 @@
 
     private void broadcastConfigChangedIntent(int phoneId) {
         Intent intent = new Intent(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED);
-        intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
+        intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT |
+                Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
         SubscriptionManager.putPhoneIdAndSubIdExtra(intent, phoneId);
-        ActivityManagerNative.broadcastStickyIntent(intent, READ_PHONE_STATE,
-                UserHandle.USER_ALL);
+        ActivityManager.broadcastStickyIntent(intent, UserHandle.USER_ALL);
     }
 
     /** Binds to the default or carrier config app. */
@@ -717,9 +724,41 @@
         }
         pw.println("CarrierConfigLoader: " + this);
         for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
-            pw.println("  Phone Id=" + i);
-            pw.println("  mConfigFromDefaultApp=" + mConfigFromDefaultApp[i]);
-            pw.println("  mConfigFromCarrierApp=" + mConfigFromCarrierApp[i]);
+            pw.println("Phone Id = " + i);
+            // display default values in CarrierConfigManager
+            printConfig(CarrierConfigManager.getDefaultConfig(), pw,
+                    "Default Values from CarrierConfigManager");
+            pw.println("");
+            // display ConfigFromDefaultApp
+            printConfig(mConfigFromDefaultApp[i], pw, "mConfigFromDefaultApp");
+            pw.println("");
+            // display ConfigFromCarrierApp
+            printConfig(mConfigFromCarrierApp[i], pw, "mConfigFromCarrierApp");
+        }
+    }
+
+    private void printConfig(PersistableBundle configApp, PrintWriter pw, String name) {
+        IndentingPrintWriter indentPW = new IndentingPrintWriter(pw, "    ");
+        if (configApp == null) {
+            indentPW.increaseIndent();
+            indentPW.println(name + " : null ");
+            return;
+        }
+        indentPW.increaseIndent();
+        indentPW.println(name + " : ");
+        List<String> sortedKeys = new ArrayList<String>(configApp.keySet());
+        Collections.sort(sortedKeys);
+        indentPW.increaseIndent();
+        indentPW.increaseIndent();
+        for (String key : sortedKeys) {
+            if (configApp.get(key) != null && configApp.get(key) instanceof Object[]) {
+                indentPW.println(key + " = " +
+                        Arrays.toString((Object[]) configApp.get(key)));
+            } else if (configApp.get(key) != null && configApp.get(key) instanceof int[]) {
+                indentPW.println(key + " = " + Arrays.toString((int[]) configApp.get(key)));
+            } else {
+                indentPW.println(key + " = " + configApp.get(key));
+            }
         }
     }
 
diff --git a/src/com/android/phone/CdmaCallOptions.java b/src/com/android/phone/CdmaCallOptions.java
index 4a5f229..bbd0069 100644
--- a/src/com/android/phone/CdmaCallOptions.java
+++ b/src/com/android/phone/CdmaCallOptions.java
@@ -25,10 +25,10 @@
 import android.os.Handler;
 import android.os.Message;
 import android.os.PersistableBundle;
-import android.preference.CheckBoxPreference;
 import android.preference.Preference;
 import android.preference.PreferenceActivity;
 import android.preference.PreferenceScreen;
+import android.preference.SwitchPreference;
 import android.telephony.CarrierConfigManager;
 import android.util.Log;
 import android.view.MenuItem;
@@ -38,7 +38,7 @@
     private final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
 
     private static final String BUTTON_VP_KEY = "button_voice_privacy_key";
-    private CheckBoxPreference mButtonVoicePrivacy;
+    private SwitchPreference mButtonVoicePrivacy;
 
     @Override
     protected void onCreate(Bundle icicle) {
@@ -50,7 +50,7 @@
         subInfoHelper.setActionBarTitle(
                 getActionBar(), getResources(), R.string.labelCdmaMore_with_label);
 
-        mButtonVoicePrivacy = (CheckBoxPreference) findPreference(BUTTON_VP_KEY);
+        mButtonVoicePrivacy = (SwitchPreference) findPreference(BUTTON_VP_KEY);
         PersistableBundle carrierConfig;
         if (subInfoHelper.hasSubId()) {
             carrierConfig = PhoneGlobals.getInstance().getCarrierConfigForSubId(
diff --git a/src/com/android/phone/CdmaOptions.java b/src/com/android/phone/CdmaOptions.java
index eabbdd2..a760cda 100644
--- a/src/com/android/phone/CdmaOptions.java
+++ b/src/com/android/phone/CdmaOptions.java
@@ -16,22 +16,17 @@
 
 package com.android.phone;
 
-import android.content.Context;
 import android.content.Intent;
-import android.content.res.Resources;
-import android.net.Uri;
 import android.os.PersistableBundle;
 import android.os.SystemProperties;
 import android.preference.Preference;
-import android.preference.PreferenceActivity;
+import android.preference.PreferenceFragment;
 import android.preference.PreferenceScreen;
 import android.provider.Settings;
 import android.telephony.CarrierConfigManager;
-import android.telephony.TelephonyManager;
 import android.text.TextUtils;
 
 import com.android.internal.telephony.Phone;
-import com.android.internal.telephony.PhoneConstants;
 import com.android.internal.telephony.TelephonyProperties;
 
 /**
@@ -46,23 +41,22 @@
 
     private static final String BUTTON_CDMA_SYSTEM_SELECT_KEY = "cdma_system_select_key";
     private static final String BUTTON_CDMA_SUBSCRIPTION_KEY = "cdma_subscription_key";
-    private static final String BUTTON_CDMA_ACTIVATE_DEVICE_KEY = "cdma_activate_device_key";
     private static final String BUTTON_CARRIER_SETTINGS_KEY = "carrier_settings_key";
     private static final String BUTTON_APN_EXPAND_KEY = "button_apn_key_cdma";
 
-    private PreferenceActivity mPrefActivity;
+    private PreferenceFragment mPrefFragment;
     private PreferenceScreen mPrefScreen;
     private Phone mPhone;
 
-    public CdmaOptions(PreferenceActivity prefActivity, PreferenceScreen prefScreen, Phone phone) {
-        mPrefActivity = prefActivity;
+    public CdmaOptions(PreferenceFragment prefFragment, PreferenceScreen prefScreen, Phone phone) {
+        mPrefFragment = prefFragment;
         mPrefScreen = prefScreen;
         mPhone = phone;
         create();
     }
 
     protected void create() {
-        mPrefActivity.addPreferencesFromResource(R.xml.cdma_options);
+        mPrefFragment.addPreferencesFromResource(R.xml.cdma_options);
 
         mButtonAPNExpand = (PreferenceScreen) mPrefScreen.findPreference(BUTTON_APN_EXPAND_KEY);
         boolean removedAPNExpand = false;
@@ -86,7 +80,7 @@
                             // This will setup the Home and Search affordance
                             intent.putExtra(":settings:show_fragment_as_subsetting", true);
                             intent.putExtra("sub_id", mPhone.getSubId());
-                            mPrefActivity.startActivity(intent);
+                            mPrefFragment.startActivity(intent);
                             return true;
                         }
             });
@@ -108,16 +102,6 @@
                                 .findPreference(BUTTON_CDMA_SUBSCRIPTION_KEY));
         }
 
-        final boolean voiceCapable = mPrefActivity.getResources().getBoolean(
-                com.android.internal.R.bool.config_voice_capable);
-        final boolean isLTE = mPhone.getLteOnCdmaMode() == PhoneConstants.LTE_ON_CDMA_TRUE;
-        if (voiceCapable || isLTE) {
-            // This option should not be available on voice-capable devices (i.e. regular phones)
-            // and is replaced by the LTE data service item on LTE devices
-            mPrefScreen.removePreference(
-                    mPrefScreen.findPreference(BUTTON_CDMA_ACTIVATE_DEVICE_KEY));
-        }
-
         // Read platform settings for carrier settings
         final boolean isCarrierSettingsEnabled = carrierConfig.getBoolean(
                 CarrierConfigManager.KEY_CARRIER_SETTINGS_ENABLE_BOOL);
diff --git a/src/com/android/phone/CdmaSystemSelectListPreference.java b/src/com/android/phone/CdmaSystemSelectListPreference.java
index 9bc55bd..ca2bc02 100644
--- a/src/com/android/phone/CdmaSystemSelectListPreference.java
+++ b/src/com/android/phone/CdmaSystemSelectListPreference.java
@@ -54,8 +54,7 @@
 
     @Override
     protected void showDialog(Bundle state) {
-        if (Boolean.parseBoolean(
-                    SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE))) {
+        if (mPhone.isInEcm()) {
             // In ECM mode do not show selection options
         } else {
             super.showDialog(state);
diff --git a/src/com/android/phone/CdmaVoicePrivacyCheckBoxPreference.java b/src/com/android/phone/CdmaVoicePrivacySwitchPreference.java
similarity index 84%
rename from src/com/android/phone/CdmaVoicePrivacyCheckBoxPreference.java
rename to src/com/android/phone/CdmaVoicePrivacySwitchPreference.java
index a5ff37e..5a99bb7 100644
--- a/src/com/android/phone/CdmaVoicePrivacyCheckBoxPreference.java
+++ b/src/com/android/phone/CdmaVoicePrivacySwitchPreference.java
@@ -22,29 +22,29 @@
 import android.os.AsyncResult;
 import android.os.Handler;
 import android.os.Message;
-import android.preference.CheckBoxPreference;
+import android.preference.SwitchPreference;
 import android.util.AttributeSet;
 import android.util.Log;
 
-public class CdmaVoicePrivacyCheckBoxPreference extends CheckBoxPreference {
-    private static final String LOG_TAG = "CdmaVoicePrivacyCheckBoxPreference";
+public class CdmaVoicePrivacySwitchPreference extends SwitchPreference {
+    private static final String LOG_TAG = "CdmaVoicePrivacySwitchPreference";
     private final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
 
     Phone phone;
     private MyHandler mHandler = new MyHandler();
 
-    public CdmaVoicePrivacyCheckBoxPreference(Context context, AttributeSet attrs, int defStyle) {
+    public CdmaVoicePrivacySwitchPreference(Context context, AttributeSet attrs, int defStyle) {
         super(context, attrs, defStyle);
 
         phone = PhoneGlobals.getPhone();
         phone.getEnhancedVoicePrivacy(mHandler.obtainMessage(MyHandler.MESSAGE_GET_VP));
     }
 
-    public CdmaVoicePrivacyCheckBoxPreference(Context context, AttributeSet attrs) {
-        this(context, attrs, com.android.internal.R.attr.checkBoxPreferenceStyle);
+    public CdmaVoicePrivacySwitchPreference(Context context, AttributeSet attrs) {
+        this(context, attrs, com.android.internal.R.attr.switchPreferenceStyle);
     }
 
-    public CdmaVoicePrivacyCheckBoxPreference(Context context) {
+    public CdmaVoicePrivacySwitchPreference(Context context) {
         this(context, null);
     }
 
diff --git a/src/com/android/phone/DumpsysHandler.java b/src/com/android/phone/DumpsysHandler.java
index d2ae38f..a0277fc 100644
--- a/src/com/android/phone/DumpsysHandler.java
+++ b/src/com/android/phone/DumpsysHandler.java
@@ -3,7 +3,7 @@
 
 import android.content.Context;
 
-import com.android.phone.vvm.omtp.utils.VvmDumpHandler;
+import com.android.phone.vvm.VvmDumpHandler;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
diff --git a/src/com/android/phone/EmergencyCallbackModeExitDialog.java b/src/com/android/phone/EmergencyCallbackModeExitDialog.java
index b423e14..f5509b9 100644
--- a/src/com/android/phone/EmergencyCallbackModeExitDialog.java
+++ b/src/com/android/phone/EmergencyCallbackModeExitDialog.java
@@ -80,8 +80,7 @@
 
         mPhone = PhoneGlobals.getInstance().getPhoneInEcm();
         // Check if phone is in Emergency Callback Mode. If not, exit.
-        final boolean isInEcm = Boolean.parseBoolean(
-                SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE));
+        final boolean isInEcm = mPhone.isInEcm();
         Log.i(TAG, "ECMModeExitDialog launched - isInEcm: " + isInEcm + " phone:" + mPhone);
         if (mPhone == null || !isInEcm) {
             finish();
diff --git a/src/com/android/phone/EmergencyCallbackModeService.java b/src/com/android/phone/EmergencyCallbackModeService.java
index 9ed38ae..a07f7aa 100644
--- a/src/com/android/phone/EmergencyCallbackModeService.java
+++ b/src/com/android/phone/EmergencyCallbackModeService.java
@@ -24,8 +24,6 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
-import android.content.res.Resources;
-import android.graphics.BitmapFactory;
 import android.os.AsyncResult;
 import android.os.Binder;
 import android.os.CountDownTimer;
@@ -37,9 +35,11 @@
 
 import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.PhoneConstants;
-import com.android.internal.telephony.PhoneFactory;
 import com.android.internal.telephony.TelephonyIntents;
 import com.android.internal.telephony.TelephonyProperties;
+import com.android.internal.telephony.util.NotificationChannelController;
+
+import java.text.SimpleDateFormat;
 
 /**
  * Application service that inserts/removes Emergency Callback Mode notification and
@@ -154,7 +154,6 @@
                 @Override
                 public void onTick(long millisUntilFinished) {
                     mTimeLeft = millisUntilFinished;
-                    EmergencyCallbackModeService.this.showNotification(millisUntilFinished);
                 }
 
                 @Override
@@ -199,12 +198,20 @@
         if(mInEmergencyCall) {
             text = getText(R.string.phone_in_ecm_call_notification_text).toString();
         } else {
-            int minutes = (int)(millisUntilFinished / 60000);
-            String time = String.format("%d:%02d", minutes, (millisUntilFinished % 60000) / 1000);
-            text = String.format(getResources().getQuantityText(
-                     R.plurals.phone_in_ecm_notification_time, minutes).toString(), time);
+            // Calculate the time in ms when the notification will be finished.
+            long finishedCountMs = millisUntilFinished + System.currentTimeMillis();
+            builder.setShowWhen(true);
+            builder.setChronometerCountDown(true);
+            builder.setUsesChronometer(true);
+            builder.setWhen(finishedCountMs);
+
+            String completeTime = SimpleDateFormat.getTimeInstance(SimpleDateFormat.SHORT).format(
+                    finishedCountMs);
+            text = getResources().getString(R.string.phone_in_ecm_notification_complete_time,
+                    completeTime);
         }
         builder.setContentText(text);
+        builder.setChannelId(NotificationChannelController.CHANNEL_ID_ALERT);
 
         // Show notification
         mNotificationManager.notify(R.string.phone_in_ecm_notification_title, builder.build());
diff --git a/src/com/android/phone/EmergencyDialer.java b/src/com/android/phone/EmergencyDialer.java
index 1d34788..53f6f7e 100644
--- a/src/com/android/phone/EmergencyDialer.java
+++ b/src/com/android/phone/EmergencyDialer.java
@@ -106,8 +106,6 @@
 
     private static final int BAD_EMERGENCY_NUMBER_DIALOG = 0;
 
-    // private static final int USER_ACTIVITY_TIMEOUT_WHEN_NO_PROX_SENSOR = 15000; // millis
-
     EditText mDigits;
     private View mDialButton;
     private View mDelete;
diff --git a/src/com/android/phone/GsmUmtsAdditionalCallOptions.java b/src/com/android/phone/GsmUmtsAdditionalCallOptions.java
index 88d32fb..082eaa9 100644
--- a/src/com/android/phone/GsmUmtsAdditionalCallOptions.java
+++ b/src/com/android/phone/GsmUmtsAdditionalCallOptions.java
@@ -1,7 +1,6 @@
 package com.android.phone;
 
 import android.app.ActionBar;
-import android.content.Intent;
 import android.os.Bundle;
 import android.preference.Preference;
 import android.preference.PreferenceScreen;
@@ -20,7 +19,7 @@
     private static final String BUTTON_CW_KEY    = "button_cw_key";
 
     private CLIRListPreference mCLIRButton;
-    private CallWaitingCheckBoxPreference mCWButton;
+    private CallWaitingSwitchPreference mCWButton;
 
     private final ArrayList<Preference> mPreferences = new ArrayList<Preference>();
     private int mInitIndex = 0;
@@ -40,7 +39,7 @@
 
         PreferenceScreen prefSet = getPreferenceScreen();
         mCLIRButton = (CLIRListPreference) prefSet.findPreference(BUTTON_CLIR_KEY);
-        mCWButton = (CallWaitingCheckBoxPreference) prefSet.findPreference(BUTTON_CW_KEY);
+        mCWButton = (CallWaitingSwitchPreference) prefSet.findPreference(BUTTON_CW_KEY);
 
         mPreferences.add(mCLIRButton);
         mPreferences.add(mCWButton);
@@ -84,8 +83,8 @@
         if (mInitIndex < mPreferences.size()-1 && !isFinishing()) {
             mInitIndex++;
             Preference pref = mPreferences.get(mInitIndex);
-            if (pref instanceof CallWaitingCheckBoxPreference) {
-                ((CallWaitingCheckBoxPreference) pref).init(this, false, mPhone);
+            if (pref instanceof CallWaitingSwitchPreference) {
+                ((CallWaitingSwitchPreference) pref).init(this, false, mPhone);
             }
         }
         super.onFinished(preference, reading);
diff --git a/src/com/android/phone/GsmUmtsOptions.java b/src/com/android/phone/GsmUmtsOptions.java
index 2e9d88a..70ba4af 100644
--- a/src/com/android/phone/GsmUmtsOptions.java
+++ b/src/com/android/phone/GsmUmtsOptions.java
@@ -16,12 +16,11 @@
 
 package com.android.phone;
 
-import android.content.Context;
 import android.content.Intent;
 import android.content.res.Resources;
 import android.os.PersistableBundle;
 import android.preference.Preference;
-import android.preference.PreferenceActivity;
+import android.preference.PreferenceFragment;
 import android.preference.PreferenceScreen;
 import android.provider.Settings;
 import android.telephony.CarrierConfigManager;
@@ -43,20 +42,20 @@
     private static final String BUTTON_OPERATOR_SELECTION_EXPAND_KEY = "button_carrier_sel_key";
     private static final String BUTTON_CARRIER_SETTINGS_KEY = "carrier_settings_key";
     public static final String EXTRA_SUB_ID = "sub_id";
-    private PreferenceActivity mPrefActivity;
+    private PreferenceFragment mPrefFragment;
     private PreferenceScreen mPrefScreen;
     private int mSubId;
 
-    public GsmUmtsOptions(PreferenceActivity prefActivity, PreferenceScreen prefScreen,
+    public GsmUmtsOptions(PreferenceFragment prefFragment, PreferenceScreen prefScreen,
             final int subId) {
-        mPrefActivity = prefActivity;
+        mPrefFragment = prefFragment;
         mPrefScreen = prefScreen;
         mSubId = subId;
         create();
     }
 
     protected void create() {
-        mPrefActivity.addPreferencesFromResource(R.xml.gsm_umts_options);
+        mPrefFragment.addPreferencesFromResource(R.xml.gsm_umts_options);
         mButtonAPNExpand = (PreferenceScreen) mPrefScreen.findPreference(BUTTON_APN_EXPAND_KEY);
         boolean removedAPNExpand = false;
         mButtonOperatorSelectionExpand =
@@ -67,7 +66,7 @@
             mButtonOperatorSelectionExpand.setEnabled(false);
         } else {
             log("Not a CDMA phone");
-            Resources res = mPrefActivity.getResources();
+            Resources res = mPrefFragment.getResources();
             PersistableBundle carrierConfig =
                     PhoneGlobals.getInstance().getCarrierConfigForSubId(mSubId);
 
@@ -120,7 +119,7 @@
                             // This will setup the Home and Search affordance
                             intent.putExtra(":settings:show_fragment_as_subsetting", true);
                             intent.putExtra(EXTRA_SUB_ID, mSubId);
-                            mPrefActivity.startActivity(intent);
+                            mPrefFragment.startActivity(intent);
                             return true;
                         }
             });
@@ -134,7 +133,7 @@
                             intent.setComponent(new ComponentName("com.android.phone",
                                     "com.android.phone.NetworkSetting"));
                             intent.putExtra(EXTRA_SUB_ID, mSubId);
-                            mPrefActivity.startActivity(intent);
+                            mPrefFragment.startActivity(intent);
                             return true;
                         }
             });
diff --git a/src/com/android/phone/HfaActivity.java b/src/com/android/phone/HfaActivity.java
deleted file mode 100644
index b526d46..0000000
--- a/src/com/android/phone/HfaActivity.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (C) 2013 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.phone;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.PendingIntent;
-import android.content.DialogInterface;
-import android.os.Bundle;
-import android.util.Log;
-
-/**
- * Starts and displays status for Hands Free Activation (HFA).
- *
- * This class operates with Hands Free Activation apps. It comes up during activation
- * requests that occur outside of setup wizard and so provides its own UI.
- * It uses {@link HfaLogic} to perform the actual activation and during the process
- * displays a "performing activation..." dialog.  This will remain up until the user
- * chooses to skip the activation (still happens in the background) or the activation
- * is successful.  Upon failure, the dialog also goes away but a subsequent dialog will
- * ask the user if they would like to try again or cancel.
- */
-public class HfaActivity extends Activity {
-    private static final String TAG = HfaActivity.class.getSimpleName();
-
-    private AlertDialog mDialog;
-    private HfaLogic mHfaLogic;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        Log.i(TAG, "onCreate");
-
-        final PendingIntent otaResponseIntent = getIntent().getParcelableExtra(
-                OtaUtils.EXTRA_OTASP_RESULT_CODE_PENDING_INTENT);
-
-        mHfaLogic = new HfaLogic(this.getApplicationContext(), new HfaLogic.HfaLogicCallback() {
-            @Override
-            public void onSuccess() {
-                onHfaSuccess();
-            }
-
-            @Override
-            public void onError(String error) {
-                onHfaError(error);
-            }
-        }, otaResponseIntent);
-
-        startProvisioning();
-    }
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-
-        Log.i(TAG, "onDestroy");
-
-        if (mDialog != null && mDialog.isShowing()) {
-            mDialog.dismiss();
-            mDialog = null;
-        }
-    }
-
-    private void startProvisioning() {
-        buildAndShowDialog();
-        mHfaLogic.start();
-    }
-
-    private void buildAndShowDialog() {
-        mDialog = new AlertDialog.Builder(this, AlertDialog.THEME_DEVICE_DEFAULT_LIGHT)
-                .setTitle(R.string.ota_hfa_activation_title)
-                .setMessage(R.string.ota_hfa_activation_dialog_message)
-                .setPositiveButton(R.string.ota_skip_activation_dialog_skip_label,
-                        new DialogInterface.OnClickListener() {
-                            @Override
-                            public void onClick(DialogInterface di, int which) {
-                                onUserSkip();
-                            }})
-                /*.setOnCancelListener(new DialogInterface.OnCancelListener() {
-                    @Override
-                    public void onCancel(DialogInterface di) {
-                        sendFinalResponse(OTASP_USER_SKIPPED);
-                    }})*/
-                .create();
-
-        // Do not allow user to dismiss dialog unless they are clicking "skip"
-        mDialog.setCanceledOnTouchOutside(false);
-        mDialog.setCancelable(false);
-
-        Log.i(TAG, "showing dialog");
-        mDialog.show();
-    }
-
-    private void onHfaError(String errorMsg) {
-        mDialog.dismiss();
-
-        AlertDialog errorDialog = new AlertDialog.Builder(this,
-                AlertDialog.THEME_DEVICE_DEFAULT_LIGHT)
-            .setMessage(errorMsg)
-            .setPositiveButton(R.string.ota_skip_activation_dialog_skip_label,
-                    new DialogInterface.OnClickListener() {
-                        @Override
-                        public void onClick(DialogInterface di, int which) {
-                            di.dismiss();
-                            onUserSkip();
-                        }
-                    })
-            .setNegativeButton(R.string.ota_try_again,
-                    new DialogInterface.OnClickListener() {
-                        @Override
-                        public void onClick(DialogInterface di, int which) {
-                            di.dismiss();
-                            startProvisioning();
-                        }
-                    })
-            .create();
-
-        errorDialog.show();
-    }
-
-    private void onHfaSuccess() {
-        finish();
-    }
-
-    private void onUserSkip() {
-        finish();
-    }
-
-}
diff --git a/src/com/android/phone/HfaLogic.java b/src/com/android/phone/HfaLogic.java
deleted file mode 100644
index b064b18..0000000
--- a/src/com/android/phone/HfaLogic.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (C) 2013 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.phone;
-
-import android.app.PendingIntent;
-import android.app.PendingIntent.CanceledException;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.AsyncResult;
-import android.os.Handler;
-import android.os.Message;
-import android.telephony.ServiceState;
-import android.util.Log;
-
-import com.android.internal.telephony.Phone;
-import com.google.common.base.Preconditions;
-
-/**
- * Starts and displays status for Hands Free Activation (HFA).
- *
- * This class operates with Hands Free Activation apps.
- * It starts by broadcasting the intent com.android.action.START_HFA.
- * An HFA app will pick that up and start the HFA process.
- * If it fails it return ERROR_HFA Intent and upon success returns COMPLETE_HFA.
- *
- * If successful, we bounce the radio so that the service picks up the new number.
- * Once the radio is back on we callback the requestor.
- *
- * If there is an error, we do not bounce the radio but still callback with a failure.
- *
- * TODO(klp): We need system-only permissions for the HFA intents.
- */
-public class HfaLogic {
-    private static final String TAG = HfaLogic.class.getSimpleName();
-
-    private static final String ACTION_START = "com.android.action.START_HFA";
-    private static final String ACTION_ERROR = "com.android.action.ERROR_HFA";
-    private static final String ACTION_CANCEL = "com.android.action.CANCEL_HFA";
-    private static final String ACTION_COMPLETE = "com.android.action.COMPLETE_HFA";
-
-    private static final int SERVICE_STATE_CHANGED = 1;
-
-    public static final int NOT_WAITING = 0;
-    public static final int WAITING_FOR_RADIO_OFF = 1;
-    public static final int WAITING_FOR_RADIO_ON = 2;
-
-    public static final int OTASP_UNKNOWN = 0;
-    public static final int OTASP_USER_SKIPPED = 1;
-    public static final int OTASP_SUCCESS = 2;
-    public static final int OTASP_FAILURE = 3;
-
-    private int mPhoneMonitorState = NOT_WAITING;
-    private BroadcastReceiver mReceiver;
-    private HfaLogicCallback mCallback;
-    private PendingIntent mResponseIntent;
-    private Context mContext;
-
-    // No retry at the moment. Increase later if necessary.
-    private static final int DEFAULT_RETRY_COUNT = 0;
-    private int mRetryCount;
-
-    public interface HfaLogicCallback {
-        public void onSuccess();
-        public void onError(String errorMsg);
-    }
-
-    public HfaLogic(Context context, HfaLogicCallback callback, PendingIntent intent) {
-        mCallback = Preconditions.checkNotNull(callback);
-        mContext = Preconditions.checkNotNull(context);
-        mResponseIntent = intent;
-    }
-
-    public void start() {
-        Log.i(TAG, "start:");
-        mRetryCount = DEFAULT_RETRY_COUNT;
-        startHfaIntentReceiver();
-        startProvisioning();
-    }
-
-    private void startProvisioning() {
-        Log.i(TAG, "startProvisioning:");
-        sendHfaCommand(ACTION_START);
-    }
-
-    private void sendHfaCommand(String action) {
-        Log.i(TAG, "sendHfaCommand: command=" + action);
-        mContext.sendBroadcast(new Intent(action));
-    }
-
-    private void onHfaError(String errorMsg) {
-        Log.i(TAG, "onHfaError: call mCallBack.onError errorMsg=" + errorMsg
-                + " mRetryCount=" + mRetryCount);
-        mRetryCount -= 1;
-        if (mRetryCount >= 0) {
-            Log.i(TAG, "onHfaError: retry");
-            startProvisioning();
-        } else {
-            Log.i(TAG, "onHfaError: Declare OTASP_FAILURE");
-            mRetryCount = 0;
-            stopHfaIntentReceiver();
-            sendFinalResponse(OTASP_FAILURE, errorMsg);
-            mCallback.onError(errorMsg);
-        }
-    }
-
-    private void onHfaSuccess() {
-        Log.i(TAG, "onHfaSuccess: NOT bouncing radio call onTotalSuccess");
-        stopHfaIntentReceiver();
-        // bounceRadio();
-        onTotalSuccess();
-    }
-
-    private void onTotalSuccess() {
-        Log.i(TAG, "onTotalSuccess: call mCallBack.onSuccess");
-        sendFinalResponse(OTASP_SUCCESS, null);
-        mCallback.onSuccess();
-    }
-
-    private void bounceRadio() {
-        final Phone phone = PhoneGlobals.getInstance().getPhone();
-        phone.registerForServiceStateChanged(mHandler, SERVICE_STATE_CHANGED, null);
-
-        mPhoneMonitorState = WAITING_FOR_RADIO_OFF;
-        phone.setRadioPower(false);
-        onServiceStateChange(phone.getServiceState());
-    }
-
-    private void onServiceStateChange(ServiceState state) {
-        final boolean radioIsOff = state.getVoiceRegState() == ServiceState.STATE_POWER_OFF;
-        final Phone phone = PhoneGlobals.getInstance().getPhone();
-
-        Log.i(TAG, "Radio is on: " + !radioIsOff);
-
-        if (mPhoneMonitorState == WAITING_FOR_RADIO_OFF) {
-            if (radioIsOff) {
-                mPhoneMonitorState = WAITING_FOR_RADIO_ON;
-                phone.setRadioPower(true);
-            }
-        } else if (mPhoneMonitorState == WAITING_FOR_RADIO_ON) {
-            if (!radioIsOff) {
-                mPhoneMonitorState = NOT_WAITING;
-                phone.unregisterForServiceStateChanged(mHandler);
-
-                onTotalSuccess();
-            }
-        }
-    }
-
-    private void startHfaIntentReceiver() {
-        final IntentFilter filter = new IntentFilter(ACTION_COMPLETE);
-        filter.addAction(ACTION_ERROR);
-
-        mReceiver = new BroadcastReceiver() {
-            @Override
-            public void onReceive(Context context, Intent intent) {
-                final String action = intent.getAction();
-                if (action.equals(ACTION_ERROR)) {
-                    onHfaError(intent.getStringExtra("errorCode"));
-                } else if (action.equals(ACTION_COMPLETE)) {
-                    Log.i(TAG, "Hfa Successful");
-                    onHfaSuccess();
-                }
-            }
-        };
-
-        mContext.registerReceiver(mReceiver, filter);
-    }
-
-    private void stopHfaIntentReceiver() {
-        if (mReceiver != null) {
-            mContext.unregisterReceiver(mReceiver);
-            mReceiver = null;
-        }
-    }
-
-    private void sendFinalResponse(int responseCode, String errorCode) {
-        if (mResponseIntent != null) {
-            final Intent extraStuff = new Intent();
-            extraStuff.putExtra(OtaUtils.EXTRA_OTASP_RESULT_CODE, responseCode);
-
-            if (responseCode == OTASP_FAILURE && errorCode != null) {
-                extraStuff.putExtra(OtaUtils.EXTRA_OTASP_ERROR_CODE, errorCode);
-            }
-
-            try {
-                Log.i(TAG, "Sending OTASP confirmation with result code: "
-                        + responseCode);
-                mResponseIntent.send(mContext, 0 /* resultCode (not used) */, extraStuff);
-            } catch (CanceledException e) {
-                Log.e(TAG, "Pending Intent canceled");
-            }
-        }
-    }
-
-    private Handler mHandler = new Handler() {
-        @Override
-        public void handleMessage(Message msg) {
-            switch (msg.what) {
-                case SERVICE_STATE_CHANGED:
-                    ServiceState state = (ServiceState) ((AsyncResult) msg.obj).result;
-                    onServiceStateChange(state);
-                    break;
-                default:
-                    break;
-            }
-        }
-    };
-
-}
diff --git a/src/com/android/phone/HfaService.java b/src/com/android/phone/HfaService.java
deleted file mode 100644
index bc07453..0000000
--- a/src/com/android/phone/HfaService.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2013 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.phone;
-
-import android.app.PendingIntent;
-import android.app.Service;
-import android.content.Intent;
-import android.os.IBinder;
-import android.util.Log;
-
-/**
- * Service for performing HfaActivation without any UI.
- */
-public class HfaService extends Service {
-    private static final String TAG = HfaService.class.getSimpleName();
-
-    private HfaLogic mHfaLogic;
-
-    @Override
-    public void onCreate() {
-        Log.i(TAG, "service started");
-    }
-
-    @Override
-    public int onStartCommand(Intent intent, int flags, int startId) {
-        final PendingIntent otaResponseIntent = intent.getParcelableExtra(
-                OtaUtils.EXTRA_OTASP_RESULT_CODE_PENDING_INTENT);
-
-        mHfaLogic = new HfaLogic(this, new HfaLogic.HfaLogicCallback() {
-            @Override
-            public void onSuccess() {
-                Log.i(TAG, "onSuccess");
-                onComplete();
-            }
-
-            @Override
-            public void onError(String msg) {
-                Log.i(TAG, "onError: " + msg);
-                // We do not respond from this service. On success or failure
-                // we do the same thing...finish.
-                onComplete();
-            }
-        }, otaResponseIntent);
-        mHfaLogic.start();
-
-        return START_REDELIVER_INTENT;
-    }
-
-    @Override
-    public IBinder onBind(Intent intent) {
-        return null;
-    }
-
-    private void onComplete() {
-        stopSelf();
-    }
-}
diff --git a/src/com/android/phone/InCallScreenShowActivation.java b/src/com/android/phone/InCallScreenShowActivation.java
deleted file mode 100644
index 9d35442..0000000
--- a/src/com/android/phone/InCallScreenShowActivation.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright (C) 2009 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.phone;
-
-import android.app.Activity;
-import android.app.PendingIntent;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
-import android.os.Bundle;
-import android.os.PersistableBundle;
-import android.os.SystemProperties;
-import android.provider.Settings;
-import android.telephony.CarrierConfigManager;
-import android.util.Log;
-
-import com.android.internal.telephony.Phone;
-import com.android.internal.telephony.TelephonyCapabilities;
-
-/**
- * Invisible activity that handles the com.android.phone.PERFORM_CDMA_PROVISIONING intent.
- * This activity is protected by the android.permission.PERFORM_CDMA_PROVISIONING permission.
- *
- * We handle the PERFORM_CDMA_PROVISIONING action by launching an OTASP
- * call via one of the OtaUtils helper methods: startInteractiveOtasp() on
- * regular phones, or startNonInteractiveOtasp() on data-only devices.
- *
- * TODO: The class name InCallScreenShowActivation is misleading, since
- * this activity is totally unrelated to the InCallScreen (which
- * implements the in-call UI.)  Let's eventually rename this to something
- * like CdmaProvisioningLauncher or CdmaProvisioningHandler...
- */
-public class InCallScreenShowActivation extends Activity {
-    private static final String LOG_TAG = "InCallScreenShowActivation";
-    private static final boolean DBG =
-            (PhoneGlobals.DBG_LEVEL >= 1) && (SystemProperties.getInt("ro.debuggable", 0) == 1);
-
-    @Override
-    protected void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-
-        Intent intent = getIntent();
-        if (DBG) Log.d(LOG_TAG, "onCreate: intent = " + intent);
-        Bundle extras = intent.getExtras();
-        if (DBG && (extras != null)) {
-            Log.d(LOG_TAG, "      - has extras: size = " + extras.size()); // forces an unparcel()
-            Log.d(LOG_TAG, "      - extras = " + extras);
-        }
-
-        PhoneGlobals app = PhoneGlobals.getInstanceIfPrimary();
-        if (app == null) {
-            // TODO: All CDMA provisioning code should move into a BroadcastReceiver that runs
-            // exclusively in the primary user's context.  This is because the majority of the
-            // telephony logic -- and all of the important bits -- runs only as primary so we don't
-            // have access to the things we need. We still need to maintain an Activity to support
-            // legacy code which starts this using startActivity() but that Activity should be a
-            // simple intent-trampoline for the new BroadcastReceiver.
-            //
-            // Though this conditional protects this code from NPEs on a secondary user due to an
-            // uninitialized PhoneGlobals, there's not a good reason at the time of this writing as
-            // to why a secondary user context shouldn't trigger a CDMA provisioning, or at least
-            // nobody has expressed concern.
-            Log.i(LOG_TAG, "Being asked to provision CDMA SIM from secondary user, skipping.");
-            setResult(RESULT_CANCELED);
-            finish();
-            return;
-        }
-
-        Phone phone = app.getPhone();
-        if (!TelephonyCapabilities.supportsOtasp(phone)) {
-            Log.w(LOG_TAG, "CDMA Provisioning not supported on this device");
-            setResult(RESULT_CANCELED);
-            finish();
-            return;
-        }
-
-        if (intent.getAction().equals(OtaUtils.ACTION_PERFORM_CDMA_PROVISIONING)) {
-
-            PersistableBundle carrierConfig = app.getCarrierConfig();
-            boolean usesHfa = carrierConfig.getBoolean(
-                    CarrierConfigManager.KEY_USE_HFA_FOR_PROVISIONING_BOOL);
-            if (usesHfa) {
-                Log.i(LOG_TAG, "Starting Hfa from ACTION_PERFORM_CDMA_PROVISIONING");
-                startHfa();
-                finish();
-                return;
-            }
-
-            boolean usesOtasp = carrierConfig.getBoolean(
-                    CarrierConfigManager.KEY_USE_OTASP_FOR_PROVISIONING_BOOL);
-            if (usesOtasp) {
-                // On voice-capable devices, we perform CDMA provisioning in
-                // "interactive" mode by directly launching the InCallScreen.
-                // boolean interactiveMode = PhoneGlobals.sVoiceCapable;
-                // TODO: Renable interactive mode for device provisioning.
-                boolean interactiveMode = false;
-                Log.i(LOG_TAG, "ACTION_PERFORM_CDMA_PROVISIONING (interactiveMode = "
-                      + interactiveMode + ")...");
-
-                // Testing: this intent extra allows test apps manually
-                // enable/disable "interactive mode", regardless of whether
-                // the current device is voice-capable.  This is allowed only
-                // in userdebug or eng builds.
-                if (intent.hasExtra(OtaUtils.EXTRA_OVERRIDE_INTERACTIVE_MODE)
-                        && (SystemProperties.getInt("ro.debuggable", 0) == 1)) {
-                    interactiveMode =
-                            intent.getBooleanExtra(OtaUtils.EXTRA_OVERRIDE_INTERACTIVE_MODE, false);
-                    Log.d(LOG_TAG, "==> MANUALLY OVERRIDING interactiveMode to " + interactiveMode);
-                }
-
-                // We allow the caller to pass a PendingIntent (as the
-                // EXTRA_NONINTERACTIVE_OTASP_RESULT_PENDING_INTENT extra)
-                // which we'll later use to notify them when the OTASP call
-                // fails or succeeds.
-                //
-                // Stash that away here, and we'll fire it off later in
-                // OtaUtils.sendOtaspResult().
-                app.cdmaOtaScreenState.otaspResultCodePendingIntent =
-                            (PendingIntent) intent.getParcelableExtra(
-                                    OtaUtils.EXTRA_OTASP_RESULT_CODE_PENDING_INTENT);
-
-                if (interactiveMode) {
-                    // On voice-capable devices, launch an OTASP call and arrange
-                    // for the in-call UI to come up.  (The InCallScreen will
-                    // notice that an OTASP call is active, and display the
-                    // special OTASP UI instead of the usual in-call controls.)
-
-                    if (DBG) Log.d(LOG_TAG, "==> Starting interactive CDMA provisioning...");
-                    OtaUtils.startInteractiveOtasp(this);
-
-                    // The result we set here is actually irrelevant, since the
-                    // InCallScreen's "interactive" OTASP sequence never actually
-                    // finish()es; it ends by directly launching the Home
-                    // activity.  So our caller won't actually ever get an
-                    // onActivityResult() call in this case.
-                    setResult(OtaUtils.RESULT_INTERACTIVE_OTASP_STARTED);
-                } else {
-                    // On data-only devices, manually launch the OTASP call
-                    // *without* displaying any UI.  (Our caller, presumably
-                    // SetupWizardActivity, is responsible for displaying some
-                    // sort of progress UI.)
-
-                    if (DBG) Log.d(LOG_TAG, "==> Starting non-interactive CDMA provisioning...");
-                    int callStatus = OtaUtils.startNonInteractiveOtasp(this);
-
-                    if (callStatus == PhoneUtils.CALL_STATUS_DIALED) {
-                        if (DBG) Log.d(LOG_TAG,
-                                "  ==> successful result from startNonInteractiveOtasp(): " +
-                                callStatus);
-                        setResult(OtaUtils.RESULT_NONINTERACTIVE_OTASP_STARTED);
-                    } else {
-                        Log.w(LOG_TAG, "Failure code from startNonInteractiveOtasp(): " +
-                                callStatus);
-                        setResult(OtaUtils.RESULT_NONINTERACTIVE_OTASP_FAILED);
-                    }
-                }
-            } else {
-                Log.i(LOG_TAG, "Skipping activation.");
-            }
-        } else {
-            Log.e(LOG_TAG, "Unexpected intent action: " + intent);
-            setResult(RESULT_CANCELED);
-        }
-
-        finish();
-    }
-
-    /**
-     * On devices that provide a phone initialization wizard (such as Google Setup Wizard),
-     * the wizard displays it's own activation UI. The Hfa activation started by this class
-     * will show a UI or not depending on the status of the setup wizard. If the setup wizard
-     * is running, do not show a UI, otherwise show our own UI since setup wizard will not.
-     *
-     * The method checks two properties:
-     * 1. Does the device require a setup wizard (ro.setupwizard.mode == (REQUIRED|OPTIONAL))
-     * 2. Is device_provisioned set to non-zero--a property that setup wizard sets at completion.
-     * @return true if wizard is running, false otherwise.
-     */
-    private boolean isWizardRunning(Context context) {
-        Intent intent = new Intent("android.intent.action.DEVICE_INITIALIZATION_WIZARD");
-        ResolveInfo resolveInfo = context.getPackageManager().resolveActivity(intent,
-                PackageManager.MATCH_DEFAULT_ONLY);
-        boolean provisioned = Settings.Global.getInt(context.getContentResolver(),
-                Settings.Global.DEVICE_PROVISIONED, 0) != 0;
-        String mode = SystemProperties.get("ro.setupwizard.mode", "REQUIRED");
-        boolean runningSetupWizard = "REQUIRED".equals(mode) || "OPTIONAL".equals(mode);
-        if (DBG) {
-            Log.v(LOG_TAG, "resolvInfo = " + resolveInfo + ", provisioned = " + provisioned
-                    + ", runningSetupWizard = " + runningSetupWizard);
-        }
-        return resolveInfo != null && !provisioned && runningSetupWizard;
-    }
-
-    /**
-     * Starts the HFA provisioning process by bringing up the HFA Activity.
-     */
-    private void startHfa() {
-        boolean isWizardRunning = isWizardRunning(this);
-        // We always run our HFA logic if we're in setup wizard, but if we're outside of setup
-        // wizard then we have to check a config to see if we should still run HFA.
-        if (isWizardRunning ||
-                getResources().getBoolean(R.bool.config_allow_hfa_outside_of_setup_wizard)) {
-
-            final Intent intent = new Intent();
-
-            final PendingIntent otaResponseIntent = getIntent().getParcelableExtra(
-                    OtaUtils.EXTRA_OTASP_RESULT_CODE_PENDING_INTENT);
-
-            final boolean showUi = !isWizardRunning;
-            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-
-            if (otaResponseIntent != null) {
-                intent.putExtra(OtaUtils.EXTRA_OTASP_RESULT_CODE_PENDING_INTENT, otaResponseIntent);
-            }
-
-            Log.v(LOG_TAG, "Starting hfa activation activity");
-            if (showUi) {
-                intent.setClassName(this, HfaActivity.class.getName());
-                startActivity(intent);
-            } else {
-                intent.setClassName(this, HfaService.class.getName());
-                startService(intent);
-            }
-
-        }
-        setResult(RESULT_OK);
-    }
-}
diff --git a/src/com/android/phone/MMIDialogActivity.java b/src/com/android/phone/MMIDialogActivity.java
index 10ec6a3..1e6fa41 100644
--- a/src/com/android/phone/MMIDialogActivity.java
+++ b/src/com/android/phone/MMIDialogActivity.java
@@ -18,10 +18,12 @@
 
 import android.app.Activity;
 import android.app.Dialog;
+import android.content.Intent;
 import android.os.AsyncResult;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
+import android.telephony.SubscriptionManager;
 import android.util.Log;
 import android.widget.Toast;
 
@@ -43,12 +45,16 @@
     private Handler mHandler;
 
     private CallManager mCM = PhoneGlobals.getInstance().getCallManager();
-    private Phone mPhone = PhoneGlobals.getPhone();
+    private Phone mPhone;
 
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
+        Intent intent = getIntent();
+        int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY,
+                SubscriptionManager.DEFAULT_SUBSCRIPTION_ID);
+        mPhone = PhoneGlobals.getPhone(subId);
         mHandler = new Handler() {
                 @Override
                 public void handleMessage(Message msg) {
@@ -63,9 +69,6 @@
                 }
         };
         mCM.registerForMmiComplete(mHandler, PhoneGlobals.MMI_COMPLETE, null);
-        if (mCM.getState() == PhoneConstants.State.OFFHOOK) {
-            Toast.makeText(this, R.string.incall_status_dialed_mmi, Toast.LENGTH_SHORT).show();
-        }
         showMMIDialog();
     }
 
diff --git a/src/com/android/phone/MobileNetworkSettings.java b/src/com/android/phone/MobileNetworkSettings.java
index 56b6390..2d8ba6d 100644
--- a/src/com/android/phone/MobileNetworkSettings.java
+++ b/src/com/android/phone/MobileNetworkSettings.java
@@ -16,6 +16,41 @@
 
 package com.android.phone;
 
+import android.app.ActionBar;
+import android.app.DialogFragment;
+import android.app.Fragment;
+import android.app.FragmentManager;
+import android.app.Activity;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.PackageManager;
+import android.net.Uri;
+import android.os.AsyncResult;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.os.PersistableBundle;
+import android.os.SystemProperties;
+import android.os.UserHandle;
+import android.os.UserManager;
+import android.preference.ListPreference;
+import android.preference.Preference;
+import android.preference.PreferenceFragment;
+import android.preference.PreferenceScreen;
+import android.preference.SwitchPreference;
+import android.telephony.CarrierConfigManager;
+import android.telephony.PhoneStateListener;
+import android.telephony.SubscriptionInfo;
+import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.TabHost;
+
 import com.android.ims.ImsManager;
 import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.PhoneConstants;
@@ -28,1330 +63,1345 @@
 import java.util.Iterator;
 import java.util.List;
 
-import android.app.ActionBar;
-import android.app.AlertDialog;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.pm.PackageManager.NameNotFoundException;
-import android.net.Uri;
-import android.os.AsyncResult;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.os.PersistableBundle;
-import android.os.SystemProperties;
-import android.os.UserHandle;
-import android.os.UserManager;
-import android.preference.ListPreference;
-import android.preference.Preference;
-import android.preference.PreferenceActivity;
-import android.preference.PreferenceScreen;
-import android.preference.SwitchPreference;
-import android.telephony.CarrierConfigManager;
-import android.telephony.PhoneStateListener;
-import android.telephony.SubscriptionInfo;
-import android.telephony.SubscriptionManager;
-import android.telephony.TelephonyManager;
-import android.text.TextUtils;
-import android.util.Log;
-import android.view.MenuItem;
-import android.view.View;
-import android.widget.TabHost.OnTabChangeListener;
-import android.widget.TabHost.TabContentFactory;
-import android.widget.TabHost.TabSpec;
-import android.widget.TabHost;
-
 /**
- * "Mobile network settings" screen.  This preference screen lets you
+ * "Mobile network settings" screen.  This screen lets you
  * enable/disable mobile data, and control data roaming and other
  * network-specific mobile data features.  It's used on non-voice-capable
  * tablets as well as regular phone devices.
  *
- * Note that this PreferenceActivity is part of the phone app, even though
+ * Note that this Activity is part of the phone app, even though
  * you reach it from the "Wireless & Networks" section of the main
  * Settings app.  It's not part of the "Call settings" hierarchy that's
  * available from the Phone app (see CallFeaturesSetting for that.)
  */
-public class MobileNetworkSettings extends PreferenceActivity
-        implements DialogInterface.OnClickListener,
-        DialogInterface.OnDismissListener, Preference.OnPreferenceChangeListener{
 
-    // debug data
-    private static final String LOG_TAG = "NetworkSettings";
-    private static final boolean DBG = true;
-    public static final int REQUEST_CODE_EXIT_ECM = 17;
-
-    // Number of active Subscriptions to show tabs
-    private static final int TAB_THRESHOLD = 2;
-
-    //String keys for preference lookup
-    private static final String BUTTON_PREFERED_NETWORK_MODE = "preferred_network_mode_key";
-    private static final String BUTTON_ROAMING_KEY = "button_roaming_key";
-    private static final String BUTTON_CDMA_LTE_DATA_SERVICE_KEY = "cdma_lte_data_service_key";
-    private static final String BUTTON_ENABLED_NETWORKS_KEY = "enabled_networks_key";
-    private static final String BUTTON_4G_LTE_KEY = "enhanced_4g_lte";
-    private static final String BUTTON_CELL_BROADCAST_SETTINGS = "cell_broadcast_settings";
-    private static final String BUTTON_APN_EXPAND_KEY = "button_apn_key";
-    private static final String BUTTON_OPERATOR_SELECTION_EXPAND_KEY = "button_carrier_sel_key";
-    private static final String BUTTON_CARRIER_SETTINGS_KEY = "carrier_settings_key";
-    private static final String BUTTON_CDMA_SYSTEM_SELECT_KEY = "cdma_system_select_key";
-
-    static final int preferredNetworkMode = Phone.PREFERRED_NT_MODE;
-
-    //Information about logical "up" Activity
-    private static final String UP_ACTIVITY_PACKAGE = "com.android.settings";
-    private static final String UP_ACTIVITY_CLASS =
-            "com.android.settings.Settings$WirelessSettingsActivity";
-
-    private SubscriptionManager mSubscriptionManager;
-
-    //UI objects
-    private ListPreference mButtonPreferredNetworkMode;
-    private ListPreference mButtonEnabledNetworks;
-    private RestrictedSwitchPreference mButtonDataRoam;
-    private SwitchPreference mButton4glte;
-    private Preference mLteDataServicePref;
-
-    private static final String iface = "rmnet0"; //TODO: this will go away
-    private List<SubscriptionInfo> mActiveSubInfos;
-
-    private UserManager mUm;
-    private Phone mPhone;
-    private MyHandler mHandler;
-    private boolean mOkClicked;
-
-    // We assume the the value returned by mTabHost.getCurrentTab() == slotId
-    private TabHost mTabHost;
-
-    //GsmUmts options and Cdma options
-    GsmUmtsOptions mGsmUmtsOptions;
-    CdmaOptions mCdmaOptions;
-
-    private Preference mClickedPreference;
-    private boolean mShow4GForLTE;
-    private boolean mIsGlobalCdma;
-    private boolean mUnavailable;
-
-    private final PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
-        /*
-         * Enable/disable the 'Enhanced 4G LTE Mode' when in/out of a call
-         * and depending on TTY mode and TTY support over VoLTE.
-         * @see android.telephony.PhoneStateListener#onCallStateChanged(int,
-         * java.lang.String)
-         */
-        @Override
-        public void onCallStateChanged(int state, String incomingNumber) {
-            if (DBG) log("PhoneStateListener.onCallStateChanged: state=" + state);
-            boolean enabled = (state == TelephonyManager.CALL_STATE_IDLE) &&
-                    ImsManager.isNonTtyOrTtyOnVolteEnabled(getApplicationContext());
-            Preference pref = getPreferenceScreen().findPreference(BUTTON_4G_LTE_KEY);
-            if (pref != null) pref.setEnabled(enabled && hasActiveSubscriptions());
-        }
-    };
-
-    private final BroadcastReceiver mPhoneChangeReceiver = new PhoneChangeReceiver();
-
-    private class PhoneChangeReceiver extends BroadcastReceiver {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            if (DBG) log("onReceive:");
-            // When the radio changes (ex: CDMA->GSM), refresh all options.
-            mGsmUmtsOptions = null;
-            mCdmaOptions = null;
-            updateBody();
-        }
-    }
-
-    //This is a method implemented for DialogInterface.OnClickListener.
-    //  Used to dismiss the dialogs when they come up.
-    public void onClick(DialogInterface dialog, int which) {
-        if (which == DialogInterface.BUTTON_POSITIVE) {
-            mPhone.setDataRoamingEnabled(true);
-            mOkClicked = true;
-        } else {
-            // Reset the toggle
-            mButtonDataRoam.setChecked(false);
-        }
-    }
-
-    @Override
-    public void onDismiss(DialogInterface dialog) {
-        // Assuming that onClick gets called first
-        mButtonDataRoam.setChecked(mOkClicked);
-    }
-
-    /**
-     * Invoked on each preference click in this hierarchy, overrides
-     * PreferenceActivity's implementation.  Used to make sure we track the
-     * preference click events.
-     */
-    @Override
-    public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
-        /** TODO: Refactor and get rid of the if's using subclasses */
-        final int phoneSubId = mPhone.getSubId();
-        if (preference.getKey().equals(BUTTON_4G_LTE_KEY)) {
-            return true;
-        } else if (mGsmUmtsOptions != null &&
-                mGsmUmtsOptions.preferenceTreeClick(preference) == true) {
-            return true;
-        } else if (mCdmaOptions != null &&
-                   mCdmaOptions.preferenceTreeClick(preference) == true) {
-            if (Boolean.parseBoolean(
-                    SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE))) {
-
-                mClickedPreference = preference;
-
-                // In ECM mode launch ECM app dialog
-                startActivityForResult(
-                    new Intent(TelephonyIntents.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS, null),
-                    REQUEST_CODE_EXIT_ECM);
-            }
-            return true;
-        } else if (preference == mButtonPreferredNetworkMode) {
-            //displays the value taken from the Settings.System
-            int settingsNetworkMode = android.provider.Settings.Global.getInt(mPhone.getContext().
-                    getContentResolver(),
-                    android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId,
-                    preferredNetworkMode);
-            mButtonPreferredNetworkMode.setValue(Integer.toString(settingsNetworkMode));
-            return true;
-        } else if (preference == mLteDataServicePref) {
-            String tmpl = android.provider.Settings.Global.getString(getContentResolver(),
-                        android.provider.Settings.Global.SETUP_PREPAID_DATA_SERVICE_URL);
-            if (!TextUtils.isEmpty(tmpl)) {
-                TelephonyManager tm = (TelephonyManager) getSystemService(
-                        Context.TELEPHONY_SERVICE);
-                String imsi = tm.getSubscriberId();
-                if (imsi == null) {
-                    imsi = "";
-                }
-                final String url = TextUtils.isEmpty(tmpl) ? null
-                        : TextUtils.expandTemplate(tmpl, imsi).toString();
-                Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
-                startActivity(intent);
-            } else {
-                android.util.Log.e(LOG_TAG, "Missing SETUP_PREPAID_DATA_SERVICE_URL");
-            }
-            return true;
-        }  else if (preference == mButtonEnabledNetworks) {
-            int settingsNetworkMode = android.provider.Settings.Global.getInt(mPhone.getContext().
-                            getContentResolver(),
-                    android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId,
-                    preferredNetworkMode);
-            mButtonEnabledNetworks.setValue(Integer.toString(settingsNetworkMode));
-            return true;
-        } else if (preference == mButtonDataRoam) {
-            // Do not disable the preference screen if the user clicks Data roaming.
-            return true;
-        } else {
-            // if the button is anything but the simple toggle preference,
-            // we'll need to disable all preferences to reject all click
-            // events until the sub-activity's UI comes up.
-            preferenceScreen.setEnabled(false);
-            // Let the intents be launched by the Preference manager
-            return false;
-        }
-    }
-
-    private final SubscriptionManager.OnSubscriptionsChangedListener mOnSubscriptionsChangeListener
-            = new SubscriptionManager.OnSubscriptionsChangedListener() {
-        @Override
-        public void onSubscriptionsChanged() {
-            if (DBG) log("onSubscriptionsChanged:");
-            initializeSubscriptions();
-        }
-    };
-
-    private void initializeSubscriptions() {
-        if (isDestroyed()) { // Process preferences in activity only if its not destroyed
-            return;
-        }
-        int currentTab = 0;
-        if (DBG) log("initializeSubscriptions:+");
-
-        // Before updating the the active subscription list check
-        // if tab updating is needed as the list is changing.
-        List<SubscriptionInfo> sil = mSubscriptionManager.getActiveSubscriptionInfoList();
-        TabState state = isUpdateTabsNeeded(sil);
-
-        // Update to the active subscription list
-        mActiveSubInfos.clear();
-        if (sil != null) {
-            mActiveSubInfos.addAll(sil);
-            // If there is only 1 sim then currenTab should represent slot no. of the sim.
-            if (sil.size() == 1) {
-                currentTab = sil.get(0).getSimSlotIndex();
-            }
-        }
-
-        switch (state) {
-            case UPDATE: {
-                if (DBG) log("initializeSubscriptions: UPDATE");
-                currentTab = mTabHost != null ? mTabHost.getCurrentTab() : 0;
-
-                setContentView(com.android.internal.R.layout.common_tab_settings);
-
-                mTabHost = (TabHost) findViewById(android.R.id.tabhost);
-                mTabHost.setup();
-
-                // Update the tabName. Since the mActiveSubInfos are in slot order
-                // we can iterate though the tabs and subscription info in one loop. But
-                // we need to handle the case where a slot may be empty.
-
-                Iterator<SubscriptionInfo> siIterator = mActiveSubInfos.listIterator();
-                SubscriptionInfo si = siIterator.hasNext() ? siIterator.next() : null;
-                for (int simSlotIndex = 0; simSlotIndex  < mActiveSubInfos.size(); simSlotIndex++) {
-                    String tabName;
-                    if (si != null && si.getSimSlotIndex() == simSlotIndex) {
-                        // Slot is not empty and we match
-                        tabName = String.valueOf(si.getDisplayName());
-                        si = siIterator.hasNext() ? siIterator.next() : null;
-                    } else {
-                        // Slot is empty, set name to unknown
-                        tabName = getResources().getString(R.string.unknown);
-                    }
-                    if (DBG) {
-                        log("initializeSubscriptions: tab=" + simSlotIndex + " name=" + tabName);
-                    }
-
-                    mTabHost.addTab(buildTabSpec(String.valueOf(simSlotIndex), tabName));
-                }
-
-                mTabHost.setOnTabChangedListener(mTabListener);
-                mTabHost.setCurrentTab(currentTab);
-                break;
-            }
-            case NO_TABS: {
-                if (DBG) log("initializeSubscriptions: NO_TABS");
-
-                if (mTabHost != null) {
-                    mTabHost.clearAllTabs();
-                    mTabHost = null;
-                }
-                setContentView(com.android.internal.R.layout.common_tab_settings);
-                break;
-            }
-            case DO_NOTHING: {
-                if (DBG) log("initializeSubscriptions: DO_NOTHING");
-                if (mTabHost != null) {
-                    currentTab = mTabHost.getCurrentTab();
-                }
-                break;
-            }
-        }
-        updatePhone(currentTab);
-        updateBody();
-        if (DBG) log("initializeSubscriptions:-");
-    }
+public class MobileNetworkSettings extends Activity  {
 
     private enum TabState {
         NO_TABS, UPDATE, DO_NOTHING
     }
-    private TabState isUpdateTabsNeeded(List<SubscriptionInfo> newSil) {
-        TabState state = TabState.DO_NOTHING;
-        if (newSil == null) {
-            if (mActiveSubInfos.size() >= TAB_THRESHOLD) {
-                if (DBG) log("isUpdateTabsNeeded: NO_TABS, size unknown and was tabbed");
-                state = TabState.NO_TABS;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.network_setting);
+
+        FragmentManager fragmentManager = getFragmentManager();
+        Fragment fragment = fragmentManager.findFragmentById(R.id.network_setting_content);
+        if (fragment == null) {
+            fragmentManager.beginTransaction()
+                    .add(R.id.network_setting_content, new MobileNetworkFragment())
+                    .commit();
+        }
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(final MenuItem item) {
+        final int itemId = item.getItemId();
+        switch (itemId) {
+            // Respond to the action bar's Up/Home button
+            case android.R.id.home:
+                finish();
+                return true;
+        }
+        return super.onOptionsItemSelected(item);
+    }
+
+    public static class MobileNetworkFragment extends PreferenceFragment implements
+            Preference.OnPreferenceChangeListener, RoamingDialogFragment.RoamingDialogListener {
+
+        // debug data
+        private static final String LOG_TAG = "NetworkSettings";
+        private static final boolean DBG = true;
+        public static final int REQUEST_CODE_EXIT_ECM = 17;
+
+        // Number of active Subscriptions to show tabs
+        private static final int TAB_THRESHOLD = 2;
+
+        // fragment tag for roaming data dialog
+        private static final String ROAMING_TAG = "RoamingDialogFragment";
+
+        //String keys for preference lookup
+        private static final String BUTTON_PREFERED_NETWORK_MODE = "preferred_network_mode_key";
+        private static final String BUTTON_ROAMING_KEY = "button_roaming_key";
+        private static final String BUTTON_CDMA_LTE_DATA_SERVICE_KEY = "cdma_lte_data_service_key";
+        private static final String BUTTON_ENABLED_NETWORKS_KEY = "enabled_networks_key";
+        private static final String BUTTON_4G_LTE_KEY = "enhanced_4g_lte";
+        private static final String BUTTON_CELL_BROADCAST_SETTINGS = "cell_broadcast_settings";
+        private static final String BUTTON_APN_EXPAND_KEY = "button_apn_key";
+        private static final String BUTTON_OPERATOR_SELECTION_EXPAND_KEY = "button_carrier_sel_key";
+        private static final String BUTTON_CARRIER_SETTINGS_KEY = "carrier_settings_key";
+        private static final String BUTTON_CDMA_SYSTEM_SELECT_KEY = "cdma_system_select_key";
+
+        private final BroadcastReceiver mPhoneChangeReceiver = new PhoneChangeReceiver();
+
+        static final int preferredNetworkMode = Phone.PREFERRED_NT_MODE;
+
+        //Information about logical "up" Activity
+        private static final String UP_ACTIVITY_PACKAGE = "com.android.settings";
+        private static final String UP_ACTIVITY_CLASS =
+                "com.android.settings.Settings$WirelessSettingsActivity";
+
+        private SubscriptionManager mSubscriptionManager;
+
+        //UI objects
+        private ListPreference mButtonPreferredNetworkMode;
+        private ListPreference mButtonEnabledNetworks;
+        private RestrictedSwitchPreference mButtonDataRoam;
+        private SwitchPreference mButton4glte;
+        private Preference mLteDataServicePref;
+
+        private static final String iface = "rmnet0"; //TODO: this will go away
+        private List<SubscriptionInfo> mActiveSubInfos;
+
+        private UserManager mUm;
+        private Phone mPhone;
+        private MyHandler mHandler;
+        private boolean mOkClicked;
+
+        // We assume the the value returned by mTabHost.getCurrentTab() == slotId
+        private TabHost mTabHost;
+
+        //GsmUmts options and Cdma options
+        GsmUmtsOptions mGsmUmtsOptions;
+        CdmaOptions mCdmaOptions;
+
+        private Preference mClickedPreference;
+        private boolean mShow4GForLTE;
+        private boolean mIsGlobalCdma;
+        private boolean mUnavailable;
+
+        private final PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
+            /*
+             * Enable/disable the 'Enhanced 4G LTE Mode' when in/out of a call
+             * and depending on TTY mode and TTY support over VoLTE.
+             * @see android.telephony.PhoneStateListener#onCallStateChanged(int,
+             * java.lang.String)
+             */
+            @Override
+            public void onCallStateChanged(int state, String incomingNumber) {
+                if (DBG) log("PhoneStateListener.onCallStateChanged: state=" + state);
+                boolean enabled = (state == TelephonyManager.CALL_STATE_IDLE) &&
+                        ImsManager.isNonTtyOrTtyOnVolteEnabled
+                                (getActivity().getApplicationContext());
+                Preference pref = getPreferenceScreen().findPreference(BUTTON_4G_LTE_KEY);
+                if (pref != null) pref.setEnabled(enabled && hasActiveSubscriptions());
+
             }
-        } else if (newSil.size() < TAB_THRESHOLD && mActiveSubInfos.size() >= TAB_THRESHOLD) {
-            if (DBG) log("isUpdateTabsNeeded: NO_TABS, size went to small");
-            state = TabState.NO_TABS;
-        } else if (newSil.size() >= TAB_THRESHOLD && mActiveSubInfos.size() < TAB_THRESHOLD) {
-            if (DBG) log("isUpdateTabsNeeded: UPDATE, size changed");
-            state = TabState.UPDATE;
-        } else if (newSil.size() >= TAB_THRESHOLD) {
-            Iterator<SubscriptionInfo> siIterator = mActiveSubInfos.iterator();
-            for(SubscriptionInfo newSi : newSil) {
-                SubscriptionInfo curSi = siIterator.next();
-                if (!newSi.getDisplayName().equals(curSi.getDisplayName())) {
-                    if (DBG) log("isUpdateTabsNeeded: UPDATE, new name=" + newSi.getDisplayName());
-                    state = TabState.UPDATE;
+        };
+
+        @Override
+        public void onPositiveButtonClick(DialogFragment dialog) {
+            mPhone.setDataRoamingEnabled(true);
+            mButtonDataRoam.setChecked(true);
+        }
+
+        @Override
+        public void onViewCreated(View view, Bundle savedInstanceState) {
+            if (getListView() != null) {
+                getListView().setDivider(null);
+            }
+        }
+
+        /**
+         * Invoked on each preference click in this hierarchy, overrides
+         * PreferenceActivity's implementation.  Used to make sure we track the
+         * preference click events.
+         */
+        @Override
+        public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen,
+                                             Preference preference) {
+            /** TODO: Refactor and get rid of the if's using subclasses */
+            final int phoneSubId = mPhone.getSubId();
+            if (preference.getKey().equals(BUTTON_4G_LTE_KEY)) {
+                return true;
+            } else if (mGsmUmtsOptions != null &&
+                    mGsmUmtsOptions.preferenceTreeClick(preference) == true) {
+                return true;
+            } else if (mCdmaOptions != null &&
+                    mCdmaOptions.preferenceTreeClick(preference) == true) {
+                if (mPhone.isInEcm()) {
+
+                    mClickedPreference = preference;
+
+                    // In ECM mode launch ECM app dialog
+                    startActivityForResult(
+                            new Intent(TelephonyIntents.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS, null),
+                            REQUEST_CODE_EXIT_ECM);
+                }
+                return true;
+            } else if (preference == mButtonPreferredNetworkMode) {
+                //displays the value taken from the Settings.System
+                int settingsNetworkMode = android.provider.Settings.Global.getInt(
+                        mPhone.getContext().getContentResolver(),
+                        android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId,
+                        preferredNetworkMode);
+                mButtonPreferredNetworkMode.setValue(Integer.toString(settingsNetworkMode));
+                return true;
+            } else if (preference == mLteDataServicePref) {
+                String tmpl = android.provider.Settings.Global.getString(
+                        getActivity().getContentResolver(),
+                        android.provider.Settings.Global.SETUP_PREPAID_DATA_SERVICE_URL);
+                if (!TextUtils.isEmpty(tmpl)) {
+                    TelephonyManager tm = (TelephonyManager) getActivity().getSystemService(
+                            Context.TELEPHONY_SERVICE);
+                    String imsi = tm.getSubscriberId();
+                    if (imsi == null) {
+                        imsi = "";
+                    }
+                    final String url = TextUtils.isEmpty(tmpl) ? null
+                            : TextUtils.expandTemplate(tmpl, imsi).toString();
+                    Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
+                    startActivity(intent);
+                } else {
+                    android.util.Log.e(LOG_TAG, "Missing SETUP_PREPAID_DATA_SERVICE_URL");
+                }
+                return true;
+            }  else if (preference == mButtonEnabledNetworks) {
+                int settingsNetworkMode = android.provider.Settings.Global.getInt(
+                        mPhone.getContext().getContentResolver(),
+                        android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId,
+                        preferredNetworkMode);
+                mButtonEnabledNetworks.setValue(Integer.toString(settingsNetworkMode));
+                return true;
+            } else if (preference == mButtonDataRoam) {
+                // Do not disable the preference screen if the user clicks Data roaming.
+                return true;
+            } else {
+                // if the button is anything but the simple toggle preference,
+                // we'll need to disable all preferences to reject all click
+                // events until the sub-activity's UI comes up.
+                preferenceScreen.setEnabled(false);
+                // Let the intents be launched by the Preference manager
+                return false;
+            }
+        }
+
+        private final SubscriptionManager.OnSubscriptionsChangedListener
+                mOnSubscriptionsChangeListener
+                = new SubscriptionManager.OnSubscriptionsChangedListener() {
+            @Override
+            public void onSubscriptionsChanged() {
+                if (DBG) log("onSubscriptionsChanged:");
+                initializeSubscriptions();
+            }
+        };
+
+        private void initializeSubscriptions() {
+            if (getActivity().isDestroyed()) {
+                // Process preferences in activity only if its not destroyed
+                return;
+            }
+            int currentTab = 0;
+            if (DBG) log("initializeSubscriptions:+");
+
+            // Before updating the the active subscription list check
+            // if tab updating is needed as the list is changing.
+            List<SubscriptionInfo> sil = mSubscriptionManager.getActiveSubscriptionInfoList();
+            MobileNetworkSettings.TabState state = isUpdateTabsNeeded(sil);
+
+            // Update to the active subscription list
+            mActiveSubInfos.clear();
+            if (sil != null) {
+                mActiveSubInfos.addAll(sil);
+                // If there is only 1 sim then currenTab should represent slot no. of the sim.
+                if (sil.size() == 1) {
+                    currentTab = sil.get(0).getSimSlotIndex();
+                }
+            }
+
+            switch (state) {
+                case UPDATE: {
+                    if (DBG) log("initializeSubscriptions: UPDATE");
+                    currentTab = mTabHost != null ? mTabHost.getCurrentTab() : 0;
+
+                    getActivity().setContentView(com.android.internal.R.layout.common_tab_settings);
+
+                    mTabHost = (TabHost) getActivity().findViewById(android.R.id.tabhost);
+                    mTabHost.setup();
+
+                    // Update the tabName. Since the mActiveSubInfos are in slot order
+                    // we can iterate though the tabs and subscription info in one loop. But
+                    // we need to handle the case where a slot may be empty.
+
+                    Iterator<SubscriptionInfo> siIterator = mActiveSubInfos.listIterator();
+                    SubscriptionInfo si = siIterator.hasNext() ? siIterator.next() : null;
+                    for (int simSlotIndex = 0; simSlotIndex  < mActiveSubInfos.size();
+                         simSlotIndex++) {
+                        String tabName;
+                        if (si != null && si.getSimSlotIndex() == simSlotIndex) {
+                            // Slot is not empty and we match
+                            tabName = String.valueOf(si.getDisplayName());
+                            si = siIterator.hasNext() ? siIterator.next() : null;
+                        } else {
+                            // Slot is empty, set name to unknown
+                            tabName = getResources().getString(R.string.unknown);
+                        }
+                        if (DBG) {
+                            log("initializeSubscriptions:tab=" + simSlotIndex + " name=" + tabName);
+                        }
+
+                        mTabHost.addTab(buildTabSpec(String.valueOf(simSlotIndex), tabName));
+                    }
+
+                    mTabHost.setOnTabChangedListener(mTabListener);
+                    mTabHost.setCurrentTab(currentTab);
+                    break;
+                }
+                case NO_TABS: {
+                    if (DBG) log("initializeSubscriptions: NO_TABS");
+
+                    if (mTabHost != null) {
+                        mTabHost.clearAllTabs();
+                        mTabHost = null;
+                    }
+                    getActivity().setContentView(com.android.internal.R.layout.common_tab_settings);
+                    break;
+                }
+                case DO_NOTHING: {
+                    if (DBG) log("initializeSubscriptions: DO_NOTHING");
+                    if (mTabHost != null) {
+                        currentTab = mTabHost.getCurrentTab();
+                    }
                     break;
                 }
             }
-        }
-        if (DBG) {
-            log("isUpdateTabsNeeded:- " + state
-                + " newSil.size()=" + ((newSil != null) ? newSil.size() : 0)
-                + " mActiveSubInfos.size()=" + mActiveSubInfos.size());
-        }
-        return state;
-    }
-
-    private OnTabChangeListener mTabListener = new OnTabChangeListener() {
-        @Override
-        public void onTabChanged(String tabId) {
-            if (DBG) log("onTabChanged:");
-            // The User has changed tab; update the body.
-            updatePhone(Integer.parseInt(tabId));
+            updatePhone(currentTab);
             updateBody();
-        }
-    };
-
-    private void updatePhone(int slotId) {
-        final SubscriptionInfo sir = mSubscriptionManager
-                .getActiveSubscriptionInfoForSimSlotIndex(slotId);
-        if (sir != null) {
-            mPhone = PhoneFactory.getPhone(
-                    SubscriptionManager.getPhoneId(sir.getSubscriptionId()));
-        }
-        if (mPhone == null) {
-            // Do the best we can
-            mPhone = PhoneGlobals.getPhone();
-        }
-        if (DBG) log("updatePhone:- slotId=" + slotId + " sir=" + sir);
-    }
-
-    private TabContentFactory mEmptyTabContent = new TabContentFactory() {
-        @Override
-        public View createTabContent(String tag) {
-            return new View(mTabHost.getContext());
-        }
-    };
-
-    private TabSpec buildTabSpec(String tag, String title) {
-        return mTabHost.newTabSpec(tag).setIndicator(title).setContent(
-                mEmptyTabContent);
-    }
-
-    @Override
-    protected void onCreate(Bundle icicle) {
-        if (DBG) log("onCreate:+");
-        super.onCreate(icicle);
-
-        mHandler = new MyHandler();
-        mUm = (UserManager) getSystemService(Context.USER_SERVICE);
-        mSubscriptionManager = SubscriptionManager.from(this);
-
-        if (mUm.hasUserRestriction(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS)) {
-            mUnavailable = true;
-            setContentView(R.layout.telephony_disallowed_preference_screen);
-            return;
+            if (DBG) log("initializeSubscriptions:-");
         }
 
-        addPreferencesFromResource(R.xml.network_setting);
-
-        mButton4glte = (SwitchPreference)findPreference(BUTTON_4G_LTE_KEY);
-        mButton4glte.setOnPreferenceChangeListener(this);
-
-        try {
-            Context con = createPackageContext("com.android.systemui", 0);
-            int id = con.getResources().getIdentifier("config_show4GForLTE",
-                    "bool", "com.android.systemui");
-            mShow4GForLTE = con.getResources().getBoolean(id);
-        } catch (NameNotFoundException e) {
-            loge("NameNotFoundException for show4GFotLTE");
-            mShow4GForLTE = false;
-        }
-
-        //get UI object references
-        PreferenceScreen prefSet = getPreferenceScreen();
-
-        mButtonDataRoam = (RestrictedSwitchPreference) prefSet.findPreference(BUTTON_ROAMING_KEY);
-        mButtonPreferredNetworkMode = (ListPreference) prefSet.findPreference(
-                BUTTON_PREFERED_NETWORK_MODE);
-        mButtonEnabledNetworks = (ListPreference) prefSet.findPreference(
-                BUTTON_ENABLED_NETWORKS_KEY);
-        mButtonDataRoam.setOnPreferenceChangeListener(this);
-
-        mLteDataServicePref = prefSet.findPreference(BUTTON_CDMA_LTE_DATA_SERVICE_KEY);
-
-        // Initialize mActiveSubInfo
-        int max = mSubscriptionManager.getActiveSubscriptionInfoCountMax();
-        mActiveSubInfos = new ArrayList<SubscriptionInfo>(max);
-
-        initializeSubscriptions();
-
-        IntentFilter intentFilter = new IntentFilter(
-                TelephonyIntents.ACTION_RADIO_TECHNOLOGY_CHANGED);
-        registerReceiver(mPhoneChangeReceiver, intentFilter);
-        if (DBG) log("onCreate:-");
-    }
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        unregisterReceiver(mPhoneChangeReceiver);
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-        if (DBG) log("onResume:+");
-
-        if (mUnavailable) {
-            if (DBG) log("onResume:- ignore mUnavailable == false");
-            return;
-        }
-
-        // upon resumption from the sub-activity, make sure we re-enable the
-        // preferences.
-        getPreferenceScreen().setEnabled(true);
-
-        // Set UI state in onResume because a user could go home, launch some
-        // app to change this setting's backend, and re-launch this settings app
-        // and the UI state would be inconsistent with actual state
-        mButtonDataRoam.setChecked(mPhone.getDataRoamingEnabled());
-
-        if (getPreferenceScreen().findPreference(BUTTON_PREFERED_NETWORK_MODE) != null
-                || getPreferenceScreen().findPreference(BUTTON_ENABLED_NETWORKS_KEY) != null)  {
-            updatePreferredNetworkUIFromDb();
-        }
-
-        if (ImsManager.isVolteEnabledByPlatform(this)
-                && ImsManager.isVolteProvisionedOnDevice(this)) {
-            TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
-            tm.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE);
-        }
-
-        // NOTE: Buttons will be enabled/disabled in mPhoneStateListener
-        boolean enh4glteMode = ImsManager.isEnhanced4gLteModeSettingEnabledByUser(this)
-                && ImsManager.isNonTtyOrTtyOnVolteEnabled(this);
-        mButton4glte.setChecked(enh4glteMode);
-
-        mSubscriptionManager.addOnSubscriptionsChangedListener(mOnSubscriptionsChangeListener);
-
-        if (DBG) log("onResume:-");
-
-    }
-
-    private boolean hasActiveSubscriptions() {
-        return mActiveSubInfos.size() > 0;
-    }
-
-    private void updateBody() {
-        final Context context = getApplicationContext();
-        PreferenceScreen prefSet = getPreferenceScreen();
-        boolean isLteOnCdma = mPhone.getLteOnCdmaMode() == PhoneConstants.LTE_ON_CDMA_TRUE;
-        final int phoneSubId = mPhone.getSubId();
-
-        if (DBG) {
-            log("updateBody: isLteOnCdma=" + isLteOnCdma + " phoneSubId=" + phoneSubId);
-        }
-
-        if (prefSet != null) {
-            prefSet.removeAll();
-            prefSet.addPreference(mButtonDataRoam);
-            prefSet.addPreference(mButtonPreferredNetworkMode);
-            prefSet.addPreference(mButtonEnabledNetworks);
-            prefSet.addPreference(mButton4glte);
-        }
-
-        int settingsNetworkMode = android.provider.Settings.Global.getInt(
-                mPhone.getContext().getContentResolver(),
-                android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId,
-                preferredNetworkMode);
-
-        PersistableBundle carrierConfig =
-                PhoneGlobals.getInstance().getCarrierConfigForSubId(mPhone.getSubId());
-        mIsGlobalCdma = isLteOnCdma
-                && carrierConfig.getBoolean(CarrierConfigManager.KEY_SHOW_CDMA_CHOICES_BOOL);
-        if (carrierConfig.getBoolean(CarrierConfigManager.KEY_HIDE_CARRIER_NETWORK_SETTINGS_BOOL)) {
-            prefSet.removePreference(mButtonPreferredNetworkMode);
-            prefSet.removePreference(mButtonEnabledNetworks);
-            prefSet.removePreference(mLteDataServicePref);
-        } else if (carrierConfig.getBoolean(CarrierConfigManager
-                    .KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL)
-                && !mPhone.getServiceState().getRoaming()) {
-            prefSet.removePreference(mButtonPreferredNetworkMode);
-            prefSet.removePreference(mButtonEnabledNetworks);
-
-            final int phoneType = mPhone.getPhoneType();
-            if (phoneType == PhoneConstants.PHONE_TYPE_CDMA) {
-                mCdmaOptions = new CdmaOptions(this, prefSet, mPhone);
-                // In World mode force a refresh of GSM Options.
-                if (isWorldMode()) {
-                    mGsmUmtsOptions = null;
+        private MobileNetworkSettings.TabState isUpdateTabsNeeded(List<SubscriptionInfo> newSil) {
+            TabState state = MobileNetworkSettings.TabState.DO_NOTHING;
+            if (newSil == null) {
+                if (mActiveSubInfos.size() >= TAB_THRESHOLD) {
+                    if (DBG) log("isUpdateTabsNeeded: NO_TABS, size unknown and was tabbed");
+                    state = MobileNetworkSettings.TabState.NO_TABS;
                 }
-            } else if (phoneType == PhoneConstants.PHONE_TYPE_GSM) {
+            } else if (newSil.size() < TAB_THRESHOLD && mActiveSubInfos.size() >= TAB_THRESHOLD) {
+                if (DBG) log("isUpdateTabsNeeded: NO_TABS, size went to small");
+                state = MobileNetworkSettings.TabState.NO_TABS;
+            } else if (newSil.size() >= TAB_THRESHOLD && mActiveSubInfos.size() < TAB_THRESHOLD) {
+                if (DBG) log("isUpdateTabsNeeded: UPDATE, size changed");
+                state = MobileNetworkSettings.TabState.UPDATE;
+            } else if (newSil.size() >= TAB_THRESHOLD) {
+                Iterator<SubscriptionInfo> siIterator = mActiveSubInfos.iterator();
+                for(SubscriptionInfo newSi : newSil) {
+                    SubscriptionInfo curSi = siIterator.next();
+                    if (!newSi.getDisplayName().equals(curSi.getDisplayName())) {
+                        if (DBG) log("isUpdateTabsNeeded: UPDATE, new name="
+                                + newSi.getDisplayName());
+                        state = MobileNetworkSettings.TabState.UPDATE;
+                        break;
+                    }
+                }
+            }
+            if (DBG) {
+                Log.i(LOG_TAG, "isUpdateTabsNeeded:- " + state
+                        + " newSil.size()=" + ((newSil != null) ? newSil.size() : 0)
+                        + " mActiveSubInfos.size()=" + mActiveSubInfos.size());
+            }
+            return state;
+        }
+
+        private TabHost.OnTabChangeListener mTabListener = new TabHost.OnTabChangeListener() {
+            @Override
+            public void onTabChanged(String tabId) {
+                if (DBG) log("onTabChanged:");
+                // The User has changed tab; update the body.
+                updatePhone(Integer.parseInt(tabId));
+                updateBody();
+            }
+        };
+
+        private void updatePhone(int slotId) {
+            final SubscriptionInfo sir = mSubscriptionManager
+                    .getActiveSubscriptionInfoForSimSlotIndex(slotId);
+            if (sir != null) {
+                mPhone = PhoneFactory.getPhone(
+                        SubscriptionManager.getPhoneId(sir.getSubscriptionId()));
+            }
+            if (mPhone == null) {
+                // Do the best we can
+                mPhone = PhoneGlobals.getPhone();
+            }
+            Log.i(LOG_TAG, "updatePhone:- slotId=" + slotId + " sir=" + sir);
+        }
+
+        private TabHost.TabContentFactory mEmptyTabContent = new TabHost.TabContentFactory() {
+            @Override
+            public View createTabContent(String tag) {
+                return new View(mTabHost.getContext());
+            }
+        };
+
+        private TabHost.TabSpec buildTabSpec(String tag, String title) {
+            return mTabHost.newTabSpec(tag).setIndicator(title).setContent(
+                    mEmptyTabContent);
+        }
+
+        @Override
+        public void onCreate(Bundle icicle) {
+            Log.i(LOG_TAG, "onCreate:+");
+            super.onCreate(icicle);
+            mHandler = new MyHandler();
+            mUm = (UserManager) getActivity().getSystemService(Context.USER_SERVICE);
+            mSubscriptionManager = SubscriptionManager.from(getActivity());
+
+            if (mUm.hasUserRestriction(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS)) {
+                mUnavailable = true;
+                getActivity().setContentView(R.layout.telephony_disallowed_preference_screen);
+                return;
+            }
+
+            addPreferencesFromResource(R.xml.network_setting_fragment);
+
+            mButton4glte = (SwitchPreference)findPreference(BUTTON_4G_LTE_KEY);
+            mButton4glte.setOnPreferenceChangeListener(this);
+
+            try {
+                Context con = getActivity().createPackageContext("com.android.systemui", 0);
+                int id = con.getResources().getIdentifier("config_show4GForLTE",
+                        "bool", "com.android.systemui");
+                mShow4GForLTE = con.getResources().getBoolean(id);
+            } catch (PackageManager.NameNotFoundException e) {
+                Log.e(LOG_TAG, "NameNotFoundException for show4GFotLTE");
+                mShow4GForLTE = false;
+            }
+
+            //get UI object references
+            PreferenceScreen prefSet = getPreferenceScreen();
+
+            mButtonDataRoam = (RestrictedSwitchPreference) prefSet.findPreference(
+                    BUTTON_ROAMING_KEY);
+            mButtonPreferredNetworkMode = (ListPreference) prefSet.findPreference(
+                    BUTTON_PREFERED_NETWORK_MODE);
+            mButtonEnabledNetworks = (ListPreference) prefSet.findPreference(
+                    BUTTON_ENABLED_NETWORKS_KEY);
+            mButtonDataRoam.setOnPreferenceChangeListener(this);
+
+            mLteDataServicePref = prefSet.findPreference(BUTTON_CDMA_LTE_DATA_SERVICE_KEY);
+
+            // Initialize mActiveSubInfo
+            int max = mSubscriptionManager.getActiveSubscriptionInfoCountMax();
+            mActiveSubInfos = new ArrayList<SubscriptionInfo>(max);
+
+            IntentFilter intentFilter = new IntentFilter(
+                    TelephonyIntents.ACTION_RADIO_TECHNOLOGY_CHANGED);
+            getActivity().registerReceiver(mPhoneChangeReceiver, intentFilter);
+
+            initializeSubscriptions();
+            Log.i(LOG_TAG, "onCreate:-");
+        }
+
+        private class PhoneChangeReceiver extends BroadcastReceiver {
+            @Override
+            public void onReceive(Context context, Intent intent) {
+                Log.i(LOG_TAG, "onReceive:");
+                // When the radio changes (ex: CDMA->GSM), refresh all options.
+                mGsmUmtsOptions = null;
+                mCdmaOptions = null;
+                updateBody();
+            }
+        }
+
+        @Override
+        public void onDestroy() {
+            super.onDestroy();
+            getActivity().unregisterReceiver(mPhoneChangeReceiver);
+        }
+
+        @Override
+        public void onResume() {
+            super.onResume();
+            Log.i(LOG_TAG, "onResume:+");
+
+            if (mUnavailable) {
+                Log.i(LOG_TAG, "onResume:- ignore mUnavailable == false");
+                return;
+            }
+
+            // upon resumption from the sub-activity, make sure we re-enable the
+            // preferences.
+            getPreferenceScreen().setEnabled(true);
+
+            // Set UI state in onResume because a user could go home, launch some
+            // app to change this setting's backend, and re-launch this settings app
+            // and the UI state would be inconsistent with actual state
+            mButtonDataRoam.setChecked(mPhone.getDataRoamingEnabled());
+
+            if (getPreferenceScreen().findPreference(BUTTON_PREFERED_NETWORK_MODE) != null
+                    || getPreferenceScreen().findPreference(BUTTON_ENABLED_NETWORKS_KEY) != null)  {
+                updatePreferredNetworkUIFromDb();
+            }
+
+            if (ImsManager.isVolteEnabledByPlatform(getActivity())
+                    && ImsManager.isVolteProvisionedOnDevice(getActivity())) {
+                TelephonyManager tm =
+                        (TelephonyManager) getActivity().getSystemService(
+                                Context.TELEPHONY_SERVICE);
+                tm.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE);
+            }
+
+            // NOTE: Buttons will be enabled/disabled in mPhoneStateListener
+            boolean enh4glteMode = ImsManager.isEnhanced4gLteModeSettingEnabledByUser(getActivity())
+                    && ImsManager.isNonTtyOrTtyOnVolteEnabled(getActivity());
+            mButton4glte.setChecked(enh4glteMode);
+
+            mSubscriptionManager.addOnSubscriptionsChangedListener(mOnSubscriptionsChangeListener);
+
+            Log.i(LOG_TAG, "onResume:-");
+
+        }
+
+        private boolean hasActiveSubscriptions() {
+            return mActiveSubInfos.size() > 0;
+        }
+
+        private void updateBody() {
+            Context context = getActivity().getApplicationContext();
+            PreferenceScreen prefSet = getPreferenceScreen();
+            boolean isLteOnCdma = mPhone.getLteOnCdmaMode() == PhoneConstants.LTE_ON_CDMA_TRUE;
+            final int phoneSubId = mPhone.getSubId();
+
+            if (DBG) {
+                log("updateBody: isLteOnCdma=" + isLteOnCdma + " phoneSubId=" + phoneSubId);
+            }
+
+            if (prefSet != null) {
+                prefSet.removeAll();
+                prefSet.addPreference(mButtonDataRoam);
+                prefSet.addPreference(mButtonPreferredNetworkMode);
+                prefSet.addPreference(mButtonEnabledNetworks);
+                prefSet.addPreference(mButton4glte);
+            }
+
+            int settingsNetworkMode = android.provider.Settings.Global.getInt(
+                    mPhone.getContext().getContentResolver(),
+                    android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId,
+                    preferredNetworkMode);
+
+            PersistableBundle carrierConfig =
+                    PhoneGlobals.getInstance().getCarrierConfigForSubId(mPhone.getSubId());
+            mIsGlobalCdma = isLteOnCdma
+                    && carrierConfig.getBoolean(CarrierConfigManager.KEY_SHOW_CDMA_CHOICES_BOOL);
+            if (carrierConfig.getBoolean(
+                    CarrierConfigManager.KEY_HIDE_CARRIER_NETWORK_SETTINGS_BOOL)) {
+                prefSet.removePreference(mButtonPreferredNetworkMode);
+                prefSet.removePreference(mButtonEnabledNetworks);
+                prefSet.removePreference(mLteDataServicePref);
+            } else if (carrierConfig.getBoolean(CarrierConfigManager
+                    .KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL)
+                    && !mPhone.getServiceState().getRoaming()) {
+                prefSet.removePreference(mButtonPreferredNetworkMode);
+                prefSet.removePreference(mButtonEnabledNetworks);
+
+                final int phoneType = mPhone.getPhoneType();
+                if (phoneType == PhoneConstants.PHONE_TYPE_CDMA) {
+                    mCdmaOptions = new CdmaOptions(this, prefSet, mPhone);
+                    // In World mode force a refresh of GSM Options.
+                    if (isWorldMode()) {
+                        mGsmUmtsOptions = null;
+                    }
+                } else if (phoneType == PhoneConstants.PHONE_TYPE_GSM) {
+                    mGsmUmtsOptions = new GsmUmtsOptions(this, prefSet, phoneSubId);
+                } else {
+                    throw new IllegalStateException("Unexpected phone type: " + phoneType);
+                }
+                // Since pref is being hidden from user, set network mode to default
+                // in case it is currently something else. That is possible if user
+                // changed the setting while roaming and is now back to home network.
+                settingsNetworkMode = preferredNetworkMode;
+            } else if (carrierConfig.getBoolean(
+                    CarrierConfigManager.KEY_WORLD_PHONE_BOOL) == true) {
+                prefSet.removePreference(mButtonEnabledNetworks);
+                // set the listener for the mButtonPreferredNetworkMode list preference so we can issue
+                // change Preferred Network Mode.
+                mButtonPreferredNetworkMode.setOnPreferenceChangeListener(this);
+
+                mCdmaOptions = new CdmaOptions(this, prefSet, mPhone);
                 mGsmUmtsOptions = new GsmUmtsOptions(this, prefSet, phoneSubId);
             } else {
-                throw new IllegalStateException("Unexpected phone type: " + phoneType);
-            }
-            // Since pref is being hidden from user, set network mode to default
-            // in case it is currently something else. That is possible if user
-            // changed the setting while roaming and is now back to home network.
-            settingsNetworkMode = preferredNetworkMode;
-        } else if (carrierConfig.getBoolean(CarrierConfigManager.KEY_WORLD_PHONE_BOOL) == true) {
-            prefSet.removePreference(mButtonEnabledNetworks);
-            // set the listener for the mButtonPreferredNetworkMode list preference so we can issue
-            // change Preferred Network Mode.
-            mButtonPreferredNetworkMode.setOnPreferenceChangeListener(this);
+                prefSet.removePreference(mButtonPreferredNetworkMode);
+                final int phoneType = mPhone.getPhoneType();
+                if (phoneType == PhoneConstants.PHONE_TYPE_CDMA) {
+                    int lteForced = android.provider.Settings.Global.getInt(
+                            mPhone.getContext().getContentResolver(),
+                            android.provider.Settings.Global.LTE_SERVICE_FORCED + mPhone.getSubId(),
+                            0);
 
-            mCdmaOptions = new CdmaOptions(this, prefSet, mPhone);
-            mGsmUmtsOptions = new GsmUmtsOptions(this, prefSet, phoneSubId);
-        } else {
-            prefSet.removePreference(mButtonPreferredNetworkMode);
-            final int phoneType = mPhone.getPhoneType();
-            if (phoneType == PhoneConstants.PHONE_TYPE_CDMA) {
-                int lteForced = android.provider.Settings.Global.getInt(
-                        mPhone.getContext().getContentResolver(),
-                        android.provider.Settings.Global.LTE_SERVICE_FORCED + mPhone.getSubId(),
-                        0);
+                    if (isLteOnCdma) {
+                        if (lteForced == 0) {
+                            mButtonEnabledNetworks.setEntries(
+                                    R.array.enabled_networks_cdma_choices);
+                            mButtonEnabledNetworks.setEntryValues(
+                                    R.array.enabled_networks_cdma_values);
+                        } else {
+                            switch (settingsNetworkMode) {
+                                case Phone.NT_MODE_CDMA:
+                                case Phone.NT_MODE_CDMA_NO_EVDO:
+                                case Phone.NT_MODE_EVDO_NO_CDMA:
+                                    mButtonEnabledNetworks.setEntries(
+                                            R.array.enabled_networks_cdma_no_lte_choices);
+                                    mButtonEnabledNetworks.setEntryValues(
+                                            R.array.enabled_networks_cdma_no_lte_values);
+                                    break;
+                                case Phone.NT_MODE_GLOBAL:
+                                case Phone.NT_MODE_LTE_CDMA_AND_EVDO:
+                                case Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA:
+                                case Phone.NT_MODE_LTE_ONLY:
+                                    mButtonEnabledNetworks.setEntries(
+                                            R.array.enabled_networks_cdma_only_lte_choices);
+                                    mButtonEnabledNetworks.setEntryValues(
+                                            R.array.enabled_networks_cdma_only_lte_values);
+                                    break;
+                                default:
+                                    mButtonEnabledNetworks.setEntries(
+                                            R.array.enabled_networks_cdma_choices);
+                                    mButtonEnabledNetworks.setEntryValues(
+                                            R.array.enabled_networks_cdma_values);
+                                    break;
+                            }
+                        }
+                    }
+                    mCdmaOptions = new CdmaOptions(this, prefSet, mPhone);
 
-                if (isLteOnCdma) {
-                    if (lteForced == 0) {
+                    // In World mode force a refresh of GSM Options.
+                    if (isWorldMode()) {
+                        mGsmUmtsOptions = null;
+                    }
+                } else if (phoneType == PhoneConstants.PHONE_TYPE_GSM) {
+                    if (isSupportTdscdma()) {
+                        mButtonEnabledNetworks.setEntries(
+                                R.array.enabled_networks_tdscdma_choices);
+                        mButtonEnabledNetworks.setEntryValues(
+                                R.array.enabled_networks_tdscdma_values);
+                    } else if (!carrierConfig.getBoolean(CarrierConfigManager.KEY_PREFER_2G_BOOL)
+                            && !getResources().getBoolean(R.bool.config_enabled_lte)) {
+                        mButtonEnabledNetworks.setEntries(
+                                R.array.enabled_networks_except_gsm_lte_choices);
+                        mButtonEnabledNetworks.setEntryValues(
+                                R.array.enabled_networks_except_gsm_lte_values);
+                    } else if (!carrierConfig.getBoolean(CarrierConfigManager.KEY_PREFER_2G_BOOL)) {
+                        int select = (mShow4GForLTE == true) ?
+                                R.array.enabled_networks_except_gsm_4g_choices
+                                : R.array.enabled_networks_except_gsm_choices;
+                        mButtonEnabledNetworks.setEntries(select);
+                        mButtonEnabledNetworks.setEntryValues(
+                                R.array.enabled_networks_except_gsm_values);
+                    } else if (!getResources().getBoolean(R.bool.config_enabled_lte)) {
+                        mButtonEnabledNetworks.setEntries(
+                                R.array.enabled_networks_except_lte_choices);
+                        mButtonEnabledNetworks.setEntryValues(
+                                R.array.enabled_networks_except_lte_values);
+                    } else if (mIsGlobalCdma) {
                         mButtonEnabledNetworks.setEntries(
                                 R.array.enabled_networks_cdma_choices);
                         mButtonEnabledNetworks.setEntryValues(
                                 R.array.enabled_networks_cdma_values);
                     } else {
-                        switch (settingsNetworkMode) {
-                            case Phone.NT_MODE_CDMA:
-                            case Phone.NT_MODE_CDMA_NO_EVDO:
-                            case Phone.NT_MODE_EVDO_NO_CDMA:
-                                mButtonEnabledNetworks.setEntries(
-                                        R.array.enabled_networks_cdma_no_lte_choices);
-                                mButtonEnabledNetworks.setEntryValues(
-                                        R.array.enabled_networks_cdma_no_lte_values);
-                                break;
-                            case Phone.NT_MODE_GLOBAL:
-                            case Phone.NT_MODE_LTE_CDMA_AND_EVDO:
-                            case Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA:
-                            case Phone.NT_MODE_LTE_ONLY:
-                                mButtonEnabledNetworks.setEntries(
-                                        R.array.enabled_networks_cdma_only_lte_choices);
-                                mButtonEnabledNetworks.setEntryValues(
-                                        R.array.enabled_networks_cdma_only_lte_values);
-                                break;
-                            default:
-                                mButtonEnabledNetworks.setEntries(
-                                        R.array.enabled_networks_cdma_choices);
-                                mButtonEnabledNetworks.setEntryValues(
-                                        R.array.enabled_networks_cdma_values);
-                                break;
-                        }
+                        int select = (mShow4GForLTE == true) ? R.array.enabled_networks_4g_choices
+                                : R.array.enabled_networks_choices;
+                        mButtonEnabledNetworks.setEntries(select);
+                        mButtonEnabledNetworks.setEntryValues(
+                                R.array.enabled_networks_values);
                     }
-                }
-                mCdmaOptions = new CdmaOptions(this, prefSet, mPhone);
-
-                // In World mode force a refresh of GSM Options.
-                if (isWorldMode()) {
-                    mGsmUmtsOptions = null;
-                }
-            } else if (phoneType == PhoneConstants.PHONE_TYPE_GSM) {
-                if (isSupportTdscdma()) {
-                    mButtonEnabledNetworks.setEntries(
-                            R.array.enabled_networks_tdscdma_choices);
-                    mButtonEnabledNetworks.setEntryValues(
-                            R.array.enabled_networks_tdscdma_values);
-                } else if (!carrierConfig.getBoolean(CarrierConfigManager.KEY_PREFER_2G_BOOL)
-                        && !getResources().getBoolean(R.bool.config_enabled_lte)) {
-                    mButtonEnabledNetworks.setEntries(
-                            R.array.enabled_networks_except_gsm_lte_choices);
-                    mButtonEnabledNetworks.setEntryValues(
-                            R.array.enabled_networks_except_gsm_lte_values);
-                } else if (!carrierConfig.getBoolean(CarrierConfigManager.KEY_PREFER_2G_BOOL)) {
-                    int select = (mShow4GForLTE == true) ?
-                            R.array.enabled_networks_except_gsm_4g_choices
-                            : R.array.enabled_networks_except_gsm_choices;
-                    mButtonEnabledNetworks.setEntries(select);
-                    mButtonEnabledNetworks.setEntryValues(
-                            R.array.enabled_networks_except_gsm_values);
-                } else if (!getResources().getBoolean(R.bool.config_enabled_lte)) {
-                    mButtonEnabledNetworks.setEntries(
-                            R.array.enabled_networks_except_lte_choices);
-                    mButtonEnabledNetworks.setEntryValues(
-                            R.array.enabled_networks_except_lte_values);
-                } else if (mIsGlobalCdma) {
-                    mButtonEnabledNetworks.setEntries(
-                            R.array.enabled_networks_cdma_choices);
-                    mButtonEnabledNetworks.setEntryValues(
-                            R.array.enabled_networks_cdma_values);
+                    mGsmUmtsOptions = new GsmUmtsOptions(this, prefSet, phoneSubId);
                 } else {
-                    int select = (mShow4GForLTE == true) ? R.array.enabled_networks_4g_choices
-                            : R.array.enabled_networks_choices;
-                    mButtonEnabledNetworks.setEntries(select);
-                    mButtonEnabledNetworks.setEntryValues(
-                            R.array.enabled_networks_values);
+                    throw new IllegalStateException("Unexpected phone type: " + phoneType);
                 }
-                mGsmUmtsOptions = new GsmUmtsOptions(this, prefSet, phoneSubId);
+                if (isWorldMode()) {
+                    mButtonEnabledNetworks.setEntries(
+                            R.array.preferred_network_mode_choices_world_mode);
+                    mButtonEnabledNetworks.setEntryValues(
+                            R.array.preferred_network_mode_values_world_mode);
+                }
+                mButtonEnabledNetworks.setOnPreferenceChangeListener(this);
+                if (DBG) log("settingsNetworkMode: " + settingsNetworkMode);
+            }
+
+            final boolean missingDataServiceUrl = TextUtils.isEmpty(
+                    android.provider.Settings.Global.getString(getActivity().getContentResolver(),
+                            android.provider.Settings.Global.SETUP_PREPAID_DATA_SERVICE_URL));
+            if (!isLteOnCdma || missingDataServiceUrl) {
+                prefSet.removePreference(mLteDataServicePref);
             } else {
-                throw new IllegalStateException("Unexpected phone type: " + phoneType);
+                android.util.Log.d(LOG_TAG, "keep ltePref");
             }
-            if (isWorldMode()) {
-                mButtonEnabledNetworks.setEntries(
-                        R.array.preferred_network_mode_choices_world_mode);
-                mButtonEnabledNetworks.setEntryValues(
-                        R.array.preferred_network_mode_values_world_mode);
+
+            if (!(ImsManager.isVolteEnabledByPlatform(getActivity())
+                    && ImsManager.isVolteProvisionedOnDevice(getActivity()))
+                    || carrierConfig.getBoolean(
+                        CarrierConfigManager.KEY_HIDE_ENHANCED_4G_LTE_BOOL)) {
+                Preference pref = prefSet.findPreference(BUTTON_4G_LTE_KEY);
+                if (pref != null) {
+                    prefSet.removePreference(pref);
+                }
             }
-            mButtonEnabledNetworks.setOnPreferenceChangeListener(this);
-            if (DBG) log("settingsNetworkMode: " + settingsNetworkMode);
-        }
 
-        final boolean missingDataServiceUrl = TextUtils.isEmpty(
-                android.provider.Settings.Global.getString(getContentResolver(),
-                        android.provider.Settings.Global.SETUP_PREPAID_DATA_SERVICE_URL));
-        if (!isLteOnCdma || missingDataServiceUrl) {
-            prefSet.removePreference(mLteDataServicePref);
-        } else {
-            android.util.Log.d(LOG_TAG, "keep ltePref");
-        }
-
-        // Enable enhanced 4G LTE mode settings depending on whether exists on platform
-        if (!(ImsManager.isVolteEnabledByPlatform(this)
-                && ImsManager.isVolteProvisionedOnDevice(this))) {
-            Preference pref = prefSet.findPreference(BUTTON_4G_LTE_KEY);
-            if (pref != null) {
-                prefSet.removePreference(pref);
+            ActionBar actionBar = getActivity().getActionBar();
+            if (actionBar != null) {
+                // android.R.id.home will be triggered in onOptionsItemSelected()
+                actionBar.setDisplayHomeAsUpEnabled(true);
             }
-        }
 
-        ActionBar actionBar = getActionBar();
-        if (actionBar != null) {
-            // android.R.id.home will be triggered in onOptionsItemSelected()
-            actionBar.setDisplayHomeAsUpEnabled(true);
-        }
+            // Enable link to CMAS app settings depending on the value in config.xml.
+            final boolean isCellBroadcastAppLinkEnabled = getActivity().getResources().getBoolean(
+                    com.android.internal.R.bool.config_cellBroadcastAppLinks);
+            if (!mUm.isAdminUser() || !isCellBroadcastAppLinkEnabled
+                    || mUm.hasUserRestriction(UserManager.DISALLOW_CONFIG_CELL_BROADCASTS)) {
+                PreferenceScreen root = getPreferenceScreen();
+                Preference ps = findPreference(BUTTON_CELL_BROADCAST_SETTINGS);
+                if (ps != null) {
+                    root.removePreference(ps);
+                }
+            }
 
-        // Enable link to CMAS app settings depending on the value in config.xml.
-        final boolean isCellBroadcastAppLinkEnabled = this.getResources().getBoolean(
-                com.android.internal.R.bool.config_cellBroadcastAppLinks);
-        if (!mUm.isAdminUser() || !isCellBroadcastAppLinkEnabled
-                || mUm.hasUserRestriction(UserManager.DISALLOW_CONFIG_CELL_BROADCASTS)) {
+            // Get the networkMode from Settings.System and displays it
+            mButtonDataRoam.setChecked(mPhone.getDataRoamingEnabled());
+            mButtonEnabledNetworks.setValue(Integer.toString(settingsNetworkMode));
+            mButtonPreferredNetworkMode.setValue(Integer.toString(settingsNetworkMode));
+            UpdatePreferredNetworkModeSummary(settingsNetworkMode);
+            UpdateEnabledNetworksValueAndSummary(settingsNetworkMode);
+            // Display preferred network type based on what modem returns b/18676277
+            mPhone.setPreferredNetworkType(settingsNetworkMode, mHandler
+                    .obtainMessage(MyHandler.MESSAGE_SET_PREFERRED_NETWORK_TYPE));
+
+            /**
+             * Enable/disable depending upon if there are any active subscriptions.
+             *
+             * I've decided to put this enable/disable code at the bottom as the
+             * code above works even when there are no active subscriptions, thus
+             * putting it afterwards is a smaller change. This can be refined later,
+             * but you do need to remember that this all needs to work when subscriptions
+             * change dynamically such as when hot swapping sims.
+             */
+            boolean hasActiveSubscriptions = hasActiveSubscriptions();
+            TelephonyManager tm = (TelephonyManager) getActivity().getSystemService(
+                    Context.TELEPHONY_SERVICE);
+            boolean canChange4glte = (tm.getCallState() == TelephonyManager.CALL_STATE_IDLE) &&
+                    ImsManager.isNonTtyOrTtyOnVolteEnabled(getActivity().getApplicationContext()) &&
+                    carrierConfig.getBoolean(
+                            CarrierConfigManager.KEY_EDITABLE_ENHANCED_4G_LTE_BOOL);
+            boolean useVariant4glteTitle = carrierConfig.getBoolean(
+                    CarrierConfigManager.KEY_ENHANCED_4G_LTE_TITLE_VARIANT_BOOL);
+            int enhanced4glteModeTitleId = useVariant4glteTitle ?
+                    R.string.enhanced_4g_lte_mode_title_variant :
+                    R.string.enhanced_4g_lte_mode_title;
+            mButtonDataRoam.setDisabledByAdmin(false);
+            mButtonDataRoam.setEnabled(hasActiveSubscriptions);
+            if (mButtonDataRoam.isEnabled()) {
+                if (RestrictedLockUtils.hasBaseUserRestriction(context,
+                        UserManager.DISALLOW_DATA_ROAMING, UserHandle.myUserId())) {
+                    mButtonDataRoam.setEnabled(false);
+                } else {
+                    mButtonDataRoam.checkRestrictionAndSetDisabled(
+                            UserManager.DISALLOW_DATA_ROAMING);
+                }
+            }
+            mButtonPreferredNetworkMode.setEnabled(hasActiveSubscriptions);
+            mButtonEnabledNetworks.setEnabled(hasActiveSubscriptions);
+            mButton4glte.setTitle(enhanced4glteModeTitleId);
+            mButton4glte.setEnabled(hasActiveSubscriptions && canChange4glte);
+            mLteDataServicePref.setEnabled(hasActiveSubscriptions);
+            Preference ps;
             PreferenceScreen root = getPreferenceScreen();
-            Preference ps = findPreference(BUTTON_CELL_BROADCAST_SETTINGS);
+            ps = findPreference(BUTTON_CELL_BROADCAST_SETTINGS);
             if (ps != null) {
-                root.removePreference(ps);
+                ps.setEnabled(hasActiveSubscriptions);
+            }
+            ps = findPreference(BUTTON_APN_EXPAND_KEY);
+            if (ps != null) {
+                ps.setEnabled(hasActiveSubscriptions);
+            }
+            ps = findPreference(BUTTON_OPERATOR_SELECTION_EXPAND_KEY);
+            if (ps != null) {
+                ps.setEnabled(hasActiveSubscriptions);
+            }
+            ps = findPreference(BUTTON_CARRIER_SETTINGS_KEY);
+            if (ps != null) {
+                ps.setEnabled(hasActiveSubscriptions);
+            }
+            ps = findPreference(BUTTON_CDMA_SYSTEM_SELECT_KEY);
+            if (ps != null) {
+                ps.setEnabled(hasActiveSubscriptions);
             }
         }
 
-        // Get the networkMode from Settings.System and displays it
-        mButtonDataRoam.setChecked(mPhone.getDataRoamingEnabled());
-        mButtonEnabledNetworks.setValue(Integer.toString(settingsNetworkMode));
-        mButtonPreferredNetworkMode.setValue(Integer.toString(settingsNetworkMode));
-        UpdatePreferredNetworkModeSummary(settingsNetworkMode);
-        UpdateEnabledNetworksValueAndSummary(settingsNetworkMode);
-        // Display preferred network type based on what modem returns b/18676277
-        mPhone.setPreferredNetworkType(settingsNetworkMode, mHandler
-                .obtainMessage(MyHandler.MESSAGE_SET_PREFERRED_NETWORK_TYPE));
+        @Override
+        public void onPause() {
+            super.onPause();
+            if (DBG) log("onPause:+");
+
+            if (ImsManager.isVolteEnabledByPlatform(getActivity())
+                    && ImsManager.isVolteProvisionedOnDevice(getActivity())) {
+                TelephonyManager tm =
+                        (TelephonyManager) getActivity().getSystemService(
+                                Context.TELEPHONY_SERVICE);
+                tm.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);
+            }
+
+            mSubscriptionManager
+                    .removeOnSubscriptionsChangedListener(mOnSubscriptionsChangeListener);
+            if (DBG) log("onPause:-");
+        }
 
         /**
-         * Enable/disable depending upon if there are any active subscriptions.
+         * Implemented to support onPreferenceChangeListener to look for preference
+         * changes specifically on CLIR.
          *
-         * I've decided to put this enable/disable code at the bottom as the
-         * code above works even when there are no active subscriptions, thus
-         * putting it afterwards is a smaller change. This can be refined later,
-         * but you do need to remember that this all needs to work when subscriptions
-         * change dynamically such as when hot swapping sims.
+         * @param preference is the preference to be changed, should be mButtonCLIR.
+         * @param objValue should be the value of the selection, NOT its localized
+         * display value.
          */
-        boolean hasActiveSubscriptions = hasActiveSubscriptions();
-        TelephonyManager tm = (TelephonyManager) getSystemService(
-                Context.TELEPHONY_SERVICE);
-        boolean canChange4glte = (tm.getCallState() == TelephonyManager.CALL_STATE_IDLE) &&
-                ImsManager.isNonTtyOrTtyOnVolteEnabled(getApplicationContext()) &&
-                carrierConfig.getBoolean(CarrierConfigManager.KEY_EDITABLE_ENHANCED_4G_LTE_BOOL);
-        boolean useVariant4glteTitle = carrierConfig.getBoolean(
-                CarrierConfigManager.KEY_ENHANCED_4G_LTE_TITLE_VARIANT_BOOL);
-        int enhanced4glteModeTitleId = useVariant4glteTitle ?
-                R.string.enhanced_4g_lte_mode_title_variant :
-                R.string.enhanced_4g_lte_mode_title;
-        mButtonDataRoam.setDisabledByAdmin(false);
-        mButtonDataRoam.setEnabled(hasActiveSubscriptions);
-        if (mButtonDataRoam.isEnabled()) {
-            if (RestrictedLockUtils.hasBaseUserRestriction(context,
-                    UserManager.DISALLOW_DATA_ROAMING, UserHandle.myUserId())) {
-                mButtonDataRoam.setEnabled(false);
-            } else {
-                mButtonDataRoam.checkRestrictionAndSetDisabled(UserManager.DISALLOW_DATA_ROAMING);
-            }
-        }
-        mButtonPreferredNetworkMode.setEnabled(hasActiveSubscriptions);
-        mButtonEnabledNetworks.setEnabled(hasActiveSubscriptions);
-        mButton4glte.setTitle(enhanced4glteModeTitleId);
-        mButton4glte.setEnabled(hasActiveSubscriptions && canChange4glte);
-        mLteDataServicePref.setEnabled(hasActiveSubscriptions);
-        Preference ps;
-        PreferenceScreen root = getPreferenceScreen();
-        ps = findPreference(BUTTON_CELL_BROADCAST_SETTINGS);
-        if (ps != null) {
-            ps.setEnabled(hasActiveSubscriptions);
-        }
-        ps = findPreference(BUTTON_APN_EXPAND_KEY);
-        if (ps != null) {
-            ps.setEnabled(hasActiveSubscriptions);
-        }
-        ps = findPreference(BUTTON_OPERATOR_SELECTION_EXPAND_KEY);
-        if (ps != null) {
-            ps.setEnabled(hasActiveSubscriptions);
-        }
-        ps = findPreference(BUTTON_CARRIER_SETTINGS_KEY);
-        if (ps != null) {
-            ps.setEnabled(hasActiveSubscriptions);
-        }
-        ps = findPreference(BUTTON_CDMA_SYSTEM_SELECT_KEY);
-        if (ps != null) {
-            ps.setEnabled(hasActiveSubscriptions);
-        }
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-        if (DBG) log("onPause:+");
-
-        if (ImsManager.isVolteEnabledByPlatform(this)
-                && ImsManager.isVolteProvisionedOnDevice(this)) {
-            TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
-            tm.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);
-        }
-
-        mSubscriptionManager
-            .removeOnSubscriptionsChangedListener(mOnSubscriptionsChangeListener);
-        if (DBG) log("onPause:-");
-    }
-
-    /**
-     * Implemented to support onPreferenceChangeListener to look for preference
-     * changes specifically on CLIR.
-     *
-     * @param preference is the preference to be changed, should be mButtonCLIR.
-     * @param objValue should be the value of the selection, NOT its localized
-     * display value.
-     */
-    public boolean onPreferenceChange(Preference preference, Object objValue) {
-        final int phoneSubId = mPhone.getSubId();
-        if (preference == mButtonPreferredNetworkMode) {
-            //NOTE onPreferenceChange seems to be called even if there is no change
-            //Check if the button value is changed from the System.Setting
-            mButtonPreferredNetworkMode.setValue((String) objValue);
-            int buttonNetworkMode;
-            buttonNetworkMode = Integer.parseInt((String) objValue);
-            int settingsNetworkMode = android.provider.Settings.Global.getInt(
-                    mPhone.getContext().getContentResolver(),
-                    android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId,
-                    preferredNetworkMode);
-            if (buttonNetworkMode != settingsNetworkMode) {
-                int modemNetworkMode;
-                // if new mode is invalid ignore it
-                switch (buttonNetworkMode) {
-                    case Phone.NT_MODE_WCDMA_PREF:
-                    case Phone.NT_MODE_GSM_ONLY:
-                    case Phone.NT_MODE_WCDMA_ONLY:
-                    case Phone.NT_MODE_GSM_UMTS:
-                    case Phone.NT_MODE_CDMA:
-                    case Phone.NT_MODE_CDMA_NO_EVDO:
-                    case Phone.NT_MODE_EVDO_NO_CDMA:
-                    case Phone.NT_MODE_GLOBAL:
-                    case Phone.NT_MODE_LTE_CDMA_AND_EVDO:
-                    case Phone.NT_MODE_LTE_GSM_WCDMA:
-                    case Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA:
-                    case Phone.NT_MODE_LTE_ONLY:
-                    case Phone.NT_MODE_LTE_WCDMA:
-                    case Phone.NT_MODE_TDSCDMA_ONLY:
-                    case Phone.NT_MODE_TDSCDMA_WCDMA:
-                    case Phone.NT_MODE_LTE_TDSCDMA:
-                    case Phone.NT_MODE_TDSCDMA_GSM:
-                    case Phone.NT_MODE_LTE_TDSCDMA_GSM:
-                    case Phone.NT_MODE_TDSCDMA_GSM_WCDMA:
-                    case Phone.NT_MODE_LTE_TDSCDMA_WCDMA:
-                    case Phone.NT_MODE_LTE_TDSCDMA_GSM_WCDMA:
-                    case Phone.NT_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
-                    case Phone.NT_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
-                        // This is one of the modes we recognize
-                        modemNetworkMode = buttonNetworkMode;
-                        break;
-                    default:
-                        loge("Invalid Network Mode (" + buttonNetworkMode + ") chosen. Ignore.");
-                        return true;
-                }
-
-                android.provider.Settings.Global.putInt(mPhone.getContext().getContentResolver(),
+        public boolean onPreferenceChange(Preference preference, Object objValue) {
+            final int phoneSubId = mPhone.getSubId();
+            if (preference == mButtonPreferredNetworkMode) {
+                //NOTE onPreferenceChange seems to be called even if there is no change
+                //Check if the button value is changed from the System.Setting
+                mButtonPreferredNetworkMode.setValue((String) objValue);
+                int buttonNetworkMode;
+                buttonNetworkMode = Integer.parseInt((String) objValue);
+                int settingsNetworkMode = android.provider.Settings.Global.getInt(
+                        mPhone.getContext().getContentResolver(),
                         android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId,
-                        buttonNetworkMode );
-                //Set the modem network mode
-                mPhone.setPreferredNetworkType(modemNetworkMode, mHandler
-                        .obtainMessage(MyHandler.MESSAGE_SET_PREFERRED_NETWORK_TYPE));
-            }
-        } else if (preference == mButtonEnabledNetworks) {
-            mButtonEnabledNetworks.setValue((String) objValue);
-            int buttonNetworkMode;
-            buttonNetworkMode = Integer.parseInt((String) objValue);
-            if (DBG) log("buttonNetworkMode: " + buttonNetworkMode);
-            int settingsNetworkMode = android.provider.Settings.Global.getInt(
-                    mPhone.getContext().getContentResolver(),
-                    android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId,
-                    preferredNetworkMode);
-            if (buttonNetworkMode != settingsNetworkMode) {
-                int modemNetworkMode;
-                // if new mode is invalid ignore it
-                switch (buttonNetworkMode) {
-                    case Phone.NT_MODE_WCDMA_PREF:
-                    case Phone.NT_MODE_GSM_ONLY:
-                    case Phone.NT_MODE_LTE_GSM_WCDMA:
-                    case Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA:
-                    case Phone.NT_MODE_CDMA:
-                    case Phone.NT_MODE_CDMA_NO_EVDO:
-                    case Phone.NT_MODE_LTE_CDMA_AND_EVDO:
-                    case Phone.NT_MODE_TDSCDMA_ONLY:
-                    case Phone.NT_MODE_TDSCDMA_WCDMA:
-                    case Phone.NT_MODE_LTE_TDSCDMA:
-                    case Phone.NT_MODE_TDSCDMA_GSM:
-                    case Phone.NT_MODE_LTE_TDSCDMA_GSM:
-                    case Phone.NT_MODE_TDSCDMA_GSM_WCDMA:
-                    case Phone.NT_MODE_LTE_TDSCDMA_WCDMA:
-                    case Phone.NT_MODE_LTE_TDSCDMA_GSM_WCDMA:
-                    case Phone.NT_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
-                    case Phone.NT_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
-                        // This is one of the modes we recognize
-                        modemNetworkMode = buttonNetworkMode;
-                        break;
-                    default:
-                        loge("Invalid Network Mode (" + buttonNetworkMode + ") chosen. Ignore.");
-                        return true;
+                        preferredNetworkMode);
+                if (buttonNetworkMode != settingsNetworkMode) {
+                    int modemNetworkMode;
+                    // if new mode is invalid ignore it
+                    switch (buttonNetworkMode) {
+                        case Phone.NT_MODE_WCDMA_PREF:
+                        case Phone.NT_MODE_GSM_ONLY:
+                        case Phone.NT_MODE_WCDMA_ONLY:
+                        case Phone.NT_MODE_GSM_UMTS:
+                        case Phone.NT_MODE_CDMA:
+                        case Phone.NT_MODE_CDMA_NO_EVDO:
+                        case Phone.NT_MODE_EVDO_NO_CDMA:
+                        case Phone.NT_MODE_GLOBAL:
+                        case Phone.NT_MODE_LTE_CDMA_AND_EVDO:
+                        case Phone.NT_MODE_LTE_GSM_WCDMA:
+                        case Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA:
+                        case Phone.NT_MODE_LTE_ONLY:
+                        case Phone.NT_MODE_LTE_WCDMA:
+                        case Phone.NT_MODE_TDSCDMA_ONLY:
+                        case Phone.NT_MODE_TDSCDMA_WCDMA:
+                        case Phone.NT_MODE_LTE_TDSCDMA:
+                        case Phone.NT_MODE_TDSCDMA_GSM:
+                        case Phone.NT_MODE_LTE_TDSCDMA_GSM:
+                        case Phone.NT_MODE_TDSCDMA_GSM_WCDMA:
+                        case Phone.NT_MODE_LTE_TDSCDMA_WCDMA:
+                        case Phone.NT_MODE_LTE_TDSCDMA_GSM_WCDMA:
+                        case Phone.NT_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
+                        case Phone.NT_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
+                            // This is one of the modes we recognize
+                            modemNetworkMode = buttonNetworkMode;
+                            break;
+                        default:
+                            loge("Invalid Network Mode (" +buttonNetworkMode+ ") chosen. Ignore.");
+                            return true;
+                    }
+
+                    android.provider.Settings.Global.putInt(
+                            mPhone.getContext().getContentResolver(),
+                            android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId,
+                            buttonNetworkMode );
+                    //Set the modem network mode
+                    mPhone.setPreferredNetworkType(modemNetworkMode, mHandler
+                            .obtainMessage(MyHandler.MESSAGE_SET_PREFERRED_NETWORK_TYPE));
                 }
-
-                UpdateEnabledNetworksValueAndSummary(buttonNetworkMode);
-
-                android.provider.Settings.Global.putInt(mPhone.getContext().getContentResolver(),
+            } else if (preference == mButtonEnabledNetworks) {
+                mButtonEnabledNetworks.setValue((String) objValue);
+                int buttonNetworkMode;
+                buttonNetworkMode = Integer.parseInt((String) objValue);
+                if (DBG) log("buttonNetworkMode: " + buttonNetworkMode);
+                int settingsNetworkMode = android.provider.Settings.Global.getInt(
+                        mPhone.getContext().getContentResolver(),
                         android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId,
-                        buttonNetworkMode );
-                //Set the modem network mode
-                mPhone.setPreferredNetworkType(modemNetworkMode, mHandler
-                        .obtainMessage(MyHandler.MESSAGE_SET_PREFERRED_NETWORK_TYPE));
-            }
-        } else if (preference == mButton4glte) {
-            SwitchPreference enhanced4gModePref = (SwitchPreference) preference;
-            boolean enhanced4gMode = !enhanced4gModePref.isChecked();
-            enhanced4gModePref.setChecked(enhanced4gMode);
-            ImsManager.setEnhanced4gLteModeSetting(this, enhanced4gModePref.isChecked());
-        } else if (preference == mButtonDataRoam) {
-            if (DBG) log("onPreferenceTreeClick: preference == mButtonDataRoam.");
+                        preferredNetworkMode);
+                if (buttonNetworkMode != settingsNetworkMode) {
+                    int modemNetworkMode;
+                    // if new mode is invalid ignore it
+                    switch (buttonNetworkMode) {
+                        case Phone.NT_MODE_WCDMA_PREF:
+                        case Phone.NT_MODE_GSM_ONLY:
+                        case Phone.NT_MODE_LTE_GSM_WCDMA:
+                        case Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA:
+                        case Phone.NT_MODE_CDMA:
+                        case Phone.NT_MODE_CDMA_NO_EVDO:
+                        case Phone.NT_MODE_LTE_CDMA_AND_EVDO:
+                        case Phone.NT_MODE_TDSCDMA_ONLY:
+                        case Phone.NT_MODE_TDSCDMA_WCDMA:
+                        case Phone.NT_MODE_LTE_TDSCDMA:
+                        case Phone.NT_MODE_TDSCDMA_GSM:
+                        case Phone.NT_MODE_LTE_TDSCDMA_GSM:
+                        case Phone.NT_MODE_TDSCDMA_GSM_WCDMA:
+                        case Phone.NT_MODE_LTE_TDSCDMA_WCDMA:
+                        case Phone.NT_MODE_LTE_TDSCDMA_GSM_WCDMA:
+                        case Phone.NT_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
+                        case Phone.NT_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
+                            // This is one of the modes we recognize
+                            modemNetworkMode = buttonNetworkMode;
+                            break;
+                        default:
+                            loge("Invalid Network Mode (" +buttonNetworkMode+ ") chosen. Ignore.");
+                            return true;
+                    }
 
-            //normally called on the toggle click
-            if (!mButtonDataRoam.isChecked()) {
-                // First confirm with a warning dialog about charges
-                mOkClicked = false;
-                new AlertDialog.Builder(this).setMessage(
-                        getResources().getString(R.string.roaming_warning))
-                        .setTitle(R.string.roaming_alert_title)
-                        .setIconAttribute(android.R.attr.alertDialogIcon)
-                        .setPositiveButton(android.R.string.yes, this)
-                        .setNegativeButton(android.R.string.no, this)
-                        .show()
-                        .setOnDismissListener(this);
-            } else {
-                mPhone.setDataRoamingEnabled(false);
+                    UpdateEnabledNetworksValueAndSummary(buttonNetworkMode);
+
+                    android.provider.Settings.Global.putInt(
+                            mPhone.getContext().getContentResolver(),
+                            android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId,
+                            buttonNetworkMode );
+                    //Set the modem network mode
+                    mPhone.setPreferredNetworkType(modemNetworkMode, mHandler
+                            .obtainMessage(MyHandler.MESSAGE_SET_PREFERRED_NETWORK_TYPE));
+                }
+            } else if (preference == mButton4glte) {
+                SwitchPreference enhanced4gModePref = (SwitchPreference) preference;
+                boolean enhanced4gMode = !enhanced4gModePref.isChecked();
+                enhanced4gModePref.setChecked(enhanced4gMode);
+                ImsManager.setEnhanced4gLteModeSetting(getActivity(),
+                        enhanced4gModePref.isChecked());
+            } else if (preference == mButtonDataRoam) {
+                if (DBG) log("onPreferenceTreeClick: preference == mButtonDataRoam.");
+
+                //normally called on the toggle click
+                if (!mButtonDataRoam.isChecked()) {
+                    // First confirm with a warning dialog about charges
+                    mOkClicked = false;
+                    RoamingDialogFragment fragment = new RoamingDialogFragment();
+                    fragment.show(getFragmentManager(), ROAMING_TAG);
+                    // Don't update the toggle unless the confirm button is actually pressed.
+                    return false;
+                } else {
+                    mPhone.setDataRoamingEnabled(false);
+                }
+                return true;
             }
+
+            updateBody();
+            // always let the preference setting proceed.
             return true;
         }
 
-        updateBody();
-        // always let the preference setting proceed.
-        return true;
-    }
+        private class MyHandler extends Handler {
 
-    private class MyHandler extends Handler {
+            static final int MESSAGE_SET_PREFERRED_NETWORK_TYPE = 0;
 
-        static final int MESSAGE_SET_PREFERRED_NETWORK_TYPE = 0;
-
-        @Override
-        public void handleMessage(Message msg) {
-            switch (msg.what) {
-                case MESSAGE_SET_PREFERRED_NETWORK_TYPE:
-                    handleSetPreferredNetworkTypeResponse(msg);
-                    break;
-            }
-        }
-
-        private void handleSetPreferredNetworkTypeResponse(Message msg) {
-            if (isDestroyed()) { // Access preferences of activity only if it is not destroyed
-                return;
-            }
-
-            AsyncResult ar = (AsyncResult) msg.obj;
-            final int phoneSubId = mPhone.getSubId();
-
-            if (ar.exception == null) {
-                int networkMode;
-                if (getPreferenceScreen().findPreference(BUTTON_PREFERED_NETWORK_MODE) != null)  {
-                    networkMode =  Integer.parseInt(mButtonPreferredNetworkMode.getValue());
-                    android.provider.Settings.Global.putInt(mPhone.getContext().getContentResolver(),
-                            android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId,
-                            networkMode );
-                }
-                if (getPreferenceScreen().findPreference(BUTTON_ENABLED_NETWORKS_KEY) != null)  {
-                    networkMode = Integer.parseInt(mButtonEnabledNetworks.getValue());
-                    android.provider.Settings.Global.putInt(mPhone.getContext().getContentResolver(),
-                            android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId,
-                            networkMode );
-                }
-            } else {
-                if (DBG) {
-                    log("handleSetPreferredNetworkTypeResponse: exception in setting network mode.");
-                }
-                updatePreferredNetworkUIFromDb();
-            }
-        }
-    }
-
-    private void updatePreferredNetworkUIFromDb() {
-        final int phoneSubId = mPhone.getSubId();
-
-        int settingsNetworkMode = android.provider.Settings.Global.getInt(
-                mPhone.getContext().getContentResolver(),
-                android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId,
-                preferredNetworkMode);
-
-        if (DBG) {
-            log("updatePreferredNetworkUIFromDb: settingsNetworkMode = " +
-                    settingsNetworkMode);
-        }
-
-        UpdatePreferredNetworkModeSummary(settingsNetworkMode);
-        UpdateEnabledNetworksValueAndSummary(settingsNetworkMode);
-        // changes the mButtonPreferredNetworkMode accordingly to settingsNetworkMode
-        mButtonPreferredNetworkMode.setValue(Integer.toString(settingsNetworkMode));
-    }
-
-    private void UpdatePreferredNetworkModeSummary(int NetworkMode) {
-        switch(NetworkMode) {
-            case Phone.NT_MODE_TDSCDMA_GSM_WCDMA:
-            case Phone.NT_MODE_TDSCDMA_GSM:
-            case Phone.NT_MODE_WCDMA_PREF:
-                mButtonPreferredNetworkMode.setSummary(
-                        R.string.preferred_network_mode_wcdma_perf_summary);
-                break;
-            case Phone.NT_MODE_GSM_ONLY:
-                mButtonPreferredNetworkMode.setSummary(
-                        R.string.preferred_network_mode_gsm_only_summary);
-                break;
-            case Phone.NT_MODE_TDSCDMA_WCDMA:
-            case Phone.NT_MODE_WCDMA_ONLY:
-                mButtonPreferredNetworkMode.setSummary(
-                        R.string.preferred_network_mode_wcdma_only_summary);
-                break;
-            case Phone.NT_MODE_GSM_UMTS:
-                mButtonPreferredNetworkMode.setSummary(
-                        R.string.preferred_network_mode_gsm_wcdma_summary);
-                break;
-            case Phone.NT_MODE_CDMA:
-                switch (mPhone.getLteOnCdmaMode()) {
-                    case PhoneConstants.LTE_ON_CDMA_TRUE:
-                        mButtonPreferredNetworkMode.setSummary(
-                            R.string.preferred_network_mode_cdma_summary);
-                    break;
-                    case PhoneConstants.LTE_ON_CDMA_FALSE:
-                    default:
-                        mButtonPreferredNetworkMode.setSummary(
-                            R.string.preferred_network_mode_cdma_evdo_summary);
+            @Override
+            public void handleMessage(Message msg) {
+                switch (msg.what) {
+                    case MESSAGE_SET_PREFERRED_NETWORK_TYPE:
+                        handleSetPreferredNetworkTypeResponse(msg);
                         break;
                 }
-                break;
-            case Phone.NT_MODE_CDMA_NO_EVDO:
-                mButtonPreferredNetworkMode.setSummary(
-                        R.string.preferred_network_mode_cdma_only_summary);
-                break;
-            case Phone.NT_MODE_EVDO_NO_CDMA:
-                mButtonPreferredNetworkMode.setSummary(
-                        R.string.preferred_network_mode_evdo_only_summary);
-                break;
-            case Phone.NT_MODE_LTE_TDSCDMA:
-            case Phone.NT_MODE_LTE_ONLY:
-                mButtonPreferredNetworkMode.setSummary(
-                        R.string.preferred_network_mode_lte_summary);
-                break;
-            case Phone.NT_MODE_LTE_TDSCDMA_GSM:
-            case Phone.NT_MODE_LTE_TDSCDMA_GSM_WCDMA:
-            case Phone.NT_MODE_LTE_GSM_WCDMA:
-                mButtonPreferredNetworkMode.setSummary(
-                        R.string.preferred_network_mode_lte_gsm_wcdma_summary);
-                break;
-            case Phone.NT_MODE_LTE_CDMA_AND_EVDO:
-                mButtonPreferredNetworkMode.setSummary(
-                        R.string.preferred_network_mode_lte_cdma_evdo_summary);
-                break;
-            case Phone.NT_MODE_TDSCDMA_ONLY:
-                mButtonPreferredNetworkMode.setSummary(
-                        R.string.preferred_network_mode_tdscdma_summary);
-                break;
-            case Phone.NT_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
-            case Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA:
-                if (mPhone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA ||
-                        mIsGlobalCdma ||
-                        isWorldMode()) {
-                    mButtonPreferredNetworkMode.setSummary(
-                            R.string.preferred_network_mode_global_summary);
+            }
+
+            private void handleSetPreferredNetworkTypeResponse(Message msg) {
+                final Activity activity = getActivity();
+                if (activity == null || activity.isDestroyed()) {
+                    // Access preferences of activity only if it is not destroyed
+                    // or if fragment is not attached to an activity.
+                    return;
+                }
+
+                AsyncResult ar = (AsyncResult) msg.obj;
+                final int phoneSubId = mPhone.getSubId();
+
+                if (ar.exception == null) {
+                    int networkMode;
+                    if (getPreferenceScreen().findPreference(
+                            BUTTON_PREFERED_NETWORK_MODE) != null)  {
+                        networkMode =  Integer.parseInt(mButtonPreferredNetworkMode.getValue());
+                        android.provider.Settings.Global.putInt(
+                                mPhone.getContext().getContentResolver(),
+                                android.provider.Settings.Global.PREFERRED_NETWORK_MODE
+                                        + phoneSubId,
+                                networkMode );
+                    }
+                    if (getPreferenceScreen().findPreference(BUTTON_ENABLED_NETWORKS_KEY) != null) {
+                        networkMode = Integer.parseInt(mButtonEnabledNetworks.getValue());
+                        android.provider.Settings.Global.putInt(
+                                mPhone.getContext().getContentResolver(),
+                                android.provider.Settings.Global.PREFERRED_NETWORK_MODE
+                                        + phoneSubId,
+                                networkMode );
+                    }
                 } else {
+                    Log.i(LOG_TAG, "handleSetPreferredNetworkTypeResponse:" +
+                            "exception in setting network mode.");
+                    updatePreferredNetworkUIFromDb();
+                }
+            }
+        }
+
+        private void updatePreferredNetworkUIFromDb() {
+            final int phoneSubId = mPhone.getSubId();
+
+            int settingsNetworkMode = android.provider.Settings.Global.getInt(
+                    mPhone.getContext().getContentResolver(),
+                    android.provider.Settings.Global.PREFERRED_NETWORK_MODE + phoneSubId,
+                    preferredNetworkMode);
+
+            if (DBG) {
+                log("updatePreferredNetworkUIFromDb: settingsNetworkMode = " +
+                        settingsNetworkMode);
+            }
+
+            UpdatePreferredNetworkModeSummary(settingsNetworkMode);
+            UpdateEnabledNetworksValueAndSummary(settingsNetworkMode);
+            // changes the mButtonPreferredNetworkMode accordingly to settingsNetworkMode
+            mButtonPreferredNetworkMode.setValue(Integer.toString(settingsNetworkMode));
+        }
+
+        private void UpdatePreferredNetworkModeSummary(int NetworkMode) {
+            switch(NetworkMode) {
+                case Phone.NT_MODE_TDSCDMA_GSM_WCDMA:
+                case Phone.NT_MODE_TDSCDMA_GSM:
+                case Phone.NT_MODE_WCDMA_PREF:
+                    mButtonPreferredNetworkMode.setSummary(
+                            R.string.preferred_network_mode_wcdma_perf_summary);
+                    break;
+                case Phone.NT_MODE_GSM_ONLY:
+                    mButtonPreferredNetworkMode.setSummary(
+                            R.string.preferred_network_mode_gsm_only_summary);
+                    break;
+                case Phone.NT_MODE_TDSCDMA_WCDMA:
+                case Phone.NT_MODE_WCDMA_ONLY:
+                    mButtonPreferredNetworkMode.setSummary(
+                            R.string.preferred_network_mode_wcdma_only_summary);
+                    break;
+                case Phone.NT_MODE_GSM_UMTS:
+                    mButtonPreferredNetworkMode.setSummary(
+                            R.string.preferred_network_mode_gsm_wcdma_summary);
+                    break;
+                case Phone.NT_MODE_CDMA:
+                    switch (mPhone.getLteOnCdmaMode()) {
+                        case PhoneConstants.LTE_ON_CDMA_TRUE:
+                            mButtonPreferredNetworkMode.setSummary(
+                                    R.string.preferred_network_mode_cdma_summary);
+                            break;
+                        case PhoneConstants.LTE_ON_CDMA_FALSE:
+                        default:
+                            mButtonPreferredNetworkMode.setSummary(
+                                    R.string.preferred_network_mode_cdma_evdo_summary);
+                            break;
+                    }
+                    break;
+                case Phone.NT_MODE_CDMA_NO_EVDO:
+                    mButtonPreferredNetworkMode.setSummary(
+                            R.string.preferred_network_mode_cdma_only_summary);
+                    break;
+                case Phone.NT_MODE_EVDO_NO_CDMA:
+                    mButtonPreferredNetworkMode.setSummary(
+                            R.string.preferred_network_mode_evdo_only_summary);
+                    break;
+                case Phone.NT_MODE_LTE_TDSCDMA:
+                case Phone.NT_MODE_LTE_ONLY:
                     mButtonPreferredNetworkMode.setSummary(
                             R.string.preferred_network_mode_lte_summary);
-                }
-                break;
-            case Phone.NT_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
-            case Phone.NT_MODE_GLOBAL:
-                mButtonPreferredNetworkMode.setSummary(
-                        R.string.preferred_network_mode_cdma_evdo_gsm_wcdma_summary);
-                break;
-            case Phone.NT_MODE_LTE_TDSCDMA_WCDMA:
-            case Phone.NT_MODE_LTE_WCDMA:
-                mButtonPreferredNetworkMode.setSummary(
-                        R.string.preferred_network_mode_lte_wcdma_summary);
-                break;
-            default:
-                mButtonPreferredNetworkMode.setSummary(
-                        R.string.preferred_network_mode_global_summary);
-        }
-    }
-
-    private void UpdateEnabledNetworksValueAndSummary(int NetworkMode) {
-        switch (NetworkMode) {
-            case Phone.NT_MODE_TDSCDMA_WCDMA:
-            case Phone.NT_MODE_TDSCDMA_GSM_WCDMA:
-            case Phone.NT_MODE_TDSCDMA_GSM:
-                mButtonEnabledNetworks.setValue(
-                        Integer.toString(Phone.NT_MODE_TDSCDMA_GSM_WCDMA));
-                mButtonEnabledNetworks.setSummary(R.string.network_3G);
-                break;
-            case Phone.NT_MODE_WCDMA_ONLY:
-            case Phone.NT_MODE_GSM_UMTS:
-            case Phone.NT_MODE_WCDMA_PREF:
-                if (!mIsGlobalCdma) {
-                    mButtonEnabledNetworks.setValue(
-                            Integer.toString(Phone.NT_MODE_WCDMA_PREF));
-                    mButtonEnabledNetworks.setSummary(R.string.network_3G);
-                } else {
-                    mButtonEnabledNetworks.setValue(
-                            Integer.toString(Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA));
-                    mButtonEnabledNetworks.setSummary(R.string.network_global);
-                }
-                break;
-            case Phone.NT_MODE_GSM_ONLY:
-                if (!mIsGlobalCdma) {
-                    mButtonEnabledNetworks.setValue(
-                            Integer.toString(Phone.NT_MODE_GSM_ONLY));
-                    mButtonEnabledNetworks.setSummary(R.string.network_2G);
-                } else {
-                    mButtonEnabledNetworks.setValue(
-                            Integer.toString(Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA));
-                    mButtonEnabledNetworks.setSummary(R.string.network_global);
-                }
-                break;
-            case Phone.NT_MODE_LTE_GSM_WCDMA:
-                if (isWorldMode()) {
-                    mButtonEnabledNetworks.setSummary(
-                            R.string.preferred_network_mode_lte_gsm_umts_summary);
-                    controlCdmaOptions(false);
-                    controlGsmOptions(true);
                     break;
-                }
-            case Phone.NT_MODE_LTE_ONLY:
-            case Phone.NT_MODE_LTE_WCDMA:
-                if (!mIsGlobalCdma) {
-                    mButtonEnabledNetworks.setValue(
-                            Integer.toString(Phone.NT_MODE_LTE_GSM_WCDMA));
-                    mButtonEnabledNetworks.setSummary((mShow4GForLTE == true)
-                            ? R.string.network_4G : R.string.network_lte);
-                } else {
-                    mButtonEnabledNetworks.setValue(
-                            Integer.toString(Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA));
-                    mButtonEnabledNetworks.setSummary(R.string.network_global);
-                }
-                break;
-            case Phone.NT_MODE_LTE_CDMA_AND_EVDO:
-                if (isWorldMode()) {
-                    mButtonEnabledNetworks.setSummary(
-                            R.string.preferred_network_mode_lte_cdma_summary);
-                    controlCdmaOptions(true);
-                    controlGsmOptions(false);
-                } else {
-                    mButtonEnabledNetworks.setValue(
-                            Integer.toString(Phone.NT_MODE_LTE_CDMA_AND_EVDO));
-                    mButtonEnabledNetworks.setSummary(R.string.network_lte);
-                }
-                break;
-            case Phone.NT_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
-                mButtonEnabledNetworks.setValue(
-                        Integer.toString(Phone.NT_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA));
-                mButtonEnabledNetworks.setSummary(R.string.network_3G);
-                break;
-            case Phone.NT_MODE_CDMA:
-            case Phone.NT_MODE_EVDO_NO_CDMA:
-            case Phone.NT_MODE_GLOBAL:
-                mButtonEnabledNetworks.setValue(
-                        Integer.toString(Phone.NT_MODE_CDMA));
-                mButtonEnabledNetworks.setSummary(R.string.network_3G);
-                break;
-            case Phone.NT_MODE_CDMA_NO_EVDO:
-                mButtonEnabledNetworks.setValue(
-                        Integer.toString(Phone.NT_MODE_CDMA_NO_EVDO));
-                mButtonEnabledNetworks.setSummary(R.string.network_1x);
-                break;
-            case Phone.NT_MODE_TDSCDMA_ONLY:
-                mButtonEnabledNetworks.setValue(
-                        Integer.toString(Phone.NT_MODE_TDSCDMA_ONLY));
-                mButtonEnabledNetworks.setSummary(R.string.network_3G);
-                break;
-            case Phone.NT_MODE_LTE_TDSCDMA_GSM:
-            case Phone.NT_MODE_LTE_TDSCDMA_GSM_WCDMA:
-            case Phone.NT_MODE_LTE_TDSCDMA:
-            case Phone.NT_MODE_LTE_TDSCDMA_WCDMA:
-            case Phone.NT_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
-            case Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA:
-                if (isSupportTdscdma()) {
-                    mButtonEnabledNetworks.setValue(
-                            Integer.toString(Phone.NT_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA));
-                    mButtonEnabledNetworks.setSummary(R.string.network_lte);
-                } else {
-                    if (isWorldMode()) {
-                        controlCdmaOptions(true);
-                        controlGsmOptions(false);
-                    }
-                    mButtonEnabledNetworks.setValue(
-                            Integer.toString(Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA));
+                case Phone.NT_MODE_LTE_TDSCDMA_GSM:
+                case Phone.NT_MODE_LTE_TDSCDMA_GSM_WCDMA:
+                case Phone.NT_MODE_LTE_GSM_WCDMA:
+                    mButtonPreferredNetworkMode.setSummary(
+                            R.string.preferred_network_mode_lte_gsm_wcdma_summary);
+                    break;
+                case Phone.NT_MODE_LTE_CDMA_AND_EVDO:
+                    mButtonPreferredNetworkMode.setSummary(
+                            R.string.preferred_network_mode_lte_cdma_evdo_summary);
+                    break;
+                case Phone.NT_MODE_TDSCDMA_ONLY:
+                    mButtonPreferredNetworkMode.setSummary(
+                            R.string.preferred_network_mode_tdscdma_summary);
+                    break;
+                case Phone.NT_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
+                case Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA:
                     if (mPhone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA ||
                             mIsGlobalCdma ||
                             isWorldMode()) {
-                        mButtonEnabledNetworks.setSummary(R.string.network_global);
+                        mButtonPreferredNetworkMode.setSummary(
+                                R.string.preferred_network_mode_global_summary);
                     } else {
+                        mButtonPreferredNetworkMode.setSummary(
+                                R.string.preferred_network_mode_lte_summary);
+                    }
+                    break;
+                case Phone.NT_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
+                case Phone.NT_MODE_GLOBAL:
+                    mButtonPreferredNetworkMode.setSummary(
+                            R.string.preferred_network_mode_cdma_evdo_gsm_wcdma_summary);
+                    break;
+                case Phone.NT_MODE_LTE_TDSCDMA_WCDMA:
+                case Phone.NT_MODE_LTE_WCDMA:
+                    mButtonPreferredNetworkMode.setSummary(
+                            R.string.preferred_network_mode_lte_wcdma_summary);
+                    break;
+                default:
+                    mButtonPreferredNetworkMode.setSummary(
+                            R.string.preferred_network_mode_global_summary);
+            }
+        }
+
+        private void UpdateEnabledNetworksValueAndSummary(int NetworkMode) {
+            switch (NetworkMode) {
+                case Phone.NT_MODE_TDSCDMA_WCDMA:
+                case Phone.NT_MODE_TDSCDMA_GSM_WCDMA:
+                case Phone.NT_MODE_TDSCDMA_GSM:
+                    mButtonEnabledNetworks.setValue(
+                            Integer.toString(Phone.NT_MODE_TDSCDMA_GSM_WCDMA));
+                    mButtonEnabledNetworks.setSummary(R.string.network_3G);
+                    break;
+                case Phone.NT_MODE_WCDMA_ONLY:
+                case Phone.NT_MODE_GSM_UMTS:
+                case Phone.NT_MODE_WCDMA_PREF:
+                    if (!mIsGlobalCdma) {
+                        mButtonEnabledNetworks.setValue(
+                                Integer.toString(Phone.NT_MODE_WCDMA_PREF));
+                        mButtonEnabledNetworks.setSummary(R.string.network_3G);
+                    } else {
+                        mButtonEnabledNetworks.setValue(
+                                Integer.toString(Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA));
+                        mButtonEnabledNetworks.setSummary(R.string.network_global);
+                    }
+                    break;
+                case Phone.NT_MODE_GSM_ONLY:
+                    if (!mIsGlobalCdma) {
+                        mButtonEnabledNetworks.setValue(
+                                Integer.toString(Phone.NT_MODE_GSM_ONLY));
+                        mButtonEnabledNetworks.setSummary(R.string.network_2G);
+                    } else {
+                        mButtonEnabledNetworks.setValue(
+                                Integer.toString(Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA));
+                        mButtonEnabledNetworks.setSummary(R.string.network_global);
+                    }
+                    break;
+                case Phone.NT_MODE_LTE_GSM_WCDMA:
+                    if (isWorldMode()) {
+                        mButtonEnabledNetworks.setSummary(
+                                R.string.preferred_network_mode_lte_gsm_umts_summary);
+                        controlCdmaOptions(false);
+                        controlGsmOptions(true);
+                        break;
+                    }
+                case Phone.NT_MODE_LTE_ONLY:
+                case Phone.NT_MODE_LTE_WCDMA:
+                    if (!mIsGlobalCdma) {
+                        mButtonEnabledNetworks.setValue(
+                                Integer.toString(Phone.NT_MODE_LTE_GSM_WCDMA));
                         mButtonEnabledNetworks.setSummary((mShow4GForLTE == true)
                                 ? R.string.network_4G : R.string.network_lte);
+                    } else {
+                        mButtonEnabledNetworks.setValue(
+                                Integer.toString(Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA));
+                        mButtonEnabledNetworks.setSummary(R.string.network_global);
                     }
-                }
-                break;
-            default:
-                String errMsg = "Invalid Network Mode (" + NetworkMode + "). Ignore.";
-                loge(errMsg);
-                mButtonEnabledNetworks.setSummary(errMsg);
-        }
-    }
-
-    @Override
-    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        switch(requestCode) {
-        case REQUEST_CODE_EXIT_ECM:
-            Boolean isChoiceYes =
-                data.getBooleanExtra(EmergencyCallbackModeExitDialog.EXTRA_EXIT_ECM_RESULT, false);
-            if (isChoiceYes) {
-                // If the phone exits from ECM mode, show the CDMA Options
-                mCdmaOptions.showDialog(mClickedPreference);
-            } else {
-                // do nothing
+                    break;
+                case Phone.NT_MODE_LTE_CDMA_AND_EVDO:
+                    if (isWorldMode()) {
+                        mButtonEnabledNetworks.setSummary(
+                                R.string.preferred_network_mode_lte_cdma_summary);
+                        controlCdmaOptions(true);
+                        controlGsmOptions(false);
+                    } else {
+                        mButtonEnabledNetworks.setValue(
+                                Integer.toString(Phone.NT_MODE_LTE_CDMA_AND_EVDO));
+                        mButtonEnabledNetworks.setSummary(R.string.network_lte);
+                    }
+                    break;
+                case Phone.NT_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
+                    mButtonEnabledNetworks.setValue(
+                            Integer.toString(Phone.NT_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA));
+                    mButtonEnabledNetworks.setSummary(R.string.network_3G);
+                    break;
+                case Phone.NT_MODE_CDMA:
+                case Phone.NT_MODE_EVDO_NO_CDMA:
+                case Phone.NT_MODE_GLOBAL:
+                    mButtonEnabledNetworks.setValue(
+                            Integer.toString(Phone.NT_MODE_CDMA));
+                    mButtonEnabledNetworks.setSummary(R.string.network_3G);
+                    break;
+                case Phone.NT_MODE_CDMA_NO_EVDO:
+                    mButtonEnabledNetworks.setValue(
+                            Integer.toString(Phone.NT_MODE_CDMA_NO_EVDO));
+                    mButtonEnabledNetworks.setSummary(R.string.network_1x);
+                    break;
+                case Phone.NT_MODE_TDSCDMA_ONLY:
+                    mButtonEnabledNetworks.setValue(
+                            Integer.toString(Phone.NT_MODE_TDSCDMA_ONLY));
+                    mButtonEnabledNetworks.setSummary(R.string.network_3G);
+                    break;
+                case Phone.NT_MODE_LTE_TDSCDMA_GSM:
+                case Phone.NT_MODE_LTE_TDSCDMA_GSM_WCDMA:
+                case Phone.NT_MODE_LTE_TDSCDMA:
+                case Phone.NT_MODE_LTE_TDSCDMA_WCDMA:
+                case Phone.NT_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
+                case Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA:
+                    if (isSupportTdscdma()) {
+                        mButtonEnabledNetworks.setValue(
+                                Integer.toString(Phone.NT_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA));
+                        mButtonEnabledNetworks.setSummary(R.string.network_lte);
+                    } else {
+                        if (isWorldMode()) {
+                            controlCdmaOptions(true);
+                            controlGsmOptions(false);
+                        }
+                        mButtonEnabledNetworks.setValue(
+                                Integer.toString(Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA));
+                        if (mPhone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA ||
+                                mIsGlobalCdma ||
+                                isWorldMode()) {
+                            mButtonEnabledNetworks.setSummary(R.string.network_global);
+                        } else {
+                            mButtonEnabledNetworks.setSummary((mShow4GForLTE == true)
+                                    ? R.string.network_4G : R.string.network_lte);
+                        }
+                    }
+                    break;
+                default:
+                    String errMsg = "Invalid Network Mode (" + NetworkMode + "). Ignore.";
+                    loge(errMsg);
+                    mButtonEnabledNetworks.setSummary(errMsg);
             }
-            break;
-
-        default:
-            break;
         }
-    }
 
-    private static void log(String msg) {
-        Log.d(LOG_TAG, msg);
-    }
+        @Override
+        public void onActivityResult(int requestCode, int resultCode, Intent data) {
+            switch(requestCode) {
+                case REQUEST_CODE_EXIT_ECM:
+                    Boolean isChoiceYes = data.getBooleanExtra(
+                            EmergencyCallbackModeExitDialog.EXTRA_EXIT_ECM_RESULT, false);
+                    if (isChoiceYes) {
+                        // If the phone exits from ECM mode, show the CDMA Options
+                        mCdmaOptions.showDialog(mClickedPreference);
+                    } else {
+                        // do nothing
+                    }
+                    break;
 
-    private static void loge(String msg) {
-        Log.e(LOG_TAG, msg);
-    }
+                default:
+                    break;
+            }
+        }
 
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        final int itemId = item.getItemId();
-        if (itemId == android.R.id.home) {  // See ActionBar#setDisplayHomeAsUpEnabled()
-            // Commenting out "logical up" capability. This is a workaround for issue 5278083.
-            //
-            // Settings app may not launch this activity via UP_ACTIVITY_CLASS but the other
-            // Activity that looks exactly same as UP_ACTIVITY_CLASS ("SubSettings" Activity).
-            // At that moment, this Activity launches UP_ACTIVITY_CLASS on top of the Activity.
-            // which confuses users.
-            // TODO: introduce better mechanism for "up" capability here.
+        private static void log(String msg) {
+            Log.d(LOG_TAG, msg);
+        }
+
+        private static void loge(String msg) {
+            Log.e(LOG_TAG, msg);
+        }
+
+        @Override
+        public boolean onOptionsItemSelected(MenuItem item) {
+            final int itemId = item.getItemId();
+            if (itemId == android.R.id.home) {  // See ActionBar#setDisplayHomeAsUpEnabled()
+                // Commenting out "logical up" capability. This is a workaround for issue 5278083.
+                //
+                // Settings app may not launch this activity via UP_ACTIVITY_CLASS but the other
+                // Activity that looks exactly same as UP_ACTIVITY_CLASS ("SubSettings" Activity).
+                // At that moment, this Activity launches UP_ACTIVITY_CLASS on top of the Activity.
+                // which confuses users.
+                // TODO: introduce better mechanism for "up" capability here.
             /*Intent intent = new Intent(Intent.ACTION_MAIN);
             intent.setClassName(UP_ACTIVITY_PACKAGE, UP_ACTIVITY_CLASS);
             intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
             startActivity(intent);*/
-            finish();
-            return true;
-        }
-        return super.onOptionsItemSelected(item);
-    }
-
-    private boolean isWorldMode() {
-        boolean worldModeOn = false;
-        final TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
-        final String configString = getResources().getString(R.string.config_world_mode);
-
-        if (!TextUtils.isEmpty(configString)) {
-            String[] configArray = configString.split(";");
-            // Check if we have World mode configuration set to True only or config is set to True
-            // and SIM GID value is also set and matches to the current SIM GID.
-            if (configArray != null &&
-                   ((configArray.length == 1 && configArray[0].equalsIgnoreCase("true")) ||
-                       (configArray.length == 2 && !TextUtils.isEmpty(configArray[1]) &&
-                           tm != null && configArray[1].equalsIgnoreCase(tm.getGroupIdLevel1())))) {
-                               worldModeOn = true;
-            }
-        }
-
-        if (DBG) {
-            log("isWorldMode=" + worldModeOn);
-        }
-
-        return worldModeOn;
-    }
-
-    private void controlGsmOptions(boolean enable) {
-        PreferenceScreen prefSet = getPreferenceScreen();
-        if (prefSet == null) {
-            return;
-        }
-
-        if (mGsmUmtsOptions == null) {
-            mGsmUmtsOptions = new GsmUmtsOptions(this, prefSet, mPhone.getSubId());
-        }
-        PreferenceScreen apnExpand =
-                (PreferenceScreen) prefSet.findPreference(BUTTON_APN_EXPAND_KEY);
-        PreferenceScreen operatorSelectionExpand =
-                (PreferenceScreen) prefSet.findPreference(BUTTON_OPERATOR_SELECTION_EXPAND_KEY);
-        PreferenceScreen carrierSettings =
-                (PreferenceScreen) prefSet.findPreference(BUTTON_CARRIER_SETTINGS_KEY);
-        if (apnExpand != null) {
-            apnExpand.setEnabled(isWorldMode() || enable);
-        }
-        if (operatorSelectionExpand != null) {
-            if (enable) {
-                operatorSelectionExpand.setEnabled(true);
-            } else {
-                prefSet.removePreference(operatorSelectionExpand);
-            }
-        }
-        if (carrierSettings != null) {
-            prefSet.removePreference(carrierSettings);
-        }
-    }
-
-    private void controlCdmaOptions(boolean enable) {
-        PreferenceScreen prefSet = getPreferenceScreen();
-        if (prefSet == null) {
-            return;
-        }
-        if (enable && mCdmaOptions == null) {
-            mCdmaOptions = new CdmaOptions(this, prefSet, mPhone);
-        }
-        CdmaSystemSelectListPreference systemSelect =
-                (CdmaSystemSelectListPreference)prefSet.findPreference
-                        (BUTTON_CDMA_SYSTEM_SELECT_KEY);
-        if (systemSelect != null) {
-            systemSelect.setEnabled(enable);
-        }
-    }
-
-    private boolean isSupportTdscdma() {
-        if (getResources().getBoolean(R.bool.config_support_tdscdma)) {
-            return true;
-        }
-
-        String operatorNumeric = mPhone.getServiceState().getOperatorNumeric();
-        String[] numericArray = getResources().getStringArray(
-                R.array.config_support_tdscdma_roaming_on_networks);
-        if (numericArray.length == 0 || operatorNumeric == null) {
-            return false;
-        }
-        for (String numeric : numericArray) {
-            if (operatorNumeric.equals(numeric)) {
+                getActivity().finish();
                 return true;
             }
+            return super.onOptionsItemSelected(item);
         }
-        return false;
+
+        private boolean isWorldMode() {
+            boolean worldModeOn = false;
+            final TelephonyManager tm =
+                    (TelephonyManager) getActivity().getSystemService(Context.TELEPHONY_SERVICE);
+            final String configString = getResources().getString(R.string.config_world_mode);
+
+            if (!TextUtils.isEmpty(configString)) {
+                String[] configArray = configString.split(";");
+                // Check if we have World mode configuration set to True only or config is set to True
+                // and SIM GID value is also set and matches to the current SIM GID.
+                if (configArray != null &&
+                        ((configArray.length == 1 && configArray[0].equalsIgnoreCase("true"))
+                                || (configArray.length == 2 && !TextUtils.isEmpty(configArray[1])
+                                && tm != null
+                                && configArray[1].equalsIgnoreCase(tm.getGroupIdLevel1())))) {
+                    worldModeOn = true;
+                }
+            }
+
+            Log.d(LOG_TAG, "isWorldMode=" + worldModeOn);
+
+            return worldModeOn;
+        }
+
+        private void controlGsmOptions(boolean enable) {
+            PreferenceScreen prefSet = getPreferenceScreen();
+            if (prefSet == null) {
+                return;
+            }
+
+            if (mGsmUmtsOptions == null) {
+                mGsmUmtsOptions = new GsmUmtsOptions(this, prefSet, mPhone.getSubId());
+            }
+            PreferenceScreen apnExpand =
+                    (PreferenceScreen) prefSet.findPreference(BUTTON_APN_EXPAND_KEY);
+            PreferenceScreen operatorSelectionExpand =
+                    (PreferenceScreen) prefSet.findPreference(BUTTON_OPERATOR_SELECTION_EXPAND_KEY);
+            PreferenceScreen carrierSettings =
+                    (PreferenceScreen) prefSet.findPreference(BUTTON_CARRIER_SETTINGS_KEY);
+            if (apnExpand != null) {
+                apnExpand.setEnabled(isWorldMode() || enable);
+            }
+            if (operatorSelectionExpand != null) {
+                if (enable) {
+                    operatorSelectionExpand.setEnabled(true);
+                } else {
+                    prefSet.removePreference(operatorSelectionExpand);
+                }
+            }
+            if (carrierSettings != null) {
+                prefSet.removePreference(carrierSettings);
+            }
+        }
+
+        private void controlCdmaOptions(boolean enable) {
+            PreferenceScreen prefSet = getPreferenceScreen();
+            if (prefSet == null) {
+                return;
+            }
+            if (enable && mCdmaOptions == null) {
+                mCdmaOptions = new CdmaOptions(this, prefSet, mPhone);
+            }
+            CdmaSystemSelectListPreference systemSelect =
+                    (CdmaSystemSelectListPreference)prefSet.findPreference
+                            (BUTTON_CDMA_SYSTEM_SELECT_KEY);
+            if (systemSelect != null) {
+                systemSelect.setEnabled(enable);
+            }
+        }
+
+        private boolean isSupportTdscdma() {
+            if (getResources().getBoolean(R.bool.config_support_tdscdma)) {
+                return true;
+            }
+
+            String operatorNumeric = mPhone.getServiceState().getOperatorNumeric();
+            String[] numericArray = getResources().getStringArray(
+                    R.array.config_support_tdscdma_roaming_on_networks);
+            if (numericArray.length == 0 || operatorNumeric == null) {
+                return false;
+            }
+            for (String numeric : numericArray) {
+                if (operatorNumeric.equals(numeric)) {
+                    return true;
+                }
+            }
+            return false;
+        }
     }
 }
+
diff --git a/src/com/android/phone/NetworkSetting.java b/src/com/android/phone/NetworkSetting.java
index 29608da..72ad513 100644
--- a/src/com/android/phone/NetworkSetting.java
+++ b/src/com/android/phone/NetworkSetting.java
@@ -394,7 +394,7 @@
         if (phone != null) {
             ServiceState ss = tm.getServiceStateForSubscriber(phone.getSubId());
             if (ss != null) {
-                app.notificationMgr.updateNetworkSelection(ss.getState());
+                app.notificationMgr.updateNetworkSelection(ss.getState(), phone.getSubId());
             }
         }
     }
diff --git a/src/com/android/phone/NotificationMgr.java b/src/com/android/phone/NotificationMgr.java
index d40b08e..bc67fd5 100644
--- a/src/com/android/phone/NotificationMgr.java
+++ b/src/com/android/phone/NotificationMgr.java
@@ -16,6 +16,8 @@
 
 package com.android.phone;
 
+import static android.Manifest.permission.READ_PHONE_STATE;
+
 import android.app.Notification;
 import android.app.NotificationManager;
 import android.app.PendingIntent;
@@ -24,6 +26,7 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
+import android.content.pm.ResolveInfo;
 import android.content.pm.UserInfo;
 import android.content.res.Resources;
 import android.net.Uri;
@@ -33,6 +36,7 @@
 import android.os.UserManager;
 import android.preference.PreferenceManager;
 import android.provider.ContactsContract.PhoneLookup;
+import android.telecom.DefaultDialerManager;
 import android.telecom.PhoneAccount;
 import android.telecom.PhoneAccountHandle;
 import android.telecom.TelecomManager;
@@ -49,10 +53,10 @@
 import android.widget.Toast;
 
 import com.android.internal.telephony.Phone;
+import com.android.internal.telephony.PhoneFactory;
 import com.android.internal.telephony.TelephonyCapabilities;
-import com.android.phone.settings.VoicemailNotificationSettingsUtil;
+import com.android.internal.telephony.util.NotificationChannelController;
 import com.android.phone.settings.VoicemailSettingsActivity;
-import com.android.phone.vvm.omtp.sync.VoicemailStatusQueryHelper;
 
 import java.util.Iterator;
 import java.util.List;
@@ -89,11 +93,9 @@
     private static NotificationMgr sInstance;
 
     private PhoneGlobals mApp;
-    private Phone mPhone;
 
     private Context mContext;
     private NotificationManager mNotificationManager;
-    private final ComponentName mNotificationComponent;
     private StatusBarManager mStatusBarManager;
     private UserManager mUserManager;
     private Toast mToast;
@@ -119,17 +121,10 @@
         mStatusBarManager =
                 (StatusBarManager) app.getSystemService(Context.STATUS_BAR_SERVICE);
         mUserManager = (UserManager) app.getSystemService(Context.USER_SERVICE);
-        mPhone = app.mCM.getDefaultPhone();
         mSubscriptionManager = SubscriptionManager.from(mContext);
         mTelecomManager = TelecomManager.from(mContext);
         mTelephonyManager = (TelephonyManager) app.getSystemService(Context.TELEPHONY_SERVICE);
 
-        final String notificationComponent = mContext.getString(
-                R.string.config_customVoicemailComponent);
-
-        mNotificationComponent = notificationComponent != null
-                ? ComponentName.unflattenFromString(notificationComponent) : null;
-
         mSubscriptionManager.addOnSubscriptionsChangedListener(
                 new OnSubscriptionsChangedListener() {
                     @Override
@@ -252,20 +247,6 @@
         }
 
         Phone phone = PhoneGlobals.getPhone(subId);
-        if (visible && phone != null && shouldCheckVisualVoicemailConfigurationForMwi(subId)) {
-            VoicemailStatusQueryHelper queryHelper = new VoicemailStatusQueryHelper(mContext);
-            PhoneAccountHandle phoneAccount = PhoneUtils.makePstnPhoneAccountHandle(phone);
-            if (queryHelper.isVoicemailSourceConfigured(phoneAccount)) {
-                Log.v(LOG_TAG, "Source configured for visual voicemail, hiding mwi.");
-                // MWI may not be suppressed if the PIN is not set on VVM3 because it is also a
-                // "Not OK" configuration state. But VVM3 never send a MWI after the service is
-                // activated so this should be fine.
-                // TODO(twyen): once unbundled the client should be able to set a flag to suppress
-                // MWI, instead of letting the NotificationMgr try to interpret the states.
-                visible = false;
-            }
-        }
-
         Log.i(LOG_TAG, "updateMwi(): subId " + subId + " update to " + visible);
         mMwiVisible.put(subId, visible);
 
@@ -350,11 +331,6 @@
 
             PendingIntent pendingIntent =
                     PendingIntent.getActivity(mContext, subId /* requestCode */, intent, 0);
-            Uri ringtoneUri = null;
-
-            if (enableNotificationSound) {
-                ringtoneUri = VoicemailNotificationSettingsUtil.getRingtoneUri(phone);
-            }
 
             Resources res = mContext.getResources();
             PersistableBundle carrierConfig = PhoneGlobals.getInstance().getCarrierConfigForSubId(
@@ -366,14 +342,10 @@
                     .setContentTitle(notificationTitle)
                     .setContentText(notificationText)
                     .setContentIntent(pendingIntent)
-                    .setSound(ringtoneUri)
                     .setColor(res.getColor(R.color.dialer_theme_color))
                     .setOngoing(carrierConfig.getBoolean(
-                            CarrierConfigManager.KEY_VOICEMAIL_NOTIFICATION_PERSISTENT_BOOL));
-
-            if (VoicemailNotificationSettingsUtil.isVibrationEnabled(phone)) {
-                builder.setDefaults(Notification.DEFAULT_VIBRATE);
-            }
+                            CarrierConfigManager.KEY_VOICEMAIL_NOTIFICATION_PERSISTENT_BOOL))
+                    .setChannel(NotificationChannelController.CHANNEL_ID_VOICE_MAIL);
 
             final Notification notification = builder.build();
             List<UserInfo> users = mUserManager.getUsers(true);
@@ -383,8 +355,8 @@
                 if (!mUserManager.hasUserRestriction(
                         UserManager.DISALLOW_OUTGOING_CALLS, userHandle)
                         && !user.isManagedProfile()) {
-                    if (!sendNotificationCustomComponent(vmCount, vmNumber, pendingIntent,
-                            isSettingsIntent)) {
+                    if (!maybeSendVoicemailNotificationUsingDefaultDialer(phone, vmCount, vmNumber,
+                            pendingIntent, isSettingsIntent, userHandle)) {
                         mNotificationManager.notifyAsUser(
                                 Integer.toString(subId) /* tag */,
                                 VOICEMAIL_NOTIFICATION,
@@ -394,36 +366,51 @@
                 }
             }
         } else {
-            if (!sendNotificationCustomComponent(0, null, null, false)) {
-                mNotificationManager.cancelAsUser(
-                        Integer.toString(subId) /* tag */,
-                        VOICEMAIL_NOTIFICATION,
-                        UserHandle.ALL);
+            List<UserInfo> users = mUserManager.getUsers(true /* excludeDying */);
+            for (int i = 0; i < users.size(); i++) {
+                final UserInfo user = users.get(i);
+                final UserHandle userHandle = user.getUserHandle();
+                if (!mUserManager.hasUserRestriction(
+                        UserManager.DISALLOW_OUTGOING_CALLS, userHandle)
+                        && !user.isManagedProfile()) {
+                    if (!maybeSendVoicemailNotificationUsingDefaultDialer(phone, 0, null, null,
+                            false, userHandle)) {
+                        mNotificationManager.cancelAsUser(
+                                Integer.toString(subId) /* tag */,
+                                VOICEMAIL_NOTIFICATION,
+                                userHandle);
+                    }
+                }
             }
         }
     }
 
     /**
-     * Sends a broadcast with the voicemail notification information to a custom component to
-     * handle. This method is also used to indicate to the custom component when to clear the
-     * notification. A pending intent can be passed to the custom component to indicate an action to
+     * Sends a broadcast with the voicemail notification information to the default dialer. This
+     * method is also used to indicate to the default dialer when to clear the
+     * notification. A pending intent can be passed to the default dialer to indicate an action to
      * be taken as it would by a notification produced in this class.
+     * @param phone The phone the notification is sent from
      * @param count The number of pending voicemail messages to indicate on the notification. A
      *              Value of 0 is passed here to indicate that the notification should be cleared.
      * @param number The voicemail phone number if specified.
      * @param pendingIntent The intent that should be passed as the action to be taken.
      * @param isSettingsIntent {@code true} to indicate the pending intent is to launch settings.
      *                         otherwise, {@code false} to indicate the intent launches voicemail.
-     * @return {@code true} if a custom component was notified of the notification.
+     * @param userHandle The user to receive the notification. Each user can have their own default
+     *                   dialer.
+     * @return {@code true} if the default was notified of the notification.
      */
-    private boolean sendNotificationCustomComponent(Integer count, String number,
-            PendingIntent pendingIntent, boolean isSettingsIntent) {
-        if (mNotificationComponent != null) {
-            Intent intent = new Intent();
-            intent.setFlags(Intent.FLAG_RECEIVER_FOREGROUND);
-            intent.setComponent(mNotificationComponent);
-            intent.setAction(TelephonyManager.ACTION_SHOW_VOICEMAIL_NOTIFICATION);
+    private boolean maybeSendVoicemailNotificationUsingDefaultDialer(Phone phone, Integer count,
+            String number, PendingIntent pendingIntent, boolean isSettingsIntent,
+            UserHandle userHandle) {
 
+        if (shouldManageNotificationThroughDefaultDialer(userHandle)) {
+            Intent intent = getShowVoicemailIntentForDefaultDialer(userHandle);
+            intent.setFlags(Intent.FLAG_RECEIVER_FOREGROUND);
+            intent.setAction(TelephonyManager.ACTION_SHOW_VOICEMAIL_NOTIFICATION);
+            intent.putExtra(TelephonyManager.EXTRA_PHONE_ACCOUNT_HANDLE,
+                    PhoneUtils.makePstnPhoneAccountHandle(phone));
             if (count != null) {
                 intent.putExtra(TelephonyManager.EXTRA_NOTIFICATION_COUNT, count);
             }
@@ -443,14 +430,31 @@
                             pendingIntent);
                 }
             }
-
-            mContext.sendBroadcast(intent);
+            mContext.sendBroadcastAsUser(intent, userHandle, READ_PHONE_STATE);
             return true;
         }
 
         return false;
     }
 
+    private Intent getShowVoicemailIntentForDefaultDialer(UserHandle userHandle) {
+        String dialerPackage = DefaultDialerManager
+                .getDefaultDialerApplication(mContext, userHandle.getIdentifier());
+        return new Intent(TelephonyManager.ACTION_SHOW_VOICEMAIL_NOTIFICATION)
+                .setPackage(dialerPackage);
+    }
+
+    private boolean shouldManageNotificationThroughDefaultDialer(UserHandle userHandle) {
+        Intent intent = getShowVoicemailIntentForDefaultDialer(userHandle);
+        if (intent == null) {
+            return false;
+        }
+
+        List<ResolveInfo> receivers = mContext.getPackageManager()
+                .queryBroadcastReceivers(intent, 0);
+        return receivers.size() > 0;
+    }
+
     /**
      * Updates the message call forwarding indicator notification.
      *
@@ -489,7 +493,8 @@
                     .setContentTitle(notificationTitle)
                     .setContentText(mContext.getString(R.string.sum_cfu_enabled_indicator))
                     .setShowWhen(false)
-                    .setOngoing(true);
+                    .setOngoing(true)
+                    .setChannel(NotificationChannelController.CHANNEL_ID_CALL_FORWARD);
 
             Intent intent = new Intent(Intent.ACTION_MAIN);
             intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
@@ -539,7 +544,8 @@
                 .setSmallIcon(android.R.drawable.stat_sys_warning)
                 .setContentTitle(mContext.getText(R.string.roaming))
                 .setColor(mContext.getResources().getColor(R.color.dialer_theme_color))
-                .setContentText(contentText);
+                .setContentText(contentText)
+                .setChannel(NotificationChannelController.CHANNEL_ID_MOBILE_DATA_ALERT);
 
         List<UserInfo> users = mUserManager.getUsers(true);
         for (int i = 0; i < users.size(); i++) {
@@ -567,8 +573,9 @@
     /**
      * Display the network selection "no service" notification
      * @param operator is the numeric operator number
+     * @param subId is the subscription ID
      */
-    private void showNetworkSelection(String operator) {
+    private void showNetworkSelection(String operator, int subId) {
         if (DBG) log("showNetworkSelection(" + operator + ")...");
 
         Notification.Builder builder = new Notification.Builder(mContext)
@@ -577,7 +584,8 @@
                 .setContentText(
                         mContext.getString(R.string.notification_network_selection_text, operator))
                 .setShowWhen(false)
-                .setOngoing(true);
+                .setOngoing(true)
+                .setChannel(NotificationChannelController.CHANNEL_ID_ALERT);
 
         // create the target network operators settings intent
         Intent intent = new Intent(Intent.ACTION_MAIN);
@@ -587,7 +595,7 @@
         intent.setComponent(new ComponentName(
                 mContext.getString(R.string.network_operator_settings_package),
                 mContext.getString(R.string.network_operator_settings_class)));
-        intent.putExtra(GsmUmtsOptions.EXTRA_SUB_ID, mPhone.getSubId());
+        intent.putExtra(GsmUmtsOptions.EXTRA_SUB_ID, subId);
         PendingIntent contentIntent = PendingIntent.getActivity(mContext, 0, intent, 0);
 
         List<UserInfo> users = mUserManager.getUsers(true);
@@ -619,10 +627,13 @@
      * Update notification about no service of user selected operator
      *
      * @param serviceState Phone service state
+     * @param subId The subscription ID
      */
-    void updateNetworkSelection(int serviceState) {
-        if (TelephonyCapabilities.supportsNetworkSelection(mPhone)) {
-            int subId = mPhone.getSubId();
+    void updateNetworkSelection(int serviceState, int subId) {
+        int phoneId = SubscriptionManager.getPhoneId(subId);
+        Phone phone = SubscriptionManager.isValidPhoneId(phoneId) ?
+                PhoneFactory.getPhone(phoneId) : PhoneFactory.getDefaultPhone();
+        if (TelephonyCapabilities.supportsNetworkSelection(phone)) {
             if (SubscriptionManager.isValidSubscriptionId(subId)) {
                 // get the shared preference of network_selection.
                 // empty is auto mode, otherwise it is the operator alpha name
@@ -641,7 +652,7 @@
 
                 if (serviceState == ServiceState.STATE_OUT_OF_SERVICE
                         && !TextUtils.isEmpty(networkSelection)) {
-                    showNetworkSelection(networkSelection);
+                    showNetworkSelection(networkSelection, subId);
                     mSelectedUnavailableNotify = true;
                 } else {
                     if (mSelectedUnavailableNotify) {
diff --git a/src/com/android/phone/OtaStartupReceiver.java b/src/com/android/phone/OtaStartupReceiver.java
deleted file mode 100644
index 09cb185..0000000
--- a/src/com/android/phone/OtaStartupReceiver.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (C) 2009 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.phone;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
-import android.os.AsyncResult;
-import android.os.Handler;
-import android.os.Message;
-import android.os.SystemProperties;
-import android.provider.Settings;
-import android.telephony.PhoneStateListener;
-import android.telephony.ServiceState;
-import android.telephony.TelephonyManager;
-
-import com.android.internal.telephony.Phone;
-import com.android.internal.telephony.ServiceStateTracker;
-import com.android.internal.telephony.TelephonyCapabilities;
-
-import android.util.Log;
-
-/*
- * Handles OTA Start procedure at phone power up. At phone power up, if phone is not OTA
- * provisioned (check MIN value of the Phone) and 'device_provisioned' is not set,
- * OTA Activation screen is shown that helps user activate the phone
- */
-public class OtaStartupReceiver extends BroadcastReceiver {
-    private static final String TAG = "OtaStartupReceiver";
-    private static final boolean DBG = false;
-    private static final int MIN_READY = 10;
-    private static final int SERVICE_STATE_CHANGED = 11;
-    private Context mContext;
-
-    private int mOtaspMode = -1;
-    private boolean mPhoneStateListenerRegistered = false;
-    private PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
-        @Override
-        public void onOtaspChanged(int otaspMode) {
-            if (mOtaspMode == otaspMode) {
-                return;
-            }
-            mOtaspMode = otaspMode;
-            Log.v(TAG, "onOtaspChanged: mOtaspMode=" + mOtaspMode);
-
-            if (otaspMode == ServiceStateTracker.OTASP_NEEDED) {
-                Log.i(TAG, "OTASP is needed - performing CDMA provisioning");
-                final Intent intent = new Intent(OtaUtils.ACTION_PERFORM_CDMA_PROVISIONING);
-                intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-                mContext.startActivity(intent);
-            }
-        }
-    };
-
-
-    private Handler mHandler = new Handler() {
-        @Override
-        public void handleMessage(Message msg) {
-            switch (msg.what) {
-                case MIN_READY:
-                    Log.v(TAG, "Attempting OtaActivation from handler, mOtaspMode=" + mOtaspMode);
-                    OtaUtils.maybeDoOtaCall(mContext, mHandler, MIN_READY);
-                    break;
-                case SERVICE_STATE_CHANGED: {
-                    ServiceState state = (ServiceState) ((AsyncResult) msg.obj).result;
-                    if (DBG) Log.d(TAG, "onServiceStateChanged()...  new state = " + state);
-
-                    // Possible service states:
-                    // - STATE_IN_SERVICE        // Normal operation
-                    // - STATE_OUT_OF_SERVICE    // Still searching for an operator to register to,
-                    //                           // or no radio signal
-                    // - STATE_EMERGENCY_ONLY    // Phone is locked; only emergency numbers are allowed
-                    // - STATE_POWER_OFF         // Radio is explicitly powered off (airplane mode)
-
-                    // Once we reach STATE_IN_SERVICE
-                    // it's finally OK to start OTA provisioning
-                    if (state.getState() == ServiceState.STATE_IN_SERVICE) {
-                        if (DBG) Log.d(TAG, "call OtaUtils.maybeDoOtaCall after network is available");
-                        Phone phone = PhoneGlobals.getPhone();
-                        phone.unregisterForServiceStateChanged(this);
-                        OtaUtils.maybeDoOtaCall(mContext, mHandler, MIN_READY);
-                    }
-                    break;
-                }
-            }
-
-        }
-    };
-
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        mContext = context;
-        if (DBG) {
-            Log.v(TAG, "onReceive: intent action=" + intent.getAction() +
-                    "  mOtaspMode=" + mOtaspMode);
-        }
-
-        PhoneGlobals globals = PhoneGlobals.getInstanceIfPrimary();
-        if (globals == null) {
-            if (DBG) Log.d(TAG, "Not primary user, nothing to do.");
-            return;
-        }
-
-        if (mPhoneStateListenerRegistered == false) {
-            if (DBG) Log.d(TAG, "Register our PhoneStateListener");
-            TelephonyManager telephonyManager = (TelephonyManager)context.getSystemService(
-                    Context.TELEPHONY_SERVICE);
-            telephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_OTASP_CHANGED);
-            mPhoneStateListenerRegistered = true;
-        } else {
-            if (DBG) Log.d(TAG, "PhoneStateListener already registered");
-        }
-
-        if (!TelephonyCapabilities.supportsOtasp(PhoneGlobals.getPhone())) {
-            if (DBG) Log.d(TAG, "OTASP not supported, nothing to do.");
-            return;
-        }
-
-        if (shouldPostpone(context)) {
-            if (DBG) Log.d(TAG, "Postponing OTASP until wizard runs");
-            return;
-        }
-
-        // Delay OTA provisioning if network is not available yet
-        PhoneGlobals app = PhoneGlobals.getInstance();
-        Phone phone = PhoneGlobals.getPhone();
-        if (app.mCM.getServiceState() != ServiceState.STATE_IN_SERVICE) {
-            if (DBG) Log.w(TAG, "Network is not ready. Registering to receive notification.");
-            phone.registerForServiceStateChanged(mHandler, SERVICE_STATE_CHANGED, null);
-            return;
-        }
-
-        // The following depends on the phone process being persistent. Normally we can't
-        // expect a BroadcastReceiver to persist after returning from this function but it does
-        // because the phone activity is persistent.
-        if (DBG) Log.d(TAG, "call OtaUtils.maybeDoOtaCall");
-        OtaUtils.maybeDoOtaCall(mContext, mHandler, MIN_READY);
-    }
-
-    /**
-     * On devices that provide a phone initialization wizard (such as Google Setup Wizard), we
-     * allow delaying CDMA OTA setup so it can be done in a single wizard. The wizard is responsible
-     * for (1) disabling itself once it has been run and/or (2) setting the 'device_provisioned'
-     * flag to something non-zero and (3) calling the OTA Setup with the action below.
-     *
-     * NB: Typical phone initialization wizards will install themselves as the homescreen
-     * (category "android.intent.category.HOME") with a priority higher than the default.
-     * The wizard should set 'device_provisioned' when it completes, disable itself with the
-     * PackageManager.setComponentEnabledSetting() and then start home screen.
-     *
-     * @return true if setup will be handled by wizard, false if it should be done now.
-     */
-    private boolean shouldPostpone(Context context) {
-        Intent intent = new Intent("android.intent.action.DEVICE_INITIALIZATION_WIZARD");
-        ResolveInfo resolveInfo = context.getPackageManager().resolveActivity(intent,
-                PackageManager.MATCH_DEFAULT_ONLY);
-        boolean provisioned = Settings.Global.getInt(context.getContentResolver(),
-                Settings.Global.DEVICE_PROVISIONED, 0) != 0;
-        String mode = SystemProperties.get("ro.setupwizard.mode", "REQUIRED");
-        boolean runningSetupWizard = "REQUIRED".equals(mode) || "OPTIONAL".equals(mode);
-        if (DBG) {
-            Log.v(TAG, "resolvInfo = " + resolveInfo + ", provisioned = " + provisioned
-                    + ", runningSetupWizard = " + runningSetupWizard);
-        }
-        return resolveInfo != null && !provisioned && runningSetupWizard;
-    }
-}
diff --git a/src/com/android/phone/OtaUtils.java b/src/com/android/phone/OtaUtils.java
deleted file mode 100644
index a37ce80..0000000
--- a/src/com/android/phone/OtaUtils.java
+++ /dev/null
@@ -1,1581 +0,0 @@
-/*
- * Copyright (C) 2009 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.phone;
-
-import com.android.internal.telephony.Phone;
-import com.android.internal.telephony.PhoneConstants;
-import com.android.internal.telephony.TelephonyCapabilities;
-import com.android.internal.telephony.TelephonyProperties;
-import com.android.phone.OtaUtils.CdmaOtaInCallScreenUiState.State;
-
-import android.app.Activity;
-import android.app.ActivityManager;
-import android.app.AlertDialog;
-import android.app.PendingIntent;
-import android.app.PendingIntent.CanceledException;
-import android.content.ActivityNotFoundException;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.AsyncResult;
-import android.os.Handler;
-import android.os.SystemClock;
-import android.os.SystemProperties;
-import android.os.UserHandle;
-import android.telecom.PhoneAccount;
-import android.telephony.TelephonyManager;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.WindowManager;
-import android.widget.Button;
-import android.widget.ProgressBar;
-import android.widget.TextView;
-import android.widget.ToggleButton;
-
-/**
- * Handles all OTASP Call related logic and UI functionality.
- * The InCallScreen interacts with this class to perform an OTASP Call.
- *
- * OTASP is a CDMA-specific feature:
- *   OTA or OTASP == Over The Air service provisioning
- *   SPC == Service Programming Code
- *   TODO: Include pointer to more detailed documentation.
- *
- * TODO: This is Over The Air Service Provisioning (OTASP)
- *       A better name would be OtaspUtils.java.
- */
-public class OtaUtils {
-    private static final String LOG_TAG = "OtaUtils";
-    private static final boolean DBG = false;
-
-    public static final int OTA_SHOW_ACTIVATION_SCREEN_OFF = 0;
-    public static final int OTA_SHOW_ACTIVATION_SCREEN_ON = 1;
-    public static final int OTA_SHOW_LISTENING_SCREEN_OFF =0;
-    public static final int OTA_SHOW_LISTENING_SCREEN_ON =1;
-    public static final int OTA_SHOW_ACTIVATE_FAIL_COUNT_OFF = 0;
-    public static final int OTA_SHOW_ACTIVATE_FAIL_COUNT_THREE = 3;
-    public static final int OTA_PLAY_SUCCESS_FAILURE_TONE_OFF = 0;
-    public static final int OTA_PLAY_SUCCESS_FAILURE_TONE_ON = 1;
-
-    // SPC Timeout is 60 seconds
-    public final int OTA_SPC_TIMEOUT = 60;
-    public final int OTA_FAILURE_DIALOG_TIMEOUT = 2;
-
-    // Constants for OTASP-related Intents and intent extras.
-    // Watch out: these must agree with the corresponding constants in
-    // apps/SetupWizard!
-
-    // Intent action to launch an OTASP call.
-    public static final String ACTION_PERFORM_CDMA_PROVISIONING =
-           "com.android.phone.PERFORM_CDMA_PROVISIONING";
-
-    // Intent action to launch activation on a non-voice capable device
-    public static final String ACTION_PERFORM_VOICELESS_CDMA_PROVISIONING =
-            "com.android.phone.PERFORM_VOICELESS_CDMA_PROVISIONING";
-
-    // Intent action to display the InCallScreen in the OTASP "activation" state.
-    public static final String ACTION_DISPLAY_ACTIVATION_SCREEN =
-            "com.android.phone.DISPLAY_ACTIVATION_SCREEN";
-
-    // boolean voiceless provisioning extra that enables a "don't show this again" checkbox
-    // the user can check to never see the activity upon bootup again
-    public static final String EXTRA_VOICELESS_PROVISIONING_OFFER_DONTSHOW =
-            "com.android.phone.VOICELESS_PROVISIONING_OFFER_DONTSHOW";
-
-    // Activity result codes for the ACTION_PERFORM_CDMA_PROVISIONING intent
-    // (see the InCallScreenShowActivation activity.)
-    //
-    // Note: currently, our caller won't ever actually receive the
-    // RESULT_INTERACTIVE_OTASP_STARTED result code; see comments in
-    // InCallScreenShowActivation.onCreate() for details.
-
-    public static final int RESULT_INTERACTIVE_OTASP_STARTED = Activity.RESULT_FIRST_USER;
-    public static final int RESULT_NONINTERACTIVE_OTASP_STARTED = Activity.RESULT_FIRST_USER + 1;
-    public static final int RESULT_NONINTERACTIVE_OTASP_FAILED = Activity.RESULT_FIRST_USER + 2;
-
-    // Testing: Extra for the ACTION_PERFORM_CDMA_PROVISIONING intent that
-    // allows the caller to manually enable/disable "interactive mode" for
-    // the OTASP call.   Only available in userdebug or eng builds.
-    public static final String EXTRA_OVERRIDE_INTERACTIVE_MODE =
-            "ota_override_interactive_mode";
-
-    // Extra for the ACTION_PERFORM_CDMA_PROVISIONING intent, holding a
-    // PendingIntent which the phone app can use to send a result code
-    // back to the caller.
-    public static final String EXTRA_OTASP_RESULT_CODE_PENDING_INTENT =
-            "otasp_result_code_pending_intent";
-
-    // Extra attached to the above PendingIntent that indicates
-    // success or failure.
-    public static final String EXTRA_OTASP_RESULT_CODE = "otasp_result_code";
-
-    // Extra attached to the above PendingIntent that contains an error code.
-    public static final String EXTRA_OTASP_ERROR_CODE = "otasp_error_code";
-
-    public static final int OTASP_UNKNOWN = 0;
-    public static final int OTASP_USER_SKIPPED = 1;  // Only meaningful with interactive OTASP
-    public static final int OTASP_SUCCESS = 2;
-    public static final int OTASP_FAILURE = 3;
-    // failed due to CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED
-    public static final int OTASP_FAILURE_SPC_RETRIES = 4;
-    // TODO: Distinguish between interactive and non-interactive success
-    // and failure.  Then, have the PendingIntent be sent after
-    // interactive OTASP as well (so the caller can find out definitively
-    // when interactive OTASP completes.)
-
-    private static final String OTASP_NUMBER = "*228";
-    private static final String OTASP_NUMBER_NON_INTERACTIVE = "*22899";
-
-    private Context mContext;
-    private PhoneGlobals mApplication;
-    private OtaWidgetData mOtaWidgetData;
-
-    private static boolean sIsWizardMode = true;
-
-    // How many times do we retry maybeDoOtaCall() if the LTE state is not known yet,
-    // and how long do we wait between retries
-    private static final int OTA_CALL_LTE_RETRIES_MAX = 5;
-    private static final int OTA_CALL_LTE_RETRY_PERIOD = 3000;
-    private static int sOtaCallLteRetries = 0;
-
-    // In "interactive mode", the OtaUtils object is tied to an
-    // InCallScreen instance, where we display a bunch of UI specific to
-    // the OTASP call.  But on devices that are not "voice capable", the
-    // OTASP call runs in a non-interactive mode, and we don't have
-    // an InCallScreen or CallCard or any OTASP UI elements at all.
-    private boolean mInteractive = true;
-
-    /**
-     * OtaWidgetData class represent all OTA UI elements
-     *
-     * TODO(OTASP): It's really ugly for the OtaUtils object to reach into the
-     *     InCallScreen like this and directly manipulate its widgets.
-     *
-     *     Instead, the model/view separation should be more clear: OtaUtils
-     *     should only know about a higher-level abstraction of the
-     *     OTASP-specific UI state (just like how the CallController uses the
-     *     InCallUiState object), and the InCallScreen itself should translate
-     *     that higher-level abstraction into actual onscreen views and widgets.
-     */
-    private class OtaWidgetData {
-        public Button otaEndButton;
-        public Button otaActivateButton;
-        public Button otaSkipButton;
-        public Button otaNextButton;
-        public ToggleButton otaSpeakerButton;
-        public ViewGroup otaUpperWidgets;
-        public View callCardOtaButtonsFailSuccess;
-        public ProgressBar otaTextProgressBar;
-        public TextView otaTextSuccessFail;
-        public View callCardOtaButtonsActivate;
-        public View callCardOtaButtonsListenProgress;
-        public TextView otaTextActivate;
-        public TextView otaTextListenProgress;
-        public AlertDialog spcErrorDialog;
-        public AlertDialog otaFailureDialog;
-        public AlertDialog otaSkipConfirmationDialog;
-        public TextView otaTitle;
-        public Button otaTryAgainButton;
-    }
-
-    /**
-     * OtaUtils constructor.
-     *
-     * @param context the Context of the calling Activity or Application
-     * @param interactive if true, use the InCallScreen to display the progress
-     *                    and result of the OTASP call.  In practice this is
-     *                    true IFF the current device is a voice-capable phone.
-     *
-     * Note if interactive is true, you must also call updateUiWidgets() as soon
-     * as the InCallScreen instance is ready.
-     */
-    public OtaUtils(Context context, boolean interactive) {
-        if (DBG) log("OtaUtils constructor...");
-        mApplication = PhoneGlobals.getInstance();
-        mContext = context;
-        mInteractive = interactive;
-    }
-
-    /**
-     * Starts the OTA provisioning call.  If the MIN isn't available yet, it returns false and adds
-     * an event to return the request to the calling app when it becomes available.
-     *
-     * @param context
-     * @param handler
-     * @param request
-     * @return true if we were able to launch Ota activity or it's not required; false otherwise
-     */
-    public static boolean maybeDoOtaCall(Context context, Handler handler, int request) {
-        PhoneGlobals app = PhoneGlobals.getInstance();
-        Phone phone = PhoneGlobals.getPhone();
-
-        if (ActivityManager.isRunningInTestHarness()) {
-            Log.i(LOG_TAG, "Don't run provisioning when in test harness");
-            return true;
-        }
-
-        if (!TelephonyCapabilities.supportsOtasp(phone)) {
-            // Presumably not a CDMA phone.
-            if (DBG) log("maybeDoOtaCall: OTASP not supported on this device");
-            return true;  // Nothing to do here.
-        }
-
-        if (!phone.isMinInfoReady()) {
-            if (DBG) log("MIN is not ready. Registering to receive notification.");
-            phone.registerForSubscriptionInfoReady(handler, request, null);
-            return false;
-        }
-        phone.unregisterForSubscriptionInfoReady(handler);
-
-        if (getLteOnCdmaMode(context) == PhoneConstants.LTE_ON_CDMA_UNKNOWN) {
-            if (sOtaCallLteRetries < OTA_CALL_LTE_RETRIES_MAX) {
-                if (DBG) log("maybeDoOtaCall: LTE state still unknown: retrying");
-                handler.sendEmptyMessageDelayed(request, OTA_CALL_LTE_RETRY_PERIOD);
-                sOtaCallLteRetries++;
-                return false;
-            } else {
-                Log.w(LOG_TAG, "maybeDoOtaCall: LTE state still unknown: giving up");
-                return true;
-            }
-        }
-
-        boolean phoneNeedsActivation = phone.needsOtaServiceProvisioning();
-        if (DBG) log("phoneNeedsActivation is set to " + phoneNeedsActivation);
-
-        int otaShowActivationScreen = context.getResources().getInteger(
-                R.integer.OtaShowActivationScreen);
-        if (DBG) log("otaShowActivationScreen: " + otaShowActivationScreen);
-
-        // Run the OTASP call in "interactive" mode only if
-        // this is a non-LTE "voice capable" device.
-        if (PhoneGlobals.sVoiceCapable && getLteOnCdmaMode(context) == PhoneConstants.LTE_ON_CDMA_FALSE) {
-            if (phoneNeedsActivation
-                    && (otaShowActivationScreen == OTA_SHOW_ACTIVATION_SCREEN_ON)) {
-                app.cdmaOtaProvisionData.isOtaCallIntentProcessed = false;
-                sIsWizardMode = false;
-
-                if (DBG) Log.d(LOG_TAG, "==> Starting interactive CDMA provisioning...");
-                OtaUtils.startInteractiveOtasp(context);
-
-                if (DBG) log("maybeDoOtaCall: voice capable; activation started.");
-            } else {
-                if (DBG) log("maybeDoOtaCall: voice capable; activation NOT started.");
-            }
-        } else {
-            if (phoneNeedsActivation) {
-                app.cdmaOtaProvisionData.isOtaCallIntentProcessed = false;
-                Intent newIntent = new Intent(ACTION_PERFORM_VOICELESS_CDMA_PROVISIONING);
-                newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-                newIntent.putExtra(EXTRA_VOICELESS_PROVISIONING_OFFER_DONTSHOW, true);
-                try {
-                    context.startActivity(newIntent);
-                } catch (ActivityNotFoundException e) {
-                    loge("No activity Handling PERFORM_VOICELESS_CDMA_PROVISIONING!");
-                    return false;
-                }
-                if (DBG) log("maybeDoOtaCall: non-interactive; activation intent sent.");
-            } else {
-                if (DBG) log("maybeDoOtaCall: non-interactive, no need for OTASP.");
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Starts a normal "interactive" OTASP call (i.e. CDMA activation
-     * for regular voice-capable phone devices.)
-     *
-     * This method is called from the InCallScreenShowActivation activity when
-     * handling the ACTION_PERFORM_CDMA_PROVISIONING intent.
-     */
-    public static void startInteractiveOtasp(Context context) {
-        if (DBG) log("startInteractiveOtasp()...");
-        PhoneGlobals app = PhoneGlobals.getInstance();
-
-        // There are two ways to start OTASP on voice-capable devices:
-        //
-        // (1) via the PERFORM_CDMA_PROVISIONING intent
-        //     - this is triggered by the "Activate device" button in settings,
-        //       or can be launched automatically upon boot if the device
-        //       thinks it needs to be provisioned.
-        //     - the intent is handled by InCallScreenShowActivation.onCreate(),
-        //       which calls this method
-        //     - we prepare for OTASP by initializing the OtaUtils object
-        //     - we bring up the InCallScreen in the ready-to-activate state
-        //     - when the user presses the "Activate" button we launch the
-        //       call by calling CallController.placeCall() via the
-        //       otaPerformActivation() method.
-        //
-        // (2) by manually making an outgoing call to a special OTASP number
-        //     like "*228" or "*22899".
-        //     - That sequence does NOT involve this method (OtaUtils.startInteractiveOtasp()).
-        //       Instead, the outgoing call request goes straight to CallController.placeCall().
-        //     - CallController.placeCall() notices that it's an OTASP
-        //       call, and initializes the OtaUtils object.
-        //     - The InCallScreen is launched (as the last step of
-        //       CallController.placeCall()).  The InCallScreen notices that
-        //       OTASP is active and shows the correct UI.
-
-        // Here, we start sequence (1):
-        // Do NOT immediately start the call.  Instead, bring up the InCallScreen
-        // in the special "activate" state (see OtaUtils.otaShowActivateScreen()).
-        // We won't actually make the call until the user presses the "Activate"
-        // button.
-
-        Intent activationScreenIntent = new Intent().setClass(context, InCallScreen.class)
-                .setAction(ACTION_DISPLAY_ACTIVATION_SCREEN);
-
-        // Watch out: in the scenario where OTASP gets triggered from the
-        // BOOT_COMPLETED broadcast (see OtaStartupReceiver.java), we might be
-        // running in the PhoneApp's context right now.
-        // So the FLAG_ACTIVITY_NEW_TASK flag is required here.
-        activationScreenIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-
-        // We're about to start the OTASP sequence, so create and initialize the
-        // OtaUtils instance.  (This needs to happen before bringing up the
-        // InCallScreen.)
-        OtaUtils.setupOtaspCall(activationScreenIntent);
-
-        // And bring up the InCallScreen...
-        Log.i(LOG_TAG, "startInteractiveOtasp: launching InCallScreen in 'activate' state: "
-              + activationScreenIntent);
-        context.startActivity(activationScreenIntent);
-    }
-
-    /**
-     * Starts the OTASP call *without* involving the InCallScreen or
-     * displaying any UI.
-     *
-     * This is used on data-only devices, which don't support any kind of
-     * in-call phone UI.
-     *
-     * @return PhoneUtils.CALL_STATUS_DIALED if we successfully
-     *         dialed the OTASP number, or one of the other
-     *         CALL_STATUS_* constants if there was a failure.
-     */
-    public static int startNonInteractiveOtasp(Context context) {
-        if (DBG) log("startNonInteractiveOtasp()...");
-        PhoneGlobals app = PhoneGlobals.getInstance();
-
-        if (app.otaUtils != null) {
-            // An OtaUtils instance already exists, presumably from a previous OTASP call.
-            Log.i(LOG_TAG, "startNonInteractiveOtasp: "
-                  + "OtaUtils already exists; nuking the old one and starting again...");
-        }
-
-        // Create the OtaUtils instance.
-        app.otaUtils = new OtaUtils(context, false /* non-interactive mode */);
-        if (DBG) log("- created OtaUtils: " + app.otaUtils);
-
-        // ... and kick off the OTASP call.
-        // TODO(InCallScreen redesign): This should probably go through
-        // the CallController, rather than directly calling
-        // PhoneUtils.placeCall().
-        Phone phone = PhoneGlobals.getPhone();
-        String number = OTASP_NUMBER_NON_INTERACTIVE;
-        Log.i(LOG_TAG, "startNonInteractiveOtasp: placing call to '" + number + "'...");
-        int callStatus = PhoneUtils.placeCall(context,
-                                              phone,
-                                              number,
-                                              null,   // contactRef
-                                              false); //isEmergencyCall
-
-        if (callStatus == PhoneUtils.CALL_STATUS_DIALED) {
-            if (DBG) log("  ==> successful return from placeCall(): callStatus = " + callStatus);
-        } else {
-            Log.w(LOG_TAG, "Failure from placeCall() for OTA number '"
-                  + number + "': code " + callStatus);
-            return callStatus;
-        }
-
-        // TODO: Any other special work to do here?
-        // Such as:
-        //
-        // - manually kick off progress updates, either using TelephonyRegistry
-        //   or else by sending PendingIntents directly to our caller?
-        //
-        // - manually silence the in-call audio?  (Probably unnecessary
-        //   if Stingray truly has no audio path from phone baseband
-        //   to the device's speakers.)
-        //
-
-        return callStatus;
-    }
-
-    /**
-     * @return true if the specified Intent is a CALL action that's an attempt
-     * to initate an OTASP call.
-     *
-     * OTASP is a CDMA-specific concept, so this method will always return false
-     * on GSM phones.
-     *
-     * This code was originally part of the InCallScreen.checkIsOtaCall() method.
-     */
-    public static boolean isOtaspCallIntent(Intent intent) {
-        if (DBG) log("isOtaspCallIntent(" + intent + ")...");
-        PhoneGlobals app = PhoneGlobals.getInstance();
-        Phone phone = app.mCM.getDefaultPhone();
-
-        if (intent == null) {
-            return false;
-        }
-        if (!TelephonyCapabilities.supportsOtasp(phone)) {
-            return false;
-        }
-
-        String action = intent.getAction();
-        if (action == null) {
-            return false;
-        }
-        if (!action.equals(Intent.ACTION_CALL)) {
-            if (DBG) log("isOtaspCallIntent: not a CALL action: '" + action + "' ==> not OTASP");
-            return false;
-        }
-
-        if ((app.cdmaOtaScreenState == null) || (app.cdmaOtaProvisionData == null)) {
-            // Uh oh -- something wrong with our internal OTASP state.
-            // (Since this is an OTASP-capable device, these objects
-            // *should* have already been created by PhoneApp.onCreate().)
-            throw new IllegalStateException("isOtaspCallIntent: "
-                                            + "app.cdmaOta* objects(s) not initialized");
-        }
-
-        // This is an OTASP call iff the number we're trying to dial is one of
-        // the magic OTASP numbers.
-        String number;
-        try {
-            number = PhoneUtils.getInitialNumber(intent);
-        } catch (PhoneUtils.VoiceMailNumberMissingException ex) {
-            // This was presumably a "voicemail:" intent, so it's
-            // obviously not an OTASP number.
-            if (DBG) log("isOtaspCallIntent: VoiceMailNumberMissingException => not OTASP");
-            return false;
-        }
-        if (phone.isOtaSpNumber(number)) {
-            if (DBG) log("isOtaSpNumber: ACTION_CALL to '" + number + "' ==> OTASP call!");
-            return true;
-        }
-        return false;
-    }
-
-    /**
-     * Set up for an OTASP call.
-     *
-     * This method is called as part of the CallController placeCall() sequence
-     * before initiating an outgoing OTASP call.
-     *
-     * The purpose of this method is mainly to create and initialize the
-     * OtaUtils instance, along with some other misc pre-OTASP cleanup.
-     */
-    public static void setupOtaspCall(Intent intent) {
-        if (DBG) log("setupOtaspCall(): preparing for OTASP call to " + intent);
-        PhoneGlobals app = PhoneGlobals.getInstance();
-
-        if (app.otaUtils != null) {
-            // An OtaUtils instance already exists, presumably from a prior OTASP call.
-            // Nuke the old one and start this call with a fresh instance.
-            Log.i(LOG_TAG, "setupOtaspCall: "
-                  + "OtaUtils already exists; replacing with new instance...");
-        }
-
-        // Create the OtaUtils instance.
-        app.otaUtils = new OtaUtils(app.getApplicationContext(), true /* interactive */);
-        if (DBG) log("- created OtaUtils: " + app.otaUtils);
-
-        // NOTE we still need to call OtaUtils.updateUiWidgets() once the
-        // InCallScreen instance is ready; see InCallScreen.checkOtaspStateOnResume()
-
-        // Make sure the InCallScreen knows that it needs to switch into OTASP mode.
-        //
-        // NOTE in gingerbread and earlier, we used to do
-        //     setInCallScreenMode(InCallScreenMode.OTA_NORMAL);
-        // directly in the InCallScreen, back when this check happened inside the InCallScreen.
-        //
-        // But now, set the global CdmaOtaInCallScreenUiState object into
-        // NORMAL mode, which will then cause the InCallScreen (when it
-        // comes up) to realize that an OTA call is active.
-
-        app.otaUtils.setCdmaOtaInCallScreenUiState(
-            OtaUtils.CdmaOtaInCallScreenUiState.State.NORMAL);
-
-        // TODO(OTASP): note app.inCallUiState.inCallScreenMode and
-        // app.cdmaOtaInCallScreenUiState.state are mostly redundant.  Combine them.
-        // app.inCallUiState.inCallScreenMode = InCallUiState.InCallScreenMode.OTA_NORMAL;
-
-        // TODO(OTASP / bug 5092031): we ideally should call
-        // otaShowListeningScreen() here to make sure that the DTMF dialpad
-        // becomes visible at the start of the "*228" call:
-        //
-        //  // ...and get the OTASP-specific UI into the right state.
-        //  app.otaUtils.otaShowListeningScreen();
-        //  if (app.otaUtils.mInCallScreen != null) {
-        //      app.otaUtils.mInCallScreen.requestUpdateScreen();
-        //  }
-        //
-        // But this doesn't actually work; the call to otaShowListeningScreen()
-        // *doesn't* actually bring up the listening screen, since the
-        // cdmaOtaConfigData.otaShowListeningScreen config parameter hasn't been
-        // initialized (we haven't run readXmlSettings() yet at this point!)
-
-        // Also, since the OTA call is now just starting, clear out
-        // the "committed" flag in app.cdmaOtaProvisionData.
-        if (app.cdmaOtaProvisionData != null) {
-            app.cdmaOtaProvisionData.isOtaCallCommitted = false;
-        }
-    }
-
-    private void setSpeaker(boolean state) {
-        if (DBG) log("setSpeaker : " + state );
-
-        if (!mInteractive) {
-            if (DBG) log("non-interactive mode, ignoring setSpeaker.");
-            return;
-        }
-
-        if (state == PhoneUtils.isSpeakerOn(mContext)) {
-            if (DBG) log("no change. returning");
-            return;
-        }
-
-        PhoneUtils.turnOnSpeaker(mContext, state, true);
-    }
-
-    /**
-     * Handles OTA Provision events from the telephony layer.
-     * These events come in to this method whether or not
-     * the InCallScreen is visible.
-     *
-     * Possible events are:
-     * OTA Commit Event - OTA provisioning was successful
-     * SPC retries exceeded - SPC failure retries has exceeded, and Phone needs to
-     *    power down.
-     */
-    public void onOtaProvisionStatusChanged(AsyncResult r) {
-        int OtaStatus[] = (int[]) r.result;
-        if (DBG) log("Provision status event!");
-        if (DBG) log("onOtaProvisionStatusChanged(): status = "
-                     + OtaStatus[0] + " ==> " + otaProvisionStatusToString(OtaStatus[0]));
-
-        // In practice, in a normal successful OTASP call, events come in as follows:
-        //   - SPL_UNLOCKED within a couple of seconds after the call starts
-        //   - then a delay of around 45 seconds
-        //   - then PRL_DOWNLOADED and MDN_DOWNLOADED and COMMITTED within a span of 2 seconds
-
-        switch(OtaStatus[0]) {
-            case Phone.CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED:
-                if (DBG) log("onOtaProvisionStatusChanged(): RETRIES EXCEEDED");
-                updateOtaspProgress();
-                mApplication.cdmaOtaProvisionData.otaSpcUptime = SystemClock.elapsedRealtime();
-                if (mInteractive) {
-                    otaShowSpcErrorNotice(OTA_SPC_TIMEOUT);
-                } else {
-                    sendOtaspResult(OTASP_FAILURE_SPC_RETRIES);
-                }
-                // Power.shutdown();
-                break;
-
-            case Phone.CDMA_OTA_PROVISION_STATUS_COMMITTED:
-                if (DBG) {
-                    log("onOtaProvisionStatusChanged(): DONE, isOtaCallCommitted set to true");
-                }
-                mApplication.cdmaOtaProvisionData.isOtaCallCommitted = true;
-                if (mApplication.cdmaOtaScreenState.otaScreenState !=
-                    CdmaOtaScreenState.OtaScreenState.OTA_STATUS_UNDEFINED) {
-                    updateOtaspProgress();
-                }
-
-                break;
-
-            case Phone.CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED:
-            case Phone.CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED:
-            case Phone.CDMA_OTA_PROVISION_STATUS_SSD_UPDATED:
-            case Phone.CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED:
-            case Phone.CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED:
-            case Phone.CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED:
-            case Phone.CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED:
-            case Phone.CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED:
-            case Phone.CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED:
-            case Phone.CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED:
-                // Only update progress when OTA call is in normal state
-                if (getCdmaOtaInCallScreenUiState() == CdmaOtaInCallScreenUiState.State.NORMAL) {
-                    if (DBG) log("onOtaProvisionStatusChanged(): change to ProgressScreen");
-                    updateOtaspProgress();
-                }
-                break;
-
-            default:
-                if (DBG) log("onOtaProvisionStatusChanged(): Ignoring OtaStatus " + OtaStatus[0]);
-                break;
-        }
-    }
-
-    /**
-     * Handle a disconnect event from the OTASP call.
-     */
-    public void onOtaspDisconnect() {
-        if (DBG) log("onOtaspDisconnect()...");
-        // We only handle this event explicitly in non-interactive mode.
-        // (In interactive mode, the InCallScreen does any post-disconnect
-        // cleanup.)
-        if (!mInteractive) {
-            // Send a success or failure indication back to our caller.
-            updateNonInteractiveOtaSuccessFailure();
-        }
-        cleanOtaScreen(true);
-    }
-
-    private void otaShowHome() {
-        if (DBG) log("otaShowHome()...");
-        mApplication.cdmaOtaScreenState.otaScreenState =
-                CdmaOtaScreenState.OtaScreenState.OTA_STATUS_UNDEFINED;
-        // mInCallScreen.endInCallScreenSession();
-        Intent intent = new Intent(Intent.ACTION_MAIN);
-        intent.addCategory (Intent.CATEGORY_HOME);
-        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-        mContext.startActivityAsUser(intent, UserHandle.CURRENT);
-        return;
-    }
-
-    private void otaSkipActivation() {
-        if (DBG) log("otaSkipActivation()...");
-
-        sendOtaspResult(OTASP_USER_SKIPPED);
-
-        // if (mInteractive) mInCallScreen.finish();
-        return;
-    }
-
-    /**
-     * Actually initiate the OTASP call.  This method is triggered by the
-     * onscreen "Activate" button, and is only used in interactive mode.
-     */
-    private void otaPerformActivation() {
-        if (DBG) log("otaPerformActivation()...");
-        if (!mInteractive) {
-            // We shouldn't ever get here in non-interactive mode!
-            Log.w(LOG_TAG, "otaPerformActivation: not interactive!");
-            return;
-        }
-
-        if (!mApplication.cdmaOtaProvisionData.inOtaSpcState) {
-            // Place an outgoing call to the special OTASP number:
-            Intent newIntent = new Intent(Intent.ACTION_CALL);
-            newIntent.setData(Uri.fromParts(PhoneAccount.SCHEME_TEL, OTASP_NUMBER, null));
-
-            // Initiate the outgoing call:
-            mApplication.callController.placeCall(newIntent);
-
-            // ...and get the OTASP-specific UI into the right state.
-            otaShowListeningScreen();
-            // mInCallScreen.requestUpdateScreen();
-        }
-        return;
-    }
-
-    /**
-     * Show Activation Screen when phone powers up and OTA provision is
-     * required. Also shown when activation fails and user needs
-     * to re-attempt it. Contains ACTIVATE and SKIP buttons
-     * which allow user to start OTA activation or skip the activation process.
-     */
-    public void otaShowActivateScreen() {
-        if (DBG) log("otaShowActivateScreen()...");
-        if (mApplication.cdmaOtaConfigData.otaShowActivationScreen
-                == OTA_SHOW_ACTIVATION_SCREEN_ON) {
-            if (DBG) log("otaShowActivateScreen(): show activation screen");
-            if (!isDialerOpened()) {
-                otaScreenInitialize();
-                mOtaWidgetData.otaSkipButton.setVisibility(sIsWizardMode ?
-                        View.VISIBLE : View.INVISIBLE);
-                mOtaWidgetData.otaTextActivate.setVisibility(View.VISIBLE);
-                mOtaWidgetData.callCardOtaButtonsActivate.setVisibility(View.VISIBLE);
-            }
-            mApplication.cdmaOtaScreenState.otaScreenState =
-                    CdmaOtaScreenState.OtaScreenState.OTA_STATUS_ACTIVATION;
-        } else {
-            if (DBG) log("otaShowActivateScreen(): show home screen");
-            otaShowHome();
-        }
-     }
-
-    /**
-     * Show "Listen for Instruction" screen during OTA call. Shown when OTA Call
-     * is initiated and user needs to listen for network instructions and press
-     * appropriate DTMF digits to proceed to the "Programming in Progress" phase.
-     */
-    private void otaShowListeningScreen() {
-        if (DBG) log("otaShowListeningScreen()...");
-        if (!mInteractive) {
-            // We shouldn't ever get here in non-interactive mode!
-            Log.w(LOG_TAG, "otaShowListeningScreen: not interactive!");
-            return;
-        }
-
-        if (mApplication.cdmaOtaConfigData.otaShowListeningScreen
-                == OTA_SHOW_LISTENING_SCREEN_ON) {
-            if (DBG) log("otaShowListeningScreen(): show listening screen");
-            if (!isDialerOpened()) {
-                otaScreenInitialize();
-                mOtaWidgetData.otaTextListenProgress.setVisibility(View.VISIBLE);
-                mOtaWidgetData.otaTextListenProgress.setText(R.string.ota_listen);
-                // mOtaWidgetData.otaDtmfDialerView.setVisibility(View.VISIBLE);
-                mOtaWidgetData.callCardOtaButtonsListenProgress.setVisibility(View.VISIBLE);
-                mOtaWidgetData.otaSpeakerButton.setVisibility(View.VISIBLE);
-                boolean speakerOn = PhoneUtils.isSpeakerOn(mContext);
-                mOtaWidgetData.otaSpeakerButton.setChecked(speakerOn);
-            }
-            mApplication.cdmaOtaScreenState.otaScreenState =
-                    CdmaOtaScreenState.OtaScreenState.OTA_STATUS_LISTENING;
-        } else {
-            if (DBG) log("otaShowListeningScreen(): show progress screen");
-            otaShowInProgressScreen();
-        }
-    }
-
-    /**
-     * Do any necessary updates (of onscreen UI, for example)
-     * based on the latest status of the OTASP call.
-     */
-    private void updateOtaspProgress() {
-        if (DBG) log("updateOtaspProgress()...  mInteractive = " + mInteractive);
-        if (mInteractive) {
-            // On regular phones we just call through to
-            // otaShowInProgressScreen(), which updates the
-            // InCallScreen's onscreen UI.
-            otaShowInProgressScreen();
-        } else {
-            // We're not using the InCallScreen to show OTA progress.
-
-            // For now, at least, there's nothing to do here.
-            // The overall "success" or "failure" indication we send back
-            // (to our caller) is triggered by the DISCONNECT event;
-            // see updateNonInteractiveOtaSuccessFailure().
-
-            // But if we ever need to send *intermediate* progress updates back
-            // to our caller, we'd do that here, possbily using the same
-            // PendingIntent that we already use to indicate success or failure.
-        }
-    }
-
-    /**
-     * When a non-interactive OTASP call completes, send a success or
-     * failure indication back to our caller.
-     *
-     * This is basically the non-interactive equivalent of
-     * otaShowSuccessFailure().
-     */
-    private void updateNonInteractiveOtaSuccessFailure() {
-        // This is basically the same logic as otaShowSuccessFailure(): we
-        // check the isOtaCallCommitted bit, and if that's true it means
-        // that activation was successful.
-
-        if (DBG) log("updateNonInteractiveOtaSuccessFailure(): isOtaCallCommitted = "
-                     + mApplication.cdmaOtaProvisionData.isOtaCallCommitted);
-        int resultCode =
-                mApplication.cdmaOtaProvisionData.isOtaCallCommitted
-                ? OTASP_SUCCESS : OTASP_FAILURE;
-        sendOtaspResult(resultCode);
-    }
-
-    /**
-     * Sends the specified OTASP result code back to our caller (presumably
-     * SetupWizard) via the PendingIntent that they originally sent along with
-     * the ACTION_PERFORM_CDMA_PROVISIONING intent.
-     */
-    private void sendOtaspResult(int resultCode) {
-        if (DBG) log("sendOtaspResult: resultCode = " + resultCode);
-
-        // Pass the success or failure indication back to our caller by
-        // adding an additional extra to the PendingIntent we already
-        // have.
-        // (NB: there's a PendingIntent send() method that takes a resultCode
-        // directly, but we can't use that here since that call is only
-        // meaningful for pending intents that are actually used as activity
-        // results.)
-
-        Intent extraStuff = new Intent();
-        extraStuff.putExtra(EXTRA_OTASP_RESULT_CODE, resultCode);
-        // When we call PendingIntent.send() below, the extras from this
-        // intent will get merged with any extras already present in
-        // cdmaOtaScreenState.otaspResultCodePendingIntent.
-
-        if (mApplication.cdmaOtaScreenState == null) {
-            Log.e(LOG_TAG, "updateNonInteractiveOtaSuccessFailure: no cdmaOtaScreenState object!");
-            return;
-        }
-        if (mApplication.cdmaOtaScreenState.otaspResultCodePendingIntent == null) {
-            Log.w(LOG_TAG, "updateNonInteractiveOtaSuccessFailure: "
-                  + "null otaspResultCodePendingIntent!");
-            return;
-        }
-
-        try {
-            if (DBG) log("- sendOtaspResult:  SENDING PENDING INTENT: " +
-                         mApplication.cdmaOtaScreenState.otaspResultCodePendingIntent);
-            mApplication.cdmaOtaScreenState.otaspResultCodePendingIntent.send(
-                    mContext,
-                    0, /* resultCode (unused) */
-                    extraStuff);
-        } catch (CanceledException e) {
-            // should never happen because no code cancels the pending intent right now,
-            Log.e(LOG_TAG, "PendingIntent send() failed: " + e);
-        }
-    }
-
-    /**
-     * Show "Programming In Progress" screen during OTA call. Shown when OTA
-     * provisioning is in progress after user has selected an option.
-     */
-    private void otaShowInProgressScreen() {
-        if (DBG) log("otaShowInProgressScreen()...");
-        if (!mInteractive) {
-            // We shouldn't ever get here in non-interactive mode!
-            Log.w(LOG_TAG, "otaShowInProgressScreen: not interactive!");
-            return;
-        }
-
-        mApplication.cdmaOtaScreenState.otaScreenState =
-            CdmaOtaScreenState.OtaScreenState.OTA_STATUS_PROGRESS;
-
-        if ((mOtaWidgetData == null) /* || (mInCallScreen == null) */) {
-            Log.w(LOG_TAG, "otaShowInProgressScreen: UI widgets not set up yet!");
-
-            // TODO(OTASP): our CdmaOtaScreenState is now correct; we just set
-            // it to OTA_STATUS_PROGRESS.  But we still need to make sure that
-            // when the InCallScreen eventually comes to the foreground, it
-            // notices that state and does all the same UI updating we do below.
-            return;
-        }
-
-        if (!isDialerOpened()) {
-            otaScreenInitialize();
-            mOtaWidgetData.otaTextListenProgress.setVisibility(View.VISIBLE);
-            mOtaWidgetData.otaTextListenProgress.setText(R.string.ota_progress);
-            mOtaWidgetData.otaTextProgressBar.setVisibility(View.VISIBLE);
-            mOtaWidgetData.callCardOtaButtonsListenProgress.setVisibility(View.VISIBLE);
-            mOtaWidgetData.otaSpeakerButton.setVisibility(View.VISIBLE);
-            boolean speakerOn = PhoneUtils.isSpeakerOn(mContext);
-            mOtaWidgetData.otaSpeakerButton.setChecked(speakerOn);
-        }
-    }
-
-    /**
-     * Show programming failure dialog when OTA provisioning fails.
-     * If OTA provisioning attempts fail more than 3 times, then unsuccessful
-     * dialog is shown. Otherwise a two-second notice is shown with unsuccessful
-     * information. When notice expires, phone returns to activation screen.
-     */
-    private void otaShowProgramFailure(int length) {
-        if (DBG) log("otaShowProgramFailure()...");
-        mApplication.cdmaOtaProvisionData.activationCount++;
-        if ((mApplication.cdmaOtaProvisionData.activationCount <
-                mApplication.cdmaOtaConfigData.otaShowActivateFailTimes)
-                && (mApplication.cdmaOtaConfigData.otaShowActivationScreen ==
-                OTA_SHOW_ACTIVATION_SCREEN_ON)) {
-            if (DBG) log("otaShowProgramFailure(): activationCount"
-                    + mApplication.cdmaOtaProvisionData.activationCount);
-            if (DBG) log("otaShowProgramFailure(): show failure notice");
-            otaShowProgramFailureNotice(length);
-        } else {
-            if (DBG) log("otaShowProgramFailure(): show failure dialog");
-            otaShowProgramFailureDialog();
-        }
-    }
-
-    /**
-     * Show either programming success dialog when OTA provisioning succeeds, or
-     * programming failure dialog when it fails. See {@link #otaShowProgramFailure}
-     * for more details.
-     */
-    public void otaShowSuccessFailure() {
-        if (DBG) log("otaShowSuccessFailure()...");
-        if (!mInteractive) {
-            // We shouldn't ever get here in non-interactive mode!
-            Log.w(LOG_TAG, "otaShowSuccessFailure: not interactive!");
-            return;
-        }
-
-        otaScreenInitialize();
-        if (DBG) log("otaShowSuccessFailure(): isOtaCallCommitted"
-                + mApplication.cdmaOtaProvisionData.isOtaCallCommitted);
-        if (mApplication.cdmaOtaProvisionData.isOtaCallCommitted) {
-            if (DBG) log("otaShowSuccessFailure(), show success dialog");
-            otaShowProgramSuccessDialog();
-        } else {
-            if (DBG) log("otaShowSuccessFailure(), show failure dialog");
-            otaShowProgramFailure(OTA_FAILURE_DIALOG_TIMEOUT);
-        }
-        return;
-    }
-
-    /**
-     * Show programming failure dialog when OTA provisioning fails more than 3
-     * times.
-     */
-    private void otaShowProgramFailureDialog() {
-        if (DBG) log("otaShowProgramFailureDialog()...");
-        mApplication.cdmaOtaScreenState.otaScreenState =
-                CdmaOtaScreenState.OtaScreenState.OTA_STATUS_SUCCESS_FAILURE_DLG;
-        mOtaWidgetData.otaTitle.setText(R.string.ota_title_problem_with_activation);
-        mOtaWidgetData.otaTextSuccessFail.setVisibility(View.VISIBLE);
-        mOtaWidgetData.otaTextSuccessFail.setText(R.string.ota_unsuccessful);
-        mOtaWidgetData.callCardOtaButtonsFailSuccess.setVisibility(View.VISIBLE);
-        mOtaWidgetData.otaTryAgainButton.setVisibility(View.VISIBLE);
-        //close the dialer if open
-        // if (isDialerOpened()) {
-        //     mOtaCallCardDtmfDialer.closeDialer(false);
-        // }
-    }
-
-    /**
-     * Show programming success dialog when OTA provisioning succeeds.
-     */
-    private void otaShowProgramSuccessDialog() {
-        if (DBG) log("otaShowProgramSuccessDialog()...");
-        mApplication.cdmaOtaScreenState.otaScreenState =
-                CdmaOtaScreenState.OtaScreenState.OTA_STATUS_SUCCESS_FAILURE_DLG;
-        mOtaWidgetData.otaTitle.setText(R.string.ota_title_activate_success);
-        mOtaWidgetData.otaTextSuccessFail.setVisibility(View.VISIBLE);
-        mOtaWidgetData.otaTextSuccessFail.setText(R.string.ota_successful);
-        mOtaWidgetData.callCardOtaButtonsFailSuccess.setVisibility(View.VISIBLE);
-        mOtaWidgetData.otaNextButton.setVisibility(View.VISIBLE);
-        //close the dialer if open
-        // if (isDialerOpened()) {
-        //     mOtaCallCardDtmfDialer.closeDialer(false);
-        // }
-    }
-
-    /**
-     * Show SPC failure notice when SPC attempts exceed 15 times.
-     * During OTA provisioning, if SPC code is incorrect OTA provisioning will
-     * fail. When SPC attempts are over 15, it shows SPC failure notice for one minute and
-     * then phone will power down.
-     */
-    private void otaShowSpcErrorNotice(int length) {
-        if (DBG) log("otaShowSpcErrorNotice()...");
-        if (mOtaWidgetData.spcErrorDialog == null) {
-            mApplication.cdmaOtaProvisionData.inOtaSpcState = true;
-            DialogInterface.OnKeyListener keyListener;
-            keyListener = new DialogInterface.OnKeyListener() {
-                public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
-                    log("Ignoring key events...");
-                    return true;
-                }};
-            mOtaWidgetData.spcErrorDialog = new AlertDialog.Builder(null /* mInCallScreen */)
-                    .setMessage(R.string.ota_spc_failure)
-                    .setOnKeyListener(keyListener)
-                    .create();
-            mOtaWidgetData.spcErrorDialog.getWindow().addFlags(
-                    WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
-                    | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
-            mOtaWidgetData.spcErrorDialog.show();
-            //close the dialer if open
-            // if (isDialerOpened()) {
-            //     mOtaCallCardDtmfDialer.closeDialer(false);
-            // }
-            long noticeTime = length*1000;
-            if (DBG) log("otaShowSpcErrorNotice(), remaining SPC noticeTime" + noticeTime);
-            // mInCallScreen.requestCloseSpcErrorNotice(noticeTime);
-        }
-    }
-
-    /**
-     * When SPC notice times out, force phone to power down.
-     */
-    public void onOtaCloseSpcNotice() {
-        if (DBG) log("onOtaCloseSpcNotice(), send shutdown intent");
-        Intent shutdown = new Intent(Intent.ACTION_REQUEST_SHUTDOWN);
-        shutdown.putExtra(Intent.EXTRA_KEY_CONFIRM, false);
-        shutdown.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-        mContext.startActivity(shutdown);
-    }
-
-    /**
-     * Show two-second notice when OTA provisioning fails and number of failed attempts
-     * is less then 3.
-     */
-    private void otaShowProgramFailureNotice(int length) {
-        if (DBG) log("otaShowProgramFailureNotice()...");
-        if (mOtaWidgetData.otaFailureDialog == null) {
-            mOtaWidgetData.otaFailureDialog = new AlertDialog.Builder(null /* mInCallScreen */)
-                    .setMessage(R.string.ota_failure)
-                    .create();
-            mOtaWidgetData.otaFailureDialog.getWindow().addFlags(
-                    WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
-                    | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
-            mOtaWidgetData.otaFailureDialog.show();
-
-            long noticeTime = length*1000;
-            // mInCallScreen.requestCloseOtaFailureNotice(noticeTime);
-        }
-    }
-
-    /**
-     * Handle OTA unsuccessful notice expiry. Dismisses the
-     * two-second notice and shows the activation screen.
-     */
-    public void onOtaCloseFailureNotice() {
-        if (DBG) log("onOtaCloseFailureNotice()...");
-        if (mOtaWidgetData.otaFailureDialog != null) {
-            mOtaWidgetData.otaFailureDialog.dismiss();
-            mOtaWidgetData.otaFailureDialog = null;
-        }
-        otaShowActivateScreen();
-    }
-
-    /**
-     * Initialize all OTA UI elements to be gone. Also set inCallPanel,
-     * callCard and the dialpad handle to be gone. This is called before any OTA screen
-     * gets drawn.
-     */
-    private void otaScreenInitialize() {
-        if (DBG) log("otaScreenInitialize()...");
-
-        if (!mInteractive) {
-            // We should never be doing anything with UI elements in
-            // non-interactive mode.
-            Log.w(LOG_TAG, "otaScreenInitialize: not interactive!");
-            return;
-        }
-
-        // if (mInCallTouchUi != null) mInCallTouchUi.setVisibility(View.GONE);
-        // if (mCallCard != null) {
-        //     mCallCard.setVisibility(View.GONE);
-        //     // TODO: try removing this.
-        //     mCallCard.hideCallCardElements();
-        // }
-
-        mOtaWidgetData.otaTitle.setText(R.string.ota_title_activate);
-        mOtaWidgetData.otaTextActivate.setVisibility(View.GONE);
-        mOtaWidgetData.otaTextListenProgress.setVisibility(View.GONE);
-        mOtaWidgetData.otaTextProgressBar.setVisibility(View.GONE);
-        mOtaWidgetData.otaTextSuccessFail.setVisibility(View.GONE);
-        mOtaWidgetData.callCardOtaButtonsActivate.setVisibility(View.GONE);
-        mOtaWidgetData.callCardOtaButtonsListenProgress.setVisibility(View.GONE);
-        mOtaWidgetData.callCardOtaButtonsFailSuccess.setVisibility(View.GONE);
-        // mOtaWidgetData.otaDtmfDialerView.setVisibility(View.GONE);
-        mOtaWidgetData.otaSpeakerButton.setVisibility(View.GONE);
-        mOtaWidgetData.otaTryAgainButton.setVisibility(View.GONE);
-        mOtaWidgetData.otaNextButton.setVisibility(View.GONE);
-        mOtaWidgetData.otaUpperWidgets.setVisibility(View.VISIBLE);
-        mOtaWidgetData.otaSkipButton.setVisibility(View.VISIBLE);
-    }
-
-    public void hideOtaScreen() {
-        if (DBG) log("hideOtaScreen()...");
-
-        mOtaWidgetData.callCardOtaButtonsActivate.setVisibility(View.GONE);
-        mOtaWidgetData.callCardOtaButtonsListenProgress.setVisibility(View.GONE);
-        mOtaWidgetData.callCardOtaButtonsFailSuccess.setVisibility(View.GONE);
-        mOtaWidgetData.otaUpperWidgets.setVisibility(View.GONE);
-    }
-
-    public boolean isDialerOpened() {
-        // boolean retval = (mOtaCallCardDtmfDialer != null && mOtaCallCardDtmfDialer.isOpened());
-        boolean retval = false;
-        if (DBG) log("- isDialerOpened() ==> " + retval);
-        return retval;
-    }
-
-    /**
-     * Show the appropriate OTA screen based on the current state of OTA call.
-     *
-     * This is called from the InCallScreen when the screen needs to be
-     * refreshed (and thus is only ever used in interactive mode.)
-     *
-     * Since this is called as part of the InCallScreen.updateScreen() sequence,
-     * this method does *not* post an mInCallScreen.requestUpdateScreen()
-     * request.
-     */
-    public void otaShowProperScreen() {
-        if (DBG) log("otaShowProperScreen()...");
-        if (!mInteractive) {
-            // We shouldn't ever get here in non-interactive mode!
-            Log.w(LOG_TAG, "otaShowProperScreen: not interactive!");
-            return;
-        }
-
-        // if ((mInCallScreen != null) && mInCallScreen.isForegroundActivity()) {
-        //     if (DBG) log("otaShowProperScreen(): InCallScreen in foreground, currentstate = "
-        //             + mApplication.cdmaOtaScreenState.otaScreenState);
-        //     if (mInCallTouchUi != null) {
-        //         mInCallTouchUi.setVisibility(View.GONE);
-        //     }
-        //     if (mCallCard != null) {
-        //         mCallCard.setVisibility(View.GONE);
-        //     }
-        //     if (mApplication.cdmaOtaScreenState.otaScreenState
-        //             == CdmaOtaScreenState.OtaScreenState.OTA_STATUS_ACTIVATION) {
-        //         otaShowActivateScreen();
-        //     } else if (mApplication.cdmaOtaScreenState.otaScreenState
-        //             == CdmaOtaScreenState.OtaScreenState.OTA_STATUS_LISTENING) {
-        //         otaShowListeningScreen();
-        //     } else if (mApplication.cdmaOtaScreenState.otaScreenState
-        //             == CdmaOtaScreenState.OtaScreenState.OTA_STATUS_PROGRESS) {
-        //         otaShowInProgressScreen();
-        //     }
-
-        //     if (mApplication.cdmaOtaProvisionData.inOtaSpcState) {
-        //         otaShowSpcErrorNotice(getOtaSpcDisplayTime());
-        //     }
-        // }
-    }
-
-    /**
-     * Read configuration values for each OTA screen from config.xml.
-     * These configuration values control visibility of each screen.
-     */
-    private void readXmlSettings() {
-        if (DBG) log("readXmlSettings()...");
-        if (mApplication.cdmaOtaConfigData.configComplete) {
-            return;
-        }
-
-        mApplication.cdmaOtaConfigData.configComplete = true;
-        int tmpOtaShowActivationScreen =
-                mContext.getResources().getInteger(R.integer.OtaShowActivationScreen);
-        mApplication.cdmaOtaConfigData.otaShowActivationScreen = tmpOtaShowActivationScreen;
-        if (DBG) log("readXmlSettings(), otaShowActivationScreen = "
-                + mApplication.cdmaOtaConfigData.otaShowActivationScreen);
-
-        int tmpOtaShowListeningScreen =
-                mContext.getResources().getInteger(R.integer.OtaShowListeningScreen);
-        mApplication.cdmaOtaConfigData.otaShowListeningScreen = tmpOtaShowListeningScreen;
-        if (DBG) log("readXmlSettings(), otaShowListeningScreen = "
-                + mApplication.cdmaOtaConfigData.otaShowListeningScreen);
-
-        int tmpOtaShowActivateFailTimes =
-                mContext.getResources().getInteger(R.integer.OtaShowActivateFailTimes);
-        mApplication.cdmaOtaConfigData.otaShowActivateFailTimes = tmpOtaShowActivateFailTimes;
-        if (DBG) log("readXmlSettings(), otaShowActivateFailTimes = "
-                + mApplication.cdmaOtaConfigData.otaShowActivateFailTimes);
-
-        int tmpOtaPlaySuccessFailureTone =
-                mContext.getResources().getInteger(R.integer.OtaPlaySuccessFailureTone);
-        mApplication.cdmaOtaConfigData.otaPlaySuccessFailureTone = tmpOtaPlaySuccessFailureTone;
-        if (DBG) log("readXmlSettings(), otaPlaySuccessFailureTone = "
-                + mApplication.cdmaOtaConfigData.otaPlaySuccessFailureTone);
-    }
-
-    /**
-     * Handle the click events for OTA buttons.
-     */
-    public void onClickHandler(int id) {
-        switch (id) {
-            case R.id.otaEndButton:
-                onClickOtaEndButton();
-                break;
-
-            case R.id.otaSpeakerButton:
-                onClickOtaSpeakerButton();
-                break;
-
-            case R.id.otaActivateButton:
-                onClickOtaActivateButton();
-                break;
-
-            case R.id.otaSkipButton:
-                onClickOtaActivateSkipButton();
-                break;
-
-            case R.id.otaNextButton:
-                onClickOtaActivateNextButton();
-                break;
-
-            case R.id.otaTryAgainButton:
-                onClickOtaTryAgainButton();
-                break;
-
-            default:
-                if (DBG) log ("onClickHandler: received a click event for unrecognized id");
-                break;
-        }
-    }
-
-    private void onClickOtaTryAgainButton() {
-        if (DBG) log("Activation Try Again Clicked!");
-        if (!mApplication.cdmaOtaProvisionData.inOtaSpcState) {
-            otaShowActivateScreen();
-        }
-    }
-
-    private void onClickOtaEndButton() {
-        if (DBG) log("Activation End Call Button Clicked!");
-        if (!mApplication.cdmaOtaProvisionData.inOtaSpcState) {
-            if (PhoneUtils.hangup(mApplication.mCM) == false) {
-                // If something went wrong when placing the OTA call,
-                // the screen is not updated by the call disconnect
-                // handler and we have to do it here
-                setSpeaker(false);
-                // mInCallScreen.handleOtaCallEnd();
-            }
-        }
-    }
-
-    private void onClickOtaSpeakerButton() {
-        if (DBG) log("OTA Speaker button Clicked!");
-        if (!mApplication.cdmaOtaProvisionData.inOtaSpcState) {
-            boolean isChecked = !PhoneUtils.isSpeakerOn(mContext);
-            setSpeaker(isChecked);
-        }
-    }
-
-    private void onClickOtaActivateButton() {
-        if (DBG) log("Call Activation Clicked!");
-        otaPerformActivation();
-    }
-
-    private void onClickOtaActivateSkipButton() {
-        if (DBG) log("Activation Skip Clicked!");
-        DialogInterface.OnKeyListener keyListener;
-        keyListener = new DialogInterface.OnKeyListener() {
-            public boolean onKey(DialogInterface dialog, int keyCode,
-                    KeyEvent event) {
-                if (DBG) log("Ignoring key events...");
-                return true;
-            }
-        };
-        mOtaWidgetData.otaSkipConfirmationDialog = new AlertDialog.Builder(null /* mInCallScreen */)
-                .setTitle(R.string.ota_skip_activation_dialog_title)
-                .setMessage(R.string.ota_skip_activation_dialog_message)
-                .setPositiveButton(
-                    android.R.string.ok,
-                    // "OK" means "skip activation".
-                    new AlertDialog.OnClickListener() {
-                        public void onClick(DialogInterface dialog, int which) {
-                            otaSkipActivation();
-                        }
-                    })
-                .setNegativeButton(
-                    android.R.string.cancel,
-                    // "Cancel" means just dismiss the dialog.
-                    // Don't actually start an activation call.
-                    null)
-                .setOnKeyListener(keyListener)
-                .create();
-        mOtaWidgetData.otaSkipConfirmationDialog.show();
-    }
-
-    private void onClickOtaActivateNextButton() {
-        if (DBG) log("Dialog Next Clicked!");
-        if (!mApplication.cdmaOtaProvisionData.inOtaSpcState) {
-            mApplication.cdmaOtaScreenState.otaScreenState =
-                    CdmaOtaScreenState.OtaScreenState.OTA_STATUS_UNDEFINED;
-            otaShowHome();
-        }
-    }
-
-    public void dismissAllOtaDialogs() {
-        if (mOtaWidgetData != null) {
-            if (mOtaWidgetData.spcErrorDialog != null) {
-                if (DBG) log("- DISMISSING mSpcErrorDialog.");
-                mOtaWidgetData.spcErrorDialog.dismiss();
-                mOtaWidgetData.spcErrorDialog = null;
-            }
-            if (mOtaWidgetData.otaFailureDialog != null) {
-                if (DBG) log("- DISMISSING mOtaFailureDialog.");
-                mOtaWidgetData.otaFailureDialog.dismiss();
-                mOtaWidgetData.otaFailureDialog = null;
-            }
-        }
-    }
-
-    private int getOtaSpcDisplayTime() {
-        if (DBG) log("getOtaSpcDisplayTime()...");
-        int tmpSpcTime = 1;
-        if (mApplication.cdmaOtaProvisionData.inOtaSpcState) {
-            long tmpOtaSpcRunningTime = 0;
-            long tmpOtaSpcLeftTime = 0;
-            tmpOtaSpcRunningTime = SystemClock.elapsedRealtime();
-            tmpOtaSpcLeftTime =
-                tmpOtaSpcRunningTime - mApplication.cdmaOtaProvisionData.otaSpcUptime;
-            if (tmpOtaSpcLeftTime >= OTA_SPC_TIMEOUT*1000) {
-                tmpSpcTime = 1;
-            } else {
-                tmpSpcTime = OTA_SPC_TIMEOUT - (int)tmpOtaSpcLeftTime/1000;
-            }
-        }
-        if (DBG) log("getOtaSpcDisplayTime(), time for SPC error notice: " + tmpSpcTime);
-        return tmpSpcTime;
-    }
-
-    /**
-     * Initialize the OTA widgets for all OTA screens.
-     */
-    private void initOtaInCallScreen() {
-        if (DBG) log("initOtaInCallScreen()...");
-        // mOtaWidgetData.otaTitle = (TextView) mInCallScreen.findViewById(R.id.otaTitle);
-        // mOtaWidgetData.otaTextActivate = (TextView) mInCallScreen.findViewById(R.id.otaActivate);
-        mOtaWidgetData.otaTextActivate.setVisibility(View.GONE);
-        // mOtaWidgetData.otaTextListenProgress =
-        //         (TextView) mInCallScreen.findViewById(R.id.otaListenProgress);
-        // mOtaWidgetData.otaTextProgressBar =
-        //         (ProgressBar) mInCallScreen.findViewById(R.id.progress_large);
-        mOtaWidgetData.otaTextProgressBar.setIndeterminate(true);
-        // mOtaWidgetData.otaTextSuccessFail =
-        //         (TextView) mInCallScreen.findViewById(R.id.otaSuccessFailStatus);
-
-        // mOtaWidgetData.otaUpperWidgets =
-        //         (ViewGroup) mInCallScreen.findViewById(R.id.otaUpperWidgets);
-        // mOtaWidgetData.callCardOtaButtonsListenProgress =
-        //         (View) mInCallScreen.findViewById(R.id.callCardOtaListenProgress);
-        // mOtaWidgetData.callCardOtaButtonsActivate =
-        //         (View) mInCallScreen.findViewById(R.id.callCardOtaActivate);
-        // mOtaWidgetData.callCardOtaButtonsFailSuccess =
-        //         (View) mInCallScreen.findViewById(R.id.callCardOtaFailOrSuccessful);
-
-        // mOtaWidgetData.otaEndButton = (Button) mInCallScreen.findViewById(R.id.otaEndButton);
-        // mOtaWidgetData.otaEndButton.setOnClickListener(mInCallScreen);
-        // mOtaWidgetData.otaSpeakerButton =
-        //         (ToggleButton) mInCallScreen.findViewById(R.id.otaSpeakerButton);
-        // mOtaWidgetData.otaSpeakerButton.setOnClickListener(mInCallScreen);
-        // mOtaWidgetData.otaActivateButton =
-        //         (Button) mInCallScreen.findViewById(R.id.otaActivateButton);
-        // mOtaWidgetData.otaActivateButton.setOnClickListener(mInCallScreen);
-        // mOtaWidgetData.otaSkipButton = (Button) mInCallScreen.findViewById(R.id.otaSkipButton);
-        // mOtaWidgetData.otaSkipButton.setOnClickListener(mInCallScreen);
-        // mOtaWidgetData.otaNextButton = (Button) mInCallScreen.findViewById(R.id.otaNextButton);
-        // mOtaWidgetData.otaNextButton.setOnClickListener(mInCallScreen);
-        // mOtaWidgetData.otaTryAgainButton =
-        //         (Button) mInCallScreen.findViewById(R.id.otaTryAgainButton);
-        // mOtaWidgetData.otaTryAgainButton.setOnClickListener(mInCallScreen);
-
-        // mOtaWidgetData.otaDtmfDialerView =
-        //         (DTMFTwelveKeyDialerView) mInCallScreen.findViewById(R.id.otaDtmfDialerView);
-        // Sanity-check: the otaDtmfDialerView widget should *always* be present.
-        // if (mOtaWidgetData.otaDtmfDialerView == null) {
-        //     throw new IllegalStateException("initOtaInCallScreen: couldn't find otaDtmfDialerView");
-        // }
-
-        // Create a new DTMFTwelveKeyDialer instance purely for use by the
-        // DTMFTwelveKeyDialerView ("otaDtmfDialerView") that comes from
-        // otacall_card.xml.
-        // mOtaCallCardDtmfDialer = new DTMFTwelveKeyDialer(mInCallScreen,
-        //                                                  mOtaWidgetData.otaDtmfDialerView);
-
-        // Initialize the new DTMFTwelveKeyDialer instance.  This is
-        // needed to play local DTMF tones.
-        // mOtaCallCardDtmfDialer.startDialerSession();
-
-        // mOtaWidgetData.otaDtmfDialerView.setDialer(mOtaCallCardDtmfDialer);
-    }
-
-    /**
-     * Clear out all OTA UI widget elements. Needs to get called
-     * when OTA call ends or InCallScreen is destroyed.
-     * @param disableSpeaker parameter control whether Speaker should be turned off.
-     */
-    public void cleanOtaScreen(boolean disableSpeaker) {
-        if (DBG) log("OTA ends, cleanOtaScreen!");
-
-        mApplication.cdmaOtaScreenState.otaScreenState =
-                CdmaOtaScreenState.OtaScreenState.OTA_STATUS_UNDEFINED;
-        mApplication.cdmaOtaProvisionData.isOtaCallCommitted = false;
-        mApplication.cdmaOtaProvisionData.isOtaCallIntentProcessed = false;
-        mApplication.cdmaOtaProvisionData.inOtaSpcState = false;
-        mApplication.cdmaOtaProvisionData.activationCount = 0;
-        mApplication.cdmaOtaProvisionData.otaSpcUptime = 0;
-        mApplication.cdmaOtaInCallScreenUiState.state = State.UNDEFINED;
-
-        if (mInteractive && (mOtaWidgetData != null)) {
-            // if (mInCallTouchUi != null) mInCallTouchUi.setVisibility(View.VISIBLE);
-            // if (mCallCard != null) {
-            //     mCallCard.setVisibility(View.VISIBLE);
-            //     mCallCard.hideCallCardElements();
-            // }
-
-            // Free resources from the DTMFTwelveKeyDialer instance we created
-            // in initOtaInCallScreen().
-            // if (mOtaCallCardDtmfDialer != null) {
-            //     mOtaCallCardDtmfDialer.stopDialerSession();
-            // }
-
-            mOtaWidgetData.otaTextActivate.setVisibility(View.GONE);
-            mOtaWidgetData.otaTextListenProgress.setVisibility(View.GONE);
-            mOtaWidgetData.otaTextProgressBar.setVisibility(View.GONE);
-            mOtaWidgetData.otaTextSuccessFail.setVisibility(View.GONE);
-            mOtaWidgetData.callCardOtaButtonsActivate.setVisibility(View.GONE);
-            mOtaWidgetData.callCardOtaButtonsListenProgress.setVisibility(View.GONE);
-            mOtaWidgetData.callCardOtaButtonsFailSuccess.setVisibility(View.GONE);
-            mOtaWidgetData.otaUpperWidgets.setVisibility(View.GONE);
-            // mOtaWidgetData.otaDtmfDialerView.setVisibility(View.GONE);
-            mOtaWidgetData.otaNextButton.setVisibility(View.GONE);
-            mOtaWidgetData.otaTryAgainButton.setVisibility(View.GONE);
-        }
-
-        // turn off the speaker in case it was turned on
-        // but the OTA call could not be completed
-        if (disableSpeaker) {
-            setSpeaker(false);
-        }
-    }
-
-    /**
-     * Defines OTA information that needs to be maintained during
-     * an OTA call when display orientation changes.
-     */
-    public static class CdmaOtaProvisionData {
-        public boolean isOtaCallCommitted;
-        public boolean isOtaCallIntentProcessed;
-        public boolean inOtaSpcState;
-        public int activationCount;
-        public long otaSpcUptime;
-    }
-
-    /**
-     * Defines OTA screen configuration items read from config.xml
-     * and used to control OTA display.
-     */
-    public static class CdmaOtaConfigData {
-        public int otaShowActivationScreen;
-        public int otaShowListeningScreen;
-        public int otaShowActivateFailTimes;
-        public int otaPlaySuccessFailureTone;
-        public boolean configComplete;
-        public CdmaOtaConfigData() {
-            if (DBG) log("CdmaOtaConfigData constructor!");
-            otaShowActivationScreen = OTA_SHOW_ACTIVATION_SCREEN_OFF;
-            otaShowListeningScreen = OTA_SHOW_LISTENING_SCREEN_OFF;
-            otaShowActivateFailTimes = OTA_SHOW_ACTIVATE_FAIL_COUNT_OFF;
-            otaPlaySuccessFailureTone = OTA_PLAY_SUCCESS_FAILURE_TONE_OFF;
-        }
-    }
-
-    /**
-     * The state of the OTA InCallScreen UI.
-     */
-    public static class CdmaOtaInCallScreenUiState {
-        public enum State {
-            UNDEFINED,
-            NORMAL,
-            ENDED
-        }
-
-        public State state;
-
-        public CdmaOtaInCallScreenUiState() {
-            if (DBG) log("CdmaOtaInCallScreenState: constructor init to UNDEFINED");
-            state = CdmaOtaInCallScreenUiState.State.UNDEFINED;
-        }
-    }
-
-    /**
-     * Save the Ota InCallScreen UI state
-     */
-    public void setCdmaOtaInCallScreenUiState(CdmaOtaInCallScreenUiState.State state) {
-        if (DBG) log("setCdmaOtaInCallScreenState: " + state);
-        mApplication.cdmaOtaInCallScreenUiState.state = state;
-    }
-
-    /**
-     * Get the Ota InCallScreen UI state
-     */
-    public CdmaOtaInCallScreenUiState.State getCdmaOtaInCallScreenUiState() {
-        if (DBG) log("getCdmaOtaInCallScreenState: "
-                     + mApplication.cdmaOtaInCallScreenUiState.state);
-        return mApplication.cdmaOtaInCallScreenUiState.state;
-    }
-
-    /**
-     * The OTA screen state machine.
-     */
-    public static class CdmaOtaScreenState {
-        public enum OtaScreenState {
-            OTA_STATUS_UNDEFINED,
-            OTA_STATUS_ACTIVATION,
-            OTA_STATUS_LISTENING,
-            OTA_STATUS_PROGRESS,
-            OTA_STATUS_SUCCESS_FAILURE_DLG
-        }
-
-        public OtaScreenState otaScreenState;
-
-        public CdmaOtaScreenState() {
-            otaScreenState = OtaScreenState.OTA_STATUS_UNDEFINED;
-        }
-
-        /**
-         * {@link PendingIntent} used to report an OTASP result status code
-         * back to our caller. Can be null.
-         *
-         * Our caller (presumably SetupWizard) may create this PendingIntent,
-         * pointing back at itself, and passes it along as an extra with the
-         * ACTION_PERFORM_CDMA_PROVISIONING intent.  Then, when there's an
-         * OTASP result to report, we send that PendingIntent back, adding an
-         * extra called EXTRA_OTASP_RESULT_CODE to indicate the result.
-         *
-         * Possible result values are the OTASP_RESULT_* constants.
-         */
-        public PendingIntent otaspResultCodePendingIntent;
-    }
-
-    /** @see com.android.internal.telephony.Phone */
-    private static String otaProvisionStatusToString(int status) {
-        switch (status) {
-            case Phone.CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED:
-                return "SPL_UNLOCKED";
-            case Phone.CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED:
-                return "SPC_RETRIES_EXCEEDED";
-            case Phone.CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED:
-                return "A_KEY_EXCHANGED";
-            case Phone.CDMA_OTA_PROVISION_STATUS_SSD_UPDATED:
-                return "SSD_UPDATED";
-            case Phone.CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED:
-                return "NAM_DOWNLOADED";
-            case Phone.CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED:
-                return "MDN_DOWNLOADED";
-            case Phone.CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED:
-                return "IMSI_DOWNLOADED";
-            case Phone.CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED:
-                return "PRL_DOWNLOADED";
-            case Phone.CDMA_OTA_PROVISION_STATUS_COMMITTED:
-                return "COMMITTED";
-            case Phone.CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED:
-                return "OTAPA_STARTED";
-            case Phone.CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED:
-                return "OTAPA_STOPPED";
-            case Phone.CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED:
-                return "OTAPA_ABORTED";
-            default:
-                return "<unknown status" + status + ">";
-        }
-    }
-
-    private static int getLteOnCdmaMode(Context context) {
-        final TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(
-                Context.TELEPHONY_SERVICE);
-        // If the telephony manager is not available yet, or if it doesn't know the answer yet,
-        // try falling back on the system property that may or may not be there
-        if (telephonyManager == null
-                || telephonyManager.getLteOnCdmaMode() == PhoneConstants.LTE_ON_CDMA_UNKNOWN) {
-            return SystemProperties.getInt(TelephonyProperties.PROPERTY_LTE_ON_CDMA_DEVICE,
-                    PhoneConstants.LTE_ON_CDMA_UNKNOWN);
-        }
-        return telephonyManager.getLteOnCdmaMode();
-    }
-
-    private static void log(String msg) {
-        Log.d(LOG_TAG, msg);
-    }
-
-    private static void loge(String msg) {
-        Log.e(LOG_TAG, msg);
-    }
-}
diff --git a/src/com/android/phone/OutgoingCallBroadcaster.java b/src/com/android/phone/OutgoingCallBroadcaster.java
index cfe6f32..6bb1388 100644
--- a/src/com/android/phone/OutgoingCallBroadcaster.java
+++ b/src/com/android/phone/OutgoingCallBroadcaster.java
@@ -18,7 +18,7 @@
 
 import android.Manifest;
 import android.app.Activity;
-import android.app.ActivityManagerNative;
+import android.app.ActivityManager;
 import android.app.AlertDialog;
 import android.app.AppOpsManager;
 import android.app.Dialog;
@@ -190,47 +190,6 @@
             final PhoneGlobals app = PhoneGlobals.getInstance();
             final Phone phone = PhoneGlobals.getPhone();
 
-            // OTASP-specific checks.
-            // TODO: This should probably all happen in
-            // OutgoingCallBroadcaster.onCreate(), since there's no reason to
-            // even bother with the NEW_OUTGOING_CALL broadcast if we're going
-            // to disallow the outgoing call anyway...
-            if (TelephonyCapabilities.supportsOtasp(phone)) {
-                boolean activateState = (app.cdmaOtaScreenState.otaScreenState
-                        == OtaUtils.CdmaOtaScreenState.OtaScreenState.OTA_STATUS_ACTIVATION);
-                boolean dialogState = (app.cdmaOtaScreenState.otaScreenState
-                        == OtaUtils.CdmaOtaScreenState.OtaScreenState
-                        .OTA_STATUS_SUCCESS_FAILURE_DLG);
-                boolean isOtaCallActive = false;
-
-                // TODO: Need cleaner way to check if OTA is active.
-                // Also, this check seems to be broken in one obscure case: if
-                // you interrupt an OTASP call by pressing Back then Skip,
-                // otaScreenState somehow gets left in either PROGRESS or
-                // LISTENING.
-                if ((app.cdmaOtaScreenState.otaScreenState
-                        == OtaUtils.CdmaOtaScreenState.OtaScreenState.OTA_STATUS_PROGRESS)
-                        || (app.cdmaOtaScreenState.otaScreenState
-                        == OtaUtils.CdmaOtaScreenState.OtaScreenState.OTA_STATUS_LISTENING)) {
-                    isOtaCallActive = true;
-                }
-
-                if (activateState || dialogState) {
-                    // The OTASP sequence is active, but either (1) the call
-                    // hasn't started yet, or (2) the call has ended and we're
-                    // showing the success/failure screen.  In either of these
-                    // cases it's OK to make a new outgoing call, but we need
-                    // to take down any OTASP-related UI first.
-                    if (dialogState) app.dismissOtaDialogs();
-                    app.clearOtaState();
-                } else if (isOtaCallActive) {
-                    // The actual OTASP call is active.  Don't allow new
-                    // outgoing calls at all from this state.
-                    Log.w(TAG, "OTASP call is active: disallowing a new outgoing call.");
-                    return false;
-                }
-            }
-
             if (number == null) {
                 if (DBG) Log.v(TAG, "CALL cancelled (null number), returning...");
                 return false;
@@ -429,9 +388,9 @@
         int launchedFromUid;
         String launchedFromPackage;
         try {
-            launchedFromUid = ActivityManagerNative.getDefault().getLaunchedFromUid(
+            launchedFromUid = ActivityManager.getService().getLaunchedFromUid(
                     getActivityToken());
-            launchedFromPackage = ActivityManagerNative.getDefault().getLaunchedFromPackage(
+            launchedFromPackage = ActivityManager.getService().getLaunchedFromPackage(
                     getActivityToken());
         } catch (RemoteException e) {
             launchedFromUid = -1;
diff --git a/src/com/android/phone/PhoneGlobals.java b/src/com/android/phone/PhoneGlobals.java
index 14a451f..39937eb 100644
--- a/src/com/android/phone/PhoneGlobals.java
+++ b/src/com/android/phone/PhoneGlobals.java
@@ -57,7 +57,6 @@
 import com.android.internal.telephony.TelephonyIntents;
 import com.android.phone.common.CallLogAsync;
 import com.android.phone.settings.SettingsConstants;
-import com.android.services.telephony.activation.SimActivationManager;
 import com.android.services.telephony.sip.SipUtil;
 
 /**
@@ -129,7 +128,6 @@
     CallerInfoCache callerInfoCache;
     NotificationMgr notificationMgr;
     public PhoneInterfaceManager phoneMgr;
-    public SimActivationManager simActivationManager;
     CarrierConfigLoader configLoader;
 
     private CallGatewayManager callGatewayManager;
@@ -147,8 +145,6 @@
     private Activity mPUKEntryActivity;
     private ProgressDialog mPUKEntryProgressDialog;
 
-    private boolean mDataDisconnectedDueToRoaming = false;
-
     private WakeState mWakeState = WakeState.SLEEP;
 
     private PowerManager mPowerManager;
@@ -161,26 +157,6 @@
     // Broadcast receiver for various intent broadcasts (see onCreate())
     private final BroadcastReceiver mReceiver = new PhoneAppBroadcastReceiver();
 
-    /**
-     * The singleton OtaUtils instance used for OTASP calls.
-     *
-     * The OtaUtils instance is created lazily the first time we need to
-     * make an OTASP call, regardless of whether it's an interactive or
-     * non-interactive OTASP call.
-     */
-    public OtaUtils otaUtils;
-
-    // Following are the CDMA OTA information Objects used during OTA Call.
-    // cdmaOtaProvisionData object store static OTA information that needs
-    // to be maintained even during Slider open/close scenarios.
-    // cdmaOtaConfigData object stores configuration info to control visiblity
-    // of each OTA Screens.
-    // cdmaOtaScreenState object store OTA Screen State information.
-    public OtaUtils.CdmaOtaProvisionData cdmaOtaProvisionData;
-    public OtaUtils.CdmaOtaConfigData cdmaOtaConfigData;
-    public OtaUtils.CdmaOtaScreenState cdmaOtaScreenState;
-    public OtaUtils.CdmaOtaInCallScreenUiState cdmaOtaInCallScreenUiState;
-
     Handler mHandler = new Handler() {
         @Override
         public void handleMessage(Message msg) {
@@ -358,7 +334,7 @@
             registerReceiver(mReceiver, intentFilter);
 
             //set the default values for the preferences in the phone.
-            PreferenceManager.setDefaultValues(this, R.xml.network_setting, false);
+            PreferenceManager.setDefaultValues(this, R.xml.network_setting_fragment, false);
 
             PreferenceManager.setDefaultValues(this, R.xml.call_feature_setting, false);
 
@@ -368,13 +344,6 @@
             PhoneUtils.setAudioMode(mCM);
         }
 
-        cdmaOtaProvisionData = new OtaUtils.CdmaOtaProvisionData();
-        cdmaOtaConfigData = new OtaUtils.CdmaOtaConfigData();
-        cdmaOtaScreenState = new OtaUtils.CdmaOtaScreenState();
-        cdmaOtaInCallScreenUiState = new OtaUtils.CdmaOtaInCallScreenUiState();
-
-        simActivationManager = new SimActivationManager();
-
         // XXX pre-load the SimProvider so that it's ready
         resolver.getType(Uri.parse("content://icc/adn"));
 
@@ -438,43 +407,6 @@
     }
 
     /**
-     * Handles OTASP-related events from the telephony layer.
-     *
-     * While an OTASP call is active, the CallNotifier forwards
-     * OTASP-related telephony events to this method.
-     */
-    void handleOtaspEvent(Message msg) {
-        if (DBG) Log.d(LOG_TAG, "handleOtaspEvent(message " + msg + ")...");
-
-        if (otaUtils == null) {
-            // We shouldn't be getting OTASP events without ever
-            // having started the OTASP call in the first place!
-            Log.w(LOG_TAG, "handleOtaEvents: got an event but otaUtils is null! "
-                  + "message = " + msg);
-            return;
-        }
-
-        otaUtils.onOtaProvisionStatusChanged((AsyncResult) msg.obj);
-    }
-
-    /**
-     * Similarly, handle the disconnect event of an OTASP call
-     * by forwarding it to the OtaUtils instance.
-     */
-    /* package */ void handleOtaspDisconnect() {
-        if (DBG) Log.d(LOG_TAG, "handleOtaspDisconnect()...");
-
-        if (otaUtils == null) {
-            // We shouldn't be getting OTASP events without ever
-            // having started the OTASP call in the first place!
-            Log.w(LOG_TAG, "handleOtaspDisconnect: otaUtils is null!");
-            return;
-        }
-
-        otaUtils.onOtaspDisconnect();
-    }
-
-    /**
      * Sets the activity responsible for un-PUK-blocking the device
      * so that we may close it when we receive a positive result.
      * mPUKEntryActivity is also used to indicate to the device that
@@ -622,15 +554,8 @@
         PhoneUtils.displayMMIComplete(mmiCode.getPhone(), getInstance(), mmiCode, null, null);
     }
 
-    private void initForNewRadioTechnology(int phoneId) {
+    private void initForNewRadioTechnology() {
         if (DBG) Log.d(LOG_TAG, "initForNewRadioTechnology...");
-
-        final Phone phone = PhoneFactory.getPhone(phoneId);
-        if (phone == null || !TelephonyCapabilities.supportsOtasp(phone)) {
-            // Clean up OTA for non-CDMA since it is only valid for CDMA.
-            clearOtaState();
-        }
-
         notifier.updateCallNotifierRegistrationsAfterRadioTechnologyChange();
     }
 
@@ -666,6 +591,7 @@
         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);
+        SystemProperties.set("persist.radio.airplane_mode_on", "1");
         Settings.Global.putInt(getContentResolver(), Settings.Global.ENABLE_CELLULAR_ON_BOOT, 0);
         PhoneUtils.setRadioPower(false);
     }
@@ -676,6 +602,7 @@
                 PhoneConstants.CELL_ON_FLAG);
         Settings.Global.putInt(getContentResolver(), Settings.Global.ENABLE_CELLULAR_ON_BOOT,
                 1);
+        SystemProperties.set("persist.radio.airplane_mode_on", "0");
         PhoneUtils.setRadioPower(true);
     }
 
@@ -722,30 +649,38 @@
                 int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY,
                         SubscriptionManager.INVALID_SUBSCRIPTION_ID);
                 int phoneId = SubscriptionManager.getPhoneId(subId);
-                String state = intent.getStringExtra(PhoneConstants.STATE_KEY);
+                final String apnType = intent.getStringExtra(PhoneConstants.DATA_APN_TYPE_KEY);
+                final String state = intent.getStringExtra(PhoneConstants.STATE_KEY);
+                final String reason = intent.getStringExtra(PhoneConstants.STATE_CHANGE_REASON_KEY);
                 if (VDBG) {
                     Log.d(LOG_TAG, "mReceiver: ACTION_ANY_DATA_CONNECTION_STATE_CHANGED");
                     Log.d(LOG_TAG, "- state: " + state);
-                    Log.d(LOG_TAG, "- reason: "
-                    + intent.getStringExtra(PhoneConstants.STATE_CHANGE_REASON_KEY));
+                    Log.d(LOG_TAG, "- reason: " + reason);
                     Log.d(LOG_TAG, "- subId: " + subId);
-                    Log.d(LOG_TAG, "- phoneId: " + phoneId);
                 }
                 Phone phone = SubscriptionManager.isValidPhoneId(phoneId) ?
                         PhoneFactory.getPhone(phoneId) : PhoneFactory.getDefaultPhone();
 
+                // If the apn type of data connection state changed event is NOT default,
+                // ignore the broadcast intent and avoid action.
+                if (!PhoneConstants.APN_TYPE_DEFAULT.equals(apnType)) {
+                    if (VDBG) Log.d(LOG_TAG, "Ignore broadcast intent as not default apn type");
+                    return;
+                }
+
                 // The "data disconnected due to roaming" notification is shown
                 // if (a) you have the "data roaming" feature turned off, and
                 // (b) you just lost data connectivity because you're roaming.
-                boolean disconnectedDueToRoaming =
-                        !phone.getDataRoamingEnabled()
-                        && PhoneConstants.DataState.DISCONNECTED.equals(state)
-                        && Phone.REASON_ROAMING_ON.equals(
-                            intent.getStringExtra(PhoneConstants.STATE_CHANGE_REASON_KEY));
-                if (mDataDisconnectedDueToRoaming != disconnectedDueToRoaming) {
-                    mDataDisconnectedDueToRoaming = disconnectedDueToRoaming;
-                    mHandler.sendEmptyMessage(disconnectedDueToRoaming
-                            ? EVENT_DATA_ROAMING_DISCONNECTED : EVENT_DATA_ROAMING_OK);
+                if (PhoneConstants.DataState.DISCONNECTED.name().equals(state)
+                        && Phone.REASON_ROAMING_ON.equals(reason)
+                        && !phone.getDataRoamingEnabled()) {
+                    // Notify the user that data call is disconnected due to roaming. Note that
+                    // calling this multiple times will not cause multiple notifications.
+                    mHandler.sendEmptyMessage(EVENT_DATA_ROAMING_DISCONNECTED);
+                } else if (PhoneConstants.DataState.CONNECTED.name().equals(state)) {
+                    // Cancel the notification when data is available. Note it is okay to call this
+                    // even if the notification doesn't exist.
+                    mHandler.sendEmptyMessage(EVENT_DATA_ROAMING_OK);
                 }
             } else if ((action.equals(TelephonyIntents.ACTION_SIM_STATE_CHANGED)) &&
                     (mPUKEntryActivity != null)) {
@@ -757,16 +692,13 @@
                         intent.getStringExtra(IccCardConstants.INTENT_KEY_ICC_STATE)));
             } else if (action.equals(TelephonyIntents.ACTION_RADIO_TECHNOLOGY_CHANGED)) {
                 String newPhone = intent.getStringExtra(PhoneConstants.PHONE_NAME_KEY);
-                int phoneId = intent.getIntExtra(PhoneConstants.PHONE_KEY,
-                        SubscriptionManager.INVALID_PHONE_INDEX);
-                Log.d(LOG_TAG, "Radio technology switched. Now " + newPhone + " (" + phoneId
-                        + ") is active.");
-                initForNewRadioTechnology(phoneId);
+                Log.d(LOG_TAG, "Radio technology switched. Now " + newPhone + " is active.");
+                initForNewRadioTechnology();
             } else if (action.equals(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED)) {
                 handleServiceStateChanged(intent);
             } else if (action.equals(TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED)) {
                 int phoneId = intent.getIntExtra(PhoneConstants.PHONE_KEY, 0);
-                phoneInEcm = getPhone(phoneId);
+                phoneInEcm = PhoneFactory.getPhone(phoneId);
                 Log.d(LOG_TAG, "Emergency Callback Mode. phoneId:" + phoneId);
                 if (phoneInEcm != null) {
                     if (TelephonyCapabilities.supportsEcm(phoneInEcm)) {
@@ -806,29 +738,13 @@
             ServiceState ss = ServiceState.newFromBundle(extras);
             if (ss != null) {
                 int state = ss.getState();
-                notificationMgr.updateNetworkSelection(state);
+                int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY,
+                        SubscriptionManager.INVALID_SUBSCRIPTION_ID);
+                notificationMgr.updateNetworkSelection(state, subId);
             }
         }
     }
 
-    // it is safe to call clearOtaState() even if the InCallScreen isn't active
-    public void clearOtaState() {
-        if (DBG) Log.d(LOG_TAG, "- clearOtaState ...");
-        if (otaUtils != null) {
-            otaUtils.cleanOtaScreen(true);
-            if (DBG) Log.d(LOG_TAG, "  - clearOtaState clears OTA screen");
-        }
-    }
-
-    // it is safe to call dismissOtaDialogs() even if the InCallScreen isn't active
-    public void dismissOtaDialogs() {
-        if (DBG) Log.d(LOG_TAG, "- dismissOtaDialogs ...");
-        if (otaUtils != null) {
-            otaUtils.dismissAllOtaDialogs();
-            if (DBG) Log.d(LOG_TAG, "  - dismissOtaDialogs clears OTA dialogs");
-        }
-    }
-
     public Phone getPhoneInEcm() {
         return phoneInEcm;
     }
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 50f90c1..8afe14f 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -18,8 +18,10 @@
 
 import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY;
 
+import android.Manifest.permission;
 import android.app.ActivityManager;
 import android.app.AppOpsManager;
+import android.app.PendingIntent;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
@@ -38,6 +40,7 @@
 import android.os.ServiceManager;
 import android.os.UserHandle;
 import android.os.UserManager;
+import android.os.WorkSource;
 import android.preference.PreferenceManager;
 import android.provider.Settings;
 import android.service.carrier.CarrierIdentifier;
@@ -46,11 +49,13 @@
 import android.telecom.TelecomManager;
 import android.telephony.CarrierConfigManager;
 import android.telephony.CellInfo;
+import android.telephony.ClientRequestStats;
 import android.telephony.IccOpenLogicalChannelResponse;
 import android.telephony.ModemActivityInfo;
 import android.telephony.NeighboringCellInfo;
 import android.telephony.RadioAccessFamily;
 import android.telephony.ServiceState;
+import android.telephony.SmsManager;
 import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyHistogram;
@@ -61,8 +66,12 @@
 import android.util.Log;
 import android.util.Pair;
 import android.util.Slog;
+
 import com.android.ims.ImsManager;
+import com.android.ims.internal.IImsServiceController;
+import com.android.ims.internal.IImsServiceFeatureListener;
 import com.android.internal.telephony.CallManager;
+import com.android.internal.telephony.CallStateException;
 import com.android.internal.telephony.CellNetworkScanResult;
 import com.android.internal.telephony.CommandException;
 import com.android.internal.telephony.DefaultPhoneNotifier;
@@ -71,6 +80,7 @@
 import com.android.internal.telephony.MccTable;
 import com.android.internal.telephony.OperatorInfo;
 import com.android.internal.telephony.Phone;
+import com.android.internal.telephony.PhoneConstantConversions;
 import com.android.internal.telephony.PhoneConstants;
 import com.android.internal.telephony.PhoneFactory;
 import com.android.internal.telephony.ProxyController;
@@ -79,13 +89,21 @@
 import com.android.internal.telephony.SubscriptionController;
 import com.android.internal.telephony.uicc.IccIoResult;
 import com.android.internal.telephony.uicc.IccUtils;
+import com.android.internal.telephony.uicc.SIMRecords;
 import com.android.internal.telephony.uicc.UiccCard;
+import com.android.internal.telephony.uicc.UiccCardApplication;
 import com.android.internal.telephony.uicc.UiccController;
 import com.android.internal.util.HexDump;
-import com.android.phone.settings.VisualVoicemailSettingsUtil;
 import com.android.phone.settings.VoicemailNotificationSettingsUtil;
+import com.android.phone.vvm.PhoneAccountHandleConverter;
+import com.android.phone.vvm.RemoteVvmTaskManager;
+import com.android.phone.vvm.VisualVoicemailPreferences;
+import com.android.phone.vvm.VisualVoicemailSettingsUtil;
+import com.android.phone.vvm.VisualVoicemailSmsFilterConfig;
+
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -147,6 +165,9 @@
     private static final int EVENT_SET_ALLOWED_CARRIERS_DONE = 44;
     private static final int CMD_GET_ALLOWED_CARRIERS = 45;
     private static final int EVENT_GET_ALLOWED_CARRIERS_DONE = 46;
+    private static final int CMD_HANDLE_USSD_REQUEST = 47;
+    private static final int CMD_GET_FORBIDDEN_PLMNS = 48;
+    private static final int EVENT_GET_FORBIDDEN_PLMNS_DONE = 49;
 
     /** The singleton instance. */
     private static PhoneInterfaceManager sInstance;
@@ -256,6 +277,26 @@
             IccAPDUArgument iccArgument;
 
             switch (msg.what) {
+                 case CMD_HANDLE_USSD_REQUEST: {
+                     request = (MainThreadRequest) msg.obj;
+                     final Phone phone = getPhoneFromRequest(request);
+                     Pair<String, ResultReceiver> ussdObject = (Pair) request.argument;
+                     String ussdRequest =  ussdObject.first;
+                     ResultReceiver wrappedCallback = ussdObject.second;
+                     try {
+                         request.result = phone != null ?
+                                 phone.handleUssdRequest(ussdRequest, wrappedCallback)
+                                 : false;
+                     } catch (CallStateException cse) {
+                         request.result = false;
+                     }
+                     // Wake up the requesting thread
+                     synchronized (request) {
+                         request.notifyAll();
+                     }
+                     break;
+                }
+
                 case CMD_HANDLE_PIN_MMI: {
                     request = (MainThreadRequest) msg.obj;
                     final Phone phone = getPhoneFromRequest(request);
@@ -273,7 +314,7 @@
                     request = (MainThreadRequest) msg.obj;
                     onCompleted = obtainMessage(EVENT_NEIGHBORING_CELL_DONE,
                             request);
-                    mPhone.getNeighboringCids(onCompleted);
+                    mPhone.getNeighboringCids(onCompleted, (WorkSource)request.argument);
                     break;
 
                 case EVENT_NEIGHBORING_CELL_DONE:
@@ -477,6 +518,7 @@
                 case CMD_OPEN_CHANNEL:
                     request = (MainThreadRequest) msg.obj;
                     uiccCard = getUiccCardFromRequest(request);
+                    Pair<String, Integer> openChannelArgs = (Pair<String, Integer>) request.argument;
                     if (uiccCard == null) {
                         loge("iccOpenLogicalChannel: No UICC");
                         request.result = new IccOpenLogicalChannelResponse(-1,
@@ -486,7 +528,8 @@
                         }
                     } else {
                         onCompleted = obtainMessage(EVENT_OPEN_CHANNEL_DONE, request);
-                        uiccCard.iccOpenLogicalChannel((String)request.argument, onCompleted);
+                        uiccCard.iccOpenLogicalChannel(openChannelArgs.first,
+                                openChannelArgs.second, onCompleted);
                     }
                     break;
 
@@ -831,6 +874,56 @@
                     }
                     break;
 
+                case EVENT_GET_FORBIDDEN_PLMNS_DONE:
+                    ar = (AsyncResult) msg.obj;
+                    request = (MainThreadRequest) ar.userObj;
+                    if (ar.exception == null && ar.result != null) {
+                        request.result = ar.result;
+                    } else {
+                        request.result = new IllegalArgumentException(
+                                "Failed to retrieve Forbidden Plmns");
+                        if (ar.result == null) {
+                            loge("getForbiddenPlmns: Empty response");
+                        } else {
+                            loge("getForbiddenPlmns: Unknown exception");
+                        }
+                    }
+                    synchronized (request) {
+                        request.notifyAll();
+                    }
+                    break;
+
+                case CMD_GET_FORBIDDEN_PLMNS:
+                    request = (MainThreadRequest) msg.obj;
+                    uiccCard = getUiccCardFromRequest(request);
+                    if (uiccCard == null) {
+                        loge("getForbiddenPlmns() UiccCard is null");
+                        request.result = new IllegalArgumentException(
+                                "getForbiddenPlmns() UiccCard is null");
+                        synchronized (request) {
+                            request.notifyAll();
+                        }
+                        break;
+                    }
+                    Integer appType = (Integer) request.argument;
+                    UiccCardApplication uiccApp = uiccCard.getApplicationByType(appType);
+                    if (uiccApp == null) {
+                        loge("getForbiddenPlmns() no app with specified type -- "
+                                + appType);
+                        request.result = new IllegalArgumentException("Failed to get UICC App");
+                        synchronized (request) {
+                            request.notifyAll();
+                        }
+                        break;
+                    } else {
+                        if (DBG) logv("getForbiddenPlmns() found app " + uiccApp.getAid()
+                                + " specified type -- " + appType);
+                    }
+                    onCompleted = obtainMessage(EVENT_GET_FORBIDDEN_PLMNS_DONE, request);
+                    ((SIMRecords) uiccApp.getIccRecords()).getForbiddenPlmns(
+                              onCompleted);
+                    break;
+
                 default:
                     Log.w(LOG_TAG, "MainThreadHandler: unexpected message code: " + msg.what);
                     break;
@@ -1402,6 +1495,7 @@
     }
 
     public boolean setRadioPower(boolean turnOn) {
+        enforceModifyPermission();
         final Phone defaultPhone = PhoneFactory.getDefaultPhone();
         if (defaultPhone != null) {
             defaultPhone.setRadioPower(turnOn);
@@ -1467,6 +1561,16 @@
         return handlePinMmiForSubscriber(getDefaultSubscription(), dialString);
     }
 
+    public void handleUssdRequest(int subId, String ussdRequest, ResultReceiver wrappedCallback) {
+      enforceCallPermission();
+      if (!SubscriptionManager.isValidSubscriptionId(subId)) {
+          return;
+      }
+      Pair<String, ResultReceiver> ussdObject = new Pair(ussdRequest, wrappedCallback);
+      sendRequest(CMD_HANDLE_USSD_REQUEST, ussdObject, subId);
+    };
+
+
     public boolean handlePinMmiForSubscriber(int subId, String dialString) {
         enforceModifyPermission();
         if (!SubscriptionManager.isValidSubscriptionId(subId)) {
@@ -1479,19 +1583,19 @@
         return getCallStateForSlot(getSlotForDefaultSubscription());
     }
 
-    public int getCallStateForSlot(int slotId) {
-        Phone phone = PhoneFactory.getPhone(slotId);
+    public int getCallStateForSlot(int slotIndex) {
+        Phone phone = PhoneFactory.getPhone(slotIndex);
         return phone == null ? TelephonyManager.CALL_STATE_IDLE :
-            DefaultPhoneNotifier.convertCallState(phone.getState());
+            PhoneConstantConversions.convertCallState(phone.getState());
     }
 
     @Override
     public int getDataState() {
         Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
         if (phone != null) {
-            return DefaultPhoneNotifier.convertDataState(phone.getDataConnectionState());
+            return PhoneConstantConversions.convertDataState(phone.getDataConnectionState());
         } else {
-            return DefaultPhoneNotifier.convertDataState(PhoneConstants.DataState.DISCONNECTED);
+            return PhoneConstantConversions.convertDataState(PhoneConstants.DataState.DISCONNECTED);
         }
     }
 
@@ -1524,7 +1628,9 @@
             if (phone == null) {
                 return null;
             }
-            phone.getCellLocation().fillInNotifierBundle(data);
+
+            WorkSource workSource = getWorkSource(null, Binder.getCallingUid());
+            phone.getCellLocation(workSource).fillInNotifierBundle(data);
             return data;
         } else {
             log("getCellLocation: suppress non-active user");
@@ -1598,9 +1704,10 @@
 
             ArrayList<NeighboringCellInfo> cells = null;
 
+            WorkSource workSource = getWorkSource(null, Binder.getCallingUid());
             try {
                 cells = (ArrayList<NeighboringCellInfo>) sendRequest(
-                        CMD_HANDLE_NEIGHBORING_CELL, null,
+                        CMD_HANDLE_NEIGHBORING_CELL, workSource,
                         SubscriptionManager.INVALID_SUBSCRIPTION_ID);
             } catch (RuntimeException e) {
                 Log.e(LOG_TAG, "getNeighboringCellInfo " + e);
@@ -1626,10 +1733,11 @@
         if (checkIfCallerIsSelfOrForegroundUser() ||
                 checkCallerInteractAcrossUsersFull()) {
             if (DBG_LOC) log("getAllCellInfo: is active user");
+            WorkSource workSource = getWorkSource(null, Binder.getCallingUid());
             List<CellInfo> cellInfos = new ArrayList<CellInfo>();
             for (Phone phone : PhoneFactory.getPhones()) {
-                final List<CellInfo> info = phone.getAllCellInfo();
-                if (info != null) cellInfos.addAll(phone.getAllCellInfo());
+                final List<CellInfo> info = phone.getAllCellInfo(workSource);
+                if (info != null) cellInfos.addAll(info);
             }
             return cellInfos;
         } else {
@@ -1641,24 +1749,34 @@
     @Override
     public void setCellInfoListRate(int rateInMillis) {
         enforceModifyPermission();
-        mPhone.setCellInfoListRate(rateInMillis);
+        WorkSource workSource = getWorkSource(null, Binder.getCallingUid());
+        mPhone.setCellInfoListRate(rateInMillis, workSource);
     }
 
     @Override
-    public String getImeiForSlot(int slotId, String callingPackage) {
+    public String getImeiForSlot(int slotIndex, String callingPackage) {
       if (!canReadPhoneState(callingPackage, "getImeiForSlot")) {
           return null;
       }
-      Phone phone = PhoneFactory.getPhone(slotId);
+      Phone phone = PhoneFactory.getPhone(slotIndex);
       return phone == null ? null : phone.getImei();
     }
 
     @Override
-    public String getDeviceSoftwareVersionForSlot(int slotId, String callingPackage) {
+    public String getMeidForSlot(int slotIndex, String callingPackage) {
+        if (!canReadPhoneState(callingPackage, "getMeidForSlot")) {
+            return null;
+        }
+        Phone phone = PhoneFactory.getPhone(slotIndex);
+        return phone == null ? null : phone.getMeid();
+    }
+
+    @Override
+    public String getDeviceSoftwareVersionForSlot(int slotIndex, String callingPackage) {
       if (!canReadPhoneState(callingPackage, "getDeviceSoftwareVersionForSlot")) {
           return null;
       }
-      Phone phone = PhoneFactory.getPhone(slotId);
+      Phone phone = PhoneFactory.getPhone(slotIndex);
       return phone == null ? null : phone.getDeviceSvn();
     }
 
@@ -1786,8 +1904,8 @@
     }
 
     @Override
-    public int getActivePhoneTypeForSlot(int slotId) {
-        final Phone phone = PhoneFactory.getPhone(slotId);
+    public int getActivePhoneTypeForSlot(int slotIndex) {
+        final Phone phone = PhoneFactory.getPhone(slotIndex);
         if (phone == null) {
             return PhoneConstants.PHONE_TYPE_NONE;
         } else {
@@ -1907,24 +2025,26 @@
     }
 
     @Override
-    public void setVisualVoicemailEnabled(String callingPackage,
-            PhoneAccountHandle phoneAccountHandle, boolean enabled) {
+    public Bundle getVisualVoicemailSettings(String callingPackage, int subId) {
         mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
-        if (!TextUtils.equals(callingPackage,
-                TelecomManager.from(mPhone.getContext()).getDefaultDialerPackage())) {
-            enforceModifyPermissionOrCarrierPrivilege(
-                    PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle));
+        String systemDialer = TelecomManager.from(mPhone.getContext()).getSystemDialerPackage();
+        if (!TextUtils.equals(callingPackage, systemDialer)) {
+            throw new SecurityException("caller must be system dialer");
         }
-        VisualVoicemailSettingsUtil.setEnabled(mPhone.getContext(), phoneAccountHandle, enabled);
+        PhoneAccountHandle phoneAccountHandle = PhoneAccountHandleConverter.fromSubId(subId);
+        if (phoneAccountHandle == null){
+            return null;
+        }
+        return VisualVoicemailSettingsUtil.dump(mPhone.getContext(), phoneAccountHandle);
     }
 
     @Override
-    public boolean isVisualVoicemailEnabled(String callingPackage,
-            PhoneAccountHandle phoneAccountHandle) {
-        if (!canReadPhoneState(callingPackage, "isVisualVoicemailEnabled")) {
-            return false;
+    public String getVisualVoicemailPackageName(String callingPackage, int subId) {
+        mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
+        if (!canReadPhoneState(callingPackage, "getVisualVoicemailPackageName")) {
+            return null;
         }
-        return VisualVoicemailSettingsUtil.isEnabled(mPhone.getContext(), phoneAccountHandle);
+        return RemoteVvmTaskManager.getRemotePackage(mPhone.getContext(), subId).getPackageName();
     }
 
     @Override
@@ -1952,12 +2072,94 @@
     }
 
     @Override
-    public VisualVoicemailSmsFilterSettings getSystemVisualVoicemailSmsFilterSettings(
-            String packageName, int subId) {
+    public VisualVoicemailSmsFilterSettings getActiveVisualVoicemailSmsFilterSettings(int subId) {
         enforceReadPrivilegedPermission();
         return VisualVoicemailSmsFilterConfig
-                .getVisualVoicemailSmsFilterSettings(mPhone.getContext(), packageName, subId);
+                .getActiveVisualVoicemailSmsFilterSettings(mPhone.getContext(), subId);
     }
+
+    @Override
+    public void sendVisualVoicemailSmsForSubscriber(String callingPackage, int subId,
+            String number, int port, String text, PendingIntent sentIntent) {
+        mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
+        enforceVisualVoicemailPackage(callingPackage, subId);
+        enforceSendSmsPermission();
+        // Make the calls as the phone process.
+        final long identity = Binder.clearCallingIdentity();
+        try {
+            SmsManager smsManager = SmsManager.getSmsManagerForSubscriptionId(subId);
+            if (port == 0) {
+                smsManager.sendTextMessageWithSelfPermissions(number, null, text,
+                        sentIntent, null, false);
+            } else {
+                byte[] data = text.getBytes(StandardCharsets.UTF_8);
+                smsManager.sendDataMessageWithSelfPermissions(number, null,
+                        (short) port, data, sentIntent, null);
+            }
+        } finally {
+            Binder.restoreCallingIdentity(identity);
+        }
+    }
+    /**
+     * Sets the voice activation state of a given subId.
+     */
+    @Override
+    public void setVoiceActivationState(int subId, int activationState) {
+        enforceModifyPermissionOrCarrierPrivilege(subId);
+        final Phone phone = getPhone(subId);
+        if (phone != null) {
+            phone.setVoiceActivationState(activationState);
+        } else {
+            loge("setVoiceActivationState fails with invalid subId: " + subId);
+        }
+    }
+
+    /**
+     * Sets the data activation state of a given subId.
+     */
+    @Override
+    public void setDataActivationState(int subId, int activationState) {
+        enforceModifyPermissionOrCarrierPrivilege(subId);
+        final Phone phone = getPhone(subId);
+        if (phone != null) {
+            phone.setDataActivationState(activationState);
+        } else {
+            loge("setVoiceActivationState fails with invalid subId: " + subId);
+        }
+    }
+
+    /**
+     * Returns the voice activation state of a given subId.
+     */
+    @Override
+    public int getVoiceActivationState(int subId, String callingPackage) {
+        if (!canReadPhoneState(callingPackage, "getVoiceActivationStateForSubscriber")) {
+            return TelephonyManager.SIM_ACTIVATION_STATE_UNKNOWN;
+        }
+        final Phone phone = getPhone(subId);
+        if (phone != null) {
+            return phone.getVoiceActivationState();
+        } else {
+            return TelephonyManager.SIM_ACTIVATION_STATE_UNKNOWN;
+        }
+    }
+
+    /**
+     * Returns the data activation state of a given subId.
+     */
+    @Override
+    public int getDataActivationState(int subId, String callingPackage) {
+        if (!canReadPhoneState(callingPackage, "getDataActivationStateForSubscriber")) {
+            return TelephonyManager.SIM_ACTIVATION_STATE_UNKNOWN;
+        }
+        final Phone phone = getPhone(subId);
+        if (phone != null) {
+            return phone.getDataActivationState();
+        } else {
+            return TelephonyManager.SIM_ACTIVATION_STATE_UNKNOWN;
+        }
+    }
+
     /**
      * Returns the unread count of voicemails
      */
@@ -1979,6 +2181,31 @@
     }
 
     /**
+      * returns true, if the device is in a state where both voice and data
+      * are supported simultaneously. This can change based on location or network condition.
+     */
+    @Override
+    public boolean isConcurrentVoiceAndDataAllowed(int subId) {
+        final Phone phone = getPhone(subId);
+        return (phone == null ? false : phone.isConcurrentVoiceAndDataAllowed());
+    }
+
+    /**
+     * Send the dialer code if called from the current default dialer or the caller has
+     * carrier privilege.
+     * @param inputCode The dialer code to send
+     */
+    @Override
+    public void sendDialerSpecialCode(String callingPackage, String inputCode) {
+        mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
+        String defaultDialer = TelecomManager.from(mPhone.getContext()).getDefaultDialerPackage();
+        if (!TextUtils.equals(callingPackage, defaultDialer)) {
+            enforceCarrierPrivilege(getDefaultSubscription());
+        }
+        mPhone.sendDialerSpecialCode(inputCode);
+    }
+
+    /**
      * Returns the data network type.
      * Legacy call, permission-free.
      *
@@ -2058,17 +2285,17 @@
      */
     public boolean hasIccCard() {
         // FIXME Make changes to pass defaultSimId of type int
-        return hasIccCardUsingSlotId(mSubscriptionController.getSlotId(getDefaultSubscription()));
+        return hasIccCardUsingSlotIndex(mSubscriptionController.getSlotIndex(
+                getDefaultSubscription()));
     }
 
     /**
-     * @return true if a ICC card is present for a slotId
+     * @return true if a ICC card is present for a slotIndex
      */
     @Override
-    public boolean hasIccCardUsingSlotId(int slotId) {
-        int subId[] = mSubscriptionController.getSubIdUsingSlotId(slotId);
-        final Phone phone = getPhone(subId[0]);
-        if (subId != null && phone != null) {
+    public boolean hasIccCardUsingSlotIndex(int slotIndex) {
+        final Phone phone = PhoneFactory.getPhone(slotIndex);
+        if (phone != null) {
             return phone.getIccCard().hasIccCard();
         } else {
             return false;
@@ -2146,12 +2373,12 @@
     }
 
     @Override
-    public IccOpenLogicalChannelResponse iccOpenLogicalChannel(int subId, String AID) {
+    public IccOpenLogicalChannelResponse iccOpenLogicalChannel(int subId, String AID, int p2) {
         enforceModifyPermissionOrCarrierPrivilege(subId);
 
-        if (DBG) log("iccOpenLogicalChannel: subId=" + subId + " aid=" + AID);
+        if (DBG) log("iccOpenLogicalChannel: subId=" + subId + " aid=" + AID + " p2=" + p2);
         IccOpenLogicalChannelResponse response = (IccOpenLogicalChannelResponse)sendRequest(
-            CMD_OPEN_CHANNEL, AID, subId);
+            CMD_OPEN_CHANNEL, new Pair<String, Integer>(AID, p2), subId);
         if (DBG) log("iccOpenLogicalChannel: " + response);
         return response;
     }
@@ -2254,6 +2481,26 @@
         return result;
     }
 
+    /**
+     * Get the forbidden PLMN List from the given app type (ex APPTYPE_USIM)
+     * on a particular subscription
+     */
+    public String[] getForbiddenPlmns(int subId, int appType) {
+        mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PHONE_STATE,
+                "Requires READ_PHONE_STATE");
+        if (appType != TelephonyManager.APPTYPE_USIM && appType != TelephonyManager.APPTYPE_SIM) {
+            loge("getForbiddenPlmnList(): App Type must be USIM or SIM");
+            return null;
+        }
+        Object response = sendRequest(
+            CMD_GET_FORBIDDEN_PLMNS, new Integer(appType), subId);
+        if (response instanceof String[]) {
+            return (String[]) response;
+        }
+        // Response is an Exception of some kind, which is signalled to the user as a NULL retval
+        return null;
+    }
+
     @Override
     public String sendEnvelopeWithStatus(int subId, String content) {
         enforceModifyPermissionOrCarrierPrivilege(subId);
@@ -2354,6 +2601,19 @@
         return mPhone.getPcscfAddress(apnType);
     }
 
+    /**
+     * Returns the {@link IImsServiceController} that corresponds to the given slot Id and IMS
+     * feature or {@link null} if the service is not available. If an ImsServiceController is
+     * available, the {@link IImsServiceFeatureListener} callback is registered as a listener for
+     * feature updates.
+     */
+    public IImsServiceController getImsServiceControllerAndListen(int slotIndex, int feature,
+            IImsServiceFeatureListener callback) {
+        enforceModifyPermission();
+        return PhoneFactory.getImsResolver().getImsServiceControllerAndListen(slotIndex, feature,
+                callback);
+    }
+
     public void setImsRegistrationState(boolean registered) {
         enforceModifyPermission();
         mPhone.setImsRegistrationState(registered);
@@ -2475,7 +2735,7 @@
      */
     @Override
     public void setDataEnabled(int subId, boolean enable) {
-        enforceModifyPermission();
+        enforceModifyPermissionOrCarrierPrivilege(subId);
         int phoneId = mSubscriptionController.getPhoneId(subId);
         if (DBG) log("getDataEnabled: subId=" + subId + " phoneId=" + phoneId);
         Phone phone = PhoneFactory.getPhone(phoneId);
@@ -2490,9 +2750,7 @@
     /**
      * Get whether mobile data is enabled.
      *
-     * Note that this used to be available from ConnectivityService, gated by
-     * ACCESS_NETWORK_STATE permission, so this will accept either that or
-     * our MODIFY_PHONE_STATE.
+     * Accepts either ACCESS_NETWORK_STATE, MODIFY_PHONE_STATE or carrier privileges.
      *
      * @return {@code true} if data is enabled else {@code false}
      */
@@ -2502,8 +2760,7 @@
             mApp.enforceCallingOrSelfPermission(android.Manifest.permission.ACCESS_NETWORK_STATE,
                     null);
         } catch (Exception e) {
-            mApp.enforceCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE,
-                    null);
+            enforceModifyPermissionOrCarrierPrivilege(subId);
         }
         int phoneId = mSubscriptionController.getPhoneId(subId);
         if (DBG) log("getDataEnabled: subId=" + subId + " phoneId=" + phoneId);
@@ -2805,6 +3062,7 @@
     }
 
     @Override
+    @Deprecated
     public int invokeOemRilRequestRaw(byte[] oemReq, byte[] oemResp) {
         enforceModifyPermission();
 
@@ -2985,22 +3243,41 @@
                 Binder.getCallingUid(), callingPackage) == AppOpsManager.MODE_ALLOWED) {
             return true;
         }
+
         try {
             return canReadPhoneState(callingPackage, message);
         } catch (SecurityException readPhoneStateSecurityException) {
-            try {
-                // Can be read with READ_SMS too.
-                mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_SMS, message);
-                return mAppOps.noteOp(AppOpsManager.OP_READ_SMS,
-                        Binder.getCallingUid(), callingPackage) == AppOpsManager.MODE_ALLOWED;
-            } catch (SecurityException readSmsSecurityException) {
-                // Throw exception with message including both READ_PHONE_STATE and READ_SMS
-                // permissions
-                throw new SecurityException(message + ": Neither user " + Binder.getCallingUid() +
-                        " nor current process has " + android.Manifest.permission.READ_PHONE_STATE +
-                        " or " + android.Manifest.permission.READ_SMS + ".");
-            }
         }
+        // Can be read with READ_SMS too.
+        try {
+            mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_SMS, message);
+            int opCode = mAppOps.permissionToOpCode(android.Manifest.permission.READ_SMS);
+            if (opCode != AppOpsManager.OP_NONE) {
+                return mAppOps.noteOp(opCode, Binder.getCallingUid(), callingPackage)
+                        == AppOpsManager.MODE_ALLOWED;
+            } else {
+                return true;
+            }
+        } catch (SecurityException readSmsSecurityException) {
+        }
+        // Can be read with READ_PHONE_NUMBERS too.
+        try {
+            mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PHONE_NUMBERS,
+                    message);
+            int opCode = mAppOps.permissionToOpCode(android.Manifest.permission.READ_PHONE_NUMBERS);
+            if (opCode != AppOpsManager.OP_NONE) {
+                return mAppOps.noteOp(opCode, Binder.getCallingUid(), callingPackage)
+                        == AppOpsManager.MODE_ALLOWED;
+            } else {
+                return true;
+            }
+        } catch (SecurityException readPhoneNumberSecurityException) {
+        }
+
+        throw new SecurityException(message + ": Neither user " + Binder.getCallingUid() +
+                " nor current process has" + android.Manifest.permission.READ_PHONE_STATE +
+                ", " + android.Manifest.permission.READ_SMS + ", or " +
+                android.Manifest.permission.READ_PHONE_NUMBERS);
     }
 
     @Override
@@ -3155,15 +3432,42 @@
      */
     @Override
     public Uri getVoicemailRingtoneUri(PhoneAccountHandle accountHandle) {
-        final Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
+        Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
         if (phone == null) {
-            return null;
+            phone = mPhone;
         }
 
         return VoicemailNotificationSettingsUtil.getRingtoneUri(phone);
     }
 
     /**
+     * Sets the per-account voicemail ringtone.
+     *
+     * <p>Requires that the calling app is the default dialer, or has carrier privileges, or
+     * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
+     *
+     * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
+     * voicemail ringtone.
+     * @param uri The URI for the ringtone to play when receiving a voicemail from a specific
+     * PhoneAccount.
+     */
+    @Override
+    public void setVoicemailRingtoneUri(String callingPackage,
+            PhoneAccountHandle phoneAccountHandle, Uri uri) {
+        mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
+        if (!TextUtils.equals(callingPackage,
+                TelecomManager.from(mPhone.getContext()).getDefaultDialerPackage())) {
+            enforceModifyPermissionOrCarrierPrivilege(
+                    PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle));
+        }
+        Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
+        if (phone == null){
+           phone = mPhone;
+        }
+        VoicemailNotificationSettingsUtil.setRingtoneUri(phone, uri);
+    }
+
+    /**
      * Returns whether vibration is set for voicemail notification in Phone settings.
      *
      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
@@ -3172,15 +3476,43 @@
      */
     @Override
     public boolean isVoicemailVibrationEnabled(PhoneAccountHandle accountHandle) {
-        final Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
+        Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
         if (phone == null) {
-            return false;
+            phone = mPhone;
         }
 
         return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone);
     }
 
     /**
+     * Sets the per-account voicemail vibration.
+     *
+     * <p>Requires that the calling app is the default dialer, or has carrier privileges, or
+     * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
+     *
+     * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
+     * voicemail vibration setting.
+     * @param enabled Whether to enable or disable vibration for voicemail notifications from a
+     * specific PhoneAccount.
+     */
+    @Override
+    public void setVoicemailVibrationEnabled(String callingPackage,
+            PhoneAccountHandle phoneAccountHandle, boolean enabled) {
+        mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
+        if (!TextUtils.equals(callingPackage,
+                TelecomManager.from(mPhone.getContext()).getDefaultDialerPackage())) {
+            enforceModifyPermissionOrCarrierPrivilege(
+                    PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle));
+        }
+
+        Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
+        if (phone == null){
+            phone = mPhone;
+        }
+        VoicemailNotificationSettingsUtil.setVibrationEnabled(phone, enabled);
+    }
+
+    /**
      * Make sure either called from same process as self (phone) or IPC caller has read privilege.
      *
      * @throws SecurityException if the caller does not have the required permission
@@ -3191,6 +3523,34 @@
     }
 
     /**
+     * Make sure either called from same process as self (phone) or IPC caller has send SMS
+     * permission.
+     *
+     * @throws SecurityException if the caller does not have the required permission
+     */
+    private void enforceSendSmsPermission() {
+        mApp.enforceCallingOrSelfPermission(permission.SEND_SMS, null);
+    }
+
+    /**
+     * Make sure called from the package in charge of visual voicemail.
+     *
+     * @throws SecurityException if the caller is not the visual voicemail package.
+     */
+    private void enforceVisualVoicemailPackage(String callingPackage, int subId) {
+        ComponentName componentName =
+                RemoteVvmTaskManager.getRemotePackage(mPhone.getContext(), subId);
+        if(componentName == null) {
+            throw new SecurityException("Caller not current active visual voicemail package[null]");
+        }
+        String vvmPackage = componentName.getPackageName();
+        if (!callingPackage.equals(vvmPackage)) {
+            throw new SecurityException("Caller not current active visual voicemail package[" +
+                    vvmPackage + "]");
+        }
+    }
+
+    /**
      * Return the application ID for the app type.
      *
      * @param subId the subscription ID that this request applies to.
@@ -3271,31 +3631,36 @@
 
     /**
      * {@hide}
-     * Set the allowed carrier list for slotId
+     * Set the allowed carrier list for slotIndex
      * Require system privileges. In the future we may add this to carrier APIs.
      *
      * @return The number of carriers set successfully, should match length of carriers
      */
     @Override
-    public int setAllowedCarriers(int slotId, List<CarrierIdentifier> carriers) {
+    public int setAllowedCarriers(int slotIndex, List<CarrierIdentifier> carriers) {
         enforceModifyPermission();
-        int subId = SubscriptionManager.getSubId(slotId)[0];
+
+        if (carriers == null) {
+            throw new NullPointerException("carriers cannot be null");
+        }
+
+        int subId = SubscriptionManager.getSubId(slotIndex)[0];
         int[] retVal = (int[]) sendRequest(CMD_SET_ALLOWED_CARRIERS, carriers, subId);
         return retVal[0];
     }
 
     /**
      * {@hide}
-     * Get the allowed carrier list for slotId.
+     * Get the allowed carrier list for slotIndex.
      * Require system privileges. In the future we may add this to carrier APIs.
      *
      * @return List of {@link android.service.telephony.CarrierIdentifier}; empty list
      * means all carriers are allowed.
      */
     @Override
-    public List<CarrierIdentifier> getAllowedCarriers(int slotId) {
+    public List<CarrierIdentifier> getAllowedCarriers(int slotIndex) {
         enforceReadPrivilegedPermission();
-        int subId = SubscriptionManager.getSubId(slotId)[0];
+        int subId = SubscriptionManager.getSubId(slotIndex)[0];
         return (List<CarrierIdentifier>) sendRequest(CMD_GET_ALLOWED_CARRIERS, null, subId);
     }
 
@@ -3397,4 +3762,64 @@
             phone.setPolicyDataEnabled(enabled);
         }
     }
+
+    /**
+     * Get Client request stats
+     * @return List of Client Request Stats
+     * @hide
+     */
+    @Override
+    public List<ClientRequestStats> getClientRequestStats(String callingPackage, int subId) {
+        if (!canReadPhoneState(callingPackage, "getClientRequestStats")) {
+            return null;
+        }
+
+        Phone phone = getPhone(subId);
+        if (phone != null) {
+            return phone.getClientRequestStats();
+        }
+
+        return null;
+    }
+
+    private WorkSource getWorkSource(WorkSource workSource, int uid) {
+        if (workSource != null) {
+            return workSource;
+        }
+
+        String packageName = mPhone.getContext().getPackageManager().getNameForUid(uid);
+        workSource = new WorkSource(uid, packageName);
+        return workSource;
+    }
+
+    /**
+     * Set SIM card power state. Request is equivalent to inserting or removing the card.
+     *
+     * @param slotIndex SIM slot id.
+     * @param powerUp True if powering up the SIM, otherwise powering down
+     *
+     **/
+    @Override
+    public void setSimPowerStateForSlot(int slotIndex, boolean powerUp) {
+        enforceModifyPermission();
+        Phone phone = PhoneFactory.getPhone(slotIndex);
+
+        if (phone != null) {
+            phone.setSimPowerState(powerUp);
+        }
+    }
+
+    /**
+     * Check if phone is in emergency callback mode
+     * @return true if phone is in emergency callback mode
+     * @param subId sub id
+     */
+    public boolean getEmergencyCallbackMode(int subId) {
+        final Phone phone = getPhone(subId);
+        if (phone != null) {
+            return phone.isInEcm();
+        } else {
+            return false;
+        }
+    }
 }
diff --git a/src/com/android/phone/PhoneSearchIndexablesProvider.java b/src/com/android/phone/PhoneSearchIndexablesProvider.java
index f1dacd9..171f74f 100644
--- a/src/com/android/phone/PhoneSearchIndexablesProvider.java
+++ b/src/com/android/phone/PhoneSearchIndexablesProvider.java
@@ -16,11 +16,14 @@
 
 package com.android.phone;
 
+import android.content.Context;
 import android.database.Cursor;
 import android.database.MatrixCursor;
+import android.os.UserManager;
 import android.provider.SearchIndexableResource;
 import android.provider.SearchIndexablesProvider;
 
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_NON_INDEXABLE_KEYS_KEY_VALUE;
 import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_RANK;
 import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_RESID;
 import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_CLASS_NAME;
@@ -37,7 +40,7 @@
     private static final String TAG = "PhoneSearchIndexablesProvider";
 
     private static SearchIndexableResource[] INDEXABLE_RES = new SearchIndexableResource[] {
-            new SearchIndexableResource(1, R.xml.network_setting,
+            new SearchIndexableResource(1, R.xml.network_setting_fragment,
                     MobileNetworkSettings.class.getName(),
                     R.mipmap.ic_launcher_phone),
     };
@@ -70,9 +73,23 @@
         MatrixCursor cursor = new MatrixCursor(INDEXABLES_RAW_COLUMNS);
         return cursor;
     }
+
     @Override
     public Cursor queryNonIndexableKeys(String[] projection) {
         MatrixCursor cursor = new MatrixCursor(NON_INDEXABLES_KEYS_COLUMNS);
+        final UserManager userManager = (UserManager) getContext().getSystemService(
+                Context.USER_SERVICE);
+        if (!userManager.isAdminUser()) {
+            final String[] values = new String[]{"preferred_network_mode_key", "button_roaming_key",
+                    "cdma_lte_data_service_key", "enabled_networks_key", "enhanced_4g_lte",
+                    "button_apn_key", "button_carrier_sel_key", "carrier_settings_key",
+                    "cdma_system_select_key", "carrier_settings_euicc_key"};
+            for (String nik : values) {
+                final Object[] ref = new Object[NON_INDEXABLES_KEYS_COLUMNS.length];
+                ref[COLUMN_INDEX_NON_INDEXABLE_KEYS_KEY_VALUE] = nik;
+                cursor.addRow(ref);
+            }
+        }
         return cursor;
     }
 }
diff --git a/src/com/android/phone/PhoneUtils.java b/src/com/android/phone/PhoneUtils.java
index 9f70349..d92d349 100644
--- a/src/com/android/phone/PhoneUtils.java
+++ b/src/com/android/phone/PhoneUtils.java
@@ -86,9 +86,9 @@
     static final String ADD_CALL_MODE_KEY = "add_call_mode";
 
     // Return codes from placeCall()
-    static final int CALL_STATUS_DIALED = 0;  // The number was successfully dialed
-    static final int CALL_STATUS_DIALED_MMI = 1;  // The specified number was an MMI code
-    static final int CALL_STATUS_FAILED = 2;  // The call failed
+    public static final int CALL_STATUS_DIALED = 0;  // The number was successfully dialed
+    public static final int CALL_STATUS_DIALED_MMI = 1;  // The specified number was an MMI code
+    public static final int CALL_STATUS_FAILED = 2;  // The call failed
 
     // State of the Phone's audio modes
     // Each state can move to the other states, but within the state only certain
@@ -2175,16 +2175,7 @@
      */
     /* package */ static boolean isPhoneInEcm(Phone phone) {
         if ((phone != null) && TelephonyCapabilities.supportsEcm(phone)) {
-            // For phones that support ECM, return true iff PROPERTY_INECM_MODE == "true".
-            // TODO: There ought to be a better API for this than just
-            // exposing a system property all the way up to the app layer,
-            // probably a method like "inEcm()" provided by the telephony
-            // layer.
-            String ecmMode =
-                    SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE);
-            if (ecmMode != null) {
-                return ecmMode.equals("true");
-            }
+            return phone.isInEcm();
         }
         return false;
     }
diff --git a/src/com/android/phone/RoamingDialogFragment.java b/src/com/android/phone/RoamingDialogFragment.java
new file mode 100644
index 0000000..21c6946
--- /dev/null
+++ b/src/com/android/phone/RoamingDialogFragment.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2016 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.phone;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.DialogFragment;
+import android.app.Fragment;
+import android.app.FragmentManager;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnClickListener;
+import android.os.Bundle;
+
+/**
+ * A dialog fragment that asks the user if they are sure they want to turn on data roaming
+ * to avoid accidental charges.
+ */
+public class RoamingDialogFragment extends DialogFragment implements OnClickListener {
+
+    /**
+     * The interface we expect a host activity to implement.
+     */
+    public interface RoamingDialogListener {
+        void onPositiveButtonClick(DialogFragment dialog);
+    }
+
+    // the host activity which implements the listening interface
+    private RoamingDialogListener mListener;
+
+
+    @Override
+    public void onAttach(Context context) {
+        super.onAttach(context);
+        // Verify host activity implemented callback interface
+        FragmentManager fragmentManager = getFragmentManager();
+        Fragment fragment = fragmentManager.findFragmentById(R.id.network_setting_content);
+        try {
+            mListener = (RoamingDialogListener) fragment;
+        } catch (ClassCastException e) {
+            throw new ClassCastException(fragment.toString() +
+                    "must implement RoamingDialogListener");
+        }
+    }
+
+    @Override
+    public Dialog onCreateDialog(Bundle savedInstanceState) {
+        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+        builder.setMessage(getResources().getString(R.string.roaming_warning))
+                .setTitle(R.string.roaming_alert_title)
+                .setIconAttribute(android.R.attr.alertDialogIcon)
+                .setPositiveButton(android.R.string.yes, this)
+                .setNegativeButton(android.R.string.no, this);
+        return builder.create();
+    }
+
+    @Override
+    public void onClick(DialogInterface dialog, int which) {
+        // let the host know that the positive button has been clicked
+        if (which == dialog.BUTTON_POSITIVE) {
+            mListener.onPositiveButtonClick(this);
+        }
+    }
+}
diff --git a/src/com/android/phone/SpecialCharSequenceMgr.java b/src/com/android/phone/SpecialCharSequenceMgr.java
index 4e2120e..3c02a30 100644
--- a/src/com/android/phone/SpecialCharSequenceMgr.java
+++ b/src/com/android/phone/SpecialCharSequenceMgr.java
@@ -108,7 +108,7 @@
             || handleRegulatoryInfoDisplay(context, dialString)
             || handlePinEntry(context, dialString, pukInputActivity)
             || handleAdnEntry(context, dialString)
-            || handleSecretCode(context, dialString)) {
+            || handleSecretCode(dialString)) {
             return true;
         }
 
@@ -143,24 +143,21 @@
     }
 
     /**
-     * Handles secret codes to launch arbitrary activities in the form of *#*#<code>#*#*.
-     * If a secret code is encountered an Intent is started with the android_secret_code://<code>
-     * URI.
+     * Handles secret codes to launch arbitrary receivers in the form of *#*#<code>#*#*.
+     * If a secret code is encountered, an broadcast intent is sent with the
+     * android_secret_code://<code> URI.
      *
-     * @param context the context to use
      * @param input the text to check for a secret code in
-     * @return true if a secret code was encountered
+     * @return true if a secret code was encountered and intent is sent out
      */
-    static private boolean handleSecretCode(Context context, String input) {
+    static private boolean handleSecretCode(String input) {
         // Secret codes are in the form *#*#<code>#*#*
         int len = input.length();
         if (len > 8 && input.startsWith("*#*#") && input.endsWith("#*#*")) {
-            Intent intent = new Intent(TelephonyIntents.SECRET_CODE_ACTION,
-                    Uri.parse("android_secret_code://" + input.substring(4, len - 4)));
-            context.sendBroadcast(intent);
+            final Phone phone = PhoneGlobals.getPhone();
+            phone.sendDialerSpecialCode(input.substring(4, len - 4));
             return true;
         }
-
         return false;
     }
 
diff --git a/src/com/android/phone/VoicemailStatus.java b/src/com/android/phone/VoicemailStatus.java
deleted file mode 100644
index 00130f1..0000000
--- a/src/com/android/phone/VoicemailStatus.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone;
-
-import android.annotation.Nullable;
-import android.content.ContentResolver;
-import android.content.ContentValues;
-import android.content.Context;
-import android.net.Uri;
-import android.provider.VoicemailContract;
-import android.provider.VoicemailContract.Status;
-import android.telecom.PhoneAccountHandle;
-import com.android.phone.vvm.omtp.VvmLog;
-
-public class VoicemailStatus {
-
-    private static final String TAG = "VvmStatus";
-
-    public static class Editor {
-
-        private final Context mContext;
-        @Nullable
-        private final PhoneAccountHandle mPhoneAccountHandle;
-
-        private ContentValues mValues = new ContentValues();
-
-        private Editor(Context context, PhoneAccountHandle phoneAccountHandle) {
-            mContext = context;
-            mPhoneAccountHandle = phoneAccountHandle;
-            if (mPhoneAccountHandle == null) {
-                VvmLog.w(TAG, "VoicemailStatus.Editor created with null phone account, status will"
-                        + " not be written");
-            }
-        }
-
-        @Nullable
-        public PhoneAccountHandle getPhoneAccountHandle() {
-            return mPhoneAccountHandle;
-        }
-
-        public Editor setType(String type) {
-            mValues.put(Status.SOURCE_TYPE, type);
-            return this;
-        }
-
-        public Editor setConfigurationState(int configurationState) {
-            mValues.put(Status.CONFIGURATION_STATE, configurationState);
-            return this;
-        }
-
-        public Editor setDataChannelState(int dataChannelState) {
-            mValues.put(Status.DATA_CHANNEL_STATE, dataChannelState);
-            return this;
-        }
-
-        public Editor setNotificationChannelState(int notificationChannelState) {
-            mValues.put(Status.NOTIFICATION_CHANNEL_STATE, notificationChannelState);
-            return this;
-        }
-
-        public Editor setQuota(int occupied, int total) {
-            if (occupied == VoicemailContract.Status.QUOTA_UNAVAILABLE
-                    && total == VoicemailContract.Status.QUOTA_UNAVAILABLE) {
-                return this;
-            }
-
-            mValues.put(Status.QUOTA_OCCUPIED, occupied);
-            mValues.put(Status.QUOTA_TOTAL, total);
-            return this;
-        }
-
-        /**
-         * Apply the changes to the {@link VoicemailStatus} {@link #Editor}.
-         *
-         * @return {@code true} if the changes were successfully applied, {@code false} otherwise.
-         */
-        public boolean apply() {
-            if (mPhoneAccountHandle == null) {
-                return false;
-            }
-            mValues.put(Status.PHONE_ACCOUNT_COMPONENT_NAME,
-                    mPhoneAccountHandle.getComponentName().flattenToString());
-            mValues.put(Status.PHONE_ACCOUNT_ID, mPhoneAccountHandle.getId());
-            ContentResolver contentResolver = mContext.getContentResolver();
-            Uri statusUri = VoicemailContract.Status.buildSourceUri(mContext.getPackageName());
-            try {
-                contentResolver.insert(statusUri, mValues);
-            } catch (IllegalArgumentException iae) {
-                VvmLog.e(TAG, "apply :: failed to insert content resolver ", iae);
-                mValues.clear();
-                return false;
-            }
-            mValues.clear();
-            return true;
-        }
-
-        public ContentValues getValues() {
-            return mValues;
-        }
-    }
-
-    /**
-     * A voicemail status editor that the decision of whether to actually write to the database can
-     * be deferred. This object will be passed around as a usual {@link Editor}, but {@link
-     * #apply()} doesn't do anything. If later the creator of this object decides any status changes
-     * written to it should be committed, {@link #deferredApply()} should be called.
-     */
-    public static class DeferredEditor extends Editor {
-
-        private DeferredEditor(Context context, PhoneAccountHandle phoneAccountHandle) {
-            super(context, phoneAccountHandle);
-        }
-
-        @Override
-        public boolean apply() {
-            // Do nothing
-            return true;
-        }
-
-        public void deferredApply() {
-            super.apply();
-        }
-    }
-
-    public static Editor edit(Context context, PhoneAccountHandle phoneAccountHandle) {
-        return new Editor(context, phoneAccountHandle);
-    }
-
-    /**
-     * Reset the status to the "disabled" state, which the UI should not show anything for this
-     * subId.
-     */
-    public static void disable(Context context, PhoneAccountHandle phoneAccountHandle) {
-        edit(context, phoneAccountHandle)
-                .setConfigurationState(Status.CONFIGURATION_STATE_NOT_CONFIGURED)
-                .setDataChannelState(Status.DATA_CHANNEL_STATE_NO_CONNECTION)
-                .setNotificationChannelState(Status.NOTIFICATION_CHANNEL_STATE_NO_CONNECTION)
-                .apply();
-    }
-
-    public static DeferredEditor deferredEdit(Context context,
-            PhoneAccountHandle phoneAccountHandle) {
-        return new DeferredEditor(context, phoneAccountHandle);
-    }
-}
diff --git a/src/com/android/phone/common/mail/Address.java b/src/com/android/phone/common/mail/Address.java
deleted file mode 100644
index 5928b63..0000000
--- a/src/com/android/phone/common/mail/Address.java
+++ /dev/null
@@ -1,544 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.text.Html;
-import android.text.TextUtils;
-import android.text.util.Rfc822Token;
-import android.text.util.Rfc822Tokenizer;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.phone.common.mail.utils.LogUtils;
-
-import org.apache.james.mime4j.codec.EncoderUtil;
-import org.apache.james.mime4j.decoder.DecoderUtil;
-
-import java.util.ArrayList;
-import java.util.regex.Pattern;
-
-/**
- * This class represent email address.
- *
- * RFC822 email address may have following format.
- *   "name" <address> (comment)
- *   "name" <address>
- *   name <address>
- *   address
- * Name and comment part should be MIME/base64 encoded in header if necessary.
- *
- */
-public class Address implements Parcelable {
-    public static final String ADDRESS_DELIMETER = ",";
-    /**
-     *  Address part, in the form local_part@domain_part. No surrounding angle brackets.
-     */
-    private String mAddress;
-
-    /**
-     * Name part. No surrounding double quote, and no MIME/base64 encoding.
-     * This must be null if Address has no name part.
-     */
-    private String mPersonal;
-
-    /**
-     * When personal is set, it will return the first token of the personal
-     * string. Otherwise, it will return the e-mail address up to the '@' sign.
-     */
-    private String mSimplifiedName;
-
-    // Regex that matches address surrounded by '<>' optionally. '^<?([^>]+)>?$'
-    private static final Pattern REMOVE_OPTIONAL_BRACKET = Pattern.compile("^<?([^>]+)>?$");
-    // Regex that matches personal name surrounded by '""' optionally. '^"?([^"]+)"?$'
-    private static final Pattern REMOVE_OPTIONAL_DQUOTE = Pattern.compile("^\"?([^\"]*)\"?$");
-    // Regex that matches escaped character '\\([\\"])'
-    private static final Pattern UNQUOTE = Pattern.compile("\\\\([\\\\\"])");
-
-    // TODO: LOCAL_PART and DOMAIN_PART_PART are too permissive and can be improved.
-    // TODO: Fix this to better constrain comments.
-    /** Regex for the local part of an email address. */
-    private static final String LOCAL_PART = "[^@]+";
-    /** Regex for each part of the domain part, i.e. the thing between the dots. */
-    private static final String DOMAIN_PART_PART = "[[\\w][\\d]\\-\\(\\)\\[\\]]+";
-    /** Regex for the domain part, which is two or more {@link #DOMAIN_PART_PART} separated by . */
-    private static final String DOMAIN_PART =
-            "(" + DOMAIN_PART_PART + "\\.)+" + DOMAIN_PART_PART;
-
-    /** Pattern to check if an email address is valid. */
-    private static final Pattern EMAIL_ADDRESS =
-            Pattern.compile("\\A" + LOCAL_PART + "@" + DOMAIN_PART + "\\z");
-
-    private static final Address[] EMPTY_ADDRESS_ARRAY = new Address[0];
-
-    // delimiters are chars that do not appear in an email address, used by fromHeader
-    private static final char LIST_DELIMITER_EMAIL = '\1';
-    private static final char LIST_DELIMITER_PERSONAL = '\2';
-
-    private static final String LOG_TAG = "Email Address";
-
-    @VisibleForTesting
-    public Address(String address) {
-        setAddress(address);
-    }
-
-    public Address(String address, String personal) {
-        setPersonal(personal);
-        setAddress(address);
-    }
-
-    /**
-     * Returns a simplified string for this e-mail address.
-     * When a name is known, it will return the first token of that name. Otherwise, it will
-     * return the e-mail address up to the '@' sign.
-     */
-    public String getSimplifiedName() {
-        if (mSimplifiedName == null) {
-            if (TextUtils.isEmpty(mPersonal) && !TextUtils.isEmpty(mAddress)) {
-                int atSign = mAddress.indexOf('@');
-                mSimplifiedName = (atSign != -1) ? mAddress.substring(0, atSign) : "";
-            } else if (!TextUtils.isEmpty(mPersonal)) {
-
-                // TODO: use Contacts' NameSplitter for more reliable first-name extraction
-
-                int end = mPersonal.indexOf(' ');
-                while (end > 0 && mPersonal.charAt(end - 1) == ',') {
-                    end--;
-                }
-                mSimplifiedName = (end < 1) ? mPersonal : mPersonal.substring(0, end);
-
-            } else {
-                LogUtils.w(LOG_TAG, "Unable to get a simplified name");
-                mSimplifiedName = "";
-            }
-        }
-        return mSimplifiedName;
-    }
-
-    public static synchronized Address getEmailAddress(String rawAddress) {
-        if (TextUtils.isEmpty(rawAddress)) {
-            return null;
-        }
-        String name, address;
-        final Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(rawAddress);
-        if (tokens.length > 0) {
-            final String tokenizedName = tokens[0].getName();
-            name = tokenizedName != null ? Html.fromHtml(tokenizedName.trim()).toString()
-                    : "";
-            address = Html.fromHtml(tokens[0].getAddress()).toString();
-        } else {
-            name = "";
-            address = rawAddress == null ?
-                    "" : Html.fromHtml(rawAddress).toString();
-        }
-        return new Address(address, name);
-    }
-
-    public String getAddress() {
-        return mAddress;
-    }
-
-    public void setAddress(String address) {
-        mAddress = REMOVE_OPTIONAL_BRACKET.matcher(address).replaceAll("$1");
-    }
-
-    /**
-     * Get name part as UTF-16 string. No surrounding double quote, and no MIME/base64 encoding.
-     *
-     * @return Name part of email address. Returns null if it is omitted.
-     */
-    public String getPersonal() {
-        return mPersonal;
-    }
-
-    /**
-     * Set personal part from UTF-16 string. Optional surrounding double quote will be removed.
-     * It will be also unquoted and MIME/base64 decoded.
-     *
-     * @param personal name part of email address as UTF-16 string. Null is acceptable.
-     */
-    public void setPersonal(String personal) {
-        mPersonal = decodeAddressPersonal(personal);
-    }
-
-    /**
-     * Decodes name from UTF-16 string. Optional surrounding double quote will be removed.
-     * It will be also unquoted and MIME/base64 decoded.
-     *
-     * @param personal name part of email address as UTF-16 string. Null is acceptable.
-     */
-    public static String decodeAddressPersonal(String personal) {
-        if (personal != null) {
-            personal = REMOVE_OPTIONAL_DQUOTE.matcher(personal).replaceAll("$1");
-            personal = UNQUOTE.matcher(personal).replaceAll("$1");
-            personal = DecoderUtil.decodeEncodedWords(personal);
-            if (personal.length() == 0) {
-                personal = null;
-            }
-        }
-        return personal;
-    }
-
-    /**
-     * This method is used to check that all the addresses that the user
-     * entered in a list (e.g. To:) are valid, so that none is dropped.
-     */
-    @VisibleForTesting
-    public static boolean isAllValid(String addressList) {
-        // This code mimics the parse() method below.
-        // I don't know how to better avoid the code-duplication.
-        if (addressList != null && addressList.length() > 0) {
-            Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(addressList);
-            for (int i = 0, length = tokens.length; i < length; ++i) {
-                Rfc822Token token = tokens[i];
-                String address = token.getAddress();
-                if (!TextUtils.isEmpty(address) && !isValidAddress(address)) {
-                    return false;
-                }
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Parse a comma-delimited list of addresses in RFC822 format and return an
-     * array of Address objects.
-     *
-     * @param addressList Address list in comma-delimited string.
-     * @return An array of 0 or more Addresses.
-     */
-    public static Address[] parse(String addressList) {
-        if (addressList == null || addressList.length() == 0) {
-            return EMPTY_ADDRESS_ARRAY;
-        }
-        Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(addressList);
-        ArrayList<Address> addresses = new ArrayList<Address>();
-        for (int i = 0, length = tokens.length; i < length; ++i) {
-            Rfc822Token token = tokens[i];
-            String address = token.getAddress();
-            if (!TextUtils.isEmpty(address)) {
-                if (isValidAddress(address)) {
-                    String name = token.getName();
-                    if (TextUtils.isEmpty(name)) {
-                        name = null;
-                    }
-                    addresses.add(new Address(address, name));
-                }
-            }
-        }
-        return addresses.toArray(new Address[addresses.size()]);
-    }
-
-    /**
-     * Checks whether a string email address is valid.
-     * E.g. name@domain.com is valid.
-     */
-    @VisibleForTesting
-    static boolean isValidAddress(final String address) {
-        return EMAIL_ADDRESS.matcher(address).find();
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (o instanceof Address) {
-            // It seems that the spec says that the "user" part is case-sensitive,
-            // while the domain part in case-insesitive.
-            // So foo@yahoo.com and Foo@yahoo.com are different.
-            // This may seem non-intuitive from the user POV, so we
-            // may re-consider it if it creates UI trouble.
-            // A problem case is "replyAll" sending to both
-            // a@b.c and to A@b.c, which turn out to be the same on the server.
-            // Leave unchanged for now (i.e. case-sensitive).
-            return getAddress().equals(((Address) o).getAddress());
-        }
-        return super.equals(o);
-    }
-
-    @Override
-    public int hashCode() {
-        return getAddress().hashCode();
-    }
-
-    /**
-     * Get human readable address string.
-     * Do not use this for email header.
-     *
-     * @return Human readable address string.  Not quoted and not encoded.
-     */
-    @Override
-    public String toString() {
-        if (mPersonal != null && !mPersonal.equals(mAddress)) {
-            if (mPersonal.matches(".*[\\(\\)<>@,;:\\\\\".\\[\\]].*")) {
-                return ensureQuotedString(mPersonal) + " <" + mAddress + ">";
-            } else {
-                return mPersonal + " <" + mAddress + ">";
-            }
-        } else {
-            return mAddress;
-        }
-    }
-
-    /**
-     * Ensures that the given string starts and ends with the double quote character. The string is
-     * not modified in any way except to add the double quote character to start and end if it's not
-     * already there.
-     *
-     * sample -> "sample"
-     * "sample" -> "sample"
-     * ""sample"" -> "sample"
-     * "sample"" -> "sample"
-     * sa"mp"le -> "sa"mp"le"
-     * "sa"mp"le" -> "sa"mp"le"
-     * (empty string) -> ""
-     * " -> ""
-     */
-    private static String ensureQuotedString(String s) {
-        if (s == null) {
-            return null;
-        }
-        if (!s.matches("^\".*\"$")) {
-            return "\"" + s + "\"";
-        } else {
-            return s;
-        }
-    }
-
-    /**
-     * Get human readable comma-delimited address string.
-     *
-     * @param addresses Address array
-     * @return Human readable comma-delimited address string.
-     */
-    @VisibleForTesting
-    public static String toString(Address[] addresses) {
-        return toString(addresses, ADDRESS_DELIMETER);
-    }
-
-    /**
-     * Get human readable address strings joined with the specified separator.
-     *
-     * @param addresses Address array
-     * @param separator Separator
-     * @return Human readable comma-delimited address string.
-     */
-    public static String toString(Address[] addresses, String separator) {
-        if (addresses == null || addresses.length == 0) {
-            return null;
-        }
-        if (addresses.length == 1) {
-            return addresses[0].toString();
-        }
-        StringBuilder sb = new StringBuilder(addresses[0].toString());
-        for (int i = 1; i < addresses.length; i++) {
-            sb.append(separator);
-            // TODO: investigate why this .trim() is needed.
-            sb.append(addresses[i].toString().trim());
-        }
-        return sb.toString();
-    }
-
-    /**
-     * Get RFC822/MIME compatible address string.
-     *
-     * @return RFC822/MIME compatible address string.
-     * It may be surrounded by double quote or quoted and MIME/base64 encoded if necessary.
-     */
-    public String toHeader() {
-        if (mPersonal != null) {
-            return EncoderUtil.encodeAddressDisplayName(mPersonal) + " <" + mAddress + ">";
-        } else {
-            return mAddress;
-        }
-    }
-
-    /**
-     * Get RFC822/MIME compatible comma-delimited address string.
-     *
-     * @param addresses Address array
-     * @return RFC822/MIME compatible comma-delimited address string.
-     * it may be surrounded by double quoted or quoted and MIME/base64 encoded if necessary.
-     */
-    public static String toHeader(Address[] addresses) {
-        if (addresses == null || addresses.length == 0) {
-            return null;
-        }
-        if (addresses.length == 1) {
-            return addresses[0].toHeader();
-        }
-        StringBuilder sb = new StringBuilder(addresses[0].toHeader());
-        for (int i = 1; i < addresses.length; i++) {
-            // We need space character to be able to fold line.
-            sb.append(", ");
-            sb.append(addresses[i].toHeader());
-        }
-        return sb.toString();
-    }
-
-    /**
-     * Get Human friendly address string.
-     *
-     * @return the personal part of this Address, or the address part if the
-     * personal part is not available
-     */
-    @VisibleForTesting
-    public String toFriendly() {
-        if (mPersonal != null && mPersonal.length() > 0) {
-            return mPersonal;
-        } else {
-            return mAddress;
-        }
-    }
-
-    /**
-     * Creates a comma-delimited list of addresses in the "friendly" format (see toFriendly() for
-     * details on the per-address conversion).
-     *
-     * @param addresses Array of Address[] values
-     * @return A comma-delimited string listing all of the addresses supplied.  Null if source
-     * was null or empty.
-     */
-    @VisibleForTesting
-    public static String toFriendly(Address[] addresses) {
-        if (addresses == null || addresses.length == 0) {
-            return null;
-        }
-        if (addresses.length == 1) {
-            return addresses[0].toFriendly();
-        }
-        StringBuilder sb = new StringBuilder(addresses[0].toFriendly());
-        for (int i = 1; i < addresses.length; i++) {
-            sb.append(", ");
-            sb.append(addresses[i].toFriendly());
-        }
-        return sb.toString();
-    }
-
-    /**
-     * Returns exactly the same result as Address.toString(Address.fromHeader(addressList)).
-     */
-    @VisibleForTesting
-    public static String fromHeaderToString(String addressList) {
-        return toString(fromHeader(addressList));
-    }
-
-    /**
-     * Returns exactly the same result as Address.toHeader(Address.parse(addressList)).
-     */
-    @VisibleForTesting
-    public static String parseToHeader(String addressList) {
-        return Address.toHeader(Address.parse(addressList));
-    }
-
-    /**
-     * Returns null if the addressList has 0 addresses, otherwise returns the first address.
-     * The same as Address.fromHeader(addressList)[0] for non-empty list.
-     * This is an utility method that offers some performance optimization opportunities.
-     */
-    @VisibleForTesting
-    public static Address firstAddress(String addressList) {
-        Address[] array = fromHeader(addressList);
-        return array.length > 0 ? array[0] : null;
-    }
-
-    /**
-     * This method exists to convert an address list formatted in a deprecated legacy format to the
-     * standard RFC822 header format. {@link #fromHeader(String)} is capable of reading the legacy
-     * format and the RFC822 format. {@link #toHeader()} always produces the RFC822 format.
-     *
-     * This implementation is brute-force, and could be replaced with a more efficient version
-     * if desired.
-     */
-    public static String reformatToHeader(String addressList) {
-        return toHeader(fromHeader(addressList));
-    }
-
-    /**
-     * @param addressList a CSV of RFC822 addresses or the deprecated legacy string format
-     * @return array of addresses parsed from <code>addressList</code>
-     */
-    @VisibleForTesting
-    public static Address[] fromHeader(String addressList) {
-        if (addressList == null || addressList.length() == 0) {
-            return EMPTY_ADDRESS_ARRAY;
-        }
-        // IF we're CSV, just parse
-        if ((addressList.indexOf(LIST_DELIMITER_PERSONAL) == -1) &&
-                (addressList.indexOf(LIST_DELIMITER_EMAIL) == -1)) {
-            return Address.parse(addressList);
-        }
-        // Otherwise, do backward-compatible unpack
-        ArrayList<Address> addresses = new ArrayList<Address>();
-        int length = addressList.length();
-        int pairStartIndex = 0;
-        int pairEndIndex;
-
-        /* addressEndIndex is only re-scanned (indexOf()) when a LIST_DELIMITER_PERSONAL
-           is used, not for every email address; i.e. not for every iteration of the while().
-           This reduces the theoretical complexity from quadratic to linear,
-           and provides some speed-up in practice by removing redundant scans of the string.
-        */
-        int addressEndIndex = addressList.indexOf(LIST_DELIMITER_PERSONAL);
-
-        while (pairStartIndex < length) {
-            pairEndIndex = addressList.indexOf(LIST_DELIMITER_EMAIL, pairStartIndex);
-            if (pairEndIndex == -1) {
-                pairEndIndex = length;
-            }
-            Address address;
-            if (addressEndIndex == -1 || pairEndIndex <= addressEndIndex) {
-                // in this case the DELIMITER_PERSONAL is in a future pair,
-                // so don't use personal, and don't update addressEndIndex
-                address = new Address(addressList.substring(pairStartIndex, pairEndIndex), null);
-            } else {
-                address = new Address(addressList.substring(pairStartIndex, addressEndIndex),
-                        addressList.substring(addressEndIndex + 1, pairEndIndex));
-                // only update addressEndIndex when we use the LIST_DELIMITER_PERSONAL
-                addressEndIndex = addressList.indexOf(LIST_DELIMITER_PERSONAL, pairEndIndex + 1);
-            }
-            addresses.add(address);
-            pairStartIndex = pairEndIndex + 1;
-        }
-        return addresses.toArray(new Address[addresses.size()]);
-    }
-
-    public static final Creator<Address> CREATOR = new Creator<Address>() {
-        @Override
-        public Address createFromParcel(Parcel parcel) {
-            return new Address(parcel);
-        }
-
-        @Override
-        public Address[] newArray(int size) {
-            return new Address[size];
-        }
-    };
-
-    public Address(Parcel in) {
-        setPersonal(in.readString());
-        setAddress(in.readString());
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel out, int flags) {
-        out.writeString(mPersonal);
-        out.writeString(mAddress);
-    }
-}
diff --git a/src/com/android/phone/common/mail/AuthenticationFailedException.java b/src/com/android/phone/common/mail/AuthenticationFailedException.java
deleted file mode 100644
index f13ab45..0000000
--- a/src/com/android/phone/common/mail/AuthenticationFailedException.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail;
-
-public class AuthenticationFailedException extends MessagingException {
-    public static final long serialVersionUID = -1;
-
-    public AuthenticationFailedException(String message) {
-        super(MessagingException.AUTHENTICATION_FAILED, message);
-    }
-
-    public AuthenticationFailedException(int exceptionType, String message) {
-        super(exceptionType, message);
-    }
-
-    public AuthenticationFailedException(String message, Throwable throwable) {
-        super(MessagingException.AUTHENTICATION_FAILED, message, throwable);
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/Base64Body.java b/src/com/android/phone/common/mail/Base64Body.java
deleted file mode 100644
index 757b4b7..0000000
--- a/src/com/android/phone/common/mail/Base64Body.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail;
-
-import android.util.Base64;
-import android.util.Base64OutputStream;
-
-import org.apache.commons.io.IOUtils;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public class Base64Body implements Body {
-    private final InputStream mSource;
-    // Because we consume the input stream, we can only write out once
-    private boolean mAlreadyWritten;
-
-    public Base64Body(InputStream source) {
-        mSource = source;
-    }
-
-    @Override
-    public InputStream getInputStream() throws MessagingException {
-        return mSource;
-    }
-
-    /**
-     * This method consumes the input stream, so can only be called once
-     * @param out Stream to write to
-     * @throws IllegalStateException If called more than once
-     * @throws IOException
-     * @throws MessagingException
-     */
-    @Override
-    public void writeTo(OutputStream out)
-            throws IllegalStateException, IOException, MessagingException {
-        if (mAlreadyWritten) {
-            throw new IllegalStateException("Base64Body can only be written once");
-        }
-        mAlreadyWritten = true;
-        try {
-            final Base64OutputStream b64out = new Base64OutputStream(out, Base64.DEFAULT);
-            IOUtils.copyLarge(mSource, b64out);
-        } finally {
-            mSource.close();
-        }
-    }
-}
diff --git a/src/com/android/phone/common/mail/Body.java b/src/com/android/phone/common/mail/Body.java
deleted file mode 100644
index 8625ef2..0000000
--- a/src/com/android/phone/common/mail/Body.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public interface Body {
-    public InputStream getInputStream() throws MessagingException;
-    public void writeTo(OutputStream out) throws IOException, MessagingException;
-}
diff --git a/src/com/android/phone/common/mail/BodyPart.java b/src/com/android/phone/common/mail/BodyPart.java
deleted file mode 100644
index 78140c8..0000000
--- a/src/com/android/phone/common/mail/BodyPart.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*

- * Copyright (C) 2015 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.phone.common.mail;

-

-public abstract class BodyPart implements Part {

-    protected Multipart mParent;

-

-    public Multipart getParent() {

-        return mParent;

-    }

-}

diff --git a/src/com/android/phone/common/mail/CertificateValidationException.java b/src/com/android/phone/common/mail/CertificateValidationException.java
deleted file mode 100644
index d8ae9b4..0000000
--- a/src/com/android/phone/common/mail/CertificateValidationException.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail;
-
-public class CertificateValidationException extends MessagingException {
-    public static final long serialVersionUID = -1;
-
-    public CertificateValidationException(String message) {
-        super(MessagingException.CERTIFICATE_VALIDATION_ERROR, message);
-    }
-
-    public CertificateValidationException(String message, Throwable throwable) {
-        super(MessagingException.CERTIFICATE_VALIDATION_ERROR, message, throwable);
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/FetchProfile.java b/src/com/android/phone/common/mail/FetchProfile.java
deleted file mode 100644
index d88dc7c..0000000
--- a/src/com/android/phone/common/mail/FetchProfile.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*

- * Copyright (C) 2015 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.phone.common.mail;

-

-import java.util.ArrayList;

-

-/**

- * <pre>

- * A FetchProfile is a list of items that should be downloaded in bulk for a set of messages.

- * FetchProfile can contain the following objects:

- *      FetchProfile.Item:      Described below.

- *      Message:                Indicates that the body of the entire message should be fetched.

- *                              Synonymous with FetchProfile.Item.BODY.

- *      Part:                   Indicates that the given Part should be fetched. The provider

- *                              is expected have previously created the given BodyPart and stored

- *                              any information it needs to download the content.

- * </pre>

- */

-public class FetchProfile extends ArrayList<Fetchable> {

-    /**

-     * Default items available for pre-fetching. It should be expected that any

-     * item fetched by using these items could potentially include all of the

-     * previous items.

-     */

-    public enum Item implements Fetchable {

-        /**

-         * Download the flags of the message.

-         */

-        FLAGS,

-

-        /**

-         * Download the envelope of the message. This should include at minimum

-         * the size and the following headers: date, subject, from, content-type, to, cc

-         */

-        ENVELOPE,

-

-        /**

-         * Download the structure of the message. This maps directly to IMAP's BODYSTRUCTURE

-         * and may map to other providers.

-         * The provider should, if possible, fill in a properly formatted MIME structure in

-         * the message without actually downloading any message data. If the provider is not

-         * capable of this operation it should specifically set the body of the message to null

-         * so that upper levels can detect that a full body download is needed.

-         */

-        STRUCTURE,

-

-        /**

-         * A sane portion of the entire message, cut off at a provider determined limit.

-         * This should generally be around 50kB.

-         */

-        BODY_SANE,

-

-        /**

-         * The entire message.

-         */

-        BODY,

-    }

-

-    /**

-     * @return the first {@link Part} in this collection, or null if it doesn't contain

-     * {@link Part}.

-     */

-    public Part getFirstPart() {

-        for (Fetchable o : this) {

-            if (o instanceof Part) {

-                return (Part) o;

-            }

-        }

-        return null;

-    }

-}

diff --git a/src/com/android/phone/common/mail/Fetchable.java b/src/com/android/phone/common/mail/Fetchable.java
deleted file mode 100644
index 829c672..0000000
--- a/src/com/android/phone/common/mail/Fetchable.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail;
-
-/**
- * Interface for classes that can be added to {@link FetchProfile}.
- * i.e. {@link Part} and its subclasses, and {@link FetchProfile.Item}.
- */
-public interface Fetchable {
-}
diff --git a/src/com/android/phone/common/mail/FixedLengthInputStream.java b/src/com/android/phone/common/mail/FixedLengthInputStream.java
deleted file mode 100644
index 499feca..0000000
--- a/src/com/android/phone/common/mail/FixedLengthInputStream.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * A filtering InputStream that stops allowing reads after the given length has been read. This
- * is used to allow a client to read directly from an underlying protocol stream without reading
- * past where the protocol handler intended the client to read.
- */
-public class FixedLengthInputStream extends InputStream {
-    private final InputStream mIn;
-    private final int mLength;
-    private int mCount;
-
-    public FixedLengthInputStream(InputStream in, int length) {
-        this.mIn = in;
-        this.mLength = length;
-    }
-
-    @Override
-    public int available() throws IOException {
-        return mLength - mCount;
-    }
-
-    @Override
-    public int read() throws IOException {
-        if (mCount < mLength) {
-            mCount++;
-            return mIn.read();
-        } else {
-            return -1;
-        }
-    }
-
-    @Override
-    public int read(byte[] b, int offset, int length) throws IOException {
-        if (mCount < mLength) {
-            int d = mIn.read(b, offset, Math.min(mLength - mCount, length));
-            if (d == -1) {
-                return -1;
-            } else {
-                mCount += d;
-                return d;
-            }
-        } else {
-            return -1;
-        }
-    }
-
-    @Override
-    public int read(byte[] b) throws IOException {
-        return read(b, 0, b.length);
-    }
-
-    public int getLength() {
-        return mLength;
-    }
-
-    @Override
-    public String toString() {
-        return String.format("FixedLengthInputStream(in=%s, length=%d)", mIn.toString(), mLength);
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/Flag.java b/src/com/android/phone/common/mail/Flag.java
deleted file mode 100644
index aa5d7e9..0000000
--- a/src/com/android/phone/common/mail/Flag.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail;
-
-/**
- * Flags that can be applied to Messages.
- */
-public class Flag {
-    // If adding new flags: ALL FLAGS MUST BE UPPER CASE.
-    public static final String DELETED = "deleted";
-    public static final String SEEN = "seen";
-    public static final String ANSWERED = "answered";
-    public static final String FLAGGED = "flagged";
-    public static final String DRAFT = "draft";
-    public static final String RECENT = "recent";
-}
diff --git a/src/com/android/phone/common/mail/MailTransport.java b/src/com/android/phone/common/mail/MailTransport.java
deleted file mode 100644
index 47b273c..0000000
--- a/src/com/android/phone/common/mail/MailTransport.java
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail;
-
-import android.content.Context;
-import android.net.Network;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.phone.common.mail.store.ImapStore;
-import com.android.phone.common.mail.utils.LogUtils;
-import com.android.phone.vvm.omtp.OmtpEvents;
-import com.android.phone.vvm.omtp.imap.ImapHelper;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.HttpsURLConnection;
-import javax.net.ssl.SSLException;
-import javax.net.ssl.SSLPeerUnverifiedException;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.SSLSocket;
-
-/**
- * Make connection and perform operations on mail server by reading and writing lines.
- */
-public class MailTransport {
-    private static final String TAG = "MailTransport";
-
-    // TODO protected eventually
-    /*protected*/ public static final int SOCKET_CONNECT_TIMEOUT = 10000;
-    /*protected*/ public static final int SOCKET_READ_TIMEOUT = 60000;
-
-    private static final HostnameVerifier HOSTNAME_VERIFIER =
-            HttpsURLConnection.getDefaultHostnameVerifier();
-
-    private final Context mContext;
-    private final ImapHelper mImapHelper;
-    private final Network mNetwork;
-    private final String mHost;
-    private final int mPort;
-    private Socket mSocket;
-    private BufferedInputStream mIn;
-    private BufferedOutputStream mOut;
-    private final int mFlags;
-    private SocketCreator mSocketCreator;
-    private InetSocketAddress mAddress;
-
-    public MailTransport(Context context, ImapHelper imapHelper, Network network, String address,
-            int port, int flags) {
-        mContext = context;
-        mImapHelper = imapHelper;
-        mNetwork = network;
-        mHost = address;
-        mPort = port;
-        mFlags = flags;
-    }
-
-    /**
-     * Returns a new transport, using the current transport as a model. The new transport is
-     * configured identically, but not opened or connected in any way.
-     */
-    @Override
-    public MailTransport clone() {
-        return new MailTransport(mContext, mImapHelper, mNetwork, mHost, mPort, mFlags);
-    }
-
-    public boolean canTrySslSecurity() {
-        return (mFlags & ImapStore.FLAG_SSL) != 0;
-    }
-
-    public boolean canTrustAllCertificates() {
-        return (mFlags & ImapStore.FLAG_TRUST_ALL) != 0;
-    }
-
-    /**
-     * Attempts to open a connection using the Uri supplied for connection parameters.  Will attempt
-     * an SSL connection if indicated.
-     */
-    public void open() throws MessagingException {
-        LogUtils.d(TAG, "*** IMAP open " + mHost + ":" + String.valueOf(mPort));
-
-        List<InetSocketAddress> socketAddresses = new ArrayList<InetSocketAddress>();
-
-        if (mNetwork == null) {
-            socketAddresses.add(new InetSocketAddress(mHost, mPort));
-        } else {
-            try {
-                InetAddress[] inetAddresses = mNetwork.getAllByName(mHost);
-                if (inetAddresses.length == 0) {
-                    throw new MessagingException(MessagingException.IOERROR,
-                            "Host name " + mHost + "cannot be resolved on designated network");
-                }
-                for (int i = 0; i < inetAddresses.length; i++) {
-                    socketAddresses.add(new InetSocketAddress(inetAddresses[i], mPort));
-                }
-            } catch (IOException ioe) {
-                LogUtils.d(TAG, ioe.toString());
-                mImapHelper.handleEvent(OmtpEvents.DATA_CANNOT_RESOLVE_HOST_ON_NETWORK);
-                throw new MessagingException(MessagingException.IOERROR, ioe.toString());
-            }
-        }
-
-        boolean success = false;
-        while (socketAddresses.size() > 0) {
-            mSocket = createSocket();
-            try {
-                mAddress = socketAddresses.remove(0);
-                mSocket.connect(mAddress, SOCKET_CONNECT_TIMEOUT);
-
-                if (canTrySslSecurity()) {
-                    /*
-                    SSLSocket cannot be created with a connection timeout, so instead of doing a
-                    direct SSL connection, we connect with a normal connection and upgrade it into
-                    SSL
-                     */
-                    reopenTls();
-                } else {
-                    mIn = new BufferedInputStream(mSocket.getInputStream(), 1024);
-                    mOut = new BufferedOutputStream(mSocket.getOutputStream(), 512);
-                    mSocket.setSoTimeout(SOCKET_READ_TIMEOUT);
-                }
-                success = true;
-                return;
-            } catch (IOException ioe) {
-                LogUtils.d(TAG, ioe.toString());
-                if (socketAddresses.size() == 0) {
-                    // Only throw an error when there are no more sockets to try.
-                    mImapHelper.handleEvent(OmtpEvents.DATA_ALL_SOCKET_CONNECTION_FAILED);
-                    throw new MessagingException(MessagingException.IOERROR, ioe.toString());
-                }
-            } finally {
-                if (!success) {
-                    try {
-                        mSocket.close();
-                        mSocket = null;
-                    } catch (IOException ioe) {
-                        throw new MessagingException(MessagingException.IOERROR, ioe.toString());
-                    }
-
-                }
-            }
-        }
-    }
-
-    // For testing. We need something that can replace the behavior of "new Socket()"
-    @VisibleForTesting
-    interface SocketCreator {
-
-        Socket createSocket() throws MessagingException;
-    }
-
-    @VisibleForTesting
-    void setSocketCreator(SocketCreator creator) {
-        mSocketCreator = creator;
-    }
-
-    protected Socket createSocket() throws MessagingException {
-        if (mSocketCreator != null) {
-            return mSocketCreator.createSocket();
-        }
-
-        if (mNetwork == null) {
-            LogUtils.v(TAG, "createSocket: network not specified");
-            return new Socket();
-        }
-
-        try {
-            LogUtils.v(TAG, "createSocket: network specified");
-            return mNetwork.getSocketFactory().createSocket();
-        } catch (IOException ioe) {
-            LogUtils.d(TAG, ioe.toString());
-            throw new MessagingException(MessagingException.IOERROR, ioe.toString());
-        }
-    }
-
-    /**
-     * Attempts to reopen a normal connection into a TLS connection.
-     */
-    public void reopenTls() throws MessagingException {
-        try {
-            LogUtils.d(TAG, "open: converting to TLS socket");
-            mSocket = HttpsURLConnection.getDefaultSSLSocketFactory()
-                    .createSocket(mSocket, mAddress.getHostName(), mAddress.getPort(), true);
-            // After the socket connects to an SSL server, confirm that the hostname is as
-            // expected
-            if (!canTrustAllCertificates()) {
-                verifyHostname(mSocket, mHost);
-            }
-            mSocket.setSoTimeout(SOCKET_READ_TIMEOUT);
-            mIn = new BufferedInputStream(mSocket.getInputStream(), 1024);
-            mOut = new BufferedOutputStream(mSocket.getOutputStream(), 512);
-
-        } catch (SSLException e) {
-            LogUtils.d(TAG, e.toString());
-            throw new CertificateValidationException(e.getMessage(), e);
-        } catch (IOException ioe) {
-            LogUtils.d(TAG, ioe.toString());
-            throw new MessagingException(MessagingException.IOERROR, ioe.toString());
-        }
-    }
-
-    /**
-     * Lightweight version of SSLCertificateSocketFactory.verifyHostname, which provides this
-     * service but is not in the public API.
-     *
-     * Verify the hostname of the certificate used by the other end of a
-     * connected socket. It is harmless to call this method redundantly if the hostname has already
-     * been verified.
-     *
-     * <p>Wildcard certificates are allowed to verify any matching hostname,
-     * so "foo.bar.example.com" is verified if the peer has a certificate
-     * for "*.example.com".
-     *
-     * @param socket An SSL socket which has been connected to a server
-     * @param hostname The expected hostname of the remote server
-     * @throws IOException if something goes wrong handshaking with the server
-     * @throws SSLPeerUnverifiedException if the server cannot prove its identity
-      */
-    private void verifyHostname(Socket socket, String hostname) throws IOException {
-        // The code at the start of OpenSSLSocketImpl.startHandshake()
-        // ensures that the call is idempotent, so we can safely call it.
-        SSLSocket ssl = (SSLSocket) socket;
-        ssl.startHandshake();
-
-        SSLSession session = ssl.getSession();
-        if (session == null) {
-            mImapHelper.handleEvent(OmtpEvents.DATA_CANNOT_ESTABLISH_SSL_SESSION);
-            throw new SSLException("Cannot verify SSL socket without session");
-        }
-        // TODO: Instead of reporting the name of the server we think we're connecting to,
-        // we should be reporting the bad name in the certificate.  Unfortunately this is buried
-        // in the verifier code and is not available in the verifier API, and extracting the
-        // CN & alts is beyond the scope of this patch.
-        if (!HOSTNAME_VERIFIER.verify(hostname, session)) {
-            mImapHelper.handleEvent(OmtpEvents.DATA_SSL_INVALID_HOST_NAME);
-            throw new SSLPeerUnverifiedException("Certificate hostname not useable for server: "
-                    + session.getPeerPrincipal());
-        }
-    }
-
-    public boolean isOpen() {
-        return (mIn != null && mOut != null &&
-                mSocket != null && mSocket.isConnected() && !mSocket.isClosed());
-    }
-
-    /**
-     * Close the connection.  MUST NOT return any exceptions - must be "best effort" and safe.
-     */
-    public void close() {
-        try {
-            mIn.close();
-        } catch (Exception e) {
-            // May fail if the connection is already closed.
-        }
-        try {
-            mOut.close();
-        } catch (Exception e) {
-            // May fail if the connection is already closed.
-        }
-        try {
-            mSocket.close();
-        } catch (Exception e) {
-            // May fail if the connection is already closed.
-        }
-        mIn = null;
-        mOut = null;
-        mSocket = null;
-    }
-
-    public String getHost() {
-        return mHost;
-    }
-
-    public InputStream getInputStream() {
-        return mIn;
-    }
-
-    public OutputStream getOutputStream() {
-        return mOut;
-    }
-
-    /**
-     * Writes a single line to the server using \r\n termination.
-     */
-    public void writeLine(String s, String sensitiveReplacement) throws IOException {
-        if (sensitiveReplacement != null) {
-            LogUtils.d(TAG, ">>> " + sensitiveReplacement);
-        } else {
-            LogUtils.d(TAG, ">>> " + s);
-        }
-
-        OutputStream out = getOutputStream();
-        out.write(s.getBytes());
-        out.write('\r');
-        out.write('\n');
-        out.flush();
-    }
-
-    /**
-     * Reads a single line from the server, using either \r\n or \n as the delimiter.  The
-     * delimiter char(s) are not included in the result.
-     */
-    public String readLine(boolean loggable) throws IOException {
-        StringBuffer sb = new StringBuffer();
-        InputStream in = getInputStream();
-        int d;
-        while ((d = in.read()) != -1) {
-            if (((char)d) == '\r') {
-                continue;
-            } else if (((char)d) == '\n') {
-                break;
-            } else {
-                sb.append((char)d);
-            }
-        }
-        if (d == -1) {
-            LogUtils.d(TAG, "End of stream reached while trying to read line.");
-        }
-        String ret = sb.toString();
-        if (loggable) {
-            LogUtils.d(TAG, "<<< " + ret);
-        }
-        return ret;
-    }
-}
diff --git a/src/com/android/phone/common/mail/MeetingInfo.java b/src/com/android/phone/common/mail/MeetingInfo.java
deleted file mode 100644
index 9fbafe7..0000000
--- a/src/com/android/phone/common/mail/MeetingInfo.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail;
-
-public class MeetingInfo {
-    // Predefined tags; others can be added
-    public static final String MEETING_DTSTAMP = "DTSTAMP";
-    public static final String MEETING_UID = "UID";
-    public static final String MEETING_ORGANIZER_EMAIL = "ORGMAIL";
-    public static final String MEETING_DTSTART = "DTSTART";
-    public static final String MEETING_DTEND = "DTEND";
-    public static final String MEETING_TITLE = "TITLE";
-    public static final String MEETING_LOCATION = "LOC";
-    public static final String MEETING_RESPONSE_REQUESTED = "RESPONSE";
-    public static final String MEETING_ALL_DAY = "ALLDAY";
-}
diff --git a/src/com/android/phone/common/mail/Message.java b/src/com/android/phone/common/mail/Message.java
deleted file mode 100644
index 0a5ed35..0000000
--- a/src/com/android/phone/common/mail/Message.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail;
-
-import com.android.internal.annotations.VisibleForTesting;
-
-import java.util.Date;
-import java.util.HashSet;
-
-public abstract class Message implements Part, Body {
-    public static final Message[] EMPTY_ARRAY = new Message[0];
-
-    public static final String RECIPIENT_TYPE_TO = "to";
-    public static final String RECIPIENT_TYPE_CC = "cc";
-    public static final String RECIPIENT_TYPE_BCC = "bcc";
-    public enum RecipientType {
-        TO, CC, BCC,
-    }
-
-    protected String mUid;
-
-    private HashSet<String> mFlags = null;
-
-    protected Date mInternalDate;
-
-    public String getUid() {
-        return mUid;
-    }
-
-    public void setUid(String uid) {
-        this.mUid = uid;
-    }
-
-    public abstract String getSubject() throws MessagingException;
-
-    public abstract void setSubject(String subject) throws MessagingException;
-
-    public Date getInternalDate() {
-        return mInternalDate;
-    }
-
-    public void setInternalDate(Date internalDate) {
-        this.mInternalDate = internalDate;
-    }
-
-    public abstract Date getReceivedDate() throws MessagingException;
-
-    public abstract Date getSentDate() throws MessagingException;
-
-    public abstract void setSentDate(Date sentDate) throws MessagingException;
-
-    public abstract Address[] getRecipients(String type) throws MessagingException;
-
-    public abstract void setRecipients(String type, Address[] addresses)
-            throws MessagingException;
-
-    public void setRecipient(String type, Address address) throws MessagingException {
-        setRecipients(type, new Address[] {
-            address
-        });
-    }
-
-    public abstract Address[] getFrom() throws MessagingException;
-
-    public abstract void setFrom(Address from) throws MessagingException;
-
-    public abstract Address[] getReplyTo() throws MessagingException;
-
-    public abstract void setReplyTo(Address[] from) throws MessagingException;
-
-    // Always use these instead of getHeader("Message-ID") or setHeader("Message-ID");
-    public abstract void setMessageId(String messageId) throws MessagingException;
-    public abstract String getMessageId() throws MessagingException;
-
-    @Override
-    public boolean isMimeType(String mimeType) throws MessagingException {
-        return getContentType().startsWith(mimeType);
-    }
-
-    private HashSet<String> getFlagSet() {
-        if (mFlags == null) {
-            mFlags = new HashSet<String>();
-        }
-        return mFlags;
-    }
-
-    /*
-     * TODO Refactor Flags at some point to be able to store user defined flags.
-     */
-    public String[] getFlags() {
-        return getFlagSet().toArray(new String[] {});
-    }
-
-    /**
-     * Set/clear a flag directly, without involving overrides of {@link #setFlag} in subclasses.
-     * Only used for testing.
-     */
-    @VisibleForTesting
-    private final void setFlagDirectlyForTest(String flag, boolean set) throws MessagingException {
-        if (set) {
-            getFlagSet().add(flag);
-        } else {
-            getFlagSet().remove(flag);
-        }
-    }
-
-    public void setFlag(String flag, boolean set) throws MessagingException {
-        setFlagDirectlyForTest(flag, set);
-    }
-
-    /**
-     * This method calls setFlag(String, boolean)
-     * @param flags
-     * @param set
-     */
-    public void setFlags(String[] flags, boolean set) throws MessagingException {
-        for (String flag : flags) {
-            setFlag(flag, set);
-        }
-    }
-
-    public boolean isSet(String flag) {
-        return getFlagSet().contains(flag);
-    }
-
-    public abstract void saveChanges() throws MessagingException;
-
-    @Override
-    public String toString() {
-        return getClass().getSimpleName() + ':' + mUid;
-    }
-}
diff --git a/src/com/android/phone/common/mail/MessageDateComparator.java b/src/com/android/phone/common/mail/MessageDateComparator.java
deleted file mode 100644
index 5d8baa7..0000000
--- a/src/com/android/phone/common/mail/MessageDateComparator.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail;
-
-import java.util.Comparator;
-
-public class MessageDateComparator implements Comparator<Message> {
-    @Override
-    public int compare(Message o1, Message o2) {
-        try {
-            if (o1.getSentDate() == null) {
-                return 1;
-            } else if (o2.getSentDate() == null) {
-                return -1;
-            } else
-                return o2.getSentDate().compareTo(o1.getSentDate());
-        } catch (Exception e) {
-            return 0;
-        }
-    }
-}
diff --git a/src/com/android/phone/common/mail/MessagingException.java b/src/com/android/phone/common/mail/MessagingException.java
deleted file mode 100644
index e4c674a..0000000
--- a/src/com/android/phone/common/mail/MessagingException.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail;
-
-/**
- * This exception is used for most types of failures that occur during server interactions.
- *
- * Data passed through this exception should be considered non-localized.  Any strings should
- * either be internal-only (for debugging) or server-generated.
- *
- * TO DO: Does it make sense to further collapse AuthenticationFailedException and
- * CertificateValidationException and any others into this?
- */
-public class MessagingException extends Exception {
-    public static final long serialVersionUID = -1;
-
-    public static final int NO_ERROR = -1;
-    /** Any exception that does not specify a specific issue */
-    public static final int UNSPECIFIED_EXCEPTION = 0;
-    /** Connection or IO errors */
-    public static final int IOERROR = 1;
-    /** The configuration requested TLS but the server did not support it. */
-    public static final int TLS_REQUIRED = 2;
-    /** Authentication is required but the server did not support it. */
-    public static final int AUTH_REQUIRED = 3;
-    /** General security failures */
-    public static final int GENERAL_SECURITY = 4;
-    /** Authentication failed */
-    public static final int AUTHENTICATION_FAILED = 5;
-    /** Attempt to create duplicate account */
-    public static final int DUPLICATE_ACCOUNT = 6;
-    /** Required security policies reported - advisory only */
-    public static final int SECURITY_POLICIES_REQUIRED = 7;
-   /** Required security policies not supported */
-    public static final int SECURITY_POLICIES_UNSUPPORTED = 8;
-   /** The protocol (or protocol version) isn't supported */
-    public static final int PROTOCOL_VERSION_UNSUPPORTED = 9;
-    /** The server's SSL certificate couldn't be validated */
-    public static final int CERTIFICATE_VALIDATION_ERROR = 10;
-    /** Authentication failed during autodiscover */
-    public static final int AUTODISCOVER_AUTHENTICATION_FAILED = 11;
-    /** Autodiscover completed with a result (non-error) */
-    public static final int AUTODISCOVER_AUTHENTICATION_RESULT = 12;
-    /** Ambiguous failure; server error or bad credentials */
-    public static final int AUTHENTICATION_FAILED_OR_SERVER_ERROR = 13;
-    /** The server refused access */
-    public static final int ACCESS_DENIED = 14;
-    /** The server refused access */
-    public static final int ATTACHMENT_NOT_FOUND = 15;
-    /** A client SSL certificate is required for connections to the server */
-    public static final int CLIENT_CERTIFICATE_REQUIRED = 16;
-    /** The client SSL certificate specified is invalid */
-    public static final int CLIENT_CERTIFICATE_ERROR = 17;
-    /** The server indicates it does not support OAuth authentication */
-    public static final int OAUTH_NOT_SUPPORTED = 18;
-    /** The server indicates it experienced an internal error */
-    public static final int SERVER_ERROR = 19;
-
-    protected int mExceptionType;
-    // Exception type-specific data
-    protected Object mExceptionData;
-
-    public MessagingException(String message, Throwable throwable) {
-        this(UNSPECIFIED_EXCEPTION, message, throwable);
-    }
-
-    public MessagingException(int exceptionType, String message, Throwable throwable) {
-        super(message, throwable);
-        mExceptionType = exceptionType;
-        mExceptionData = null;
-    }
-
-    /**
-     * Constructs a MessagingException with an exceptionType and a null message.
-     * @param exceptionType The exception type to set for this exception.
-     */
-    public MessagingException(int exceptionType) {
-        this(exceptionType, null, null);
-    }
-
-    /**
-     * Constructs a MessagingException with a message.
-     * @param message the message for this exception
-     */
-    public MessagingException(String message) {
-        this(UNSPECIFIED_EXCEPTION, message, null);
-    }
-
-    /**
-     * Constructs a MessagingException with an exceptionType and a message.
-     * @param exceptionType The exception type to set for this exception.
-     */
-    public MessagingException(int exceptionType, String message) {
-        this(exceptionType, message, null);
-    }
-
-    /**
-     * Constructs a MessagingException with an exceptionType, a message, and data
-     * @param exceptionType The exception type to set for this exception.
-     * @param message the message for the exception (or null)
-     * @param data exception-type specific data for the exception (or null)
-     */
-    public MessagingException(int exceptionType, String message, Object data) {
-        super(message);
-        mExceptionType = exceptionType;
-        mExceptionData = data;
-    }
-
-    /**
-     * Return the exception type.  Will be OTHER_EXCEPTION if not explicitly set.
-     *
-     * @return Returns the exception type.
-     */
-    public int getExceptionType() {
-        return mExceptionType;
-    }
-    /**
-     * Return the exception data.  Will be null if not explicitly set.
-     *
-     * @return Returns the exception data.
-     */
-    public Object getExceptionData() {
-        return mExceptionData;
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/Multipart.java b/src/com/android/phone/common/mail/Multipart.java
deleted file mode 100644
index 77963c8..0000000
--- a/src/com/android/phone/common/mail/Multipart.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*

- * Copyright (C) 2015 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.phone.common.mail;

-

-import java.util.ArrayList;

-

-public abstract class Multipart implements Body {

-    protected Part mParent;

-

-    protected ArrayList<BodyPart> mParts = new ArrayList<BodyPart>();

-

-    protected String mContentType;

-

-    public void addBodyPart(BodyPart part) throws MessagingException {

-        mParts.add(part);

-    }

-

-    public void addBodyPart(BodyPart part, int index) throws MessagingException {

-        mParts.add(index, part);

-    }

-

-    public BodyPart getBodyPart(int index) throws MessagingException {

-        return mParts.get(index);

-    }

-

-    public String getContentType() throws MessagingException {

-        return mContentType;

-    }

-

-    public int getCount() throws MessagingException {

-        return mParts.size();

-    }

-

-    public boolean removeBodyPart(BodyPart part) throws MessagingException {

-        return mParts.remove(part);

-    }

-

-    public void removeBodyPart(int index) throws MessagingException {

-        mParts.remove(index);

-    }

-

-    public Part getParent() throws MessagingException {

-        return mParent;

-    }

-

-    public void setParent(Part parent) throws MessagingException {

-        this.mParent = parent;

-    }

-}

diff --git a/src/com/android/phone/common/mail/PackedString.java b/src/com/android/phone/common/mail/PackedString.java
deleted file mode 100644
index 6cbba9e..0000000
--- a/src/com/android/phone/common/mail/PackedString.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * A utility class for creating and modifying Strings that are tagged and packed together.
- *
- * Uses non-printable (control chars) for internal delimiters;  Intended for regular displayable
- * strings only, so please use base64 or other encoding if you need to hide any binary data here.
- *
- * Binary compatible with Address.pack() format, which should migrate to use this code.
- */
-public class PackedString {
-
-    /**
-     * Packing format is:
-     *   element : [ value ] or [ value TAG-DELIMITER tag ]
-     *   packed-string : [ element ] [ ELEMENT-DELIMITER [ element ] ]*
-     */
-    private static final char DELIMITER_ELEMENT = '\1';
-    private static final char DELIMITER_TAG = '\2';
-
-    private String mString;
-    private HashMap<String, String> mExploded;
-    private static final HashMap<String, String> EMPTY_MAP = new HashMap<String, String>();
-
-    /**
-     * Create a packed string using an already-packed string (e.g. from database)
-     * @param string packed string
-     */
-    public PackedString(String string) {
-        mString = string;
-        mExploded = null;
-    }
-
-    /**
-     * Get the value referred to by a given tag.  If the tag does not exist, return null.
-     * @param tag identifier of string of interest
-     * @return returns value, or null if no string is found
-     */
-    public String get(String tag) {
-        if (mExploded == null) {
-            mExploded = explode(mString);
-        }
-        return mExploded.get(tag);
-    }
-
-    /**
-     * Return a map of all of the values referred to by a given tag.  This is a shallow
-     * copy, don't edit the values.
-     * @return a map of the values in the packed string
-     */
-    public Map<String, String> unpack() {
-        if (mExploded == null) {
-            mExploded = explode(mString);
-        }
-        return new HashMap<String,String>(mExploded);
-    }
-
-    /**
-     * Read out all values into a map.
-     */
-    private static HashMap<String, String> explode(String packed) {
-        if (packed == null || packed.length() == 0) {
-            return EMPTY_MAP;
-        }
-        HashMap<String, String> map = new HashMap<String, String>();
-
-        int length = packed.length();
-        int elementStartIndex = 0;
-        int elementEndIndex = 0;
-        int tagEndIndex = packed.indexOf(DELIMITER_TAG);
-
-        while (elementStartIndex < length) {
-            elementEndIndex = packed.indexOf(DELIMITER_ELEMENT, elementStartIndex);
-            if (elementEndIndex == -1) {
-                elementEndIndex = length;
-            }
-            String tag;
-            String value;
-            if (tagEndIndex == -1 || elementEndIndex <= tagEndIndex) {
-                // in this case the DELIMITER_PERSONAL is in a future pair (or not found)
-                // so synthesize a positional tag for the value, and don't update tagEndIndex
-                value = packed.substring(elementStartIndex, elementEndIndex);
-                tag = Integer.toString(map.size());
-            } else {
-                value = packed.substring(elementStartIndex, tagEndIndex);
-                tag = packed.substring(tagEndIndex + 1, elementEndIndex);
-                // scan forward for next tag, if any
-                tagEndIndex = packed.indexOf(DELIMITER_TAG, elementEndIndex + 1);
-            }
-            map.put(tag, value);
-            elementStartIndex = elementEndIndex + 1;
-        }
-
-        return map;
-    }
-
-    /**
-     * Builder class for creating PackedString values.  Can also be used for editing existing
-     * PackedString representations.
-     */
-    static public class Builder {
-        HashMap<String, String> mMap;
-
-        /**
-         * Create a builder that's empty (for filling)
-         */
-        public Builder() {
-            mMap = new HashMap<String, String>();
-        }
-
-        /**
-         * Create a builder using the values of an existing PackedString (for editing).
-         */
-        public Builder(String packed) {
-            mMap = explode(packed);
-        }
-
-        /**
-         * Add a tagged value
-         * @param tag identifier of string of interest
-         * @param value the value to record in this position.  null to delete entry.
-         */
-        public void put(String tag, String value) {
-            if (value == null) {
-                mMap.remove(tag);
-            } else {
-                mMap.put(tag, value);
-            }
-        }
-
-        /**
-         * Get the value referred to by a given tag.  If the tag does not exist, return null.
-         * @param tag identifier of string of interest
-         * @return returns value, or null if no string is found
-         */
-        public String get(String tag) {
-            return mMap.get(tag);
-        }
-
-        /**
-         * Pack the values and return a single, encoded string
-         */
-        @Override
-        public String toString() {
-            StringBuilder sb = new StringBuilder();
-            for (Map.Entry<String,String> entry : mMap.entrySet()) {
-                if (sb.length() > 0) {
-                    sb.append(DELIMITER_ELEMENT);
-                }
-                sb.append(entry.getValue());
-                sb.append(DELIMITER_TAG);
-                sb.append(entry.getKey());
-            }
-            return sb.toString();
-        }
-    }
-}
diff --git a/src/com/android/phone/common/mail/Part.java b/src/com/android/phone/common/mail/Part.java
deleted file mode 100644
index d064e2a..0000000
--- a/src/com/android/phone/common/mail/Part.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-public interface Part extends Fetchable {
-    public void addHeader(String name, String value) throws MessagingException;
-
-    public void removeHeader(String name) throws MessagingException;
-
-    public void setHeader(String name, String value) throws MessagingException;
-
-    public Body getBody() throws MessagingException;
-
-    public String getContentType() throws MessagingException;
-
-    public String getDisposition() throws MessagingException;
-
-    public String getContentId() throws MessagingException;
-
-    public String[] getHeader(String name) throws MessagingException;
-
-    public void setExtendedHeader(String name, String value) throws MessagingException;
-
-    public String getExtendedHeader(String name) throws MessagingException;
-
-    public int getSize() throws MessagingException;
-
-    public boolean isMimeType(String mimeType) throws MessagingException;
-
-    public String getMimeType() throws MessagingException;
-
-    public void setBody(Body body) throws MessagingException;
-
-    public void writeTo(OutputStream out) throws IOException, MessagingException;
-}
diff --git a/src/com/android/phone/common/mail/PeekableInputStream.java b/src/com/android/phone/common/mail/PeekableInputStream.java
deleted file mode 100644
index d29fc6b..0000000
--- a/src/com/android/phone/common/mail/PeekableInputStream.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * A filtering InputStream that allows single byte "peeks" without consuming the byte. The
- * client of this stream can call peek() to see the next available byte in the stream
- * and a subsequent read will still return the peeked byte.
- */
-public class PeekableInputStream extends InputStream {
-    private final InputStream mIn;
-    private boolean mPeeked;
-    private int mPeekedByte;
-
-    public PeekableInputStream(InputStream in) {
-        this.mIn = in;
-    }
-
-    @Override
-    public int read() throws IOException {
-        if (!mPeeked) {
-            return mIn.read();
-        } else {
-            mPeeked = false;
-            return mPeekedByte;
-        }
-    }
-
-    public int peek() throws IOException {
-        if (!mPeeked) {
-            mPeekedByte = read();
-            mPeeked = true;
-        }
-        return mPeekedByte;
-    }
-
-    @Override
-    public int read(byte[] b, int offset, int length) throws IOException {
-        if (!mPeeked) {
-            return mIn.read(b, offset, length);
-        } else {
-            b[0] = (byte)mPeekedByte;
-            mPeeked = false;
-            int r = mIn.read(b, offset + 1, length - 1);
-            if (r == -1) {
-                return 1;
-            } else {
-                return r + 1;
-            }
-        }
-    }
-
-    @Override
-    public int read(byte[] b) throws IOException {
-        return read(b, 0, b.length);
-    }
-
-    @Override
-    public String toString() {
-        return String.format("PeekableInputStream(in=%s, peeked=%b, peekedByte=%d)",
-                mIn.toString(), mPeeked, mPeekedByte);
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/TempDirectory.java b/src/com/android/phone/common/mail/TempDirectory.java
deleted file mode 100644
index 8fa0e44..0000000
--- a/src/com/android/phone/common/mail/TempDirectory.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail;
-
-import android.content.Context;
-
-import java.io.File;
-
-/**
- * TempDirectory caches the directory used for caching file.  It is set up during application
- * initialization.
- */
-public class TempDirectory {
-    private static File sTempDirectory = null;
-
-    public static void setTempDirectory(Context context) {
-        sTempDirectory = context.getCacheDir();
-    }
-
-    public static File getTempDirectory() {
-        if (sTempDirectory == null) {
-            throw new RuntimeException(
-                    "TempDirectory not set.  " +
-                    "If in a unit test, call Email.setTempDirectory(context) in setUp().");
-        }
-        return sTempDirectory;
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/internet/BinaryTempFileBody.java b/src/com/android/phone/common/mail/internet/BinaryTempFileBody.java
deleted file mode 100644
index e2bdd89..0000000
--- a/src/com/android/phone/common/mail/internet/BinaryTempFileBody.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.internet;
-
-import com.android.phone.common.mail.Body;
-import com.android.phone.common.mail.MessagingException;
-import com.android.phone.common.mail.TempDirectory;
-
-import org.apache.commons.io.IOUtils;
-
-import android.util.Base64;
-import android.util.Base64OutputStream;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * A Body that is backed by a temp file. The Body exposes a getOutputStream method that allows
- * the user to write to the temp file. After the write the body is available via getInputStream
- * and writeTo one time. After writeTo is called, or the InputStream returned from
- * getInputStream is closed the file is deleted and the Body should be considered disposed of.
- */
-public class BinaryTempFileBody implements Body {
-    private File mFile;
-
-    /**
-     * An alternate way to put data into a BinaryTempFileBody is to simply supply an already-
-     * created file.  Note that this file will be deleted after it is read.
-     * @param filePath The file containing the data to be stored on disk temporarily
-     */
-    public void setFile(String filePath) {
-        mFile = new File(filePath);
-    }
-
-    public OutputStream getOutputStream() throws IOException {
-        mFile = File.createTempFile("body", null, TempDirectory.getTempDirectory());
-        mFile.deleteOnExit();
-        return new FileOutputStream(mFile);
-    }
-
-    @Override
-    public InputStream getInputStream() throws MessagingException {
-        try {
-            return new BinaryTempFileBodyInputStream(new FileInputStream(mFile));
-        }
-        catch (IOException ioe) {
-            throw new MessagingException("Unable to open body", ioe);
-        }
-    }
-
-    @Override
-    public void writeTo(OutputStream out) throws IOException, MessagingException {
-        InputStream in = getInputStream();
-        Base64OutputStream base64Out = new Base64OutputStream(
-            out, Base64.CRLF | Base64.NO_CLOSE);
-        IOUtils.copy(in, base64Out);
-        base64Out.close();
-        mFile.delete();
-        in.close();
-    }
-
-    class BinaryTempFileBodyInputStream extends FilterInputStream {
-        public BinaryTempFileBodyInputStream(InputStream in) {
-            super(in);
-        }
-
-        @Override
-        public void close() throws IOException {
-            super.close();
-            mFile.delete();
-        }
-    }
-}
diff --git a/src/com/android/phone/common/mail/internet/MimeBodyPart.java b/src/com/android/phone/common/mail/internet/MimeBodyPart.java
deleted file mode 100644
index 286a4f2..0000000
--- a/src/com/android/phone/common/mail/internet/MimeBodyPart.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.internet;
-
-import com.android.phone.common.mail.Body;
-import com.android.phone.common.mail.BodyPart;
-import com.android.phone.common.mail.MessagingException;
-
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.util.regex.Pattern;
-
-/**
- * TODO this is a close approximation of Message, need to update along with
- * Message.
- */
-public class MimeBodyPart extends BodyPart {
-    protected MimeHeader mHeader = new MimeHeader();
-    protected MimeHeader mExtendedHeader;
-    protected Body mBody;
-    protected int mSize;
-
-    // regex that matches content id surrounded by "<>" optionally.
-    private static final Pattern REMOVE_OPTIONAL_BRACKETS = Pattern.compile("^<?([^>]+)>?$");
-    // regex that matches end of line.
-    private static final Pattern END_OF_LINE = Pattern.compile("\r?\n");
-
-    public MimeBodyPart() throws MessagingException {
-        this(null);
-    }
-
-    public MimeBodyPart(Body body) throws MessagingException {
-        this(body, null);
-    }
-
-    public MimeBodyPart(Body body, String mimeType) throws MessagingException {
-        if (mimeType != null) {
-            setHeader(MimeHeader.HEADER_CONTENT_TYPE, mimeType);
-        }
-        setBody(body);
-    }
-
-    protected String getFirstHeader(String name) throws MessagingException {
-        return mHeader.getFirstHeader(name);
-    }
-
-    @Override
-    public void addHeader(String name, String value) throws MessagingException {
-        mHeader.addHeader(name, value);
-    }
-
-    @Override
-    public void setHeader(String name, String value) throws MessagingException {
-        mHeader.setHeader(name, value);
-    }
-
-    @Override
-    public String[] getHeader(String name) throws MessagingException {
-        return mHeader.getHeader(name);
-    }
-
-    @Override
-    public void removeHeader(String name) throws MessagingException {
-        mHeader.removeHeader(name);
-    }
-
-    @Override
-    public Body getBody() throws MessagingException {
-        return mBody;
-    }
-
-    @Override
-    public void setBody(Body body) throws MessagingException {
-        this.mBody = body;
-        if (body instanceof com.android.phone.common.mail.Multipart) {
-            com.android.phone.common.mail.Multipart multipart =
-                ((com.android.phone.common.mail.Multipart)body);
-            multipart.setParent(this);
-            setHeader(MimeHeader.HEADER_CONTENT_TYPE, multipart.getContentType());
-        }
-        else if (body instanceof TextBody) {
-            String contentType = String.format("%s;\n charset=utf-8", getMimeType());
-            String name = MimeUtility.getHeaderParameter(getContentType(), "name");
-            if (name != null) {
-                contentType += String.format(";\n name=\"%s\"", name);
-            }
-            setHeader(MimeHeader.HEADER_CONTENT_TYPE, contentType);
-            setHeader(MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING, "base64");
-        }
-    }
-
-    @Override
-    public String getContentType() throws MessagingException {
-        String contentType = getFirstHeader(MimeHeader.HEADER_CONTENT_TYPE);
-        if (contentType == null) {
-            return "text/plain";
-        } else {
-            return contentType;
-        }
-    }
-
-    @Override
-    public String getDisposition() throws MessagingException {
-        String contentDisposition = getFirstHeader(MimeHeader.HEADER_CONTENT_DISPOSITION);
-        if (contentDisposition == null) {
-            return null;
-        } else {
-            return contentDisposition;
-        }
-    }
-
-    @Override
-    public String getContentId() throws MessagingException {
-        String contentId = getFirstHeader(MimeHeader.HEADER_CONTENT_ID);
-        if (contentId == null) {
-            return null;
-        } else {
-            // remove optionally surrounding brackets.
-            return REMOVE_OPTIONAL_BRACKETS.matcher(contentId).replaceAll("$1");
-        }
-    }
-
-    @Override
-    public String getMimeType() throws MessagingException {
-        return MimeUtility.getHeaderParameter(getContentType(), null);
-    }
-
-    @Override
-    public boolean isMimeType(String mimeType) throws MessagingException {
-        return getMimeType().equals(mimeType);
-    }
-
-    public void setSize(int size) {
-        this.mSize = size;
-    }
-
-    @Override
-    public int getSize() throws MessagingException {
-        return mSize;
-    }
-
-    /**
-     * Set extended header
-     *
-     * @param name Extended header name
-     * @param value header value - flattened by removing CR-NL if any
-     * remove header if value is null
-     * @throws MessagingException
-     */
-    @Override
-    public void setExtendedHeader(String name, String value) throws MessagingException {
-        if (value == null) {
-            if (mExtendedHeader != null) {
-                mExtendedHeader.removeHeader(name);
-            }
-            return;
-        }
-        if (mExtendedHeader == null) {
-            mExtendedHeader = new MimeHeader();
-        }
-        mExtendedHeader.setHeader(name, END_OF_LINE.matcher(value).replaceAll(""));
-    }
-
-    /**
-     * Get extended header
-     *
-     * @param name Extended header name
-     * @return header value - null if header does not exist
-     * @throws MessagingException
-     */
-    @Override
-    public String getExtendedHeader(String name) throws MessagingException {
-        if (mExtendedHeader == null) {
-            return null;
-        }
-        return mExtendedHeader.getFirstHeader(name);
-    }
-
-    /**
-     * Write the MimeMessage out in MIME format.
-     */
-    @Override
-    public void writeTo(OutputStream out) throws IOException, MessagingException {
-        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out), 1024);
-        mHeader.writeTo(out);
-        writer.write("\r\n");
-        writer.flush();
-        if (mBody != null) {
-            mBody.writeTo(out);
-        }
-    }
-}
diff --git a/src/com/android/phone/common/mail/internet/MimeHeader.java b/src/com/android/phone/common/mail/internet/MimeHeader.java
deleted file mode 100644
index 7e6a07f..0000000
--- a/src/com/android/phone/common/mail/internet/MimeHeader.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.internet;
-
-import com.android.phone.common.mail.MessagingException;
-
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.util.ArrayList;
-
-public class MimeHeader {
-    /**
-     * Application specific header that contains Store specific information about an attachment.
-     * In IMAP this contains the IMAP BODYSTRUCTURE part id so that the ImapStore can later
-     * retrieve the attachment at will from the server.
-     * The info is recorded from this header on LocalStore.appendMessage and is put back
-     * into the MIME data by LocalStore.fetch.
-     */
-    public static final String HEADER_ANDROID_ATTACHMENT_STORE_DATA = "X-Android-Attachment-StoreData";
-
-    public static final String HEADER_CONTENT_TYPE = "Content-Type";
-    public static final String HEADER_CONTENT_TRANSFER_ENCODING = "Content-Transfer-Encoding";
-    public static final String HEADER_CONTENT_DISPOSITION = "Content-Disposition";
-    public static final String HEADER_CONTENT_ID = "Content-ID";
-
-    /**
-     * Fields that should be omitted when writing the header using writeTo()
-     */
-    private static final String[] WRITE_OMIT_FIELDS = {
-//        HEADER_ANDROID_ATTACHMENT_DOWNLOADED,
-//        HEADER_ANDROID_ATTACHMENT_ID,
-        HEADER_ANDROID_ATTACHMENT_STORE_DATA
-    };
-
-    protected final ArrayList<Field> mFields = new ArrayList<Field>();
-
-    public void clear() {
-        mFields.clear();
-    }
-
-    public String getFirstHeader(String name) throws MessagingException {
-        String[] header = getHeader(name);
-        if (header == null) {
-            return null;
-        }
-        return header[0];
-    }
-
-    public void addHeader(String name, String value) throws MessagingException {
-        mFields.add(new Field(name, value));
-    }
-
-    public void setHeader(String name, String value) throws MessagingException {
-        if (name == null || value == null) {
-            return;
-        }
-        removeHeader(name);
-        addHeader(name, value);
-    }
-
-    public String[] getHeader(String name) throws MessagingException {
-        ArrayList<String> values = new ArrayList<String>();
-        for (Field field : mFields) {
-            if (field.name.equalsIgnoreCase(name)) {
-                values.add(field.value);
-            }
-        }
-        if (values.size() == 0) {
-            return null;
-        }
-        return values.toArray(new String[] {});
-    }
-
-    public void removeHeader(String name) throws MessagingException {
-        ArrayList<Field> removeFields = new ArrayList<Field>();
-        for (Field field : mFields) {
-            if (field.name.equalsIgnoreCase(name)) {
-                removeFields.add(field);
-            }
-        }
-        mFields.removeAll(removeFields);
-    }
-
-    /**
-     * Write header into String
-     *
-     * @return CR-NL separated header string except the headers in writeOmitFields
-     * null if header is empty
-     */
-    public String writeToString() {
-        if (mFields.size() == 0) {
-            return null;
-        }
-        StringBuilder builder = new StringBuilder();
-        for (Field field : mFields) {
-            if (!arrayContains(WRITE_OMIT_FIELDS, field.name)) {
-                builder.append(field.name + ": " + field.value + "\r\n");
-            }
-        }
-        return builder.toString();
-    }
-
-    public void writeTo(OutputStream out) throws IOException, MessagingException {
-        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out), 1024);
-        for (Field field : mFields) {
-            if (!arrayContains(WRITE_OMIT_FIELDS, field.name)) {
-                writer.write(field.name + ": " + field.value + "\r\n");
-            }
-        }
-        writer.flush();
-    }
-
-    private static class Field {
-        final String name;
-        final String value;
-
-        public Field(String name, String value) {
-            this.name = name;
-            this.value = value;
-        }
-
-        @Override
-        public String toString() {
-            return name + "=" + value;
-        }
-    }
-
-    @Override
-    public String toString() {
-        return (mFields == null) ? null : mFields.toString();
-    }
-
-    public final static boolean arrayContains(Object[] a, Object o) {
-        int index = arrayIndex(a, o);
-        return (index >= 0);
-    }
-
-    public final static int arrayIndex(Object[] a, Object o) {
-        for (int i = 0, count = a.length; i < count; i++) {
-            if (a[i].equals(o)) {
-                return i;
-            }
-        }
-        return -1;
-    }
-}
diff --git a/src/com/android/phone/common/mail/internet/MimeMessage.java b/src/com/android/phone/common/mail/internet/MimeMessage.java
deleted file mode 100644
index f4c6c88..0000000
--- a/src/com/android/phone/common/mail/internet/MimeMessage.java
+++ /dev/null
@@ -1,675 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.internet;
-
-import com.android.phone.common.mail.Address;
-import com.android.phone.common.mail.Body;
-import com.android.phone.common.mail.BodyPart;
-import com.android.phone.common.mail.Message;
-import com.android.phone.common.mail.MessagingException;
-import com.android.phone.common.mail.Multipart;
-import com.android.phone.common.mail.Part;
-import com.android.phone.common.mail.utils.LogUtils;
-
-import org.apache.james.mime4j.BodyDescriptor;
-import org.apache.james.mime4j.ContentHandler;
-import org.apache.james.mime4j.EOLConvertingInputStream;
-import org.apache.james.mime4j.MimeStreamParser;
-import org.apache.james.mime4j.field.DateTimeField;
-import org.apache.james.mime4j.field.Field;
-
-import android.text.TextUtils;
-
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-import java.util.Stack;
-import java.util.regex.Pattern;
-
-/**
- * An implementation of Message that stores all of its metadata in RFC 822 and
- * RFC 2045 style headers.
- *
- * NOTE:  Automatic generation of a local message-id is becoming unwieldy and should be removed.
- * It would be better to simply do it explicitly on local creation of new outgoing messages.
- */
-public class MimeMessage extends Message {
-    private MimeHeader mHeader;
-    private MimeHeader mExtendedHeader;
-
-    // NOTE:  The fields here are transcribed out of headers, and values stored here will supersede
-    // the values found in the headers.  Use caution to prevent any out-of-phase errors.  In
-    // particular, any adds/changes/deletes here must be echoed by changes in the parse() function.
-    private Address[] mFrom;
-    private Address[] mTo;
-    private Address[] mCc;
-    private Address[] mBcc;
-    private Address[] mReplyTo;
-    private Date mSentDate;
-    private Body mBody;
-    protected int mSize;
-    private boolean mInhibitLocalMessageId = false;
-    private boolean mComplete = true;
-
-    // Shared random source for generating local message-id values
-    private static final java.util.Random sRandom = new java.util.Random();
-
-    // In MIME, en_US-like date format should be used. In other words "MMM" should be encoded to
-    // "Jan", not the other localized format like "Ene" (meaning January in locale es).
-    // This conversion is used when generating outgoing MIME messages. Incoming MIME date
-    // headers are parsed by org.apache.james.mime4j.field.DateTimeField which does not have any
-    // localization code.
-    private static final SimpleDateFormat DATE_FORMAT =
-        new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z", Locale.US);
-
-    // regex that matches content id surrounded by "<>" optionally.
-    private static final Pattern REMOVE_OPTIONAL_BRACKETS = Pattern.compile("^<?([^>]+)>?$");
-    // regex that matches end of line.
-    private static final Pattern END_OF_LINE = Pattern.compile("\r?\n");
-
-    public MimeMessage() {
-        mHeader = null;
-    }
-
-    /**
-     * Generate a local message id.  This is only used when none has been assigned, and is
-     * installed lazily.  Any remote (typically server-assigned) message id takes precedence.
-     * @return a long, locally-generated message-ID value
-     */
-    private static String generateMessageId() {
-        final StringBuilder sb = new StringBuilder();
-        sb.append("<");
-        for (int i = 0; i < 24; i++) {
-            // We'll use a 5-bit range (0..31)
-            final int value = sRandom.nextInt() & 31;
-            final char c = "0123456789abcdefghijklmnopqrstuv".charAt(value);
-            sb.append(c);
-        }
-        sb.append(".");
-        sb.append(Long.toString(System.currentTimeMillis()));
-        sb.append("@email.android.com>");
-        return sb.toString();
-    }
-
-    /**
-     * Parse the given InputStream using Apache Mime4J to build a MimeMessage.
-     *
-     * @param in InputStream providing message content
-     * @throws IOException
-     * @throws MessagingException
-     */
-    public MimeMessage(InputStream in) throws IOException, MessagingException {
-        parse(in);
-    }
-
-    private MimeStreamParser init() {
-        // Before parsing the input stream, clear all local fields that may be superceded by
-        // the new incoming message.
-        getMimeHeaders().clear();
-        mInhibitLocalMessageId = true;
-        mFrom = null;
-        mTo = null;
-        mCc = null;
-        mBcc = null;
-        mReplyTo = null;
-        mSentDate = null;
-        mBody = null;
-
-        final MimeStreamParser parser = new MimeStreamParser();
-        parser.setContentHandler(new MimeMessageBuilder());
-        return parser;
-    }
-
-    protected void parse(InputStream in) throws IOException, MessagingException {
-        final MimeStreamParser parser = init();
-        parser.parse(new EOLConvertingInputStream(in));
-        mComplete = !parser.getPrematureEof();
-    }
-
-    public void parse(InputStream in, EOLConvertingInputStream.Callback callback)
-            throws IOException, MessagingException {
-        final MimeStreamParser parser = init();
-        parser.parse(new EOLConvertingInputStream(in, getSize(), callback));
-        mComplete = !parser.getPrematureEof();
-    }
-
-    /**
-     * Return the internal mHeader value, with very lazy initialization.
-     * The goal is to save memory by not creating the headers until needed.
-     */
-    private MimeHeader getMimeHeaders() {
-        if (mHeader == null) {
-            mHeader = new MimeHeader();
-        }
-        return mHeader;
-    }
-
-    @Override
-    public Date getReceivedDate() throws MessagingException {
-        return null;
-    }
-
-    @Override
-    public Date getSentDate() throws MessagingException {
-        if (mSentDate == null) {
-            try {
-                DateTimeField field = (DateTimeField)Field.parse("Date: "
-                        + MimeUtility.unfoldAndDecode(getFirstHeader("Date")));
-                mSentDate = field.getDate();
-                // TODO: We should make it more clear what exceptions can be thrown here,
-                // and whether they reflect a normal or error condition.
-            } catch (Exception e) {
-                LogUtils.v(LogUtils.TAG, "Message missing Date header");
-            }
-        }
-        if (mSentDate == null) {
-            // If we still don't have a date, fall back to "Delivery-date"
-            try {
-                DateTimeField field = (DateTimeField)Field.parse("Date: "
-                        + MimeUtility.unfoldAndDecode(getFirstHeader("Delivery-date")));
-                mSentDate = field.getDate();
-                // TODO: We should make it more clear what exceptions can be thrown here,
-                // and whether they reflect a normal or error condition.
-            } catch (Exception e) {
-                LogUtils.v(LogUtils.TAG, "Message also missing Delivery-Date header");
-            }
-        }
-        return mSentDate;
-    }
-
-    @Override
-    public void setSentDate(Date sentDate) throws MessagingException {
-        setHeader("Date", DATE_FORMAT.format(sentDate));
-        this.mSentDate = sentDate;
-    }
-
-    @Override
-    public String getContentType() throws MessagingException {
-        final String contentType = getFirstHeader(MimeHeader.HEADER_CONTENT_TYPE);
-        if (contentType == null) {
-            return "text/plain";
-        } else {
-            return contentType;
-        }
-    }
-
-    @Override
-    public String getDisposition() throws MessagingException {
-        return getFirstHeader(MimeHeader.HEADER_CONTENT_DISPOSITION);
-    }
-
-    @Override
-    public String getContentId() throws MessagingException {
-        final String contentId = getFirstHeader(MimeHeader.HEADER_CONTENT_ID);
-        if (contentId == null) {
-            return null;
-        } else {
-            // remove optionally surrounding brackets.
-            return REMOVE_OPTIONAL_BRACKETS.matcher(contentId).replaceAll("$1");
-        }
-    }
-
-    public boolean isComplete() {
-        return mComplete;
-    }
-
-    @Override
-    public String getMimeType() throws MessagingException {
-        return MimeUtility.getHeaderParameter(getContentType(), null);
-    }
-
-    @Override
-    public int getSize() throws MessagingException {
-        return mSize;
-    }
-
-    /**
-     * Returns a list of the given recipient type from this message. If no addresses are
-     * found the method returns an empty array.
-     */
-    @Override
-    public Address[] getRecipients(String type) throws MessagingException {
-        if (type == RECIPIENT_TYPE_TO) {
-            if (mTo == null) {
-                mTo = Address.parse(MimeUtility.unfold(getFirstHeader("To")));
-            }
-            return mTo;
-        } else if (type == RECIPIENT_TYPE_CC) {
-            if (mCc == null) {
-                mCc = Address.parse(MimeUtility.unfold(getFirstHeader("CC")));
-            }
-            return mCc;
-        } else if (type == RECIPIENT_TYPE_BCC) {
-            if (mBcc == null) {
-                mBcc = Address.parse(MimeUtility.unfold(getFirstHeader("BCC")));
-            }
-            return mBcc;
-        } else {
-            throw new MessagingException("Unrecognized recipient type.");
-        }
-    }
-
-    @Override
-    public void setRecipients(String type, Address[] addresses) throws MessagingException {
-        final int TO_LENGTH = 4;  // "To: "
-        final int CC_LENGTH = 4;  // "Cc: "
-        final int BCC_LENGTH = 5; // "Bcc: "
-        if (type == RECIPIENT_TYPE_TO) {
-            if (addresses == null || addresses.length == 0) {
-                removeHeader("To");
-                this.mTo = null;
-            } else {
-                setHeader("To", MimeUtility.fold(Address.toHeader(addresses), TO_LENGTH));
-                this.mTo = addresses;
-            }
-        } else if (type == RECIPIENT_TYPE_CC) {
-            if (addresses == null || addresses.length == 0) {
-                removeHeader("CC");
-                this.mCc = null;
-            } else {
-                setHeader("CC", MimeUtility.fold(Address.toHeader(addresses), CC_LENGTH));
-                this.mCc = addresses;
-            }
-        } else if (type == RECIPIENT_TYPE_BCC) {
-            if (addresses == null || addresses.length == 0) {
-                removeHeader("BCC");
-                this.mBcc = null;
-            } else {
-                setHeader("BCC", MimeUtility.fold(Address.toHeader(addresses), BCC_LENGTH));
-                this.mBcc = addresses;
-            }
-        } else {
-            throw new MessagingException("Unrecognized recipient type.");
-        }
-    }
-
-    /**
-     * Returns the unfolded, decoded value of the Subject header.
-     */
-    @Override
-    public String getSubject() throws MessagingException {
-        return MimeUtility.unfoldAndDecode(getFirstHeader("Subject"));
-    }
-
-    @Override
-    public void setSubject(String subject) throws MessagingException {
-        final int HEADER_NAME_LENGTH = 9;     // "Subject: "
-        setHeader("Subject", MimeUtility.foldAndEncode2(subject, HEADER_NAME_LENGTH));
-    }
-
-    @Override
-    public Address[] getFrom() throws MessagingException {
-        if (mFrom == null) {
-            String list = MimeUtility.unfold(getFirstHeader("From"));
-            if (list == null || list.length() == 0) {
-                list = MimeUtility.unfold(getFirstHeader("Sender"));
-            }
-            mFrom = Address.parse(list);
-        }
-        return mFrom;
-    }
-
-    @Override
-    public void setFrom(Address from) throws MessagingException {
-        final int FROM_LENGTH = 6;  // "From: "
-        if (from != null) {
-            setHeader("From", MimeUtility.fold(from.toHeader(), FROM_LENGTH));
-            this.mFrom = new Address[] {
-                    from
-                };
-        } else {
-            this.mFrom = null;
-        }
-    }
-
-    @Override
-    public Address[] getReplyTo() throws MessagingException {
-        if (mReplyTo == null) {
-            mReplyTo = Address.parse(MimeUtility.unfold(getFirstHeader("Reply-to")));
-        }
-        return mReplyTo;
-    }
-
-    @Override
-    public void setReplyTo(Address[] replyTo) throws MessagingException {
-        final int REPLY_TO_LENGTH = 10;  // "Reply-to: "
-        if (replyTo == null || replyTo.length == 0) {
-            removeHeader("Reply-to");
-            mReplyTo = null;
-        } else {
-            setHeader("Reply-to", MimeUtility.fold(Address.toHeader(replyTo), REPLY_TO_LENGTH));
-            mReplyTo = replyTo;
-        }
-    }
-
-    /**
-     * Set the mime "Message-ID" header
-     * @param messageId the new Message-ID value
-     * @throws MessagingException
-     */
-    @Override
-    public void setMessageId(String messageId) throws MessagingException {
-        setHeader("Message-ID", messageId);
-    }
-
-    /**
-     * Get the mime "Message-ID" header.  This value will be preloaded with a locally-generated
-     * random ID, if the value has not previously been set.  Local generation can be inhibited/
-     * overridden by explicitly clearing the headers, removing the message-id header, etc.
-     * @return the Message-ID header string, or null if explicitly has been set to null
-     */
-    @Override
-    public String getMessageId() throws MessagingException {
-        String messageId = getFirstHeader("Message-ID");
-        if (messageId == null && !mInhibitLocalMessageId) {
-            messageId = generateMessageId();
-            setMessageId(messageId);
-        }
-        return messageId;
-    }
-
-    @Override
-    public void saveChanges() throws MessagingException {
-        throw new MessagingException("saveChanges not yet implemented");
-    }
-
-    @Override
-    public Body getBody() throws MessagingException {
-        return mBody;
-    }
-
-    @Override
-    public void setBody(Body body) throws MessagingException {
-        this.mBody = body;
-        if (body instanceof Multipart) {
-            final Multipart multipart = ((Multipart)body);
-            multipart.setParent(this);
-            setHeader(MimeHeader.HEADER_CONTENT_TYPE, multipart.getContentType());
-            setHeader("MIME-Version", "1.0");
-        }
-        else if (body instanceof TextBody) {
-            setHeader(MimeHeader.HEADER_CONTENT_TYPE, String.format("%s;\n charset=utf-8",
-                    getMimeType()));
-            setHeader(MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING, "base64");
-        }
-    }
-
-    protected String getFirstHeader(String name) throws MessagingException {
-        return getMimeHeaders().getFirstHeader(name);
-    }
-
-    @Override
-    public void addHeader(String name, String value) throws MessagingException {
-        getMimeHeaders().addHeader(name, value);
-    }
-
-    @Override
-    public void setHeader(String name, String value) throws MessagingException {
-        getMimeHeaders().setHeader(name, value);
-    }
-
-    @Override
-    public String[] getHeader(String name) throws MessagingException {
-        return getMimeHeaders().getHeader(name);
-    }
-
-    @Override
-    public void removeHeader(String name) throws MessagingException {
-        getMimeHeaders().removeHeader(name);
-        if ("Message-ID".equalsIgnoreCase(name)) {
-            mInhibitLocalMessageId = true;
-        }
-    }
-
-    /**
-     * Set extended header
-     *
-     * @param name Extended header name
-     * @param value header value - flattened by removing CR-NL if any
-     * remove header if value is null
-     * @throws MessagingException
-     */
-    @Override
-    public void setExtendedHeader(String name, String value) throws MessagingException {
-        if (value == null) {
-            if (mExtendedHeader != null) {
-                mExtendedHeader.removeHeader(name);
-            }
-            return;
-        }
-        if (mExtendedHeader == null) {
-            mExtendedHeader = new MimeHeader();
-        }
-        mExtendedHeader.setHeader(name, END_OF_LINE.matcher(value).replaceAll(""));
-    }
-
-    /**
-     * Get extended header
-     *
-     * @param name Extended header name
-     * @return header value - null if header does not exist
-     * @throws MessagingException
-     */
-    @Override
-    public String getExtendedHeader(String name) throws MessagingException {
-        if (mExtendedHeader == null) {
-            return null;
-        }
-        return mExtendedHeader.getFirstHeader(name);
-    }
-
-    /**
-     * Set entire extended headers from String
-     *
-     * @param headers Extended header and its value - "CR-NL-separated pairs
-     * if null or empty, remove entire extended headers
-     * @throws MessagingException
-     */
-    public void setExtendedHeaders(String headers) throws MessagingException {
-        if (TextUtils.isEmpty(headers)) {
-            mExtendedHeader = null;
-        } else {
-            mExtendedHeader = new MimeHeader();
-            for (final String header : END_OF_LINE.split(headers)) {
-                final String[] tokens = header.split(":", 2);
-                if (tokens.length != 2) {
-                    throw new MessagingException("Illegal extended headers: " + headers);
-                }
-                mExtendedHeader.setHeader(tokens[0].trim(), tokens[1].trim());
-            }
-        }
-    }
-
-    /**
-     * Get entire extended headers as String
-     *
-     * @return "CR-NL-separated extended headers - null if extended header does not exist
-     */
-    public String getExtendedHeaders() {
-        if (mExtendedHeader != null) {
-            return mExtendedHeader.writeToString();
-        }
-        return null;
-    }
-
-    /**
-     * Write message header and body to output stream
-     *
-     * @param out Output steam to write message header and body.
-     */
-    @Override
-    public void writeTo(OutputStream out) throws IOException, MessagingException {
-        final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out), 1024);
-        // Force creation of local message-id
-        getMessageId();
-        getMimeHeaders().writeTo(out);
-        // mExtendedHeader will not be write out to external output stream,
-        // because it is intended to internal use.
-        writer.write("\r\n");
-        writer.flush();
-        if (mBody != null) {
-            mBody.writeTo(out);
-        }
-    }
-
-    @Override
-    public InputStream getInputStream() throws MessagingException {
-        return null;
-    }
-
-    class MimeMessageBuilder implements ContentHandler {
-        private final Stack<Object> stack = new Stack<Object>();
-
-        public MimeMessageBuilder() {
-        }
-
-        private void expect(Class<?> c) {
-            if (!c.isInstance(stack.peek())) {
-                throw new IllegalStateException("Internal stack error: " + "Expected '"
-                        + c.getName() + "' found '" + stack.peek().getClass().getName() + "'");
-            }
-        }
-
-        @Override
-        public void startMessage() {
-            if (stack.isEmpty()) {
-                stack.push(MimeMessage.this);
-            } else {
-                expect(Part.class);
-                try {
-                    final MimeMessage m = new MimeMessage();
-                    ((Part)stack.peek()).setBody(m);
-                    stack.push(m);
-                } catch (MessagingException me) {
-                    throw new Error(me);
-                }
-            }
-        }
-
-        @Override
-        public void endMessage() {
-            expect(MimeMessage.class);
-            stack.pop();
-        }
-
-        @Override
-        public void startHeader() {
-            expect(Part.class);
-        }
-
-        @Override
-        public void field(String fieldData) {
-            expect(Part.class);
-            try {
-                final String[] tokens = fieldData.split(":", 2);
-                ((Part)stack.peek()).addHeader(tokens[0], tokens[1].trim());
-            } catch (MessagingException me) {
-                throw new Error(me);
-            }
-        }
-
-        @Override
-        public void endHeader() {
-            expect(Part.class);
-        }
-
-        @Override
-        public void startMultipart(BodyDescriptor bd) {
-            expect(Part.class);
-
-            final Part e = (Part)stack.peek();
-            try {
-                final MimeMultipart multiPart = new MimeMultipart(e.getContentType());
-                e.setBody(multiPart);
-                stack.push(multiPart);
-            } catch (MessagingException me) {
-                throw new Error(me);
-            }
-        }
-
-        @Override
-        public void body(BodyDescriptor bd, InputStream in) throws IOException {
-            expect(Part.class);
-            final Body body = MimeUtility.decodeBody(in, bd.getTransferEncoding());
-            try {
-                ((Part)stack.peek()).setBody(body);
-            } catch (MessagingException me) {
-                throw new Error(me);
-            }
-        }
-
-        @Override
-        public void endMultipart() {
-            stack.pop();
-        }
-
-        @Override
-        public void startBodyPart() {
-            expect(MimeMultipart.class);
-
-            try {
-                final MimeBodyPart bodyPart = new MimeBodyPart();
-                ((MimeMultipart)stack.peek()).addBodyPart(bodyPart);
-                stack.push(bodyPart);
-            } catch (MessagingException me) {
-                throw new Error(me);
-            }
-        }
-
-        @Override
-        public void endBodyPart() {
-            expect(BodyPart.class);
-            stack.pop();
-        }
-
-        @Override
-        public void epilogue(InputStream is) throws IOException {
-            expect(MimeMultipart.class);
-            final StringBuilder sb = new StringBuilder();
-            int b;
-            while ((b = is.read()) != -1) {
-                sb.append((char)b);
-            }
-            // TODO: why is this commented out?
-            // ((Multipart) stack.peek()).setEpilogue(sb.toString());
-        }
-
-        @Override
-        public void preamble(InputStream is) throws IOException {
-            expect(MimeMultipart.class);
-            final StringBuilder sb = new StringBuilder();
-            int b;
-            while ((b = is.read()) != -1) {
-                sb.append((char)b);
-            }
-            try {
-                ((MimeMultipart)stack.peek()).setPreamble(sb.toString());
-            } catch (MessagingException me) {
-                throw new Error(me);
-            }
-        }
-
-        @Override
-        public void raw(InputStream is) throws IOException {
-            throw new UnsupportedOperationException("Not supported");
-        }
-    }
-}
diff --git a/src/com/android/phone/common/mail/internet/MimeMultipart.java b/src/com/android/phone/common/mail/internet/MimeMultipart.java
deleted file mode 100644
index 3e118e4..0000000
--- a/src/com/android/phone/common/mail/internet/MimeMultipart.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.internet;
-
-import com.android.phone.common.mail.BodyPart;
-import com.android.phone.common.mail.MessagingException;
-import com.android.phone.common.mail.Multipart;
-
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-
-public class MimeMultipart extends Multipart {
-    protected String mPreamble;
-
-    protected String mContentType;
-
-    protected String mBoundary;
-
-    protected String mSubType;
-
-    public MimeMultipart() throws MessagingException {
-        mBoundary = generateBoundary();
-        setSubType("mixed");
-    }
-
-    public MimeMultipart(String contentType) throws MessagingException {
-        this.mContentType = contentType;
-        try {
-            mSubType = MimeUtility.getHeaderParameter(contentType, null).split("/")[1];
-            mBoundary = MimeUtility.getHeaderParameter(contentType, "boundary");
-            if (mBoundary == null) {
-                throw new MessagingException("MultiPart does not contain boundary: " + contentType);
-            }
-        } catch (Exception e) {
-            throw new MessagingException(
-                    "Invalid MultiPart Content-Type; must contain subtype and boundary. ("
-                            + contentType + ")", e);
-        }
-    }
-
-    public String generateBoundary() {
-        StringBuffer sb = new StringBuffer();
-        sb.append("----");
-        for (int i = 0; i < 30; i++) {
-            sb.append(Integer.toString((int)(Math.random() * 35), 36));
-        }
-        return sb.toString().toUpperCase();
-    }
-
-    public String getPreamble() throws MessagingException {
-        return mPreamble;
-    }
-
-    public void setPreamble(String preamble) throws MessagingException {
-        this.mPreamble = preamble;
-    }
-
-    @Override
-    public String getContentType() throws MessagingException {
-        return mContentType;
-    }
-
-    public void setSubType(String subType) throws MessagingException {
-        this.mSubType = subType;
-        mContentType = String.format("multipart/%s; boundary=\"%s\"", subType, mBoundary);
-    }
-
-    @Override
-    public void writeTo(OutputStream out) throws IOException, MessagingException {
-        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out), 1024);
-
-        if (mPreamble != null) {
-            writer.write(mPreamble + "\r\n");
-        }
-
-        for (int i = 0, count = mParts.size(); i < count; i++) {
-            BodyPart bodyPart = mParts.get(i);
-            writer.write("--" + mBoundary + "\r\n");
-            writer.flush();
-            bodyPart.writeTo(out);
-            writer.write("\r\n");
-        }
-
-        writer.write("--" + mBoundary + "--\r\n");
-        writer.flush();
-    }
-
-    @Override
-    public InputStream getInputStream() throws MessagingException {
-        return null;
-    }
-
-    public String getSubTypeForTest() {
-        return mSubType;
-    }
-}
diff --git a/src/com/android/phone/common/mail/internet/MimeUtility.java b/src/com/android/phone/common/mail/internet/MimeUtility.java
deleted file mode 100644
index 7402a4c..0000000
--- a/src/com/android/phone/common/mail/internet/MimeUtility.java
+++ /dev/null
@@ -1,416 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.internet;
-
-import android.text.TextUtils;
-import android.util.Base64;
-import android.util.Base64DataException;
-import android.util.Base64InputStream;
-
-import com.android.phone.common.mail.Body;
-import com.android.phone.common.mail.BodyPart;
-import com.android.phone.common.mail.Message;
-import com.android.phone.common.mail.MessagingException;
-import com.android.phone.common.mail.Multipart;
-import com.android.phone.common.mail.Part;
-import com.android.phone.vvm.omtp.VvmLog;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.james.mime4j.codec.EncoderUtil;
-import org.apache.james.mime4j.decoder.DecoderUtil;
-import org.apache.james.mime4j.decoder.QuotedPrintableInputStream;
-import org.apache.james.mime4j.util.CharsetUtil;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class MimeUtility {
-    private static final String LOG_TAG = "Email";
-
-    public static final String MIME_TYPE_RFC822 = "message/rfc822";
-    private final static Pattern PATTERN_CR_OR_LF = Pattern.compile("\r|\n");
-
-    /**
-     * Replace sequences of CRLF+WSP with WSP.  Tries to preserve original string
-     * object whenever possible.
-     */
-    public static String unfold(String s) {
-        if (s == null) {
-            return null;
-        }
-        Matcher patternMatcher = PATTERN_CR_OR_LF.matcher(s);
-        if (patternMatcher.find()) {
-            patternMatcher.reset();
-            s = patternMatcher.replaceAll("");
-        }
-        return s;
-    }
-
-    public static String decode(String s) {
-        if (s == null) {
-            return null;
-        }
-        return DecoderUtil.decodeEncodedWords(s);
-    }
-
-    public static String unfoldAndDecode(String s) {
-        return decode(unfold(s));
-    }
-
-    // TODO implement proper foldAndEncode
-    // NOTE: When this really works, we *must* remove all calls to foldAndEncode2() to prevent
-    // duplication of encoding.
-    public static String foldAndEncode(String s) {
-        return s;
-    }
-
-    /**
-     * INTERIM version of foldAndEncode that will be used only by Subject: headers.
-     * This is safer than implementing foldAndEncode() (see above) and risking unknown damage
-     * to other headers.
-     *
-     * TODO: Copy this code to foldAndEncode(), get rid of this function, confirm all working OK.
-     *
-     * @param s original string to encode and fold
-     * @param usedCharacters number of characters already used up by header name
-
-     * @return the String ready to be transmitted
-     */
-    public static String foldAndEncode2(String s, int usedCharacters) {
-        // james.mime4j.codec.EncoderUtil.java
-        // encode:  encodeIfNecessary(text, usage, numUsedInHeaderName)
-        // Usage.TEXT_TOKENlooks like the right thing for subjects
-        // use WORD_ENTITY for address/names
-
-        String encoded = EncoderUtil.encodeIfNecessary(s, EncoderUtil.Usage.TEXT_TOKEN,
-                usedCharacters);
-
-        return fold(encoded, usedCharacters);
-    }
-
-    /**
-     * INTERIM:  From newer version of org.apache.james (but we don't want to import
-     * the entire MimeUtil class).
-     *
-     * Splits the specified string into a multiple-line representation with
-     * lines no longer than 76 characters (because the line might contain
-     * encoded words; see <a href='http://www.faqs.org/rfcs/rfc2047.html'>RFC
-     * 2047</a> section 2). If the string contains non-whitespace sequences
-     * longer than 76 characters a line break is inserted at the whitespace
-     * character following the sequence resulting in a line longer than 76
-     * characters.
-     *
-     * @param s
-     *            string to split.
-     * @param usedCharacters
-     *            number of characters already used up. Usually the number of
-     *            characters for header field name plus colon and one space.
-     * @return a multiple-line representation of the given string.
-     */
-    public static String fold(String s, int usedCharacters) {
-        final int maxCharacters = 76;
-
-        final int length = s.length();
-        if (usedCharacters + length <= maxCharacters)
-            return s;
-
-        StringBuilder sb = new StringBuilder();
-
-        int lastLineBreak = -usedCharacters;
-        int wspIdx = indexOfWsp(s, 0);
-        while (true) {
-            if (wspIdx == length) {
-                sb.append(s.substring(Math.max(0, lastLineBreak)));
-                return sb.toString();
-            }
-
-            int nextWspIdx = indexOfWsp(s, wspIdx + 1);
-
-            if (nextWspIdx - lastLineBreak > maxCharacters) {
-                sb.append(s.substring(Math.max(0, lastLineBreak), wspIdx));
-                sb.append("\r\n");
-                lastLineBreak = wspIdx;
-            }
-
-            wspIdx = nextWspIdx;
-        }
-    }
-
-    /**
-     * INTERIM:  From newer version of org.apache.james (but we don't want to import
-     * the entire MimeUtil class).
-     *
-     * Search for whitespace.
-     */
-    private static int indexOfWsp(String s, int fromIndex) {
-        final int len = s.length();
-        for (int index = fromIndex; index < len; index++) {
-            char c = s.charAt(index);
-            if (c == ' ' || c == '\t')
-                return index;
-        }
-        return len;
-    }
-
-    /**
-     * Returns the named parameter of a header field. If name is null the first
-     * parameter is returned, or if there are no additional parameters in the
-     * field the entire field is returned. Otherwise the named parameter is
-     * searched for in a case insensitive fashion and returned. If the parameter
-     * cannot be found the method returns null.
-     *
-     * TODO: quite inefficient with the inner trimming & splitting.
-     * TODO: Also has a latent bug: uses "startsWith" to match the name, which can false-positive.
-     * TODO: The doc says that for a null name you get the first param, but you get the header.
-     *    Should probably just fix the doc, but if other code assumes that behavior, fix the code.
-     * TODO: Need to decode %-escaped strings, as in: filename="ab%22d".
-     *       ('+' -> ' ' conversion too? check RFC)
-     *
-     * @param header
-     * @param name
-     * @return the entire header (if name=null), the found parameter, or null
-     */
-    public static String getHeaderParameter(String header, String name) {
-        if (header == null) {
-            return null;
-        }
-        String[] parts = unfold(header).split(";");
-        if (name == null) {
-            return parts[0].trim();
-        }
-        String lowerCaseName = name.toLowerCase();
-        for (String part : parts) {
-            if (part.trim().toLowerCase().startsWith(lowerCaseName)) {
-                String[] parameterParts = part.split("=", 2);
-                if (parameterParts.length < 2) {
-                    return null;
-                }
-                String parameter = parameterParts[1].trim();
-                if (parameter.startsWith("\"") && parameter.endsWith("\"")) {
-                    return parameter.substring(1, parameter.length() - 1);
-                } else {
-                    return parameter;
-                }
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Reads the Part's body and returns a String based on any charset conversion that needed
-     * to be done.
-     * @param part The part containing a body
-     * @return a String containing the converted text in the body, or null if there was no text
-     * or an error during conversion.
-     */
-    public static String getTextFromPart(Part part) {
-        try {
-            if (part != null && part.getBody() != null) {
-                InputStream in = part.getBody().getInputStream();
-                String mimeType = part.getMimeType();
-                if (mimeType != null && MimeUtility.mimeTypeMatches(mimeType, "text/*")) {
-                    /*
-                     * Now we read the part into a buffer for further processing. Because
-                     * the stream is now wrapped we'll remove any transfer encoding at this point.
-                     */
-                    ByteArrayOutputStream out = new ByteArrayOutputStream();
-                    IOUtils.copy(in, out);
-                    in.close();
-                    in = null;      // we want all of our memory back, and close might not release
-
-                    /*
-                     * We've got a text part, so let's see if it needs to be processed further.
-                     */
-                    String charset = getHeaderParameter(part.getContentType(), "charset");
-                    if (charset != null) {
-                        /*
-                         * See if there is conversion from the MIME charset to the Java one.
-                         */
-                        charset = CharsetUtil.toJavaCharset(charset);
-                    }
-                    /*
-                     * No encoding, so use us-ascii, which is the standard.
-                     */
-                    if (charset == null) {
-                        charset = "ASCII";
-                    }
-                    /*
-                     * Convert and return as new String
-                     */
-                    String result = out.toString(charset);
-                    out.close();
-                    return result;
-                }
-            }
-
-        }
-        catch (OutOfMemoryError oom) {
-            /*
-             * If we are not able to process the body there's nothing we can do about it. Return
-             * null and let the upper layers handle the missing content.
-             */
-            VvmLog.e(LOG_TAG, "Unable to getTextFromPart " + oom.toString());
-        }
-        catch (Exception e) {
-            /*
-             * If we are not able to process the body there's nothing we can do about it. Return
-             * null and let the upper layers handle the missing content.
-             */
-            VvmLog.e(LOG_TAG, "Unable to getTextFromPart " + e.toString());
-        }
-        return null;
-    }
-
-    /**
-     * Returns true if the given mimeType matches the matchAgainst specification.  The comparison
-     * ignores case and the matchAgainst string may include "*" for a wildcard (e.g. "image/*").
-     *
-     * @param mimeType A MIME type to check.
-     * @param matchAgainst A MIME type to check against. May include wildcards.
-     * @return true if the mimeType matches
-     */
-    public static boolean mimeTypeMatches(String mimeType, String matchAgainst) {
-        Pattern p = Pattern.compile(matchAgainst.replaceAll("\\*", "\\.\\*"),
-                Pattern.CASE_INSENSITIVE);
-        return p.matcher(mimeType).matches();
-    }
-
-    /**
-     * Returns true if the given mimeType matches any of the matchAgainst specifications.  The
-     * comparison ignores case and the matchAgainst strings may include "*" for a wildcard
-     * (e.g. "image/*").
-     *
-     * @param mimeType A MIME type to check.
-     * @param matchAgainst An array of MIME types to check against. May include wildcards.
-     * @return true if the mimeType matches any of the matchAgainst strings
-     */
-    public static boolean mimeTypeMatches(String mimeType, String[] matchAgainst) {
-        for (String matchType : matchAgainst) {
-            if (mimeTypeMatches(mimeType, matchType)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Given an input stream and a transfer encoding, return a wrapped input stream for that
-     * encoding (or the original if none is required)
-     * @param in the input stream
-     * @param contentTransferEncoding the content transfer encoding
-     * @return a properly wrapped stream
-     */
-    public static InputStream getInputStreamForContentTransferEncoding(InputStream in,
-            String contentTransferEncoding) {
-        if (contentTransferEncoding != null) {
-            contentTransferEncoding =
-                MimeUtility.getHeaderParameter(contentTransferEncoding, null);
-            if ("quoted-printable".equalsIgnoreCase(contentTransferEncoding)) {
-                in = new QuotedPrintableInputStream(in);
-            }
-            else if ("base64".equalsIgnoreCase(contentTransferEncoding)) {
-                in = new Base64InputStream(in, Base64.DEFAULT);
-            }
-        }
-        return in;
-    }
-
-    /**
-     * Removes any content transfer encoding from the stream and returns a Body.
-     */
-    public static Body decodeBody(InputStream in, String contentTransferEncoding)
-            throws IOException {
-        /*
-         * We'll remove any transfer encoding by wrapping the stream.
-         */
-        in = getInputStreamForContentTransferEncoding(in, contentTransferEncoding);
-        BinaryTempFileBody tempBody = new BinaryTempFileBody();
-        OutputStream out = tempBody.getOutputStream();
-        try {
-            IOUtils.copy(in, out);
-        } catch (Base64DataException bde) {
-            // TODO Need to fix this somehow
-            //String warning = "\n\n" + Email.getMessageDecodeErrorString();
-            //out.write(warning.getBytes());
-        } finally {
-            out.close();
-        }
-        return tempBody;
-    }
-
-    /**
-     * Recursively scan a Part (usually a Message) and sort out which of its children will be
-     * "viewable" and which will be attachments.
-     *
-     * @param part The part to be broken down
-     * @param viewables This arraylist will be populated with all parts that appear to be
-     * the "message" (e.g. text/plain & text/html)
-     * @param attachments This arraylist will be populated with all parts that appear to be
-     * attachments (including inlines)
-     * @throws MessagingException
-     */
-    public static void collectParts(Part part, ArrayList<Part> viewables,
-            ArrayList<Part> attachments) throws MessagingException {
-        String disposition = part.getDisposition();
-        String dispositionType = MimeUtility.getHeaderParameter(disposition, null);
-        // If a disposition is not specified, default to "inline"
-        boolean inline =
-                TextUtils.isEmpty(dispositionType) || "inline".equalsIgnoreCase(dispositionType);
-        // The lower-case mime type
-        String mimeType = part.getMimeType().toLowerCase();
-
-        if (part.getBody() instanceof Multipart) {
-            // If the part is Multipart but not alternative it's either mixed or
-            // something we don't know about, which means we treat it as mixed
-            // per the spec. We just process its pieces recursively.
-            MimeMultipart mp = (MimeMultipart)part.getBody();
-            boolean foundHtml = false;
-            if (mp.getSubTypeForTest().equals("alternative")) {
-                for (int i = 0; i < mp.getCount(); i++) {
-                    if (mp.getBodyPart(i).isMimeType("text/html")) {
-                        foundHtml = true;
-                        break;
-                    }
-                }
-            }
-            for (int i = 0; i < mp.getCount(); i++) {
-                // See if we have text and html
-                BodyPart bp = mp.getBodyPart(i);
-                // If there's html, don't bother loading text
-                if (foundHtml && bp.isMimeType("text/plain")) {
-                    continue;
-                }
-                collectParts(bp, viewables, attachments);
-            }
-        } else if (part.getBody() instanceof Message) {
-            // If the part is an embedded message we just continue to process
-            // it, pulling any viewables or attachments into the running list.
-            Message message = (Message)part.getBody();
-            collectParts(message, viewables, attachments);
-        } else if (inline && (mimeType.startsWith("text") || (mimeType.startsWith("image")))) {
-            // We'll treat text and images as viewables
-            viewables.add(part);
-        } else {
-            // Everything else is an attachment.
-            attachments.add(part);
-        }
-    }
-}
diff --git a/src/com/android/phone/common/mail/internet/TextBody.java b/src/com/android/phone/common/mail/internet/TextBody.java
deleted file mode 100644
index 77bbd65..0000000
--- a/src/com/android/phone/common/mail/internet/TextBody.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.internet;
-
-import android.util.Base64;
-
-import com.android.phone.common.mail.Body;
-import com.android.phone.common.mail.MessagingException;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-
-public class TextBody implements Body {
-    String mBody;
-
-    public TextBody(String body) {
-        this.mBody = body;
-    }
-
-    @Override
-    public void writeTo(OutputStream out) throws IOException, MessagingException {
-        byte[] bytes = mBody.getBytes("UTF-8");
-        out.write(Base64.encode(bytes, Base64.CRLF));
-    }
-
-    /**
-     * Get the text of the body in it's unencoded format.
-     * @return
-     */
-    public String getText() {
-        return mBody;
-    }
-
-    /**
-     * Returns an InputStream that reads this body's text in UTF-8 format.
-     */
-    @Override
-    public InputStream getInputStream() throws MessagingException {
-        try {
-            byte[] b = mBody.getBytes("UTF-8");
-            return new ByteArrayInputStream(b);
-        }
-        catch (UnsupportedEncodingException usee) {
-            return null;
-        }
-    }
-}
diff --git a/src/com/android/phone/common/mail/store/ImapConnection.java b/src/com/android/phone/common/mail/store/ImapConnection.java
deleted file mode 100644
index af8773b..0000000
--- a/src/com/android/phone/common/mail/store/ImapConnection.java
+++ /dev/null
@@ -1,413 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.store;
-
-import android.util.ArraySet;
-import android.util.Base64;
-import com.android.phone.common.mail.AuthenticationFailedException;
-import com.android.phone.common.mail.CertificateValidationException;
-import com.android.phone.common.mail.MailTransport;
-import com.android.phone.common.mail.MessagingException;
-import com.android.phone.common.mail.store.ImapStore.ImapException;
-import com.android.phone.common.mail.store.imap.DigestMd5Utils;
-import com.android.phone.common.mail.store.imap.ImapConstants;
-import com.android.phone.common.mail.store.imap.ImapResponse;
-import com.android.phone.common.mail.store.imap.ImapResponseParser;
-import com.android.phone.common.mail.store.imap.ImapUtility;
-import com.android.phone.common.mail.utils.LogUtils;
-import com.android.phone.vvm.omtp.OmtpEvents;
-import com.android.phone.vvm.omtp.VvmLog;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
-import javax.net.ssl.SSLException;
-
-/**
- * A cacheable class that stores the details for a single IMAP connection.
- */
-public class ImapConnection {
-    private final String TAG = "ImapConnection";
-
-    private String mLoginPhrase;
-    private ImapStore mImapStore;
-    private MailTransport mTransport;
-    private ImapResponseParser mParser;
-    private Set<String> mCapabilities = new ArraySet<>();
-
-    static final String IMAP_REDACTED_LOG = "[IMAP command redacted]";
-
-    /**
-     * Next tag to use.  All connections associated to the same ImapStore instance share the same
-     * counter to make tests simpler.
-     * (Some of the tests involve multiple connections but only have a single counter to track the
-     * tag.)
-     */
-    private final AtomicInteger mNextCommandTag = new AtomicInteger(0);
-
-    ImapConnection(ImapStore store) {
-        setStore(store);
-    }
-
-    void setStore(ImapStore store) {
-        // TODO: maybe we should throw an exception if the connection is not closed here,
-        // if it's not currently closed, then we won't reopen it, so if the credentials have
-        // changed, the connection will not be reestablished.
-        mImapStore = store;
-        mLoginPhrase = null;
-    }
-
-    /**
-     * Generates and returns the phrase to be used for authentication. This will be a LOGIN with
-     * username and password.
-     *
-     * @return the login command string to sent to the IMAP server
-     */
-    String getLoginPhrase() {
-        if (mLoginPhrase == null) {
-            if (mImapStore.getUsername() != null && mImapStore.getPassword() != null) {
-                // build the LOGIN string once (instead of over-and-over again.)
-                // apply the quoting here around the built-up password
-                mLoginPhrase = ImapConstants.LOGIN + " " + mImapStore.getUsername() + " "
-                        + ImapUtility.imapQuoted(mImapStore.getPassword());
-            }
-        }
-        return mLoginPhrase;
-    }
-
-    public void open() throws IOException, MessagingException {
-        if (mTransport != null && mTransport.isOpen()) {
-            return;
-        }
-
-        try {
-            // copy configuration into a clean transport, if necessary
-            if (mTransport == null) {
-                mTransport = mImapStore.cloneTransport();
-            }
-
-            mTransport.open();
-
-            createParser();
-
-            // The server should greet us with something like
-            // * OK IMAP4rev1 Server
-            // consume the response before doing anything else.
-            ImapResponse response = mParser.readResponse(false);
-            if (!response.isOk()) {
-                mImapStore.getImapHelper()
-                        .handleEvent(OmtpEvents.DATA_INVALID_INITIAL_SERVER_RESPONSE);
-                throw new MessagingException(
-                        MessagingException.AUTHENTICATION_FAILED_OR_SERVER_ERROR,
-                        "Invalid server initial response");
-            }
-
-            queryCapability();
-
-            maybeDoStartTls();
-
-            // LOGIN
-            doLogin();
-        } catch (SSLException e) {
-            LogUtils.d(TAG, "SSLException ", e);
-            mImapStore.getImapHelper().handleEvent(OmtpEvents.DATA_SSL_EXCEPTION);
-            throw new CertificateValidationException(e.getMessage(), e);
-        } catch (IOException ioe) {
-            LogUtils.d(TAG, "IOException", ioe);
-            mImapStore.getImapHelper().handleEvent(OmtpEvents.DATA_IOE_ON_OPEN);
-            throw ioe;
-        } finally {
-            destroyResponses();
-        }
-    }
-
-    void logout() {
-        try {
-            sendCommand(ImapConstants.LOGOUT, false);
-            if (!mParser.readResponse(true).is(0, ImapConstants.BYE)) {
-                VvmLog.e(TAG, "Server did not respond LOGOUT with BYE");
-            }
-            if (!mParser.readResponse(false).isOk()) {
-                VvmLog.e(TAG, "Server did not respond OK after LOGOUT");
-            }
-        } catch (IOException | MessagingException e) {
-            VvmLog.e(TAG, "Error while logging out:" + e);
-        }
-    }
-
-    /**
-     * Closes the connection and releases all resources. This connection can not be used again
-     * until {@link #setStore(ImapStore)} is called.
-     */
-    void close() {
-        if (mTransport != null) {
-            logout();
-            mTransport.close();
-            mTransport = null;
-        }
-        destroyResponses();
-        mParser = null;
-        mImapStore = null;
-    }
-
-    /**
-     * Attempts to convert the connection into secure connection.
-     */
-    private void maybeDoStartTls() throws IOException, MessagingException {
-        // STARTTLS is required in the OMTP standard but not every implementation support it.
-        // Make sure the server does have this capability
-        if (hasCapability(ImapConstants.CAPABILITY_STARTTLS)) {
-            executeSimpleCommand(ImapConstants.STARTTLS);
-            mTransport.reopenTls();
-            createParser();
-            // The cached capabilities should be refreshed after TLS is established.
-            queryCapability();
-        }
-    }
-
-    /**
-     * Logs into the IMAP server
-     */
-    private void doLogin() throws IOException, MessagingException, AuthenticationFailedException {
-        try {
-            if (mCapabilities.contains(ImapConstants.CAPABILITY_AUTH_DIGEST_MD5)) {
-                doDigestMd5Auth();
-            } else {
-                executeSimpleCommand(getLoginPhrase(), true);
-            }
-        } catch (ImapException ie) {
-            LogUtils.d(TAG, "ImapException", ie);
-            String status = ie.getStatus();
-            String statusMessage = ie.getStatusMessage();
-            String alertText = ie.getAlertText();
-
-            if (ImapConstants.NO.equals(status)) {
-                switch (statusMessage) {
-                    case ImapConstants.NO_UNKNOWN_USER:
-                        mImapStore.getImapHelper().handleEvent(OmtpEvents.DATA_AUTH_UNKNOWN_USER);
-                        break;
-                    case ImapConstants.NO_UNKNOWN_CLIENT:
-                        mImapStore.getImapHelper().handleEvent(OmtpEvents.DATA_AUTH_UNKNOWN_DEVICE);
-                        break;
-                    case ImapConstants.NO_INVALID_PASSWORD:
-                        mImapStore.getImapHelper()
-                                .handleEvent(OmtpEvents.DATA_AUTH_INVALID_PASSWORD);
-                        break;
-                    case ImapConstants.NO_MAILBOX_NOT_INITIALIZED:
-                        mImapStore.getImapHelper()
-                                .handleEvent(OmtpEvents.DATA_AUTH_MAILBOX_NOT_INITIALIZED);
-                        break;
-                    case ImapConstants.NO_SERVICE_IS_NOT_PROVISIONED:
-                        mImapStore.getImapHelper()
-                                .handleEvent(OmtpEvents.DATA_AUTH_SERVICE_NOT_PROVISIONED);
-                        break;
-                    case ImapConstants.NO_SERVICE_IS_NOT_ACTIVATED:
-                        mImapStore.getImapHelper()
-                                .handleEvent(OmtpEvents.DATA_AUTH_SERVICE_NOT_ACTIVATED);
-                        break;
-                    case ImapConstants.NO_USER_IS_BLOCKED:
-                        mImapStore.getImapHelper()
-                                .handleEvent(OmtpEvents.DATA_AUTH_USER_IS_BLOCKED);
-                        break;
-                    case ImapConstants.NO_APPLICATION_ERROR:
-                        mImapStore.getImapHelper()
-                                .handleEvent(OmtpEvents.DATA_REJECTED_SERVER_RESPONSE);
-                    default:
-                        mImapStore.getImapHelper().handleEvent(OmtpEvents.DATA_BAD_IMAP_CREDENTIAL);
-                }
-                throw new AuthenticationFailedException(alertText, ie);
-            }
-
-            mImapStore.getImapHelper().handleEvent(OmtpEvents.DATA_REJECTED_SERVER_RESPONSE);
-            throw new MessagingException(alertText, ie);
-        }
-    }
-
-    private void doDigestMd5Auth() throws IOException, MessagingException {
-
-        //  Initiate the authentication.
-        //  The server will issue us a challenge, asking to run MD5 on the nonce with our password
-        //  and other data, including the cnonce we randomly generated.
-        //
-        //  C: a AUTHENTICATE DIGEST-MD5
-        //  S: (BASE64) realm="elwood.innosoft.com",nonce="OA6MG9tEQGm2hh",qop="auth",
-        //             algorithm=md5-sess,charset=utf-8
-        List<ImapResponse> responses = executeSimpleCommand(
-            ImapConstants.AUTHENTICATE + " " + ImapConstants.AUTH_DIGEST_MD5);
-        String decodedChallenge = decodeBase64(responses.get(0).getStringOrEmpty(0).getString());
-
-        Map<String, String> challenge = DigestMd5Utils.parseDigestMessage(decodedChallenge);
-        DigestMd5Utils.Data data = new DigestMd5Utils.Data(mImapStore, mTransport, challenge);
-
-        String response = data.createResponse();
-        //  Respond to the challenge. If the server accepts it, it will reply a response-auth which
-        //  is the MD5 of our password and the cnonce we've provided, to prove the server does know
-        //  the password.
-        //
-        //  C: (BASE64) charset=utf-8,username="chris",realm="elwood.innosoft.com",
-        //              nonce="OA6MG9tEQGm2hh",nc=00000001,cnonce="OA6MHXh6VqTrRk",
-        //              digest-uri="imap/elwood.innosoft.com",
-        //              response=d388dad90d4bbd760a152321f2143af7,qop=auth
-        //  S: (BASE64) rspauth=ea40f60335c427b5527b84dbabcdfffd
-
-        responses = executeContinuationResponse(encodeBase64(response), true);
-
-        // Verify response-auth.
-        // If failed verifyResponseAuth() will throw a MessagingException, terminating the
-        // connection
-        String decodedResponseAuth = decodeBase64(responses.get(0).getStringOrEmpty(0).getString());
-        data.verifyResponseAuth(decodedResponseAuth);
-
-        //  Send a empty response to indicate we've accepted the response-auth
-        //
-        //  C: (empty)
-        //  S: a OK User logged in
-        executeContinuationResponse("", false);
-
-    }
-
-    private static String decodeBase64(String string) {
-        return new String(Base64.decode(string, Base64.DEFAULT));
-    }
-
-    private static String encodeBase64(String string) {
-        return Base64.encodeToString(string.getBytes(), Base64.NO_WRAP);
-    }
-
-    private void queryCapability() throws IOException, MessagingException {
-        List<ImapResponse> responses = executeSimpleCommand(ImapConstants.CAPABILITY);
-        mCapabilities.clear();
-        Set<String> disabledCapabilities = mImapStore.getImapHelper().getConfig()
-                .getDisabledCapabilities();
-        for (ImapResponse response : responses) {
-            if (response.isTagged()) {
-                continue;
-            }
-            for (int i = 0; i < response.size(); i++) {
-                String capability = response.getStringOrEmpty(i).getString();
-                if (disabledCapabilities != null) {
-                    if (!disabledCapabilities.contains(capability)) {
-                        mCapabilities.add(capability);
-                    }
-                } else {
-                    mCapabilities.add(capability);
-                }
-            }
-        }
-
-        LogUtils.d(TAG, "Capabilities: " + mCapabilities.toString());
-    }
-
-    private boolean hasCapability(String capability) {
-        return mCapabilities.contains(capability);
-    }
-    /**
-     * Create an {@link ImapResponseParser} from {@code mTransport.getInputStream()} and
-     * set it to {@link #mParser}.
-     *
-     * If we already have an {@link ImapResponseParser}, we
-     * {@link #destroyResponses()} and throw it away.
-     */
-    private void createParser() {
-        destroyResponses();
-        mParser = new ImapResponseParser(mTransport.getInputStream());
-    }
-
-
-    public void destroyResponses() {
-        if (mParser != null) {
-            mParser.destroyResponses();
-        }
-    }
-
-    public ImapResponse readResponse() throws IOException, MessagingException {
-        return mParser.readResponse(false);
-    }
-
-    public List<ImapResponse> executeSimpleCommand(String command)
-            throws IOException, MessagingException{
-        return executeSimpleCommand(command, false);
-    }
-
-    /**
-     * Send a single command to the server.  The command will be preceded by an IMAP command
-     * tag and followed by \r\n (caller need not supply them).
-     * Execute a simple command at the server, a simple command being one that is sent in a single
-     * line of text
-     *
-     * @param command the command to send to the server
-     * @param sensitive whether the command should be redacted in logs (used for login)
-     * @return a list of ImapResponses
-     * @throws IOException
-     * @throws MessagingException
-     */
-    public List<ImapResponse> executeSimpleCommand(String command, boolean sensitive)
-            throws IOException, MessagingException {
-        // TODO: It may be nice to catch IOExceptions and close the connection here.
-        // Currently, we expect callers to do that, but if they fail to we'll be in a broken state.
-        sendCommand(command, sensitive);
-        return getCommandResponses();
-    }
-
-    public String sendCommand(String command, boolean sensitive)
-            throws IOException, MessagingException {
-        open();
-
-        if (mTransport == null) {
-            throw new IOException("Null transport");
-        }
-        String tag = Integer.toString(mNextCommandTag.incrementAndGet());
-        String commandToSend = tag + " " + command;
-        mTransport.writeLine(commandToSend, (sensitive ? IMAP_REDACTED_LOG : command));
-        return tag;
-    }
-
-    List<ImapResponse> executeContinuationResponse(String response, boolean sensitive)
-            throws IOException, MessagingException {
-        mTransport.writeLine(response, (sensitive ? IMAP_REDACTED_LOG : response));
-        return getCommandResponses();
-    }
-
-    /**
-     * Read and return all of the responses from the most recent command sent to the server
-     *
-     * @return a list of ImapResponses
-     * @throws IOException
-     * @throws MessagingException
-     */
-    List<ImapResponse> getCommandResponses()
-            throws IOException, MessagingException {
-        final List<ImapResponse> responses = new ArrayList<ImapResponse>();
-        ImapResponse response;
-        do {
-            response = mParser.readResponse(false);
-            responses.add(response);
-        } while (!(response.isTagged() || response.isContinuationRequest()));
-
-        if (!(response.isOk() || response.isContinuationRequest())) {
-            final String toString = response.toString();
-            final String status = response.getStatusOrEmpty().getString();
-            final String statusMessage = response.getStatusResponseTextOrEmpty().getString();
-            final String alert = response.getAlertTextOrEmpty().getString();
-            final String responseCode = response.getResponseCodeOrEmpty().getString();
-            destroyResponses();
-            throw new ImapException(toString, status, statusMessage, alert, responseCode);
-        }
-        return responses;
-    }
-}
diff --git a/src/com/android/phone/common/mail/store/ImapFolder.java b/src/com/android/phone/common/mail/store/ImapFolder.java
deleted file mode 100644
index 4abb7f5..0000000
--- a/src/com/android/phone/common/mail/store/ImapFolder.java
+++ /dev/null
@@ -1,787 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.store;
-
-import android.annotation.Nullable;
-import android.content.Context;
-import android.text.TextUtils;
-import android.util.Base64DataException;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.phone.common.R;
-import com.android.phone.common.mail.AuthenticationFailedException;
-import com.android.phone.common.mail.Body;
-import com.android.phone.common.mail.FetchProfile;
-import com.android.phone.common.mail.Flag;
-import com.android.phone.common.mail.Message;
-import com.android.phone.common.mail.MessagingException;
-import com.android.phone.common.mail.Part;
-import com.android.phone.common.mail.internet.BinaryTempFileBody;
-import com.android.phone.common.mail.internet.MimeBodyPart;
-import com.android.phone.common.mail.internet.MimeHeader;
-import com.android.phone.common.mail.internet.MimeMultipart;
-import com.android.phone.common.mail.internet.MimeUtility;
-import com.android.phone.common.mail.store.ImapStore.ImapException;
-import com.android.phone.common.mail.store.ImapStore.ImapMessage;
-import com.android.phone.common.mail.store.imap.ImapConstants;
-import com.android.phone.common.mail.store.imap.ImapElement;
-import com.android.phone.common.mail.store.imap.ImapList;
-import com.android.phone.common.mail.store.imap.ImapResponse;
-import com.android.phone.common.mail.store.imap.ImapString;
-import com.android.phone.common.mail.utils.LogUtils;
-import com.android.phone.common.mail.utils.Utility;
-import com.android.phone.vvm.omtp.OmtpEvents;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Locale;
-
-public class ImapFolder {
-    private static final String TAG = "ImapFolder";
-    private final static String[] PERMANENT_FLAGS =
-        { Flag.DELETED, Flag.SEEN, Flag.FLAGGED, Flag.ANSWERED };
-    private static final int COPY_BUFFER_SIZE = 16*1024;
-
-    private final ImapStore mStore;
-    private final String mName;
-    private int mMessageCount = -1;
-    private ImapConnection mConnection;
-    private String mMode;
-    private boolean mExists;
-    /** A set of hashes that can be used to track dirtiness */
-    Object mHash[];
-
-    public static final String MODE_READ_ONLY = "mode_read_only";
-    public static final String MODE_READ_WRITE = "mode_read_write";
-
-    public ImapFolder(ImapStore store, String name) {
-        mStore = store;
-        mName = name;
-    }
-
-    /**
-     * Callback for each message retrieval.
-     */
-    public interface MessageRetrievalListener {
-        public void messageRetrieved(Message message);
-    }
-
-    private void destroyResponses() {
-        if (mConnection != null) {
-            mConnection.destroyResponses();
-        }
-    }
-
-    public void open(String mode) throws MessagingException {
-        try {
-            if (isOpen()) {
-                throw new AssertionError("Duplicated open on ImapFolder");
-            }
-            synchronized (this) {
-                mConnection = mStore.getConnection();
-            }
-            // * FLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk
-            // $MDNSent)
-            // * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft
-            // NonJunk $MDNSent \*)] Flags permitted.
-            // * 23 EXISTS
-            // * 0 RECENT
-            // * OK [UIDVALIDITY 1125022061] UIDs valid
-            // * OK [UIDNEXT 57576] Predicted next UID
-            // 2 OK [READ-WRITE] Select completed.
-            try {
-                doSelect();
-            } catch (IOException ioe) {
-                throw ioExceptionHandler(mConnection, ioe);
-            } finally {
-                destroyResponses();
-            }
-        } catch (AuthenticationFailedException e) {
-            // Don't cache this connection, so we're forced to try connecting/login again
-            mConnection = null;
-            close(false);
-            throw e;
-        } catch (MessagingException e) {
-            mExists = false;
-            close(false);
-            throw e;
-        }
-    }
-
-    public boolean isOpen() {
-        return mExists && mConnection != null;
-    }
-
-    public String getMode() {
-        return mMode;
-    }
-
-    public void close(boolean expunge) {
-        if (expunge) {
-            try {
-                expunge();
-            } catch (MessagingException e) {
-                LogUtils.e(TAG, e, "Messaging Exception");
-            }
-        }
-        mMessageCount = -1;
-        synchronized (this) {
-            mConnection = null;
-        }
-    }
-
-    public int getMessageCount() {
-        return mMessageCount;
-    }
-
-    String[] getSearchUids(List<ImapResponse> responses) {
-        // S: * SEARCH 2 3 6
-        final ArrayList<String> uids = new ArrayList<String>();
-        for (ImapResponse response : responses) {
-            if (!response.isDataResponse(0, ImapConstants.SEARCH)) {
-                continue;
-            }
-            // Found SEARCH response data
-            for (int i = 1; i < response.size(); i++) {
-                ImapString s = response.getStringOrEmpty(i);
-                if (s.isString()) {
-                    uids.add(s.getString());
-                }
-            }
-        }
-        return uids.toArray(Utility.EMPTY_STRINGS);
-    }
-
-    @VisibleForTesting
-    String[] searchForUids(String searchCriteria) throws MessagingException {
-        checkOpen();
-        try {
-            try {
-                final String command = ImapConstants.UID_SEARCH + " " + searchCriteria;
-                final String[] result = getSearchUids(mConnection.executeSimpleCommand(command));
-                LogUtils.d(TAG, "searchForUids '" + searchCriteria + "' results: " +
-                        result.length);
-                return result;
-            } catch (ImapException me) {
-                LogUtils.d(TAG, "ImapException in search: " + searchCriteria, me);
-                return Utility.EMPTY_STRINGS; // Not found
-            } catch (IOException ioe) {
-                LogUtils.d(TAG, "IOException in search: " + searchCriteria, ioe);
-                mStore.getImapHelper().handleEvent(OmtpEvents.DATA_GENERIC_IMAP_IOE);
-                throw ioExceptionHandler(mConnection, ioe);
-            }
-        } finally {
-            destroyResponses();
-        }
-    }
-
-    @Nullable
-    public Message getMessage(String uid) throws MessagingException {
-        checkOpen();
-
-        final String[] uids = searchForUids(ImapConstants.UID + " " + uid);
-        for (int i = 0; i < uids.length; i++) {
-            if (uids[i].equals(uid)) {
-                return new ImapMessage(uid, this);
-            }
-        }
-        LogUtils.e(TAG, "UID " + uid + " not found on server");
-        return null;
-    }
-
-    @VisibleForTesting
-    protected static boolean isAsciiString(String str) {
-        int len = str.length();
-        for (int i = 0; i < len; i++) {
-            char c = str.charAt(i);
-            if (c >= 128) return false;
-        }
-        return true;
-    }
-
-    public Message[] getMessages(String[] uids) throws MessagingException {
-        if (uids == null) {
-            uids = searchForUids("1:* NOT DELETED");
-        }
-        return getMessagesInternal(uids);
-    }
-
-    public Message[] getMessagesInternal(String[] uids) {
-        final ArrayList<Message> messages = new ArrayList<Message>(uids.length);
-        for (int i = 0; i < uids.length; i++) {
-            final String uid = uids[i];
-            final ImapMessage message = new ImapMessage(uid, this);
-            messages.add(message);
-        }
-        return messages.toArray(Message.EMPTY_ARRAY);
-    }
-
-    public void fetch(Message[] messages, FetchProfile fp,
-            MessageRetrievalListener listener) throws MessagingException {
-        try {
-            fetchInternal(messages, fp, listener);
-        } catch (RuntimeException e) { // Probably a parser error.
-            LogUtils.w(TAG, "Exception detected: " + e.getMessage());
-            throw e;
-        }
-    }
-
-    public void fetchInternal(Message[] messages, FetchProfile fp,
-            MessageRetrievalListener listener) throws MessagingException {
-        if (messages.length == 0) {
-            return;
-        }
-        checkOpen();
-        HashMap<String, Message> messageMap = new HashMap<String, Message>();
-        for (Message m : messages) {
-            messageMap.put(m.getUid(), m);
-        }
-
-        /*
-         * Figure out what command we are going to run:
-         * FLAGS     - UID FETCH (FLAGS)
-         * ENVELOPE  - UID FETCH (INTERNALDATE UID RFC822.SIZE FLAGS BODY.PEEK[
-         *                            HEADER.FIELDS (date subject from content-type to cc)])
-         * STRUCTURE - UID FETCH (BODYSTRUCTURE)
-         * BODY_SANE - UID FETCH (BODY.PEEK[]<0.N>) where N = max bytes returned
-         * BODY      - UID FETCH (BODY.PEEK[])
-         * Part      - UID FETCH (BODY.PEEK[ID]) where ID = mime part ID
-         */
-
-        final LinkedHashSet<String> fetchFields = new LinkedHashSet<String>();
-
-        fetchFields.add(ImapConstants.UID);
-        if (fp.contains(FetchProfile.Item.FLAGS)) {
-            fetchFields.add(ImapConstants.FLAGS);
-        }
-        if (fp.contains(FetchProfile.Item.ENVELOPE)) {
-            fetchFields.add(ImapConstants.INTERNALDATE);
-            fetchFields.add(ImapConstants.RFC822_SIZE);
-            fetchFields.add(ImapConstants.FETCH_FIELD_HEADERS);
-        }
-        if (fp.contains(FetchProfile.Item.STRUCTURE)) {
-            fetchFields.add(ImapConstants.BODYSTRUCTURE);
-        }
-
-        if (fp.contains(FetchProfile.Item.BODY_SANE)) {
-            fetchFields.add(ImapConstants.FETCH_FIELD_BODY_PEEK_SANE);
-        }
-        if (fp.contains(FetchProfile.Item.BODY)) {
-            fetchFields.add(ImapConstants.FETCH_FIELD_BODY_PEEK);
-        }
-
-        // TODO Why are we only fetching the first part given?
-        final Part fetchPart = fp.getFirstPart();
-        if (fetchPart != null) {
-            final String[] partIds =
-                    fetchPart.getHeader(MimeHeader.HEADER_ANDROID_ATTACHMENT_STORE_DATA);
-            // TODO Why can a single part have more than one Id? And why should we only fetch
-            // the first id if there are more than one?
-            if (partIds != null) {
-                fetchFields.add(ImapConstants.FETCH_FIELD_BODY_PEEK_BARE
-                        + "[" + partIds[0] + "]");
-            }
-        }
-
-        try {
-            mConnection.sendCommand(String.format(Locale.US,
-                    ImapConstants.UID_FETCH + " %s (%s)", ImapStore.joinMessageUids(messages),
-                    Utility.combine(fetchFields.toArray(new String[fetchFields.size()]), ' ')
-            ), false);
-            ImapResponse response;
-            do {
-                response = null;
-                try {
-                    response = mConnection.readResponse();
-
-                    if (!response.isDataResponse(1, ImapConstants.FETCH)) {
-                        continue; // Ignore
-                    }
-                    final ImapList fetchList = response.getListOrEmpty(2);
-                    final String uid = fetchList.getKeyedStringOrEmpty(ImapConstants.UID)
-                            .getString();
-                    if (TextUtils.isEmpty(uid)) continue;
-
-                    ImapMessage message = (ImapMessage) messageMap.get(uid);
-                    if (message == null) continue;
-
-                    if (fp.contains(FetchProfile.Item.FLAGS)) {
-                        final ImapList flags =
-                            fetchList.getKeyedListOrEmpty(ImapConstants.FLAGS);
-                        for (int i = 0, count = flags.size(); i < count; i++) {
-                            final ImapString flag = flags.getStringOrEmpty(i);
-                            if (flag.is(ImapConstants.FLAG_DELETED)) {
-                                message.setFlagInternal(Flag.DELETED, true);
-                            } else if (flag.is(ImapConstants.FLAG_ANSWERED)) {
-                                message.setFlagInternal(Flag.ANSWERED, true);
-                            } else if (flag.is(ImapConstants.FLAG_SEEN)) {
-                                message.setFlagInternal(Flag.SEEN, true);
-                            } else if (flag.is(ImapConstants.FLAG_FLAGGED)) {
-                                message.setFlagInternal(Flag.FLAGGED, true);
-                            }
-                        }
-                    }
-                    if (fp.contains(FetchProfile.Item.ENVELOPE)) {
-                        final Date internalDate = fetchList.getKeyedStringOrEmpty(
-                                ImapConstants.INTERNALDATE).getDateOrNull();
-                        final int size = fetchList.getKeyedStringOrEmpty(
-                                ImapConstants.RFC822_SIZE).getNumberOrZero();
-                        final String header = fetchList.getKeyedStringOrEmpty(
-                                ImapConstants.BODY_BRACKET_HEADER, true).getString();
-
-                        message.setInternalDate(internalDate);
-                        message.setSize(size);
-                        message.parse(Utility.streamFromAsciiString(header));
-                    }
-                    if (fp.contains(FetchProfile.Item.STRUCTURE)) {
-                        ImapList bs = fetchList.getKeyedListOrEmpty(
-                                ImapConstants.BODYSTRUCTURE);
-                        if (!bs.isEmpty()) {
-                            try {
-                                parseBodyStructure(bs, message, ImapConstants.TEXT);
-                            } catch (MessagingException e) {
-                                LogUtils.v(TAG, e, "Error handling message");
-                                message.setBody(null);
-                            }
-                        }
-                    }
-                    if (fp.contains(FetchProfile.Item.BODY)
-                            || fp.contains(FetchProfile.Item.BODY_SANE)) {
-                        // Body is keyed by "BODY[]...".
-                        // Previously used "BODY[..." but this can be confused with "BODY[HEADER..."
-                        // TODO Should we accept "RFC822" as well??
-                        ImapString body = fetchList.getKeyedStringOrEmpty("BODY[]", true);
-                        InputStream bodyStream = body.getAsStream();
-                        message.parse(bodyStream);
-                    }
-                    if (fetchPart != null) {
-                        InputStream bodyStream =
-                                fetchList.getKeyedStringOrEmpty("BODY[", true).getAsStream();
-                        String encodings[] = fetchPart.getHeader(
-                                MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING);
-
-                        String contentTransferEncoding = null;
-                        if (encodings != null && encodings.length > 0) {
-                            contentTransferEncoding = encodings[0];
-                        } else {
-                            // According to http://tools.ietf.org/html/rfc2045#section-6.1
-                            // "7bit" is the default.
-                            contentTransferEncoding = "7bit";
-                        }
-
-                        try {
-                            // TODO Don't create 2 temp files.
-                            // decodeBody creates BinaryTempFileBody, but we could avoid this
-                            // if we implement ImapStringBody.
-                            // (We'll need to share a temp file.  Protect it with a ref-count.)
-                            message.setBody(decodeBody(mStore.getContext(), bodyStream,
-                                    contentTransferEncoding, fetchPart.getSize(), listener));
-                        } catch(Exception e) {
-                            // TODO: Figure out what kinds of exceptions might actually be thrown
-                            // from here. This blanket catch-all is because we're not sure what to
-                            // do if we don't have a contentTransferEncoding, and we don't have
-                            // time to figure out what exceptions might be thrown.
-                            LogUtils.e(TAG, "Error fetching body %s", e);
-                        }
-                    }
-
-                    if (listener != null) {
-                        listener.messageRetrieved(message);
-                    }
-                } finally {
-                    destroyResponses();
-                }
-            } while (!response.isTagged());
-        } catch (IOException ioe) {
-            mStore.getImapHelper().handleEvent(OmtpEvents.DATA_GENERIC_IMAP_IOE);
-            throw ioExceptionHandler(mConnection, ioe);
-        }
-    }
-
-    /**
-     * Removes any content transfer encoding from the stream and returns a Body.
-     * This code is taken/condensed from MimeUtility.decodeBody
-     */
-    private static Body decodeBody(Context context,InputStream in, String contentTransferEncoding,
-            int size, MessageRetrievalListener listener) throws IOException {
-        // Get a properly wrapped input stream
-        in = MimeUtility.getInputStreamForContentTransferEncoding(in, contentTransferEncoding);
-        BinaryTempFileBody tempBody = new BinaryTempFileBody();
-        OutputStream out = tempBody.getOutputStream();
-        try {
-            byte[] buffer = new byte[COPY_BUFFER_SIZE];
-            int n = 0;
-            int count = 0;
-            while (-1 != (n = in.read(buffer))) {
-                out.write(buffer, 0, n);
-                count += n;
-            }
-        } catch (Base64DataException bde) {
-            String warning = "\n\n" + context.getString(R.string.message_decode_error);
-            out.write(warning.getBytes());
-        } finally {
-            out.close();
-        }
-        return tempBody;
-    }
-
-    public String[] getPermanentFlags() {
-        return PERMANENT_FLAGS;
-    }
-
-    /**
-     * Handle any untagged responses that the caller doesn't care to handle themselves.
-     * @param responses
-     */
-    private void handleUntaggedResponses(List<ImapResponse> responses) {
-        for (ImapResponse response : responses) {
-            handleUntaggedResponse(response);
-        }
-    }
-
-    /**
-     * Handle an untagged response that the caller doesn't care to handle themselves.
-     * @param response
-     */
-    private void handleUntaggedResponse(ImapResponse response) {
-        if (response.isDataResponse(1, ImapConstants.EXISTS)) {
-            mMessageCount = response.getStringOrEmpty(0).getNumberOrZero();
-        }
-    }
-
-    private static void parseBodyStructure(ImapList bs, Part part, String id)
-            throws MessagingException {
-        if (bs.getElementOrNone(0).isList()) {
-            /*
-             * This is a multipart/*
-             */
-            MimeMultipart mp = new MimeMultipart();
-            for (int i = 0, count = bs.size(); i < count; i++) {
-                ImapElement e = bs.getElementOrNone(i);
-                if (e.isList()) {
-                    /*
-                     * For each part in the message we're going to add a new BodyPart and parse
-                     * into it.
-                     */
-                    MimeBodyPart bp = new MimeBodyPart();
-                    if (id.equals(ImapConstants.TEXT)) {
-                        parseBodyStructure(bs.getListOrEmpty(i), bp, Integer.toString(i + 1));
-
-                    } else {
-                        parseBodyStructure(bs.getListOrEmpty(i), bp, id + "." + (i + 1));
-                    }
-                    mp.addBodyPart(bp);
-
-                } else {
-                    if (e.isString()) {
-                        mp.setSubType(bs.getStringOrEmpty(i).getString().toLowerCase(Locale.US));
-                    }
-                    break; // Ignore the rest of the list.
-                }
-            }
-            part.setBody(mp);
-        } else {
-            /*
-             * This is a body. We need to add as much information as we can find out about
-             * it to the Part.
-             */
-
-            /*
-             body type
-             body subtype
-             body parameter parenthesized list
-             body id
-             body description
-             body encoding
-             body size
-             */
-
-            final ImapString type = bs.getStringOrEmpty(0);
-            final ImapString subType = bs.getStringOrEmpty(1);
-            final String mimeType =
-                    (type.getString() + "/" + subType.getString()).toLowerCase(Locale.US);
-
-            final ImapList bodyParams = bs.getListOrEmpty(2);
-            final ImapString cid = bs.getStringOrEmpty(3);
-            final ImapString encoding = bs.getStringOrEmpty(5);
-            final int size = bs.getStringOrEmpty(6).getNumberOrZero();
-
-            if (MimeUtility.mimeTypeMatches(mimeType, MimeUtility.MIME_TYPE_RFC822)) {
-                // A body type of type MESSAGE and subtype RFC822
-                // contains, immediately after the basic fields, the
-                // envelope structure, body structure, and size in
-                // text lines of the encapsulated message.
-                // [MESSAGE, RFC822, [NAME, filename.eml], NIL, NIL, 7BIT, 5974, NIL,
-                //     [INLINE, [FILENAME*0, Fwd: Xxx..., FILENAME*1, filename.eml]], NIL]
-                /*
-                 * This will be caught by fetch and handled appropriately.
-                 */
-                throw new MessagingException("BODYSTRUCTURE " + MimeUtility.MIME_TYPE_RFC822
-                        + " not yet supported.");
-            }
-
-            /*
-             * Set the content type with as much information as we know right now.
-             */
-            final StringBuilder contentType = new StringBuilder(mimeType);
-
-            /*
-             * If there are body params we might be able to get some more information out
-             * of them.
-             */
-            for (int i = 1, count = bodyParams.size(); i < count; i += 2) {
-
-                // TODO We need to convert " into %22, but
-                // because MimeUtility.getHeaderParameter doesn't recognize it,
-                // we can't fix it for now.
-                contentType.append(String.format(";\n %s=\"%s\"",
-                        bodyParams.getStringOrEmpty(i - 1).getString(),
-                        bodyParams.getStringOrEmpty(i).getString()));
-            }
-
-            part.setHeader(MimeHeader.HEADER_CONTENT_TYPE, contentType.toString());
-
-            // Extension items
-            final ImapList bodyDisposition;
-
-            if (type.is(ImapConstants.TEXT) && bs.getElementOrNone(9).isList()) {
-                // If media-type is TEXT, 9th element might be: [body-fld-lines] := number
-                // So, if it's not a list, use 10th element.
-                // (Couldn't find evidence in the RFC if it's ALWAYS 10th element.)
-                bodyDisposition = bs.getListOrEmpty(9);
-            } else {
-                bodyDisposition = bs.getListOrEmpty(8);
-            }
-
-            final StringBuilder contentDisposition = new StringBuilder();
-
-            if (bodyDisposition.size() > 0) {
-                final String bodyDisposition0Str =
-                        bodyDisposition.getStringOrEmpty(0).getString().toLowerCase(Locale.US);
-                if (!TextUtils.isEmpty(bodyDisposition0Str)) {
-                    contentDisposition.append(bodyDisposition0Str);
-                }
-
-                final ImapList bodyDispositionParams = bodyDisposition.getListOrEmpty(1);
-                if (!bodyDispositionParams.isEmpty()) {
-                    /*
-                     * If there is body disposition information we can pull some more
-                     * information about the attachment out.
-                     */
-                    for (int i = 1, count = bodyDispositionParams.size(); i < count; i += 2) {
-
-                        // TODO We need to convert " into %22.  See above.
-                        contentDisposition.append(String.format(Locale.US, ";\n %s=\"%s\"",
-                                bodyDispositionParams.getStringOrEmpty(i - 1)
-                                        .getString().toLowerCase(Locale.US),
-                                bodyDispositionParams.getStringOrEmpty(i).getString()));
-                    }
-                }
-            }
-
-            if ((size > 0)
-                    && (MimeUtility.getHeaderParameter(contentDisposition.toString(), "size")
-                            == null)) {
-                contentDisposition.append(String.format(Locale.US, ";\n size=%d", size));
-            }
-
-            if (contentDisposition.length() > 0) {
-                /*
-                 * Set the content disposition containing at least the size. Attachment
-                 * handling code will use this down the road.
-                 */
-                part.setHeader(MimeHeader.HEADER_CONTENT_DISPOSITION,
-                        contentDisposition.toString());
-            }
-
-            /*
-             * Set the Content-Transfer-Encoding header. Attachment code will use this
-             * to parse the body.
-             */
-            if (!encoding.isEmpty()) {
-                part.setHeader(MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING,
-                        encoding.getString());
-            }
-
-            /*
-             * Set the Content-ID header.
-             */
-            if (!cid.isEmpty()) {
-                part.setHeader(MimeHeader.HEADER_CONTENT_ID, cid.getString());
-            }
-
-            if (size > 0) {
-                if (part instanceof ImapMessage) {
-                    ((ImapMessage) part).setSize(size);
-                } else if (part instanceof MimeBodyPart) {
-                    ((MimeBodyPart) part).setSize(size);
-                } else {
-                    throw new MessagingException("Unknown part type " + part.toString());
-                }
-            }
-            part.setHeader(MimeHeader.HEADER_ANDROID_ATTACHMENT_STORE_DATA, id);
-        }
-
-    }
-
-    public Message[] expunge() throws MessagingException {
-        checkOpen();
-        try {
-            handleUntaggedResponses(mConnection.executeSimpleCommand(ImapConstants.EXPUNGE));
-        } catch (IOException ioe) {
-            mStore.getImapHelper().handleEvent(OmtpEvents.DATA_GENERIC_IMAP_IOE);
-            throw ioExceptionHandler(mConnection, ioe);
-        } finally {
-            destroyResponses();
-        }
-        return null;
-    }
-
-    public void setFlags(Message[] messages, String[] flags, boolean value)
-            throws MessagingException {
-        checkOpen();
-
-        String allFlags = "";
-        if (flags.length > 0) {
-            StringBuilder flagList = new StringBuilder();
-            for (int i = 0, count = flags.length; i < count; i++) {
-                String flag = flags[i];
-                if (flag == Flag.SEEN) {
-                    flagList.append(" " + ImapConstants.FLAG_SEEN);
-                } else if (flag == Flag.DELETED) {
-                    flagList.append(" " + ImapConstants.FLAG_DELETED);
-                } else if (flag == Flag.FLAGGED) {
-                    flagList.append(" " + ImapConstants.FLAG_FLAGGED);
-                } else if (flag == Flag.ANSWERED) {
-                    flagList.append(" " + ImapConstants.FLAG_ANSWERED);
-                }
-            }
-            allFlags = flagList.substring(1);
-        }
-        try {
-            mConnection.executeSimpleCommand(String.format(Locale.US,
-                    ImapConstants.UID_STORE + " %s %s" + ImapConstants.FLAGS_SILENT + " (%s)",
-                    ImapStore.joinMessageUids(messages),
-                    value ? "+" : "-",
-                    allFlags));
-
-        } catch (IOException ioe) {
-            mStore.getImapHelper().handleEvent(OmtpEvents.DATA_GENERIC_IMAP_IOE);
-            throw ioExceptionHandler(mConnection, ioe);
-        } finally {
-            destroyResponses();
-        }
-    }
-
-    /**
-     * Selects the folder for use. Before performing any operations on this folder, it
-     * must be selected.
-     */
-    private void doSelect() throws IOException, MessagingException {
-        final List<ImapResponse> responses = mConnection.executeSimpleCommand(
-                String.format(Locale.US, ImapConstants.SELECT + " \"%s\"", mName));
-
-        // Assume the folder is opened read-write; unless we are notified otherwise
-        mMode = MODE_READ_WRITE;
-        int messageCount = -1;
-        for (ImapResponse response : responses) {
-            if (response.isDataResponse(1, ImapConstants.EXISTS)) {
-                messageCount = response.getStringOrEmpty(0).getNumberOrZero();
-            } else if (response.isOk()) {
-                final ImapString responseCode = response.getResponseCodeOrEmpty();
-                if (responseCode.is(ImapConstants.READ_ONLY)) {
-                    mMode = MODE_READ_ONLY;
-                } else if (responseCode.is(ImapConstants.READ_WRITE)) {
-                    mMode = MODE_READ_WRITE;
-                }
-            } else if (response.isTagged()) { // Not OK
-                mStore.getImapHelper().handleEvent(OmtpEvents.DATA_MAILBOX_OPEN_FAILED);
-                throw new MessagingException("Can't open mailbox: "
-                        + response.getStatusResponseTextOrEmpty());
-            }
-        }
-        if (messageCount == -1) {
-            throw new MessagingException("Did not find message count during select");
-        }
-        mMessageCount = messageCount;
-        mExists = true;
-    }
-
-    public class Quota {
-
-        public final int occupied;
-        public final int total;
-
-        public Quota(int occupied, int total) {
-            this.occupied = occupied;
-            this.total = total;
-        }
-    }
-
-    public Quota getQuota() throws MessagingException {
-        try {
-            final List<ImapResponse> responses = mConnection.executeSimpleCommand(
-                    String.format(Locale.US, ImapConstants.GETQUOTAROOT + " \"%s\"", mName));
-
-            for (ImapResponse response : responses) {
-                if (!response.isDataResponse(0, ImapConstants.QUOTA)) {
-                    continue;
-                }
-                ImapList list = response.getListOrEmpty(2);
-                for (int i = 0; i < list.size(); i += 3) {
-                    if (!list.getStringOrEmpty(i).is("voice")) {
-                        continue;
-                    }
-                    return new Quota(
-                            list.getStringOrEmpty(i + 1).getNumber(-1),
-                            list.getStringOrEmpty(i + 2).getNumber(-1));
-                }
-            }
-        } catch (IOException ioe) {
-            mStore.getImapHelper().handleEvent(OmtpEvents.DATA_GENERIC_IMAP_IOE);
-            throw ioExceptionHandler(mConnection, ioe);
-        } finally {
-            destroyResponses();
-        }
-        return null;
-    }
-
-    private void checkOpen() throws MessagingException {
-        if (!isOpen()) {
-            throw new MessagingException("Folder " + mName + " is not open.");
-        }
-    }
-
-    private MessagingException ioExceptionHandler(ImapConnection connection, IOException ioe) {
-        LogUtils.d(TAG, "IO Exception detected: ", ioe);
-        connection.close();
-        if (connection == mConnection) {
-            mConnection = null; // To prevent close() from returning the connection to the pool.
-            close(false);
-        }
-        return new MessagingException(MessagingException.IOERROR, "IO Error", ioe);
-    }
-
-    public Message createMessage(String uid) {
-        return new ImapMessage(uid, this);
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/store/ImapStore.java b/src/com/android/phone/common/mail/store/ImapStore.java
deleted file mode 100644
index 179d0f2..0000000
--- a/src/com/android/phone/common/mail/store/ImapStore.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.store;
-
-import android.content.Context;
-import android.net.Network;
-
-import com.android.phone.common.mail.MailTransport;
-import com.android.phone.common.mail.Message;
-import com.android.phone.common.mail.MessagingException;
-import com.android.phone.common.mail.internet.MimeMessage;
-import com.android.phone.vvm.omtp.imap.ImapHelper;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-public class ImapStore {
-    /**
-     * A global suggestion to Store implementors on how much of the body
-     * should be returned on FetchProfile.Item.BODY_SANE requests. We'll use 125k now.
-     */
-    public static final int FETCH_BODY_SANE_SUGGESTED_SIZE = (125 * 1024);
-    private final Context mContext;
-    private final ImapHelper mHelper;
-    private final String mUsername;
-    private final String mPassword;
-    private final MailTransport mTransport;
-    private ImapConnection mConnection;
-
-    public static final int FLAG_NONE         = 0x00;    // No flags
-    public static final int FLAG_SSL          = 0x01;    // Use SSL
-    public static final int FLAG_TLS          = 0x02;    // Use TLS
-    public static final int FLAG_AUTHENTICATE = 0x04;    // Use name/password for authentication
-    public static final int FLAG_TRUST_ALL    = 0x08;    // Trust all certificates
-    public static final int FLAG_OAUTH        = 0x10;    // Use OAuth for authentication
-
-    /**
-     * Contains all the information necessary to log into an imap server
-     */
-    public ImapStore(Context context, ImapHelper helper, String username, String password, int port,
-            String serverName, int flags, Network network) {
-        mContext = context;
-        mHelper = helper;
-        mUsername = username;
-        mPassword = password;
-        mTransport = new MailTransport(context, this.getImapHelper(),
-                network, serverName, port, flags);
-    }
-
-    public Context getContext() {
-        return mContext;
-    }
-
-    public ImapHelper getImapHelper() {
-        return mHelper;
-    }
-
-    public String getUsername() {
-        return mUsername;
-    }
-
-    public String getPassword() {
-        return mPassword;
-    }
-
-    /** Returns a clone of the transport associated with this store. */
-    MailTransport cloneTransport() {
-        return mTransport.clone();
-    }
-
-    /**
-     * Returns UIDs of Messages joined with "," as the separator.
-     */
-    static String joinMessageUids(Message[] messages) {
-        StringBuilder sb = new StringBuilder();
-        boolean notFirst = false;
-        for (Message m : messages) {
-            if (notFirst) {
-                sb.append(',');
-            }
-            sb.append(m.getUid());
-            notFirst = true;
-        }
-        return sb.toString();
-    }
-
-    static class ImapMessage extends MimeMessage {
-        private ImapFolder mFolder;
-
-        ImapMessage(String uid, ImapFolder folder) {
-            mUid = uid;
-            mFolder = folder;
-        }
-
-        public void setSize(int size) {
-            mSize = size;
-        }
-
-        @Override
-        public void parse(InputStream in) throws IOException, MessagingException {
-            super.parse(in);
-        }
-
-        public void setFlagInternal(String flag, boolean set) throws MessagingException {
-            super.setFlag(flag, set);
-        }
-
-        @Override
-        public void setFlag(String flag, boolean set) throws MessagingException {
-            super.setFlag(flag, set);
-            mFolder.setFlags(new Message[] { this }, new String[] { flag }, set);
-        }
-    }
-
-    static class ImapException extends MessagingException {
-        private static final long serialVersionUID = 1L;
-
-        private final String mStatus;
-        private final String mStatusMessage;
-        private final String mAlertText;
-        private final String mResponseCode;
-
-        public ImapException(String message, String status, String statusMessage, String alertText,
-                String responseCode) {
-            super(message);
-            mStatus = status;
-            mStatusMessage = statusMessage;
-            mAlertText = alertText;
-            mResponseCode = responseCode;
-        }
-
-        public String getStatus() {
-            return mStatus;
-        }
-
-        public String getStatusMessage() {
-            return mStatusMessage;
-        }
-
-        public String getAlertText() {
-            return mAlertText;
-        }
-
-        public String getResponseCode() {
-            return mResponseCode;
-        }
-    }
-
-    public void closeConnection() {
-        if (mConnection != null) {
-            mConnection.close();
-            mConnection = null;
-        }
-    }
-
-    public ImapConnection getConnection() {
-        if (mConnection == null) {
-            mConnection = new ImapConnection(this);
-        }
-        return mConnection;
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/store/imap/DigestMd5Utils.java b/src/com/android/phone/common/mail/store/imap/DigestMd5Utils.java
deleted file mode 100644
index 436d03c..0000000
--- a/src/com/android/phone/common/mail/store/imap/DigestMd5Utils.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.common.mail.store.imap;
-
-import android.annotation.Nullable;
-import android.util.ArrayMap;
-import android.util.Base64;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.phone.common.mail.MailTransport;
-import com.android.phone.common.mail.MessagingException;
-import com.android.phone.common.mail.store.ImapStore;
-import com.android.phone.vvm.omtp.VvmLog;
-
-import java.nio.charset.StandardCharsets;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.SecureRandom;
-import java.util.Map;
-
-public class DigestMd5Utils {
-
-    private static final String TAG = "DigestMd5Utils";
-
-    private static final String DIGEST_CHARSET = "CHARSET";
-    private static final String DIGEST_USERNAME = "username";
-    private static final String DIGEST_REALM = "realm";
-    private static final String DIGEST_NONCE = "nonce";
-    private static final String DIGEST_NC = "nc";
-    private static final String DIGEST_CNONCE = "cnonce";
-    private static final String DIGEST_URI = "digest-uri";
-    private static final String DIGEST_RESPONSE = "response";
-    private static final String DIGEST_QOP = "qop";
-
-    private static final String RESPONSE_AUTH_HEADER = "rspauth=";
-    private static final String HEX_CHARS = "0123456789abcdef";
-
-    /**
-     * Represents the set of data we need to generate the DIGEST-MD5 response.
-     */
-    public static class Data {
-
-        private static final String CHARSET = "utf-8";
-
-        public String username;
-        public String password;
-        public String realm;
-        public String nonce;
-        public String nc;
-        public String cnonce;
-        public String digestUri;
-        public String qop;
-
-        @VisibleForTesting
-        Data() {
-            // Do nothing
-        }
-
-        public Data(ImapStore imapStore, MailTransport transport, Map<String, String> challenge) {
-            username = imapStore.getUsername();
-            password = imapStore.getPassword();
-            realm = challenge.getOrDefault(DIGEST_REALM, "");
-            nonce = challenge.get(DIGEST_NONCE);
-            cnonce = createCnonce();
-            nc = "00000001"; // Subsequent Authentication not supported, nounce count always 1.
-            qop = "auth"; // Other config not supported
-            digestUri = "imap/" + transport.getHost();
-        }
-
-        private static String createCnonce() {
-            SecureRandom generator = new SecureRandom();
-
-            // At least 64 bits of entropy is required
-            byte[] rawBytes = new byte[8];
-            generator.nextBytes(rawBytes);
-
-            return Base64.encodeToString(rawBytes, Base64.NO_WRAP);
-        }
-
-        /**
-         * Verify the response-auth returned by the server is correct.
-         */
-        public void verifyResponseAuth(String response)
-                throws MessagingException {
-            if (!response.startsWith(RESPONSE_AUTH_HEADER)) {
-                throw new MessagingException("response-auth expected");
-            }
-            if (!response.substring(RESPONSE_AUTH_HEADER.length())
-                    .equals(DigestMd5Utils.getResponse(this, true))) {
-                throw new MessagingException("invalid response-auth return from the server.");
-            }
-        }
-
-        public String createResponse() {
-            String response = getResponse(this, false);
-            ResponseBuilder builder = new ResponseBuilder();
-            builder
-                    .append(DIGEST_CHARSET, CHARSET)
-                    .appendQuoted(DIGEST_USERNAME, username)
-                    .appendQuoted(DIGEST_REALM, realm)
-                    .appendQuoted(DIGEST_NONCE, nonce)
-                    .append(DIGEST_NC, nc)
-                    .appendQuoted(DIGEST_CNONCE, cnonce)
-                    .appendQuoted(DIGEST_URI, digestUri)
-                    .append(DIGEST_RESPONSE, response)
-                    .append(DIGEST_QOP, qop);
-            return builder.toString();
-        }
-
-        private static class ResponseBuilder {
-
-            private StringBuilder mBuilder = new StringBuilder();
-
-            public ResponseBuilder appendQuoted(String key, String value) {
-                if (mBuilder.length() != 0) {
-                    mBuilder.append(",");
-                }
-                mBuilder.append(key).append("=\"").append(value).append("\"");
-                return this;
-            }
-
-            public ResponseBuilder append(String key, String value) {
-                if (mBuilder.length() != 0) {
-                    mBuilder.append(",");
-                }
-                mBuilder.append(key).append("=").append(value);
-                return this;
-            }
-
-            @Override
-            public String toString() {
-                return mBuilder.toString();
-            }
-        }
-    }
-
-    /*
-        response-value  =
-            toHex( getKeyDigest ( toHex(getMd5(a1)),
-            { nonce-value, ":" nc-value, ":",
-              cnonce-value, ":", qop-value, ":", toHex(getMd5(a2)) }))
-     * @param isResponseAuth is the response the one the server is returning us. response-auth has
-     * different a2 format.
-     */
-    @VisibleForTesting
-    static String getResponse(Data data, boolean isResponseAuth) {
-        StringBuilder a1 = new StringBuilder();
-        a1.append(new String(
-                getMd5(data.username + ":" + data.realm + ":" + data.password),
-                StandardCharsets.ISO_8859_1));
-        a1.append(":").append(data.nonce).append(":").append(data.cnonce);
-
-        StringBuilder a2 = new StringBuilder();
-        if (!isResponseAuth) {
-            a2.append("AUTHENTICATE");
-        }
-        a2.append(":").append(data.digestUri);
-
-        return toHex(getKeyDigest(
-                toHex(getMd5(a1.toString())),
-                data.nonce + ":" + data.nc + ":" + data.cnonce + ":" + data.qop + ":" + toHex(
-                        getMd5(a2.toString()))
-        ));
-    }
-
-    /**
-     * Let getMd5(s) be the 16 octet MD5 hash [RFC 1321] of the octet string s.
-     */
-    private static byte[] getMd5(String s) {
-        try {
-            MessageDigest digester = MessageDigest.getInstance("MD5");
-            digester.update(s.getBytes(StandardCharsets.ISO_8859_1));
-            return digester.digest();
-        } catch (NoSuchAlgorithmException e) {
-            throw new AssertionError(e);
-        }
-    }
-
-    /**
-     * Let getKeyDigest(k, s) be getMd5({k, ":", s}), i.e., the 16 octet hash of the string k, a colon and the
-     * string s.
-     */
-    private static byte[] getKeyDigest(String k, String s) {
-        StringBuilder builder = new StringBuilder(k).append(":").append(s);
-        return getMd5(builder.toString());
-    }
-
-    /**
-     * Let toHex(n) be the representation of the 16 octet MD5 hash n as a string of 32 hex digits
-     * (with alphabetic characters always in lower case, since MD5 is case sensitive).
-     */
-    private static String toHex(byte[] n) {
-        StringBuilder result = new StringBuilder();
-        for (byte b : n) {
-            int unsignedByte = b & 0xFF;
-            result.append(HEX_CHARS.charAt(unsignedByte / 16))
-                    .append(HEX_CHARS.charAt(unsignedByte % 16));
-        }
-        return result.toString();
-    }
-
-    public static Map<String, String> parseDigestMessage(String message) throws MessagingException {
-        Map<String, String> result = new DigestMessageParser(message).parse();
-        if (!result.containsKey(DIGEST_NONCE)) {
-            throw new MessagingException("nonce missing from server DIGEST-MD5 challenge");
-        }
-        return result;
-    }
-
-    /**
-     * Parse the key-value pair returned by the server.
-     */
-    private static class DigestMessageParser {
-
-        private final String mMessage;
-        private int mPosition = 0;
-        private Map<String, String> mResult = new ArrayMap<>();
-
-        public DigestMessageParser(String message) {
-            mMessage = message;
-        }
-
-        @Nullable
-        public Map<String, String> parse() {
-            try {
-                while (mPosition < mMessage.length()) {
-                    parsePair();
-                    if (mPosition != mMessage.length()) {
-                        expect(',');
-                    }
-                }
-            } catch (IndexOutOfBoundsException e) {
-                VvmLog.e(TAG, e.toString());
-                return null;
-            }
-            return mResult;
-        }
-
-        private void parsePair() {
-            String key = parseKey();
-            expect('=');
-            String value = parseValue();
-            mResult.put(key, value);
-        }
-
-        private void expect(char c) {
-            if (pop() != c) {
-                throw new IllegalStateException(
-                        "unexpected character " + mMessage.charAt(mPosition));
-            }
-        }
-
-        private char pop() {
-            char result = peek();
-            mPosition++;
-            return result;
-        }
-
-        private char peek() {
-            return mMessage.charAt(mPosition);
-        }
-
-        private void goToNext(char c) {
-            while (peek() != c) {
-                mPosition++;
-            }
-        }
-
-        private String parseKey() {
-            int start = mPosition;
-            goToNext('=');
-            return mMessage.substring(start, mPosition);
-        }
-
-        private String parseValue() {
-            if (peek() == '"') {
-                return parseQuotedValue();
-            } else {
-                return parseUnquotedValue();
-            }
-        }
-
-        private String parseQuotedValue() {
-            expect('"');
-            StringBuilder result = new StringBuilder();
-            while (true) {
-                char c = pop();
-                if (c == '\\') {
-                    result.append(pop());
-                } else if (c == '"') {
-                    break;
-                } else {
-                    result.append(c);
-                }
-            }
-            return result.toString();
-        }
-
-        private String parseUnquotedValue() {
-            StringBuilder result = new StringBuilder();
-            while (true) {
-                char c = pop();
-                if (c == '\\') {
-                    result.append(pop());
-                } else if (c == ',') {
-                    mPosition--;
-                    break;
-                } else {
-                    result.append(c);
-                }
-
-                if (mPosition == mMessage.length()) {
-                    break;
-                }
-            }
-            return result.toString();
-        }
-    }
-}
diff --git a/src/com/android/phone/common/mail/store/imap/ImapConstants.java b/src/com/android/phone/common/mail/store/imap/ImapConstants.java
deleted file mode 100644
index a2eab13..0000000
--- a/src/com/android/phone/common/mail/store/imap/ImapConstants.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.store.imap;
-
-import com.android.phone.common.mail.store.ImapStore;
-
-import java.util.Locale;
-
-public final class ImapConstants {
-    private ImapConstants() {}
-
-    public static final String FETCH_FIELD_BODY_PEEK_BARE = "BODY.PEEK";
-    public static final String FETCH_FIELD_BODY_PEEK = FETCH_FIELD_BODY_PEEK_BARE + "[]";
-    public static final String FETCH_FIELD_BODY_PEEK_SANE = String.format(
-            Locale.US, "BODY.PEEK[]<0.%d>", ImapStore.FETCH_BODY_SANE_SUGGESTED_SIZE);
-    public static final String FETCH_FIELD_HEADERS =
-            "BODY.PEEK[HEADER.FIELDS (date subject from content-type to cc message-id)]";
-
-    public static final String ALERT = "ALERT";
-    public static final String APPEND = "APPEND";
-    public static final String AUTHENTICATE = "AUTHENTICATE";
-    public static final String BAD = "BAD";
-    public static final String BADCHARSET = "BADCHARSET";
-    public static final String BODY = "BODY";
-    public static final String BODY_BRACKET_HEADER = "BODY[HEADER";
-    public static final String BODYSTRUCTURE = "BODYSTRUCTURE";
-    public static final String BYE = "BYE";
-    public static final String CAPABILITY = "CAPABILITY";
-    public static final String CHECK = "CHECK";
-    public static final String CLOSE = "CLOSE";
-    public static final String COPY = "COPY";
-    public static final String COPYUID = "COPYUID";
-    public static final String CREATE = "CREATE";
-    public static final String DELETE = "DELETE";
-    public static final String EXAMINE = "EXAMINE";
-    public static final String EXISTS = "EXISTS";
-    public static final String EXPUNGE = "EXPUNGE";
-    public static final String FETCH = "FETCH";
-    public static final String FLAG_ANSWERED = "\\ANSWERED";
-    public static final String FLAG_DELETED = "\\DELETED";
-    public static final String FLAG_FLAGGED = "\\FLAGGED";
-    public static final String FLAG_NO_SELECT = "\\NOSELECT";
-    public static final String FLAG_SEEN = "\\SEEN";
-    public static final String FLAGS = "FLAGS";
-    public static final String FLAGS_SILENT = "FLAGS.SILENT";
-    public static final String ID = "ID";
-    public static final String INBOX = "INBOX";
-    public static final String INTERNALDATE = "INTERNALDATE";
-    public static final String LIST = "LIST";
-    public static final String LOGIN = "LOGIN";
-    public static final String LOGOUT = "LOGOUT";
-    public static final String LSUB = "LSUB";
-    public static final String NAMESPACE = "NAMESPACE";
-    public static final String NO = "NO";
-    public static final String NOOP = "NOOP";
-    public static final String OK = "OK";
-    public static final String PARSE = "PARSE";
-    public static final String PERMANENTFLAGS = "PERMANENTFLAGS";
-    public static final String PREAUTH = "PREAUTH";
-    public static final String READ_ONLY = "READ-ONLY";
-    public static final String READ_WRITE = "READ-WRITE";
-    public static final String RENAME = "RENAME";
-    public static final String RFC822_SIZE = "RFC822.SIZE";
-    public static final String SEARCH = "SEARCH";
-    public static final String SELECT = "SELECT";
-    public static final String STARTTLS = "STARTTLS";
-    public static final String STATUS = "STATUS";
-    public static final String STORE = "STORE";
-    public static final String SUBSCRIBE = "SUBSCRIBE";
-    public static final String TEXT = "TEXT";
-    public static final String TRYCREATE = "TRYCREATE";
-    public static final String UID = "UID";
-    public static final String UID_COPY = "UID COPY";
-    public static final String UID_FETCH = "UID FETCH";
-    public static final String UID_SEARCH = "UID SEARCH";
-    public static final String UID_STORE = "UID STORE";
-    public static final String UIDNEXT = "UIDNEXT";
-    public static final String UIDPLUS = "UIDPLUS";
-    public static final String UIDVALIDITY = "UIDVALIDITY";
-    public static final String UNSEEN = "UNSEEN";
-    public static final String UNSUBSCRIBE = "UNSUBSCRIBE";
-    public static final String XOAUTH2 = "XOAUTH2";
-    public static final String APPENDUID = "APPENDUID";
-    public static final String NIL = "NIL";
-
-    /**
-     * NO responses
-     */
-    public static final String NO_COMMAND_NOT_ALLOWED = "command not allowed";
-    public static final String NO_RESERVATION_FAILED = "reservation failed";
-    public static final String NO_APPLICATION_ERROR = "application error";
-    public static final String NO_INVALID_PARAMETER = "invalid parameter";
-    public static final String NO_INVALID_COMMAND = "invalid command";
-    public static final String NO_UNKNOWN_COMMAND = "unknown command";
-    // AUTHENTICATE
-    // The subscriber can not be located in the system.
-    public static final String NO_UNKNOWN_USER = "unknown user";
-    // The Client Type or Protocol Version is unknown.
-    public static final String NO_UNKNOWN_CLIENT = "unknown client";
-    // The password received from the client does not match the password defined in the subscriber's profile.
-    public static final String NO_INVALID_PASSWORD = "invalid password";
-    // The subscriber's mailbox has not yet been initialised via the TUI
-    public static final String NO_MAILBOX_NOT_INITIALIZED = "mailbox not initialized";
-    // The subscriber has not been provisioned for the VVM service.
-    public static final String NO_SERVICE_IS_NOT_PROVISIONED =
-            "service is not provisioned";
-    // The subscriber is provisioned for the VVM service but the VVM service is currently not active
-    public static final String NO_SERVICE_IS_NOT_ACTIVATED = "service is not activated";
-    // The Voice Mail Blocked flag in the subscriber's profile is set to YES.
-    public static final String NO_USER_IS_BLOCKED = "user is blocked";
-
-    /**
-     * extensions
-     */
-    public static final String GETQUOTA = "GETQUOTA";
-    public static final String GETQUOTAROOT = "GETQUOTAROOT";
-    public static final String QUOTAROOT = "QUOTAROOT";
-    public static final String QUOTA = "QUOTA";
-
-    /**
-     * capabilities
-     */
-    public static final String CAPABILITY_AUTH_DIGEST_MD5 = "AUTH=DIGEST-MD5";
-    public static final String CAPABILITY_STARTTLS = "STARTTLS";
-
-    /**
-     * authentication
-     */
-    public static final String AUTH_DIGEST_MD5 = "DIGEST-MD5";
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/store/imap/ImapElement.java b/src/com/android/phone/common/mail/store/imap/ImapElement.java
deleted file mode 100644
index 2d1824e..0000000
--- a/src/com/android/phone/common/mail/store/imap/ImapElement.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.store.imap;
-
-/**
- * Class representing "element"s in IMAP responses.
- *
- * <p>Class hierarchy:
- * <pre>
- * ImapElement
- *   |
- *   |-- ImapElement.NONE (for 'index out of range')
- *   |
- *   |-- ImapList (isList() == true)
- *   |   |
- *   |   |-- ImapList.EMPTY
- *   |   |
- *   |   --- ImapResponse
- *   |
- *   --- ImapString (isString() == true)
- *       |
- *       |-- ImapString.EMPTY
- *       |
- *       |-- ImapSimpleString
- *       |
- *       |-- ImapMemoryLiteral
- *       |
- *       --- ImapTempFileLiteral
- * </pre>
- */
-public abstract class ImapElement {
-    /**
-     * An element that is returned by {@link ImapList#getElementOrNone} to indicate an index
-     * is out of range.
-     */
-    public static final ImapElement NONE = new ImapElement() {
-        @Override public void destroy() {
-            // Don't call super.destroy().
-            // It's a shared object.  We don't want the mDestroyed to be set on this.
-        }
-
-        @Override public boolean isList() {
-            return false;
-        }
-
-        @Override public boolean isString() {
-            return false;
-        }
-
-        @Override public String toString() {
-            return "[NO ELEMENT]";
-        }
-
-        @Override
-        public boolean equalsForTest(ImapElement that) {
-            return super.equalsForTest(that);
-        }
-    };
-
-    private boolean mDestroyed = false;
-
-    public abstract boolean isList();
-
-    public abstract boolean isString();
-
-    protected boolean isDestroyed() {
-        return mDestroyed;
-    }
-
-    /**
-     * Clean up the resources used by the instance.
-     * It's for removing a temp file used by {@link ImapTempFileLiteral}.
-     */
-    public void destroy() {
-        mDestroyed = true;
-    }
-
-    /**
-     * Throws {@link RuntimeException} if it's already destroyed.
-     */
-    protected final void checkNotDestroyed() {
-        if (mDestroyed) {
-            throw new RuntimeException("Already destroyed");
-        }
-    }
-
-    /**
-     * Return a string that represents this object; it's purely for the debug purpose.  Don't
-     * mistake it for {@link ImapString#getString}.
-     *
-     * Abstract to force subclasses to implement it.
-     */
-    @Override
-    public abstract String toString();
-
-    /**
-     * The equals implementation that is intended to be used only for unit testing.
-     * (Because it may be heavy and has a special sense of "equal" for testing.)
-     */
-    public boolean equalsForTest(ImapElement that) {
-        if (that == null) {
-            return false;
-        }
-        return this.getClass() == that.getClass(); // Has to be the same class.
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/store/imap/ImapList.java b/src/com/android/phone/common/mail/store/imap/ImapList.java
deleted file mode 100644
index 93adc4f..0000000
--- a/src/com/android/phone/common/mail/store/imap/ImapList.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.store.imap;
-
-import java.util.ArrayList;
-
-/**
- * Class represents an IMAP list.
- */
-public class ImapList extends ImapElement {
-    /**
-     * {@link ImapList} representing an empty list.
-     */
-    public static final ImapList EMPTY = new ImapList() {
-        @Override public void destroy() {
-            // Don't call super.destroy().
-            // It's a shared object.  We don't want the mDestroyed to be set on this.
-        }
-
-        @Override void add(ImapElement e) {
-            throw new RuntimeException();
-        }
-    };
-
-    private ArrayList<ImapElement> mList = new ArrayList<ImapElement>();
-
-    /* package */ void add(ImapElement e) {
-        if (e == null) {
-            throw new RuntimeException("Can't add null");
-        }
-        mList.add(e);
-    }
-
-    @Override
-    public final boolean isString() {
-        return false;
-    }
-
-    @Override
-    public final boolean isList() {
-        return true;
-    }
-
-    public final int size() {
-        return mList.size();
-    }
-
-    public final boolean isEmpty() {
-        return size() == 0;
-    }
-
-    /**
-     * Return true if the element at {@code index} exists, is string, and equals to {@code s}.
-     * (case insensitive)
-     */
-    public final boolean is(int index, String s) {
-        return is(index, s, false);
-    }
-
-    /**
-     * Same as {@link #is(int, String)}, but does the prefix match if {@code prefixMatch}.
-     */
-    public final boolean is(int index, String s, boolean prefixMatch) {
-        if (!prefixMatch) {
-            return getStringOrEmpty(index).is(s);
-        } else {
-            return getStringOrEmpty(index).startsWith(s);
-        }
-    }
-
-    /**
-     * Return the element at {@code index}.
-     * If {@code index} is out of range, returns {@link ImapElement#NONE}.
-     */
-    public final ImapElement getElementOrNone(int index) {
-        return (index >= mList.size()) ? ImapElement.NONE : mList.get(index);
-    }
-
-    /**
-     * Return the element at {@code index} if it's a list.
-     * If {@code index} is out of range or not a list, returns {@link ImapList#EMPTY}.
-     */
-    public final ImapList getListOrEmpty(int index) {
-        ImapElement el = getElementOrNone(index);
-        return el.isList() ? (ImapList) el : EMPTY;
-    }
-
-    /**
-     * Return the element at {@code index} if it's a string.
-     * If {@code index} is out of range or not a string, returns {@link ImapString#EMPTY}.
-     */
-    public final ImapString getStringOrEmpty(int index) {
-        ImapElement el = getElementOrNone(index);
-        return el.isString() ? (ImapString) el : ImapString.EMPTY;
-    }
-
-    /**
-     * Return an element keyed by {@code key}.  Return null if not found.  {@code key} has to be
-     * at an even index.
-     */
-    /* package */ final ImapElement getKeyedElementOrNull(String key, boolean prefixMatch) {
-        for (int i = 1; i < size(); i += 2) {
-            if (is(i-1, key, prefixMatch)) {
-                return mList.get(i);
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Return an {@link ImapList} keyed by {@code key}.
-     * Return {@link ImapList#EMPTY} if not found.
-     */
-    public final ImapList getKeyedListOrEmpty(String key) {
-        return getKeyedListOrEmpty(key, false);
-    }
-
-    /**
-     * Return an {@link ImapList} keyed by {@code key}.
-     * Return {@link ImapList#EMPTY} if not found.
-     */
-    public final ImapList getKeyedListOrEmpty(String key, boolean prefixMatch) {
-        ImapElement e = getKeyedElementOrNull(key, prefixMatch);
-        return (e != null) ? ((ImapList) e) : ImapList.EMPTY;
-    }
-
-    /**
-     * Return an {@link ImapString} keyed by {@code key}.
-     * Return {@link ImapString#EMPTY} if not found.
-     */
-    public final ImapString getKeyedStringOrEmpty(String key) {
-        return getKeyedStringOrEmpty(key, false);
-    }
-
-    /**
-     * Return an {@link ImapString} keyed by {@code key}.
-     * Return {@link ImapString#EMPTY} if not found.
-     */
-    public final ImapString getKeyedStringOrEmpty(String key, boolean prefixMatch) {
-        ImapElement e = getKeyedElementOrNull(key, prefixMatch);
-        return (e != null) ? ((ImapString) e) : ImapString.EMPTY;
-    }
-
-    /**
-     * Return true if it contains {@code s}.
-     */
-    public final boolean contains(String s) {
-        for (int i = 0; i < size(); i++) {
-            if (getStringOrEmpty(i).is(s)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    @Override
-    public void destroy() {
-        if (mList != null) {
-            for (ImapElement e : mList) {
-                e.destroy();
-            }
-            mList = null;
-        }
-        super.destroy();
-    }
-
-    @Override
-    public String toString() {
-        return mList.toString();
-    }
-
-    /**
-     * Return the text representations of the contents concatenated with ",".
-     */
-    public final String flatten() {
-        return flatten(new StringBuilder()).toString();
-    }
-
-    /**
-     * Returns text representations (i.e. getString()) of contents joined together with
-     * "," as the separator.
-     *
-     * Only used for building the capability string passed to vendor policies.
-     *
-     * We can't use toString(), because it's for debugging (meaning the format may change any time),
-     * and it won't expand literals.
-     */
-    private final StringBuilder flatten(StringBuilder sb) {
-        sb.append('[');
-        for (int i = 0; i < mList.size(); i++) {
-            if (i > 0) {
-                sb.append(',');
-            }
-            final ImapElement e = getElementOrNone(i);
-            if (e.isList()) {
-                getListOrEmpty(i).flatten(sb);
-            } else if (e.isString()) {
-                sb.append(getStringOrEmpty(i).getString());
-            }
-        }
-        sb.append(']');
-        return sb;
-    }
-
-    @Override
-    public boolean equalsForTest(ImapElement that) {
-        if (!super.equalsForTest(that)) {
-            return false;
-        }
-        ImapList thatList = (ImapList) that;
-        if (size() != thatList.size()) {
-            return false;
-        }
-        for (int i = 0; i < size(); i++) {
-            if (!mList.get(i).equalsForTest(thatList.getElementOrNone(i))) {
-                return false;
-            }
-        }
-        return true;
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/store/imap/ImapMemoryLiteral.java b/src/com/android/phone/common/mail/store/imap/ImapMemoryLiteral.java
deleted file mode 100644
index 4811590..0000000
--- a/src/com/android/phone/common/mail/store/imap/ImapMemoryLiteral.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2010 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.phone.common.mail.store.imap;
-
-import com.android.phone.common.mail.FixedLengthInputStream;
-import com.android.phone.vvm.omtp.VvmLog;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-
-/**
- * Subclass of {@link ImapString} used for literals backed by an in-memory byte array.
- */
-public class ImapMemoryLiteral extends ImapString {
-    private final String TAG = "ImapMemoryLiteral";
-    private byte[] mData;
-
-    /* package */ ImapMemoryLiteral(FixedLengthInputStream in) throws IOException {
-        // We could use ByteArrayOutputStream and IOUtils.copy, but it'd perform an unnecessary
-        // copy....
-        mData = new byte[in.getLength()];
-        int pos = 0;
-        while (pos < mData.length) {
-            int read = in.read(mData, pos, mData.length - pos);
-            if (read < 0) {
-                break;
-            }
-            pos += read;
-        }
-        if (pos != mData.length) {
-            VvmLog.w(TAG, "length mismatch");
-        }
-    }
-
-    @Override
-    public void destroy() {
-        mData = null;
-        super.destroy();
-    }
-
-    @Override
-    public String getString() {
-        try {
-            return new String(mData, "US-ASCII");
-        } catch (UnsupportedEncodingException e) {
-            VvmLog.e(TAG, "Unsupported encoding: ", e);
-        }
-        return null;
-    }
-
-    @Override
-    public InputStream getAsStream() {
-        return new ByteArrayInputStream(mData);
-    }
-
-    @Override
-    public String toString() {
-        return String.format("{%d byte literal(memory)}", mData.length);
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/store/imap/ImapResponse.java b/src/com/android/phone/common/mail/store/imap/ImapResponse.java
deleted file mode 100644
index 4891966..0000000
--- a/src/com/android/phone/common/mail/store/imap/ImapResponse.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.store.imap;
-
-/**
- * Class represents an IMAP response.
- */
-public class ImapResponse extends ImapList {
-    private final String mTag;
-    private final boolean mIsContinuationRequest;
-
-    /* package */ ImapResponse(String tag, boolean isContinuationRequest) {
-        mTag = tag;
-        mIsContinuationRequest = isContinuationRequest;
-    }
-
-    /* package */ static boolean isStatusResponse(String symbol) {
-        return     ImapConstants.OK.equalsIgnoreCase(symbol)
-                || ImapConstants.NO.equalsIgnoreCase(symbol)
-                || ImapConstants.BAD.equalsIgnoreCase(symbol)
-                || ImapConstants.PREAUTH.equalsIgnoreCase(symbol)
-                || ImapConstants.BYE.equalsIgnoreCase(symbol);
-    }
-
-    /**
-     * @return whether it's a tagged response.
-     */
-    public boolean isTagged() {
-        return mTag != null;
-    }
-
-    /**
-     * @return whether it's a continuation request.
-     */
-    public boolean isContinuationRequest() {
-        return mIsContinuationRequest;
-    }
-
-    public boolean isStatusResponse() {
-        return isStatusResponse(getStringOrEmpty(0).getString());
-    }
-
-    /**
-     * @return whether it's an OK response.
-     */
-    public boolean isOk() {
-        return is(0, ImapConstants.OK);
-    }
-
-    /**
-     * @return whether it's an BAD response.
-     */
-    public boolean isBad() {
-        return is(0, ImapConstants.BAD);
-    }
-
-    /**
-     * @return whether it's an NO response.
-     */
-    public boolean isNo() {
-        return is(0, ImapConstants.NO);
-    }
-
-    /**
-     * @return whether it's an {@code responseType} data response.  (i.e. not tagged).
-     * @param index where {@code responseType} should appear.  e.g. 1 for "FETCH"
-     * @param responseType e.g. "FETCH"
-     */
-    public final boolean isDataResponse(int index, String responseType) {
-        return !isTagged() && getStringOrEmpty(index).is(responseType);
-    }
-
-    /**
-     * @return Response code (RFC 3501 7.1) if it's a status response.
-     *
-     * e.g. "ALERT" for "* OK [ALERT] System shutdown in 10 minutes"
-     */
-    public ImapString getResponseCodeOrEmpty() {
-        if (!isStatusResponse()) {
-            return ImapString.EMPTY; // Not a status response.
-        }
-        return getListOrEmpty(1).getStringOrEmpty(0);
-    }
-
-    /**
-     * @return Alert message it it has ALERT response code.
-     *
-     * e.g. "System shutdown in 10 minutes" for "* OK [ALERT] System shutdown in 10 minutes"
-     */
-    public ImapString getAlertTextOrEmpty() {
-        if (!getResponseCodeOrEmpty().is(ImapConstants.ALERT)) {
-            return ImapString.EMPTY; // Not an ALERT
-        }
-        // The 3rd element contains all the rest of line.
-        return getStringOrEmpty(2);
-    }
-
-    /**
-     * @return Response text in a status response.
-     */
-    public ImapString getStatusResponseTextOrEmpty() {
-        if (!isStatusResponse()) {
-            return ImapString.EMPTY;
-        }
-        return getStringOrEmpty(getElementOrNone(1).isList() ? 2 : 1);
-    }
-
-    public ImapString getStatusOrEmpty() {
-        if (!isStatusResponse()) {
-            return ImapString.EMPTY;
-        }
-        return getStringOrEmpty(0);
-    }
-
-    @Override
-    public String toString() {
-        String tag = mTag;
-        if (isContinuationRequest()) {
-            tag = "+";
-        }
-        return "#" + tag + "# " + super.toString();
-    }
-
-    @Override
-    public boolean equalsForTest(ImapElement that) {
-        if (!super.equalsForTest(that)) {
-            return false;
-        }
-        final ImapResponse thatResponse = (ImapResponse) that;
-        if (mTag == null) {
-            if (thatResponse.mTag != null) {
-                return false;
-            }
-        } else {
-            if (!mTag.equals(thatResponse.mTag)) {
-                return false;
-            }
-        }
-        if (mIsContinuationRequest != thatResponse.mIsContinuationRequest) {
-            return false;
-        }
-        return true;
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/store/imap/ImapResponseParser.java b/src/com/android/phone/common/mail/store/imap/ImapResponseParser.java
deleted file mode 100644
index 6fc5abe..0000000
--- a/src/com/android/phone/common/mail/store/imap/ImapResponseParser.java
+++ /dev/null
@@ -1,432 +0,0 @@
-/*
- * Copyright (C) 2010 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.phone.common.mail.store.imap;
-
-import android.text.TextUtils;
-import android.util.Log;
-
-import com.android.phone.common.mail.FixedLengthInputStream;
-import com.android.phone.common.mail.MessagingException;
-import com.android.phone.common.mail.PeekableInputStream;
-import com.android.phone.vvm.omtp.VvmLog;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-
-/**
- * IMAP response parser.
- */
-public class ImapResponseParser {
-    private static final String TAG = "ImapResponseParser";
-
-    /**
-     * Literal larger than this will be stored in temp file.
-     */
-    public static final int LITERAL_KEEP_IN_MEMORY_THRESHOLD = 2 * 1024 * 1024;
-
-    /** Input stream */
-    private final PeekableInputStream mIn;
-
-    private final int mLiteralKeepInMemoryThreshold;
-
-    /** StringBuilder used by readUntil() */
-    private final StringBuilder mBufferReadUntil = new StringBuilder();
-
-    /** StringBuilder used by parseBareString() */
-    private final StringBuilder mParseBareString = new StringBuilder();
-
-    /**
-     * We store all {@link ImapResponse} in it.  {@link #destroyResponses()} must be called from
-     * time to time to destroy them and clear it.
-     */
-    private final ArrayList<ImapResponse> mResponsesToDestroy = new ArrayList<ImapResponse>();
-
-    /**
-     * Exception thrown when we receive BYE.  It derives from IOException, so it'll be treated
-     * in the same way EOF does.
-     */
-    public static class ByeException extends IOException {
-        public static final String MESSAGE = "Received BYE";
-        public ByeException() {
-            super(MESSAGE);
-        }
-    }
-
-    /**
-     * Public constructor for normal use.
-     */
-    public ImapResponseParser(InputStream in) {
-        this(in, LITERAL_KEEP_IN_MEMORY_THRESHOLD);
-    }
-
-    /**
-     * Constructor for testing to override the literal size threshold.
-     */
-    /* package for test */ ImapResponseParser(InputStream in, int literalKeepInMemoryThreshold) {
-        mIn = new PeekableInputStream(in);
-        mLiteralKeepInMemoryThreshold = literalKeepInMemoryThreshold;
-    }
-
-    private static IOException newEOSException() {
-        final String message = "End of stream reached";
-        VvmLog.d(TAG, message);
-        return new IOException(message);
-    }
-
-    /**
-     * Peek next one byte.
-     *
-     * Throws IOException() if reaches EOF.  As long as logical response lines end with \r\n,
-     * we shouldn't see EOF during parsing.
-     */
-    private int peek() throws IOException {
-        final int next = mIn.peek();
-        if (next == -1) {
-            throw newEOSException();
-        }
-        return next;
-    }
-
-    /**
-     * Read and return one byte from {@link #mIn}, and put it in {@link #mDiscourseLogger}.
-     *
-     * Throws IOException() if reaches EOF.  As long as logical response lines end with \r\n,
-     * we shouldn't see EOF during parsing.
-     */
-    private int readByte() throws IOException {
-        int next = mIn.read();
-        if (next == -1) {
-            throw newEOSException();
-        }
-        return next;
-    }
-
-    /**
-     * Destroy all the {@link ImapResponse}s stored in the internal storage and clear it.
-     *
-     * @see #readResponse()
-     */
-    public void destroyResponses() {
-        for (ImapResponse r : mResponsesToDestroy) {
-            r.destroy();
-        }
-        mResponsesToDestroy.clear();
-    }
-
-    /**
-     * Reads the next response available on the stream and returns an
-     * {@link ImapResponse} object that represents it.
-     *
-     * <p>When this method successfully returns an {@link ImapResponse}, the {@link ImapResponse}
-     * is stored in the internal storage.  When the {@link ImapResponse} is no longer used
-     * {@link #destroyResponses} should be called to destroy all the responses in the array.
-     *
-     * @param byeExpected is a untagged BYE response expected? If not proper cleanup will be done
-     * and {@link ByeException} will be thrown.
-     * @return the parsed {@link ImapResponse} object.
-     * @exception ByeException when detects BYE and <code>byeExpected</code> is false.
-     */
-    public ImapResponse readResponse(boolean byeExpected) throws IOException, MessagingException {
-        ImapResponse response = null;
-        try {
-            response = parseResponse();
-        } catch (RuntimeException e) {
-            // Parser crash -- log network activities.
-            onParseError(e);
-            throw e;
-        } catch (IOException e) {
-            // Network error, or received an unexpected char.
-            onParseError(e);
-            throw e;
-        }
-
-        // Handle this outside of try-catch.  We don't have to dump protocol log when getting BYE.
-        if (!byeExpected && response.is(0, ImapConstants.BYE)) {
-            Log.w(TAG, ByeException.MESSAGE);
-            response.destroy();
-            throw new ByeException();
-        }
-        mResponsesToDestroy.add(response);
-        return response;
-    }
-
-    private void onParseError(Exception e) {
-        // Read a few more bytes, so that the log will contain some more context, even if the parser
-        // crashes in the middle of a response.
-        // This also makes sure the byte in question will be logged, no matter where it crashes.
-        // e.g. when parseAtom() peeks and finds at an unexpected char, it throws an exception
-        // before actually reading it.
-        // However, we don't want to read too much, because then it may get into an email message.
-        try {
-            for (int i = 0; i < 4; i++) {
-                int b = readByte();
-                if (b == -1 || b == '\n') {
-                    break;
-                }
-            }
-        } catch (IOException ignore) {
-        }
-        VvmLog.w(TAG, "Exception detected: " + e.getMessage());
-    }
-
-    /**
-     * Read next byte from stream and throw it away.  If the byte is different from {@code expected}
-     * throw {@link MessagingException}.
-     */
-    /* package for test */ void expect(char expected) throws IOException {
-        final int next = readByte();
-        if (expected != next) {
-            throw new IOException(String.format("Expected %04x (%c) but got %04x (%c)",
-                    (int) expected, expected, next, (char) next));
-        }
-    }
-
-    /**
-     * Read bytes until we find {@code end}, and return all as string.
-     * The {@code end} will be read (rather than peeked) and won't be included in the result.
-     */
-    /* package for test */ String readUntil(char end) throws IOException {
-        mBufferReadUntil.setLength(0);
-        for (;;) {
-            final int ch = readByte();
-            if (ch != end) {
-                mBufferReadUntil.append((char) ch);
-            } else {
-                return mBufferReadUntil.toString();
-            }
-        }
-    }
-
-    /**
-     * Read all bytes until \r\n.
-     */
-    /* package */ String readUntilEol() throws IOException {
-        String ret = readUntil('\r');
-        expect('\n'); // TODO Should this really be error?
-        return ret;
-    }
-
-    /**
-     * Parse and return the response line.
-     */
-    private ImapResponse parseResponse() throws IOException, MessagingException {
-        // We need to destroy the response if we get an exception.
-        // So, we first store the response that's being built in responseToDestroy, until it's
-        // completely built, at which point we copy it into responseToReturn and null out
-        // responseToDestroyt.
-        // If responseToDestroy is not null in finally, we destroy it because that means
-        // we got an exception somewhere.
-        ImapResponse responseToDestroy = null;
-        final ImapResponse responseToReturn;
-
-        try {
-            final int ch = peek();
-            if (ch == '+') { // Continuation request
-                readByte(); // skip +
-                expect(' ');
-                responseToDestroy = new ImapResponse(null, true);
-
-                // If it's continuation request, we don't really care what's in it.
-                responseToDestroy.add(new ImapSimpleString(readUntilEol()));
-
-                // Response has successfully been built.  Let's return it.
-                responseToReturn = responseToDestroy;
-                responseToDestroy = null;
-            } else {
-                // Status response or response data
-                final String tag;
-                if (ch == '*') {
-                    tag = null;
-                    readByte(); // skip *
-                    expect(' ');
-                } else {
-                    tag = readUntil(' ');
-                }
-                responseToDestroy = new ImapResponse(tag, false);
-
-                final ImapString firstString = parseBareString();
-                responseToDestroy.add(firstString);
-
-                // parseBareString won't eat a space after the string, so we need to skip it,
-                // if exists.
-                // If the next char is not ' ', it should be EOL.
-                if (peek() == ' ') {
-                    readByte(); // skip ' '
-
-                    if (responseToDestroy.isStatusResponse()) { // It's a status response
-
-                        // Is there a response code?
-                        final int next = peek();
-                        if (next == '[') {
-                            responseToDestroy.add(parseList('[', ']'));
-                            if (peek() == ' ') { // Skip following space
-                                readByte();
-                            }
-                        }
-
-                        String rest = readUntilEol();
-                        if (!TextUtils.isEmpty(rest)) {
-                            // The rest is free-form text.
-                            responseToDestroy.add(new ImapSimpleString(rest));
-                        }
-                    } else { // It's a response data.
-                        parseElements(responseToDestroy, '\0');
-                    }
-                } else {
-                    expect('\r');
-                    expect('\n');
-                }
-
-                // Response has successfully been built.  Let's return it.
-                responseToReturn = responseToDestroy;
-                responseToDestroy = null;
-            }
-        } finally {
-            if (responseToDestroy != null) {
-                // We get an exception.
-                responseToDestroy.destroy();
-            }
-        }
-
-        return responseToReturn;
-    }
-
-    private ImapElement parseElement() throws IOException, MessagingException {
-        final int next = peek();
-        switch (next) {
-            case '(':
-                return parseList('(', ')');
-            case '[':
-                return parseList('[', ']');
-            case '"':
-                readByte(); // Skip "
-                return new ImapSimpleString(readUntil('"'));
-            case '{':
-                return parseLiteral();
-            case '\r':  // CR
-                readByte(); // Consume \r
-                expect('\n'); // Should be followed by LF.
-                return null;
-            case '\n': // LF // There shouldn't be a bare LF, but just in case.
-                readByte(); // Consume \n
-                return null;
-            default:
-                return parseBareString();
-        }
-    }
-
-    /**
-     * Parses an atom.
-     *
-     * Special case: If an atom contains '[', everything until the next ']' will be considered
-     * a part of the atom.
-     * (e.g. "BODY[HEADER.FIELDS ("DATE" ...)]" will become a single ImapString)
-     *
-     * If the value is "NIL", returns an empty string.
-     */
-    private ImapString parseBareString() throws IOException, MessagingException {
-        mParseBareString.setLength(0);
-        for (;;) {
-            final int ch = peek();
-
-            // TODO Can we clean this up?  (This condition is from the old parser.)
-            if (ch == '(' || ch == ')' || ch == '{' || ch == ' ' ||
-                    // ']' is not part of atom (it's in resp-specials)
-                    ch == ']' ||
-                    // docs claim that flags are \ atom but atom isn't supposed to
-                    // contain
-                    // * and some flags contain *
-                    // ch == '%' || ch == '*' ||
-                    ch == '%' ||
-                    // TODO probably should not allow \ and should recognize
-                    // it as a flag instead
-                    // ch == '"' || ch == '\' ||
-                    ch == '"' || (0x00 <= ch && ch <= 0x1f) || ch == 0x7f) {
-                if (mParseBareString.length() == 0) {
-                    throw new MessagingException("Expected string, none found.");
-                }
-                String s = mParseBareString.toString();
-
-                // NIL will be always converted into the empty string.
-                if (ImapConstants.NIL.equalsIgnoreCase(s)) {
-                    return ImapString.EMPTY;
-                }
-                return new ImapSimpleString(s);
-            } else if (ch == '[') {
-                // Eat all until next ']'
-                mParseBareString.append((char) readByte());
-                mParseBareString.append(readUntil(']'));
-                mParseBareString.append(']'); // readUntil won't include the end char.
-            } else {
-                mParseBareString.append((char) readByte());
-            }
-        }
-    }
-
-    private void parseElements(ImapList list, char end)
-            throws IOException, MessagingException {
-        for (;;) {
-            for (;;) {
-                final int next = peek();
-                if (next == end) {
-                    return;
-                }
-                if (next != ' ') {
-                    break;
-                }
-                // Skip space
-                readByte();
-            }
-            final ImapElement el = parseElement();
-            if (el == null) { // EOL
-                return;
-            }
-            list.add(el);
-        }
-    }
-
-    private ImapList parseList(char opening, char closing)
-            throws IOException, MessagingException {
-        expect(opening);
-        final ImapList list = new ImapList();
-        parseElements(list, closing);
-        expect(closing);
-        return list;
-    }
-
-    private ImapString parseLiteral() throws IOException, MessagingException {
-        expect('{');
-        final int size;
-        try {
-            size = Integer.parseInt(readUntil('}'));
-        } catch (NumberFormatException nfe) {
-            throw new MessagingException("Invalid length in literal");
-        }
-        if (size < 0) {
-            throw new MessagingException("Invalid negative length in literal");
-        }
-        expect('\r');
-        expect('\n');
-        FixedLengthInputStream in = new FixedLengthInputStream(mIn, size);
-        if (size > mLiteralKeepInMemoryThreshold) {
-            return new ImapTempFileLiteral(in);
-        } else {
-            return new ImapMemoryLiteral(in);
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/store/imap/ImapSimpleString.java b/src/com/android/phone/common/mail/store/imap/ImapSimpleString.java
deleted file mode 100644
index 9d65236..0000000
--- a/src/com/android/phone/common/mail/store/imap/ImapSimpleString.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.store.imap;
-
-import com.android.phone.vvm.omtp.VvmLog;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-
-/**
- * Subclass of {@link ImapString} used for non literals.
- */
-public class ImapSimpleString extends ImapString {
-    private final String TAG = "ImapSimpleString";
-    private String mString;
-
-    /* package */  ImapSimpleString(String string) {
-        mString = (string != null) ? string : "";
-    }
-
-    @Override
-    public void destroy() {
-        mString = null;
-        super.destroy();
-    }
-
-    @Override
-    public String getString() {
-        return mString;
-    }
-
-    @Override
-    public InputStream getAsStream() {
-        try {
-            return new ByteArrayInputStream(mString.getBytes("US-ASCII"));
-        } catch (UnsupportedEncodingException e) {
-            VvmLog.e(TAG, "Unsupported encoding: ", e);
-        }
-        return null;
-    }
-
-    @Override
-    public String toString() {
-        // Purposefully not return just mString, in order to prevent using it instead of getString.
-        return "\"" + mString + "\"";
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/store/imap/ImapString.java b/src/com/android/phone/common/mail/store/imap/ImapString.java
deleted file mode 100644
index dd7133c..0000000
--- a/src/com/android/phone/common/mail/store/imap/ImapString.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.store.imap;
-
-import com.android.phone.vvm.omtp.VvmLog;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-
-/**
- * Class represents an IMAP "element" that is not a list.
- *
- * An atom, quoted string, literal, are all represented by this.  Values like OK, STATUS are too.
- * Also, this class class may contain more arbitrary value like "BODY[HEADER.FIELDS ("DATE")]".
- * See {@link ImapResponseParser}.
- */
-public abstract class ImapString extends ImapElement {
-    private static final byte[] EMPTY_BYTES = new byte[0];
-
-    public static final ImapString EMPTY = new ImapString() {
-        @Override public void destroy() {
-            // Don't call super.destroy().
-            // It's a shared object.  We don't want the mDestroyed to be set on this.
-        }
-
-        @Override public String getString() {
-            return "";
-        }
-
-        @Override public InputStream getAsStream() {
-            return new ByteArrayInputStream(EMPTY_BYTES);
-        }
-
-        @Override public String toString() {
-            return "";
-        }
-    };
-
-    // This is used only for parsing IMAP's FETCH ENVELOPE command, in which
-    // en_US-like date format is used like "01-Jan-2009 11:20:39 -0800", so this should be
-    // handled by Locale.US
-    private final static SimpleDateFormat DATE_TIME_FORMAT =
-            new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss Z", Locale.US);
-
-    private boolean mIsInteger;
-    private int mParsedInteger;
-    private Date mParsedDate;
-
-    @Override
-    public final boolean isList() {
-        return false;
-    }
-
-    @Override
-    public final boolean isString() {
-        return true;
-    }
-
-    /**
-     * @return true if and only if the length of the string is larger than 0.
-     *
-     * Note: IMAP NIL is considered an empty string. See {@link ImapResponseParser
-     * #parseBareString}.
-     * On the other hand, a quoted/literal string with value NIL (i.e. "NIL" and {3}\r\nNIL) is
-     * treated literally.
-     */
-    public final boolean isEmpty() {
-        return getString().length() == 0;
-    }
-
-    public abstract String getString();
-
-    public abstract InputStream getAsStream();
-
-    /**
-     * @return whether it can be parsed as a number.
-     */
-    public final boolean isNumber() {
-        if (mIsInteger) {
-            return true;
-        }
-        try {
-            mParsedInteger = Integer.parseInt(getString());
-            mIsInteger = true;
-            return true;
-        } catch (NumberFormatException e) {
-            return false;
-        }
-    }
-
-    /**
-     * @return value parsed as a number, or 0 if the string is not a number.
-     */
-    public final int getNumberOrZero() {
-        return getNumber(0);
-    }
-
-    /**
-     * @return value parsed as a number, or {@code defaultValue} if the string is not a number.
-     */
-    public final int getNumber(int defaultValue) {
-        if (!isNumber()) {
-            return defaultValue;
-        }
-        return mParsedInteger;
-    }
-
-    /**
-     * @return whether it can be parsed as a date using {@link #DATE_TIME_FORMAT}.
-     */
-    public final boolean isDate() {
-        if (mParsedDate != null) {
-            return true;
-        }
-        if (isEmpty()) {
-            return false;
-        }
-        try {
-            mParsedDate = DATE_TIME_FORMAT.parse(getString());
-            return true;
-        } catch (ParseException e) {
-            VvmLog.w("ImapString", getString() + " can't be parsed as a date.");
-            return false;
-        }
-    }
-
-    /**
-     * @return value it can be parsed as a {@link Date}, or null otherwise.
-     */
-    public final Date getDateOrNull() {
-        if (!isDate()) {
-            return null;
-        }
-        return mParsedDate;
-    }
-
-    /**
-     * @return whether the value case-insensitively equals to {@code s}.
-     */
-    public final boolean is(String s) {
-        if (s == null) {
-            return false;
-        }
-        return getString().equalsIgnoreCase(s);
-    }
-
-
-    /**
-     * @return whether the value case-insensitively starts with {@code s}.
-     */
-    public final boolean startsWith(String prefix) {
-        if (prefix == null) {
-            return false;
-        }
-        final String me = this.getString();
-        if (me.length() < prefix.length()) {
-            return false;
-        }
-        return me.substring(0, prefix.length()).equalsIgnoreCase(prefix);
-    }
-
-    // To force subclasses to implement it.
-    @Override
-    public abstract String toString();
-
-    @Override
-    public final boolean equalsForTest(ImapElement that) {
-        if (!super.equalsForTest(that)) {
-            return false;
-        }
-        ImapString thatString = (ImapString) that;
-        return getString().equals(thatString.getString());
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/store/imap/ImapTempFileLiteral.java b/src/com/android/phone/common/mail/store/imap/ImapTempFileLiteral.java
deleted file mode 100644
index 67d5026..0000000
--- a/src/com/android/phone/common/mail/store/imap/ImapTempFileLiteral.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.store.imap;
-
-import com.android.phone.common.mail.FixedLengthInputStream;
-import com.android.phone.common.mail.TempDirectory;
-import com.android.phone.common.mail.utils.Utility;
-import com.android.phone.common.mail.utils.LogUtils;
-
-import org.apache.commons.io.IOUtils;
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * Subclass of {@link ImapString} used for literals backed by a temp file.
- */
-public class ImapTempFileLiteral extends ImapString {
-    private final String TAG = "ImapTempFileLiteral";
-
-    /* package for test */ final File mFile;
-
-    /** Size is purely for toString() */
-    private final int mSize;
-
-    /* package */  ImapTempFileLiteral(FixedLengthInputStream stream) throws IOException {
-        mSize = stream.getLength();
-        mFile = File.createTempFile("imap", ".tmp", TempDirectory.getTempDirectory());
-
-        // Unfortunately, we can't really use deleteOnExit(), because temp filenames are random
-        // so it'd simply cause a memory leak.
-        // deleteOnExit() simply adds filenames to a static list and the list will never shrink.
-        // mFile.deleteOnExit();
-        OutputStream out = new FileOutputStream(mFile);
-        IOUtils.copy(stream, out);
-        out.close();
-    }
-
-    /**
-     * Make sure we delete the temp file.
-     *
-     * We should always be calling {@link ImapResponse#destroy()}, but it's here as a last resort.
-     */
-    @Override
-    protected void finalize() throws Throwable {
-        try {
-            destroy();
-        } finally {
-            super.finalize();
-        }
-    }
-
-    @Override
-    public InputStream getAsStream() {
-        checkNotDestroyed();
-        try {
-            return new FileInputStream(mFile);
-        } catch (FileNotFoundException e) {
-            // It's probably possible if we're low on storage and the system clears the cache dir.
-            LogUtils.w(TAG, "ImapTempFileLiteral: Temp file not found");
-
-            // Return 0 byte stream as a dummy...
-            return new ByteArrayInputStream(new byte[0]);
-        }
-    }
-
-    @Override
-    public String getString() {
-        checkNotDestroyed();
-        try {
-            byte[] bytes = IOUtils.toByteArray(getAsStream());
-            // Prevent crash from OOM; we've seen this, but only rarely and not reproducibly
-            if (bytes.length > ImapResponseParser.LITERAL_KEEP_IN_MEMORY_THRESHOLD) {
-                throw new IOException();
-            }
-            return Utility.fromAscii(bytes);
-        } catch (IOException e) {
-            LogUtils.w(TAG, "ImapTempFileLiteral: Error while reading temp file", e);
-            return "";
-        }
-    }
-
-    @Override
-    public void destroy() {
-        try {
-            if (!isDestroyed() && mFile.exists()) {
-                mFile.delete();
-            }
-        } catch (RuntimeException re) {
-            // Just log and ignore.
-            LogUtils.w(TAG, "Failed to remove temp file: " + re.getMessage());
-        }
-        super.destroy();
-    }
-
-    @Override
-    public String toString() {
-        return String.format("{%d byte literal(file)}", mSize);
-    }
-
-    public boolean tempFileExistsForTest() {
-        return mFile.exists();
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/store/imap/ImapUtility.java b/src/com/android/phone/common/mail/store/imap/ImapUtility.java
deleted file mode 100644
index 8551d44..0000000
--- a/src/com/android/phone/common/mail/store/imap/ImapUtility.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.store.imap;
-
-import com.android.phone.common.mail.utils.LogUtils;
-
-import java.util.ArrayList;
-
-/**
- * Utility methods for use with IMAP.
- */
-public class ImapUtility {
-    public static final String TAG = "ImapUtility";
-    /**
-     * Apply quoting rules per IMAP RFC,
-     * quoted          = DQUOTE *QUOTED-CHAR DQUOTE
-     * QUOTED-CHAR     = <any TEXT-CHAR except quoted-specials> / "\" quoted-specials
-     * quoted-specials = DQUOTE / "\"
-     *
-     * This is used primarily for IMAP login, but might be useful elsewhere.
-     *
-     * NOTE:  Not very efficient - you may wish to preflight this, or perhaps it should check
-     * for trouble chars before calling the replace functions.
-     *
-     * @param s The string to be quoted.
-     * @return A copy of the string, having undergone quoting as described above
-     */
-    public static String imapQuoted(String s) {
-
-        // First, quote any backslashes by replacing \ with \\
-        // regex Pattern:  \\    (Java string const = \\\\)
-        // Substitute:     \\\\  (Java string const = \\\\\\\\)
-        String result = s.replaceAll("\\\\", "\\\\\\\\");
-
-        // Then, quote any double-quotes by replacing " with \"
-        // regex Pattern:  "    (Java string const = \")
-        // Substitute:     \\"  (Java string const = \\\\\")
-        result = result.replaceAll("\"", "\\\\\"");
-
-        // return string with quotes around it
-        return "\"" + result + "\"";
-    }
-
-    /**
-     * Gets all of the values in a sequence set per RFC 3501. Any ranges are expanded into a
-     * list of individual numbers. If the set is invalid, an empty array is returned.
-     * <pre>
-     * sequence-number = nz-number / "*"
-     * sequence-range  = sequence-number ":" sequence-number
-     * sequence-set    = (sequence-number / sequence-range) *("," sequence-set)
-     * </pre>
-     */
-    public static String[] getImapSequenceValues(String set) {
-        ArrayList<String> list = new ArrayList<String>();
-        if (set != null) {
-            String[] setItems = set.split(",");
-            for (String item : setItems) {
-                if (item.indexOf(':') == -1) {
-                    // simple item
-                    try {
-                        Integer.parseInt(item); // Don't need the value; just ensure it's valid
-                        list.add(item);
-                    } catch (NumberFormatException e) {
-                        LogUtils.d(TAG, "Invalid UID value", e);
-                    }
-                } else {
-                    // range
-                    for (String rangeItem : getImapRangeValues(item)) {
-                        list.add(rangeItem);
-                    }
-                }
-            }
-        }
-        String[] stringList = new String[list.size()];
-        return list.toArray(stringList);
-    }
-
-    /**
-     * Expand the given number range into a list of individual numbers. If the range is not valid,
-     * an empty array is returned.
-     * <pre>
-     * sequence-number = nz-number / "*"
-     * sequence-range  = sequence-number ":" sequence-number
-     * sequence-set    = (sequence-number / sequence-range) *("," sequence-set)
-     * </pre>
-     */
-    public static String[] getImapRangeValues(String range) {
-        ArrayList<String> list = new ArrayList<String>();
-        try {
-            if (range != null) {
-                int colonPos = range.indexOf(':');
-                if (colonPos > 0) {
-                    int first  = Integer.parseInt(range.substring(0, colonPos));
-                    int second = Integer.parseInt(range.substring(colonPos + 1));
-                    if (first < second) {
-                        for (int i = first; i <= second; i++) {
-                            list.add(Integer.toString(i));
-                        }
-                    } else {
-                        for (int i = first; i >= second; i--) {
-                            list.add(Integer.toString(i));
-                        }
-                    }
-                }
-            }
-        } catch (NumberFormatException e) {
-            LogUtils.d(TAG, "Invalid range value", e);
-        }
-        String[] stringList = new String[list.size()];
-        return list.toArray(stringList);
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/utility/CountingOutputStream.java b/src/com/android/phone/common/mail/utility/CountingOutputStream.java
deleted file mode 100644
index f631c3e..0000000
--- a/src/com/android/phone/common/mail/utility/CountingOutputStream.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.utility;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * A simple pass-thru OutputStream that also counts how many bytes are written to it and
- * makes that count available to callers.
- */
-public class CountingOutputStream extends OutputStream {
-    private long mCount;
-    private final OutputStream mOutputStream;
-
-    public CountingOutputStream(OutputStream outputStream) {
-        mOutputStream = outputStream;
-    }
-
-    public long getCount() {
-        return mCount;
-    }
-
-    @Override
-    public void write(byte[] buffer, int offset, int count) throws IOException {
-        mOutputStream.write(buffer, offset, count);
-        mCount += count;
-    }
-
-    @Override
-    public void write(int oneByte) throws IOException {
-        mOutputStream.write(oneByte);
-        mCount++;
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/utility/EOLConvertingOutputStream.java b/src/com/android/phone/common/mail/utility/EOLConvertingOutputStream.java
deleted file mode 100644
index 1d55152..0000000
--- a/src/com/android/phone/common/mail/utility/EOLConvertingOutputStream.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.common.mail.utility;
-
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-public class EOLConvertingOutputStream extends FilterOutputStream {
-    int lastChar;
-
-    public EOLConvertingOutputStream(OutputStream out) {
-        super(out);
-    }
-
-    @Override
-    public void write(int oneByte) throws IOException {
-        if (oneByte == '\n') {
-            if (lastChar != '\r') {
-                super.write('\r');
-            }
-        }
-        super.write(oneByte);
-        lastChar = oneByte;
-    }
-
-    @Override
-    public void flush() throws IOException {
-        if (lastChar == '\r') {
-            super.write('\n');
-            lastChar = '\n';
-        }
-        super.flush();
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/utils/LogUtils.java b/src/com/android/phone/common/mail/utils/LogUtils.java
deleted file mode 100644
index 6bd7be6..0000000
--- a/src/com/android/phone/common/mail/utils/LogUtils.java
+++ /dev/null
@@ -1,417 +0,0 @@
-/**
- * Copyright (c) 2015 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.phone.common.mail.utils;
-
-import android.net.Uri;
-import android.text.TextUtils;
-import android.util.Log;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.phone.vvm.omtp.VvmLog;
-
-import java.util.List;
-import java.util.regex.Pattern;
-
-public class LogUtils {
-    public static final String TAG = "Email Log";
-
-    // "GMT" + "+" or "-" + 4 digits
-    private static final Pattern DATE_CLEANUP_PATTERN_WRONG_TIMEZONE =
-            Pattern.compile("GMT([-+]\\d{4})$");
-
-    private static final String ACCOUNT_PREFIX = "account:";
-
-    /**
-     * Priority constant for the println method; use LogUtils.v.
-     */
-    public static final int VERBOSE = Log.VERBOSE;
-
-    /**
-     * Priority constant for the println method; use LogUtils.d.
-     */
-    public static final int DEBUG = Log.DEBUG;
-
-    /**
-     * Priority constant for the println method; use LogUtils.i.
-     */
-    public static final int INFO = Log.INFO;
-
-    /**
-     * Priority constant for the println method; use LogUtils.w.
-     */
-    public static final int WARN = Log.WARN;
-
-    /**
-     * Priority constant for the println method; use LogUtils.e.
-     */
-    public static final int ERROR = Log.ERROR;
-
-    /**
-     * Used to enable/disable logging that we don't want included in
-     * production releases.  This should be set to DEBUG for production releases, and VERBOSE for
-     * internal builds.
-     */
-    // STOPSHIP: ship with DEBUG set
-    private static final int MAX_ENABLED_LOG_LEVEL = VERBOSE;
-
-    private static Boolean sDebugLoggingEnabledForTests = null;
-
-    /**
-     * Enable debug logging for unit tests.
-     */
-    @VisibleForTesting
-    public static void setDebugLoggingEnabledForTests(boolean enabled) {
-        setDebugLoggingEnabledForTestsInternal(enabled);
-    }
-
-    protected static void setDebugLoggingEnabledForTestsInternal(boolean enabled) {
-        sDebugLoggingEnabledForTests = Boolean.valueOf(enabled);
-    }
-
-    /**
-     * Returns true if the build configuration prevents debug logging.
-     */
-    @VisibleForTesting
-    public static boolean buildPreventsDebugLogging() {
-        return MAX_ENABLED_LOG_LEVEL > VERBOSE;
-    }
-
-    /**
-     * Returns a boolean indicating whether debug logging is enabled.
-     */
-    protected static boolean isDebugLoggingEnabled(String tag) {
-        if (buildPreventsDebugLogging()) {
-            return false;
-        }
-        if (sDebugLoggingEnabledForTests != null) {
-            return sDebugLoggingEnabledForTests.booleanValue();
-        }
-        return Log.isLoggable(tag, Log.DEBUG) || Log.isLoggable(TAG, Log.DEBUG);
-    }
-
-    /**
-     * Returns a String for the specified content provider uri.  This will do
-     * sanitation of the uri to remove PII if debug logging is not enabled.
-     */
-    public static String contentUriToString(final Uri uri) {
-        return contentUriToString(TAG, uri);
-    }
-
-    /**
-     * Returns a String for the specified content provider uri.  This will do
-     * sanitation of the uri to remove PII if debug logging is not enabled.
-     */
-    public static String contentUriToString(String tag, Uri uri) {
-        if (isDebugLoggingEnabled(tag)) {
-            // Debug logging has been enabled, so log the uri as is
-            return uri.toString();
-        } else {
-            // Debug logging is not enabled, we want to remove the email address from the uri.
-            List<String> pathSegments = uri.getPathSegments();
-
-            Uri.Builder builder = new Uri.Builder()
-                    .scheme(uri.getScheme())
-                    .authority(uri.getAuthority())
-                    .query(uri.getQuery())
-                    .fragment(uri.getFragment());
-
-            // This assumes that the first path segment is the account
-            final String account = pathSegments.get(0);
-
-            builder = builder.appendPath(sanitizeAccountName(account));
-            for (int i = 1; i < pathSegments.size(); i++) {
-                builder.appendPath(pathSegments.get(i));
-            }
-            return builder.toString();
-        }
-    }
-
-    /**
-     * Sanitizes an account name.  If debug logging is not enabled, a sanitized name
-     * is returned.
-     */
-    public static String sanitizeAccountName(String accountName) {
-        if (TextUtils.isEmpty(accountName)) {
-            return "";
-        }
-
-        return ACCOUNT_PREFIX + sanitizeName(TAG, accountName);
-    }
-
-    public static String sanitizeName(final String tag, final String name) {
-        if (TextUtils.isEmpty(name)) {
-            return "";
-        }
-
-        if (isDebugLoggingEnabled(tag)) {
-            return name;
-        }
-
-        return String.valueOf(name.hashCode());
-    }
-
-    /**
-     * Checks to see whether or not a log for the specified tag is loggable at the specified level.
-     */
-    public static boolean isLoggable(String tag, int level) {
-        if (MAX_ENABLED_LOG_LEVEL > level) {
-            return false;
-        }
-        return Log.isLoggable(tag, level) || Log.isLoggable(TAG, level);
-    }
-
-    /**
-     * Send a {@link #VERBOSE} log message.
-     * @param tag Used to identify the source of a log message.  It usually identifies
-     *        the class or activity where the log call occurs.
-     * @param format the format string (see {@link java.util.Formatter#format})
-     * @param args
-     *            the list of arguments passed to the formatter. If there are
-     *            more arguments than required by {@code format},
-     *            additional arguments are ignored.
-     */
-    public static int v(String tag, String format, Object... args) {
-        if (isLoggable(tag, VERBOSE)) {
-            return VvmLog.v(tag, String.format(format, args));
-        }
-        return 0;
-    }
-
-    /**
-     * Send a {@link #VERBOSE} log message.
-     * @param tag Used to identify the source of a log message.  It usually identifies
-     *        the class or activity where the log call occurs.
-     * @param tr An exception to log
-     * @param format the format string (see {@link java.util.Formatter#format})
-     * @param args
-     *            the list of arguments passed to the formatter. If there are
-     *            more arguments than required by {@code format},
-     *            additional arguments are ignored.
-     */
-    public static int v(String tag, Throwable tr, String format, Object... args) {
-        if (isLoggable(tag, VERBOSE)) {
-            return VvmLog.v(tag, String.format(format, args), tr);
-        }
-        return 0;
-    }
-
-    /**
-     * Send a {@link #DEBUG} log message.
-     * @param tag Used to identify the source of a log message.  It usually identifies
-     *        the class or activity where the log call occurs.
-     * @param format the format string (see {@link java.util.Formatter#format})
-     * @param args
-     *            the list of arguments passed to the formatter. If there are
-     *            more arguments than required by {@code format},
-     *            additional arguments are ignored.
-     */
-    public static int d(String tag, String format, Object... args) {
-        if (isLoggable(tag, DEBUG)) {
-            return VvmLog.d(tag, String.format(format, args));
-        }
-        return 0;
-    }
-
-    /**
-     * Send a {@link #DEBUG} log message.
-     * @param tag Used to identify the source of a log message.  It usually identifies
-     *        the class or activity where the log call occurs.
-     * @param tr An exception to log
-     * @param format the format string (see {@link java.util.Formatter#format})
-     * @param args
-     *            the list of arguments passed to the formatter. If there are
-     *            more arguments than required by {@code format},
-     *            additional arguments are ignored.
-     */
-    public static int d(String tag, Throwable tr, String format, Object... args) {
-        if (isLoggable(tag, DEBUG)) {
-            return VvmLog.d(tag, String.format(format, args), tr);
-        }
-        return 0;
-    }
-
-    /**
-     * Send a {@link #INFO} log message.
-     * @param tag Used to identify the source of a log message.  It usually identifies
-     *        the class or activity where the log call occurs.
-     * @param format the format string (see {@link java.util.Formatter#format})
-     * @param args
-     *            the list of arguments passed to the formatter. If there are
-     *            more arguments than required by {@code format},
-     *            additional arguments are ignored.
-     */
-    public static int i(String tag, String format, Object... args) {
-        if (isLoggable(tag, INFO)) {
-            return VvmLog.i(tag, String.format(format, args));
-        }
-        return 0;
-    }
-
-    /**
-     * Send a {@link #INFO} log message.
-     * @param tag Used to identify the source of a log message.  It usually identifies
-     *        the class or activity where the log call occurs.
-     * @param tr An exception to log
-     * @param format the format string (see {@link java.util.Formatter#format})
-     * @param args
-     *            the list of arguments passed to the formatter. If there are
-     *            more arguments than required by {@code format},
-     *            additional arguments are ignored.
-     */
-    public static int i(String tag, Throwable tr, String format, Object... args) {
-        if (isLoggable(tag, INFO)) {
-            return VvmLog.i(tag, String.format(format, args), tr);
-        }
-        return 0;
-    }
-
-    /**
-     * Send a {@link #WARN} log message.
-     * @param tag Used to identify the source of a log message.  It usually identifies
-     *        the class or activity where the log call occurs.
-     * @param format the format string (see {@link java.util.Formatter#format})
-     * @param args
-     *            the list of arguments passed to the formatter. If there are
-     *            more arguments than required by {@code format},
-     *            additional arguments are ignored.
-     */
-    public static int w(String tag, String format, Object... args) {
-        if (isLoggable(tag, WARN)) {
-            return VvmLog.w(tag, String.format(format, args));
-        }
-        return 0;
-    }
-
-    /**
-     * Send a {@link #WARN} log message.
-     * @param tag Used to identify the source of a log message.  It usually identifies
-     *        the class or activity where the log call occurs.
-     * @param tr An exception to log
-     * @param format the format string (see {@link java.util.Formatter#format})
-     * @param args
-     *            the list of arguments passed to the formatter. If there are
-     *            more arguments than required by {@code format},
-     *            additional arguments are ignored.
-     */
-    public static int w(String tag, Throwable tr, String format, Object... args) {
-        if (isLoggable(tag, WARN)) {
-            return VvmLog.w(tag, String.format(format, args), tr);
-        }
-        return 0;
-    }
-
-    /**
-     * Send a {@link #ERROR} log message.
-     * @param tag Used to identify the source of a log message.  It usually identifies
-     *        the class or activity where the log call occurs.
-     * @param format the format string (see {@link java.util.Formatter#format})
-     * @param args
-     *            the list of arguments passed to the formatter. If there are
-     *            more arguments than required by {@code format},
-     *            additional arguments are ignored.
-     */
-    public static int e(String tag, String format, Object... args) {
-        if (isLoggable(tag, ERROR)) {
-            return VvmLog.e(tag, String.format(format, args));
-        }
-        return 0;
-    }
-
-    /**
-     * Send a {@link #ERROR} log message.
-     * @param tag Used to identify the source of a log message.  It usually identifies
-     *        the class or activity where the log call occurs.
-     * @param tr An exception to log
-     * @param format the format string (see {@link java.util.Formatter#format})
-     * @param args
-     *            the list of arguments passed to the formatter. If there are
-     *            more arguments than required by {@code format},
-     *            additional arguments are ignored.
-     */
-    public static int e(String tag, Throwable tr, String format, Object... args) {
-        if (isLoggable(tag, ERROR)) {
-            return VvmLog.e(tag, String.format(format, args), tr);
-        }
-        return 0;
-    }
-
-    /**
-     * What a Terrible Failure: Report a condition that should never happen.
-     * The error will always be logged at level ASSERT with the call stack.
-     * Depending on system configuration, a report may be added to the
-     * {@link android.os.DropBoxManager} and/or the process may be terminated
-     * immediately with an error dialog.
-     * @param tag Used to identify the source of a log message.  It usually identifies
-     *        the class or activity where the log call occurs.
-     * @param format the format string (see {@link java.util.Formatter#format})
-     * @param args
-     *            the list of arguments passed to the formatter. If there are
-     *            more arguments than required by {@code format},
-     *            additional arguments are ignored.
-     */
-    public static int wtf(String tag, String format, Object... args) {
-        return VvmLog.wtf(tag, String.format(format, args), new Error());
-    }
-
-    /**
-     * What a Terrible Failure: Report a condition that should never happen.
-     * The error will always be logged at level ASSERT with the call stack.
-     * Depending on system configuration, a report may be added to the
-     * {@link android.os.DropBoxManager} and/or the process may be terminated
-     * immediately with an error dialog.
-     * @param tag Used to identify the source of a log message.  It usually identifies
-     *        the class or activity where the log call occurs.
-     * @param tr An exception to log
-     * @param format the format string (see {@link java.util.Formatter#format})
-     * @param args
-     *            the list of arguments passed to the formatter. If there are
-     *            more arguments than required by {@code format},
-     *            additional arguments are ignored.
-     */
-    public static int wtf(String tag, Throwable tr, String format, Object... args) {
-        return VvmLog.wtf(tag, String.format(format, args), tr);
-    }
-
-
-    /**
-     * Try to make a date MIME(RFC 2822/5322)-compliant.
-     *
-     * It fixes:
-     * - "Thu, 10 Dec 09 15:08:08 GMT-0700" to "Thu, 10 Dec 09 15:08:08 -0700"
-     *   (4 digit zone value can't be preceded by "GMT")
-     *   We got a report saying eBay sends a date in this format
-     */
-    public static String cleanUpMimeDate(String date) {
-        if (TextUtils.isEmpty(date)) {
-            return date;
-        }
-        date = DATE_CLEANUP_PATTERN_WRONG_TIMEZONE.matcher(date).replaceFirst("$1");
-        return date;
-    }
-
-
-    public static String byteToHex(int b) {
-        return byteToHex(new StringBuilder(), b).toString();
-    }
-
-    public static StringBuilder byteToHex(StringBuilder sb, int b) {
-        b &= 0xFF;
-        sb.append("0123456789ABCDEF".charAt(b >> 4));
-        sb.append("0123456789ABCDEF".charAt(b & 0xF));
-        return sb;
-    }
-
-}
\ No newline at end of file
diff --git a/src/com/android/phone/common/mail/utils/Utility.java b/src/com/android/phone/common/mail/utils/Utility.java
deleted file mode 100644
index d71b25e..0000000
--- a/src/com/android/phone/common/mail/utils/Utility.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Copyright (c) 2015 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.phone.common.mail.utils;
-
-import java.io.ByteArrayInputStream;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.charset.Charset;
-
-/**
- * Simple utility methods used in email functions.
- */
-public class Utility {
-    public static final Charset ASCII = Charset.forName("US-ASCII");
-
-    public static final String[] EMPTY_STRINGS = new String[0];
-
-    /**
-     * Returns a concatenated string containing the output of every Object's
-     * toString() method, each separated by the given separator character.
-     */
-    public static String combine(Object[] parts, char separator) {
-        if (parts == null) {
-            return null;
-        }
-        StringBuilder sb = new StringBuilder();
-        for (int i = 0; i < parts.length; i++) {
-            sb.append(parts[i].toString());
-            if (i < parts.length - 1) {
-                sb.append(separator);
-            }
-        }
-        return sb.toString();
-    }
-
-    /** Converts a String to ASCII bytes */
-    public static byte[] toAscii(String s) {
-        return encode(ASCII, s);
-    }
-
-    /** Builds a String from ASCII bytes */
-    public static String fromAscii(byte[] b) {
-        return decode(ASCII, b);
-    }
-
-    private static byte[] encode(Charset charset, String s) {
-        if (s == null) {
-            return null;
-        }
-        final ByteBuffer buffer = charset.encode(CharBuffer.wrap(s));
-        final byte[] bytes = new byte[buffer.limit()];
-        buffer.get(bytes);
-        return bytes;
-    }
-
-    private static String decode(Charset charset, byte[] b) {
-        if (b == null) {
-            return null;
-        }
-        final CharBuffer cb = charset.decode(ByteBuffer.wrap(b));
-        return new String(cb.array(), 0, cb.length());
-    }
-
-    public static ByteArrayInputStream streamFromAsciiString(String ascii) {
-        return new ByteArrayInputStream(toAscii(ascii));
-    }
-}
diff --git a/src/com/android/phone/otasp/OtaspActivationService.java b/src/com/android/phone/otasp/OtaspActivationService.java
new file mode 100644
index 0000000..158925a
--- /dev/null
+++ b/src/com/android/phone/otasp/OtaspActivationService.java
@@ -0,0 +1,225 @@
+/*
+ * Copyright (C) 2017 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.phone.otasp;
+
+import android.app.Service;
+import android.content.Context;
+import android.content.Intent;
+import android.os.AsyncResult;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Message;
+import android.telephony.ServiceState;
+import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
+
+import com.android.internal.telephony.Phone;
+import com.android.internal.telephony.PhoneConstants;
+import com.android.phone.PhoneGlobals;
+import com.android.phone.PhoneUtils;
+
+import static com.android.phone.PhoneGlobals.getPhone;
+
+/**
+ * otasp activation service handles all logic related with OTASP call.
+ * OTASP is a CDMA-specific feature: OTA or OTASP == Over The Air service provisioning
+ * In practice, in a normal successful OTASP call, events come in as follows:
+ * - SPL_UNLOCKED within a couple of seconds after the call starts
+ * - PRL_DOWNLOADED and MDN_DOWNLOADED and COMMITTED within a span of 2 seconds
+ * - poll cdma subscription from RIL after COMMITTED
+ * - SIM reloading with provisioned MDN and MIN
+ */
+public class OtaspActivationService extends Service {
+    private static final String TAG = OtaspActivationService.class.getSimpleName();
+    private static final boolean DBG = true;
+    /* non-interactive otasp number */
+    private static final String OTASP_NUMBER = "*22899";
+
+    /**
+     * Otasp call follows with SIM reloading which might triggers a retry loop on activation
+     * failure. A max retry limit could help prevent retry loop.
+     */
+    private static final int OTASP_CALL_RETRIES_MAX = 3;
+    private static final int OTASP_CALL_RETRY_PERIOD_IN_MS = 3000;
+    private static int sOtaspCallRetries = 0;
+
+    /* events */
+    private static final int EVENT_CALL_STATE_CHANGED                     = 0;
+    private static final int EVENT_CDMA_OTASP_CALL_RETRY                  = 1;
+    private static final int EVENT_CDMA_PROVISION_STATUS_UPDATE           = 2;
+    private static final int EVENT_SERVICE_STATE_CHANGED                  = 3;
+    private static final int EVENT_START_OTASP_CALL                       = 4;
+
+    /* use iccid to detect hot sim swap */
+    private static String sIccId = null;
+
+    private Phone mPhone;
+    /* committed flag indicates Otasp call succeed */
+    private boolean mIsOtaspCallCommitted = false;
+
+    @Override
+    public void onCreate() {
+        logd("otasp service onCreate");
+        mPhone = PhoneGlobals.getPhone();
+        if ((sIccId == null) || !sIccId.equals(mPhone.getIccSerialNumber())) {
+            // reset to allow activation retry on new sim
+            sIccId = mPhone.getIccSerialNumber();
+            sOtaspCallRetries = 0;
+        }
+        sOtaspCallRetries++;
+        logd("OTASP call tried " + sOtaspCallRetries + " times");
+        if (sOtaspCallRetries > OTASP_CALL_RETRIES_MAX) {
+            logd("OTASP call exceeds max retries => activation failed");
+            updateActivationState(this, false);
+            onComplete();
+            return;
+        }
+        mHandler.sendEmptyMessage(EVENT_START_OTASP_CALL);
+    }
+
+    @Override
+    public int onStartCommand(Intent intent, int flags, int startId) {
+        return START_REDELIVER_INTENT;
+    }
+
+    @Override
+    public IBinder onBind(Intent intent) {
+        return null;
+    }
+
+    private Handler mHandler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case EVENT_SERVICE_STATE_CHANGED:
+                    logd("EVENT_SERVICE_STATE_CHANGED");
+                    onStartOtaspCall();
+                    break;
+                case EVENT_START_OTASP_CALL:
+                    logd("EVENT_START_OTASP_CALL");
+                    onStartOtaspCall();
+                    break;
+                case EVENT_CALL_STATE_CHANGED:
+                    logd("OTASP_CALL_STATE_CHANGED");
+                    onOtaspCallStateChanged();
+                    break;
+                case EVENT_CDMA_PROVISION_STATUS_UPDATE:
+                    logd("OTASP_ACTIVATION_STATUS_UPDATE_EVENT");
+                    onCdmaProvisionStatusUpdate((AsyncResult) msg.obj);
+                    break;
+                case EVENT_CDMA_OTASP_CALL_RETRY:
+                    logd("EVENT_CDMA_OTASP_CALL_RETRY");
+                    onStartOtaspCall();
+                    break;
+                default:
+                    loge("invalid msg: " + msg.what + " not handled.");
+            }
+        }
+    };
+
+    /**
+     * Starts the OTASP call without any UI.
+     * platform only support background non-interactive otasp call, but users could still dial
+     * interactive OTASP number through dialer if carrier allows (some carrier will
+     * explicitly block any outgoing *288XX number).
+     */
+    private void onStartOtaspCall() {
+        unregisterAll();
+        if (mPhone.getServiceState().getState() != ServiceState.STATE_IN_SERVICE) {
+            loge("OTASP call failure, wait for network available.");
+            mPhone.registerForServiceStateChanged(mHandler, EVENT_SERVICE_STATE_CHANGED, null);
+            return;
+        }
+        // otasp call follows with CDMA OTA PROVISION STATUS update which signals activation result
+        mPhone.registerForCdmaOtaStatusChange(mHandler, EVENT_CDMA_PROVISION_STATUS_UPDATE, null);
+        mPhone.registerForPreciseCallStateChanged(mHandler, EVENT_CALL_STATE_CHANGED, null);
+        logd("startNonInteractiveOtasp: placing call to '" + OTASP_NUMBER + "'...");
+        int callStatus = PhoneUtils.placeCall(this,
+                getPhone(),
+                OTASP_NUMBER,
+                null,   // contactRef
+                false); // isEmergencyCall
+        if (callStatus == PhoneUtils.CALL_STATUS_DIALED) {
+            if (DBG) logd("  ==> success return from placeCall(): callStatus = " + callStatus);
+        } else {
+            loge(" ==> failure return from placeCall(): callStatus = " + callStatus);
+            mHandler.sendEmptyMessageDelayed(EVENT_CDMA_OTASP_CALL_RETRY,
+                    OTASP_CALL_RETRY_PERIOD_IN_MS);
+        }
+    }
+
+    /**
+     * register for cdma ota provision status
+     * see RIL_CDMA_OTA_ProvisionStatus in include/telephony/ril.h
+     */
+    private void onCdmaProvisionStatusUpdate(AsyncResult r) {
+        int[] otaStatus = (int[]) r.result;
+        logd("onCdmaProvisionStatusUpdate: " + otaStatus[0]);
+        if (Phone.CDMA_OTA_PROVISION_STATUS_COMMITTED == otaStatus[0]) {
+            mIsOtaspCallCommitted = true;
+        }
+    }
+
+    /**
+     * update activation state upon call disconnected.
+     * check the mIsOtaspCallCommitted bit, and if that's true it means that activation
+     * was successful.
+     */
+    private void onOtaspCallStateChanged() {
+        logd("onOtaspCallStateChanged: " + mPhone.getState());
+        if (mPhone.getState().equals(PhoneConstants.State.IDLE)) {
+            if (mIsOtaspCallCommitted) {
+                logd("Otasp activation succeed");
+                updateActivationState(this, true);
+            } else {
+                logd("Otasp activation failed");
+                updateActivationState(this, false);
+            }
+            onComplete();
+        }
+    }
+
+    private void onComplete() {
+        logd("otasp service onComplete");
+        unregisterAll();
+        stopSelf();
+    }
+
+    private void unregisterAll() {
+        mPhone.unregisterForCdmaOtaStatusChange(mHandler);
+        mPhone.unregisterForSubscriptionInfoReady(mHandler);
+        mPhone.unregisterForServiceStateChanged(mHandler);
+        mPhone.unregisterForPreciseCallStateChanged(mHandler);
+        mHandler.removeCallbacksAndMessages(null);
+    }
+
+    public static void updateActivationState(Context context, boolean success) {
+        final TelephonyManager mTelephonyMgr = TelephonyManager.from(context);
+        int state = (success) ? TelephonyManager.SIM_ACTIVATION_STATE_ACTIVATED :
+                TelephonyManager.SIM_ACTIVATION_STATE_DEACTIVATED;
+        int subId = SubscriptionManager.getDefaultSubscriptionId();
+        mTelephonyMgr.setVoiceActivationState(subId, state);
+        mTelephonyMgr.setDataActivationState(subId, state);
+    }
+
+    private static void logd(String s) {
+        android.util.Log.d(TAG, s);
+    }
+
+    private static void loge(String s) {
+        android.util.Log.e(TAG, s);
+    }
+}
diff --git a/src/com/android/phone/otasp/OtaspSimStateReceiver.java b/src/com/android/phone/otasp/OtaspSimStateReceiver.java
new file mode 100644
index 0000000..213aa9f
--- /dev/null
+++ b/src/com/android/phone/otasp/OtaspSimStateReceiver.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2017 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.phone.otasp;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.os.PersistableBundle;
+import android.telephony.CarrierConfigManager;
+import android.telephony.PhoneStateListener;
+import android.telephony.TelephonyManager;
+import android.util.Log;
+import com.android.internal.telephony.Phone;
+import com.android.phone.PhoneGlobals;
+
+public class OtaspSimStateReceiver extends BroadcastReceiver {
+    private static final String TAG = OtaspSimStateReceiver.class.getSimpleName();
+    private static final boolean DBG = true;
+    private Context mContext;
+
+    private PhoneStateListener mPhoneStateListener = new PhoneStateListener(){
+        @Override
+        public void onOtaspChanged(int otaspMode) {
+            logd("onOtaspChanged: otaspMode=" + otaspMode);
+            if (otaspMode == TelephonyManager.OTASP_NEEDED) {
+                logd("otasp activation required, start otaspActivationService");
+                mContext.startService(new Intent(mContext, OtaspActivationService.class));
+            } else if (otaspMode == TelephonyManager.OTASP_NOT_NEEDED) {
+                OtaspActivationService.updateActivationState(mContext, true);
+            }
+        }
+    };
+
+    /**
+     * check if OTA service provisioning activation is supported by the current carrier
+     * @return true if otasp activation is needed, false otherwise
+     */
+    private static boolean isCarrierSupported() {
+        final Phone phone = PhoneGlobals.getPhone();
+        final Context context = phone.getContext();
+        if (context != null) {
+            PersistableBundle b = null;
+            final CarrierConfigManager configManager = (CarrierConfigManager) context
+                    .getSystemService(Context.CARRIER_CONFIG_SERVICE);
+            if (configManager != null) {
+                b = configManager.getConfig();
+            }
+            if (b != null && b.getBoolean(
+                    CarrierConfigManager.KEY_USE_OTASP_FOR_PROVISIONING_BOOL)) {
+                return true;
+            }
+        }
+        logd("otasp activation not needed: no supported carrier");
+        return false;
+    }
+
+    @Override
+    public void onReceive(Context context, Intent intent) {
+        mContext = context;
+        if(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED.equals(intent.getAction())) {
+            if (DBG) logd("Received intent: " + intent.getAction());
+            if (PhoneGlobals.getPhone().getIccRecordsLoaded() && isCarrierSupported()) {
+                final TelephonyManager telephonyManager = TelephonyManager.from(context);
+                telephonyManager.listen(mPhoneStateListener,
+                        PhoneStateListener.LISTEN_OTASP_CHANGED);
+            }
+        }
+    }
+
+    private static void logd(String s) {
+        Log.d(TAG, s);
+    }
+}
+
diff --git a/src/com/android/phone/settings/AccessibilitySettingsFragment.java b/src/com/android/phone/settings/AccessibilitySettingsFragment.java
index 0c186a9..af7d4bf 100644
--- a/src/com/android/phone/settings/AccessibilitySettingsFragment.java
+++ b/src/com/android/phone/settings/AccessibilitySettingsFragment.java
@@ -19,7 +19,7 @@
 import android.content.Context;
 import android.media.AudioManager;
 import android.os.Bundle;
-import android.preference.CheckBoxPreference;
+import android.preference.SwitchPreference;
 import android.preference.Preference;
 import android.preference.PreferenceFragment;
 import android.preference.PreferenceScreen;
@@ -66,7 +66,7 @@
     private AudioManager mAudioManager;
 
     private TtyModeListPreference mButtonTty;
-    private CheckBoxPreference mButtonHac;
+    private SwitchPreference mButtonHac;
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
@@ -79,7 +79,7 @@
 
         mButtonTty = (TtyModeListPreference) findPreference(
                 getResources().getString(R.string.tty_mode_key));
-        mButtonHac = (CheckBoxPreference) findPreference(BUTTON_HAC_KEY);
+        mButtonHac = (SwitchPreference) findPreference(BUTTON_HAC_KEY);
 
         if (PhoneGlobals.getInstance().phoneMgr.isTtyModeSupported()) {
             mButtonTty.init();
diff --git a/src/com/android/phone/settings/PhoneAccountSettingsFragment.java b/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
index 77de3f5..670f98d 100644
--- a/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
+++ b/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
@@ -8,11 +8,11 @@
 import android.net.sip.SipManager;
 import android.os.Bundle;
 import android.os.UserManager;
-import android.preference.CheckBoxPreference;
 import android.preference.ListPreference;
 import android.preference.Preference;
 import android.preference.PreferenceCategory;
 import android.preference.PreferenceFragment;
+import android.preference.SwitchPreference;
 import android.telecom.PhoneAccount;
 import android.telecom.PhoneAccountHandle;
 import android.telecom.TelecomManager;
@@ -73,7 +73,7 @@
     private AccountSelectionPreference mDefaultOutgoingAccount;
 
     private ListPreference mUseSipCalling;
-    private CheckBoxPreference mSipReceiveCallsPreference;
+    private SwitchPreference mSipReceiveCallsPreference;
     private SipPreferences mSipPreferences;
 
     @Override
@@ -173,7 +173,7 @@
             mUseSipCalling.setValueIndex(optionsValueIndex);
             mUseSipCalling.setSummary(mUseSipCalling.getEntry());
 
-            mSipReceiveCallsPreference = (CheckBoxPreference)
+            mSipReceiveCallsPreference = (SwitchPreference)
                     getPreferenceScreen().findPreference(SIP_RECEIVE_CALLS_PREF_KEY);
             mSipReceiveCallsPreference.setEnabled(SipUtil.isPhoneIdle(getActivity()));
             mSipReceiveCallsPreference.setChecked(
@@ -310,8 +310,8 @@
                 int subId2 = mTelephonyManager.getSubIdForPhoneAccount(account2);
                 if (subId1 != SubscriptionManager.INVALID_SUBSCRIPTION_ID &&
                         subId2 != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
-                    retval = (mSubscriptionManager.getSlotId(subId1) <
-                        mSubscriptionManager.getSlotId(subId2)) ? -1 : 1;
+                    retval = (mSubscriptionManager.getSlotIndex(subId1) <
+                        mSubscriptionManager.getSlotIndex(subId2)) ? -1 : 1;
                 }
 
                 // Then order by package
diff --git a/src/com/android/phone/settings/VisualVoicemailSettingsUtil.java b/src/com/android/phone/settings/VisualVoicemailSettingsUtil.java
deleted file mode 100644
index 22fb70e..0000000
--- a/src/com/android/phone/settings/VisualVoicemailSettingsUtil.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.settings;
-
-import android.content.Context;
-import android.telecom.PhoneAccountHandle;
-import com.android.phone.R;
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-import com.android.phone.vvm.omtp.VisualVoicemailPreferences;
-import com.android.phone.vvm.omtp.sync.OmtpVvmSourceManager;
-import com.android.phone.vvm.omtp.utils.PhoneAccountHandleConverter;
-
-/**
- * Save whether or not a particular account is enabled in shared to be retrieved later.
- */
-public class VisualVoicemailSettingsUtil {
-
-    private static final String IS_ENABLED_KEY = "is_enabled";
-
-
-    public static void setEnabled(Context context, PhoneAccountHandle phoneAccount,
-            boolean isEnabled) {
-        new VisualVoicemailPreferences(context, phoneAccount).edit()
-                .putBoolean(IS_ENABLED_KEY, isEnabled)
-                .apply();
-        OmtpVvmCarrierConfigHelper config = new OmtpVvmCarrierConfigHelper(context, phoneAccount);
-        if (isEnabled) {
-            OmtpVvmSourceManager.getInstance(context).addPhoneStateListener(phoneAccount);
-            config.startActivation();
-        } else {
-            OmtpVvmSourceManager.getInstance(context).removeSource(phoneAccount);
-            config.startDeactivation();
-        }
-    }
-
-    public static boolean isEnabled(Context context,
-            PhoneAccountHandle phoneAccount) {
-        if (phoneAccount == null) {
-            return false;
-        }
-        if (!context.getResources().getBoolean(R.bool.allow_visual_voicemail)) {
-            return false;
-        }
-
-        VisualVoicemailPreferences prefs = new VisualVoicemailPreferences(context, phoneAccount);
-        if (prefs.contains(IS_ENABLED_KEY)) {
-            // isEnableByDefault is a bit expensive, so don't use it as default value of
-            // getBoolean(). The "false" here should never be actually used.
-            return prefs.getBoolean(IS_ENABLED_KEY, false);
-        }
-        return new OmtpVvmCarrierConfigHelper(context,
-                PhoneAccountHandleConverter.toSubId(phoneAccount)).isEnabledByDefault();
-    }
-
-    /**
-     * Whether the client enabled status is explicitly set by user or by default(Whether carrier VVM
-     * app is installed). This is used to determine whether to disable the client when the carrier
-     * VVM app is installed. If the carrier VVM app is installed the client should give priority to
-     * it if the settings are not touched.
-     */
-    public static boolean isEnabledUserSet(Context context,
-            PhoneAccountHandle phoneAccount) {
-        if (phoneAccount == null) {
-            return false;
-        }
-        VisualVoicemailPreferences prefs = new VisualVoicemailPreferences(context, phoneAccount);
-        return prefs.contains(IS_ENABLED_KEY);
-    }
-}
diff --git a/src/com/android/phone/settings/VoicemailChangePinActivity.java b/src/com/android/phone/settings/VoicemailChangePinActivity.java
deleted file mode 100644
index 33da27a..0000000
--- a/src/com/android/phone/settings/VoicemailChangePinActivity.java
+++ /dev/null
@@ -1,656 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.settings;
-
-import android.annotation.Nullable;
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.ProgressDialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.DialogInterface.OnDismissListener;
-import android.content.SharedPreferences;
-import android.net.Network;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.preference.PreferenceManager;
-import android.telecom.PhoneAccountHandle;
-import android.text.Editable;
-import android.text.InputFilter;
-import android.text.InputFilter.LengthFilter;
-import android.text.TextWatcher;
-import android.view.KeyEvent;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.view.WindowManager;
-import android.view.inputmethod.EditorInfo;
-import android.widget.Button;
-import android.widget.EditText;
-import android.widget.TextView;
-import android.widget.TextView.OnEditorActionListener;
-import android.widget.Toast;
-import com.android.phone.PhoneUtils;
-import com.android.phone.R;
-import com.android.phone.VoicemailStatus;
-import com.android.phone.common.mail.MessagingException;
-import com.android.phone.vvm.omtp.OmtpConstants;
-import com.android.phone.vvm.omtp.OmtpConstants.ChangePinResult;
-import com.android.phone.vvm.omtp.OmtpEvents;
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-import com.android.phone.vvm.omtp.VisualVoicemailPreferences;
-import com.android.phone.vvm.omtp.VvmLog;
-import com.android.phone.vvm.omtp.imap.ImapHelper;
-import com.android.phone.vvm.omtp.imap.ImapHelper.InitializingException;
-import com.android.phone.vvm.omtp.sync.VvmNetworkRequestCallback;
-
-/**
- * Dialog to change the voicemail PIN. The TUI (Telephony User Interface) PIN is used when accessing
- * traditional voicemail through phone call. The intent to launch this activity must contain {@link
- * #EXTRA_PHONE_ACCOUNT_HANDLE}
- */
-public class VoicemailChangePinActivity extends Activity implements OnClickListener,
-        OnEditorActionListener, TextWatcher {
-
-    private static final String TAG = "VmChangePinActivity";
-
-    public static final String EXTRA_PHONE_ACCOUNT_HANDLE = "extra_phone_account_handle";
-
-    private static final String KEY_DEFAULT_OLD_PIN = "default_old_pin";
-
-    private static final int MESSAGE_HANDLE_RESULT = 1;
-
-    private PhoneAccountHandle mPhoneAccountHandle;
-    private OmtpVvmCarrierConfigHelper mConfig;
-
-    private int mPinMinLength;
-    private int mPinMaxLength;
-
-    private State mUiState = State.Initial;
-    private String mOldPin;
-    private String mFirstPin;
-
-    private ProgressDialog mProgressDialog;
-
-    private TextView mHeaderText;
-    private TextView mHintText;
-    private TextView mErrorText;
-    private EditText mPinEntry;
-    private Button mCancelButton;
-    private Button mNextButton;
-
-    private Handler mHandler = new Handler() {
-        @Override
-        public void handleMessage(Message message) {
-            if (message.what == MESSAGE_HANDLE_RESULT) {
-                mUiState.handleResult(VoicemailChangePinActivity.this, message.arg1);
-            }
-        }
-    };
-
-    private enum State {
-        /**
-         * Empty state to handle initial state transition. Will immediately switch into {@link
-         * #VerifyOldPin} if a default PIN has been set by the OMTP client, or {@link #EnterOldPin}
-         * if not.
-         */
-        Initial,
-        /**
-         * Prompt the user to enter old PIN. The PIN will be verified with the server before
-         * proceeding to {@link #EnterNewPin}.
-         */
-        EnterOldPin {
-            @Override
-            public void onEnter(VoicemailChangePinActivity activity) {
-                activity.setHeader(R.string.change_pin_enter_old_pin_header);
-                activity.mHintText.setText(R.string.change_pin_enter_old_pin_hint);
-                activity.mNextButton.setText(R.string.change_pin_continue_label);
-                activity.mErrorText.setText(null);
-            }
-
-            @Override
-            public void onInputChanged(VoicemailChangePinActivity activity) {
-                activity.setNextEnabled(activity.getCurrentPasswordInput().length() > 0);
-            }
-
-
-            @Override
-            public void handleNext(VoicemailChangePinActivity activity) {
-                activity.mOldPin = activity.getCurrentPasswordInput();
-                activity.verifyOldPin();
-            }
-
-            @Override
-            public void handleResult(VoicemailChangePinActivity activity,
-                    @ChangePinResult int result) {
-                if (result == OmtpConstants.CHANGE_PIN_SUCCESS) {
-                    activity.updateState(State.EnterNewPin);
-                } else {
-                    CharSequence message = activity.getChangePinResultMessage(result);
-                    activity.showError(message);
-                    activity.mPinEntry.setText("");
-                }
-            }
-        },
-        /**
-         * The default old PIN is found. Show a blank screen while verifying with the server to make
-         * sure the PIN is still valid. If the PIN is still valid, proceed to {@link #EnterNewPin}.
-         * If not, the user probably changed the PIN through other means, proceed to {@link
-         * #EnterOldPin}. If any other issue caused the verifying to fail, show an error and exit.
-         */
-        VerifyOldPin {
-            @Override
-            public void onEnter(VoicemailChangePinActivity activity) {
-                activity.findViewById(android.R.id.content).setVisibility(View.INVISIBLE);
-                activity.verifyOldPin();
-            }
-
-            @Override
-            public void handleResult(VoicemailChangePinActivity activity,
-                    @ChangePinResult int result) {
-                if (result == OmtpConstants.CHANGE_PIN_SUCCESS) {
-                    activity.updateState(State.EnterNewPin);
-                } else if (result == OmtpConstants.CHANGE_PIN_SYSTEM_ERROR) {
-                    activity.getWindow().setSoftInputMode(
-                            WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
-                    activity.showError(activity.getString(R.string.change_pin_system_error),
-                            new OnDismissListener() {
-                                @Override
-                                public void onDismiss(DialogInterface dialog) {
-                                    activity.finish();
-                                }
-                            });
-                } else {
-                    VvmLog.e(TAG, "invalid default old PIN: " + activity
-                            .getChangePinResultMessage(result));
-                    // If the default old PIN is rejected by the server, the PIN is probably changed
-                    // through other means, or the generated pin is invalid
-                    // Wipe the default old PIN so the old PIN input box will be shown to the user
-                    // on the next time.
-                    setDefaultOldPIN(activity, activity.mPhoneAccountHandle, null);
-                    activity.handleOmtpEvent(OmtpEvents.CONFIG_PIN_SET);
-                    activity.updateState(State.EnterOldPin);
-                }
-            }
-
-            @Override
-            public void onLeave(VoicemailChangePinActivity activity) {
-                activity.findViewById(android.R.id.content).setVisibility(View.VISIBLE);
-            }
-        },
-        /**
-         * Let the user enter the new PIN and validate the format. Only length is enforced, PIN
-         * strength check relies on the server. After a valid PIN is entered, proceed to {@link
-         * #ConfirmNewPin}
-         */
-        EnterNewPin {
-            @Override
-            public void onEnter(VoicemailChangePinActivity activity) {
-                activity.mHeaderText.setText(R.string.change_pin_enter_new_pin_header);
-                activity.mNextButton.setText(R.string.change_pin_continue_label);
-                activity.mHintText.setText(
-                        activity.getString(R.string.change_pin_enter_new_pin_hint,
-                                activity.mPinMinLength, activity.mPinMaxLength));
-            }
-
-            @Override
-            public void onInputChanged(VoicemailChangePinActivity activity) {
-                String password = activity.getCurrentPasswordInput();
-                if (password.length() == 0) {
-                    activity.setNextEnabled(false);
-                    return;
-                }
-                CharSequence error = activity.validatePassword(password);
-                if (error != null) {
-                    activity.mErrorText.setText(error);
-                    activity.setNextEnabled(false);
-                } else {
-                    activity.mErrorText.setText(null);
-                    activity.setNextEnabled(true);
-                }
-            }
-
-            @Override
-            public void handleNext(VoicemailChangePinActivity activity) {
-                CharSequence errorMsg;
-                errorMsg = activity.validatePassword(activity.getCurrentPasswordInput());
-                if (errorMsg != null) {
-                    activity.showError(errorMsg);
-                    return;
-                }
-                activity.mFirstPin = activity.getCurrentPasswordInput();
-                activity.updateState(State.ConfirmNewPin);
-            }
-        },
-        /**
-         * Let the user type in the same PIN again to avoid typos. If the PIN matches then perform a
-         * PIN change to the server. Finish the activity if succeeded. Return to {@link
-         * #EnterOldPin} if the old PIN is rejected, {@link #EnterNewPin} for other failure.
-         */
-        ConfirmNewPin {
-            @Override
-            public void onEnter(VoicemailChangePinActivity activity) {
-                activity.mHeaderText.setText(R.string.change_pin_confirm_pin_header);
-                activity.mHintText.setText(null);
-                activity.mNextButton.setText(R.string.change_pin_ok_label);
-            }
-
-            @Override
-            public void onInputChanged(VoicemailChangePinActivity activity) {
-                if (activity.getCurrentPasswordInput().length() == 0) {
-                    activity.setNextEnabled(false);
-                    return;
-                }
-                if (activity.getCurrentPasswordInput().equals(activity.mFirstPin)) {
-                    activity.setNextEnabled(true);
-                    activity.mErrorText.setText(null);
-                } else {
-                    activity.setNextEnabled(false);
-                    activity.mErrorText.setText(R.string.change_pin_confirm_pins_dont_match);
-                }
-            }
-
-            @Override
-            public void handleResult(VoicemailChangePinActivity activity,
-                    @ChangePinResult int result) {
-                if (result == OmtpConstants.CHANGE_PIN_SUCCESS) {
-                    // If the PIN change succeeded we no longer know what the old (current) PIN is.
-                    // Wipe the default old PIN so the old PIN input box will be shown to the user
-                    // on the next time.
-                    setDefaultOldPIN(activity, activity.mPhoneAccountHandle, null);
-                    activity.handleOmtpEvent(OmtpEvents.CONFIG_PIN_SET);
-
-                    activity.finish();
-
-                    Toast.makeText(activity, activity.getString(R.string.change_pin_succeeded),
-                            Toast.LENGTH_SHORT).show();
-                } else {
-                    CharSequence message = activity.getChangePinResultMessage(result);
-                    VvmLog.i(TAG, "Change PIN failed: " + message);
-                    activity.showError(message);
-                    if (result == OmtpConstants.CHANGE_PIN_MISMATCH) {
-                        // Somehow the PIN has changed, prompt to enter the old PIN again.
-                        activity.updateState(State.EnterOldPin);
-                    } else {
-                        // The new PIN failed to fulfil other restrictions imposed by the server.
-                        activity.updateState(State.EnterNewPin);
-                    }
-
-                }
-
-            }
-
-            @Override
-            public void handleNext(VoicemailChangePinActivity activity) {
-                activity.processPinChange(activity.mOldPin, activity.mFirstPin);
-            }
-        };
-
-        /**
-         * The activity has switched from another state to this one.
-         */
-        public void onEnter(VoicemailChangePinActivity activity) {
-            // Do nothing
-        }
-
-        /**
-         * The user has typed something into the PIN input field. Also called after {@link
-         * #onEnter(VoicemailChangePinActivity)}
-         */
-        public void onInputChanged(VoicemailChangePinActivity activity) {
-            // Do nothing
-        }
-
-        /**
-         * The asynchronous call to change the PIN on the server has returned.
-         */
-        public void handleResult(VoicemailChangePinActivity activity, @ChangePinResult int result) {
-            // Do nothing
-        }
-
-        /**
-         * The user has pressed the "next" button.
-         */
-        public void handleNext(VoicemailChangePinActivity activity) {
-            // Do nothing
-        }
-
-        /**
-         * The activity has switched from this state to another one.
-         */
-        public void onLeave(VoicemailChangePinActivity activity) {
-            // Do nothing
-        }
-
-    }
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        mPhoneAccountHandle = getIntent().getParcelableExtra(EXTRA_PHONE_ACCOUNT_HANDLE);
-        mConfig = new OmtpVvmCarrierConfigHelper(this, mPhoneAccountHandle);
-        setContentView(R.layout.voicemail_change_pin);
-        setTitle(R.string.change_pin_title);
-
-        readPinLength();
-
-        View view = findViewById(android.R.id.content);
-
-        mCancelButton = (Button) view.findViewById(R.id.cancel_button);
-        mCancelButton.setOnClickListener(this);
-        mNextButton = (Button) view.findViewById(R.id.next_button);
-        mNextButton.setOnClickListener(this);
-
-        mPinEntry = (EditText) view.findViewById(R.id.pin_entry);
-        mPinEntry.setOnEditorActionListener(this);
-        mPinEntry.addTextChangedListener(this);
-        if (mPinMaxLength != 0) {
-            mPinEntry.setFilters(new InputFilter[]{new LengthFilter(mPinMaxLength)});
-        }
-
-
-        mHeaderText = (TextView) view.findViewById(R.id.headerText);
-        mHintText = (TextView) view.findViewById(R.id.hintText);
-        mErrorText = (TextView) view.findViewById(R.id.errorText);
-
-        migrateDefaultOldPin();
-
-        if (isDefaultOldPinSet(this, mPhoneAccountHandle)) {
-            mOldPin = getDefaultOldPin(this, mPhoneAccountHandle);
-            updateState(State.VerifyOldPin);
-        } else {
-            updateState(State.EnterOldPin);
-        }
-    }
-
-    private void handleOmtpEvent(OmtpEvents event) {
-        mConfig.handleEvent(getVoicemailStatusEditor(), event);
-    }
-
-    private VoicemailStatus.Editor getVoicemailStatusEditor() {
-        // This activity does not have any automatic retry mechanism, errors should be written right
-        // away.
-        return VoicemailStatus.edit(this, mPhoneAccountHandle);
-    }
-
-    /**
-     * Extracts the pin length requirement sent by the server with a STATUS SMS.
-     */
-    private void readPinLength() {
-        VisualVoicemailPreferences preferences = new VisualVoicemailPreferences(this,
-                mPhoneAccountHandle);
-        // The OMTP pin length format is {min}-{max}
-        String[] lengths = preferences.getString(OmtpConstants.TUI_PASSWORD_LENGTH, "").split("-");
-        if (lengths.length == 2) {
-            try {
-                mPinMinLength = Integer.parseInt(lengths[0]);
-                mPinMaxLength = Integer.parseInt(lengths[1]);
-            } catch (NumberFormatException e) {
-                mPinMinLength = 0;
-                mPinMaxLength = 0;
-            }
-        } else {
-            mPinMinLength = 0;
-            mPinMaxLength = 0;
-        }
-    }
-
-    @Override
-    public void onResume() {
-        super.onResume();
-        updateState(mUiState);
-
-    }
-
-    public void handleNext() {
-        if (mPinEntry.length() == 0) {
-            return;
-        }
-        mUiState.handleNext(this);
-    }
-
-    public void onClick(View v) {
-        switch (v.getId()) {
-            case R.id.next_button:
-                handleNext();
-                break;
-
-            case R.id.cancel_button:
-                finish();
-                break;
-        }
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        if (item.getItemId() == android.R.id.home) {
-            onBackPressed();
-            return true;
-        }
-        return super.onOptionsItemSelected(item);
-    }
-
-    public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
-      if (!mNextButton.isEnabled()) {
-        return true;
-      }
-        // Check if this was the result of hitting the enter or "done" key
-        if (actionId == EditorInfo.IME_NULL
-                || actionId == EditorInfo.IME_ACTION_DONE
-                || actionId == EditorInfo.IME_ACTION_NEXT) {
-            handleNext();
-            return true;
-        }
-        return false;
-    }
-
-    public void afterTextChanged(Editable s) {
-        mUiState.onInputChanged(this);
-    }
-
-    public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-        // Do nothing
-    }
-
-    public void onTextChanged(CharSequence s, int start, int before, int count) {
-        // Do nothing
-    }
-
-    /**
-     * After replacing the default PIN with a random PIN, call this to store the random PIN. The
-     * stored PIN will be automatically entered when the user attempts to change the PIN.
-     */
-    public static void setDefaultOldPIN(Context context, PhoneAccountHandle phoneAccountHandle,
-            String pin) {
-        new VisualVoicemailPreferences(context, phoneAccountHandle)
-                .edit().putString(KEY_DEFAULT_OLD_PIN, pin).apply();
-    }
-
-    public static boolean isDefaultOldPinSet(Context context,
-            PhoneAccountHandle phoneAccountHandle) {
-        return getDefaultOldPin(context, phoneAccountHandle) != null;
-    }
-
-    private static String getDefaultOldPin(Context context, PhoneAccountHandle phoneAccountHandle) {
-        return new VisualVoicemailPreferences(context, phoneAccountHandle)
-                .getString(KEY_DEFAULT_OLD_PIN);
-    }
-
-    /**
-     * Storage location has changed mid development. Migrate from the old location to avoid losing
-     * tester's default old pin.
-     */
-    private void migrateDefaultOldPin() {
-        String key = "voicemail_pin_dialog_preference_"
-                + PhoneUtils.getSubIdForPhoneAccountHandle(mPhoneAccountHandle)
-                + "_default_old_pin";
-
-        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
-        if (preferences.contains(key)) {
-            setDefaultOldPIN(this, mPhoneAccountHandle, preferences.getString(key, null));
-            preferences.edit().putString(key, null).apply();
-        }
-    }
-
-    private String getCurrentPasswordInput() {
-        return mPinEntry.getText().toString();
-    }
-
-    private void updateState(State state) {
-        State previousState = mUiState;
-        mUiState = state;
-        if (previousState != state) {
-            previousState.onLeave(this);
-            mPinEntry.setText("");
-            mUiState.onEnter(this);
-        }
-        mUiState.onInputChanged(this);
-    }
-
-    /**
-     * Validates PIN and returns a message to display if PIN fails test.
-     *
-     * @param password the raw password the user typed in
-     * @return error message to show to user or null if password is OK
-     */
-    private CharSequence validatePassword(String password) {
-        if (mPinMinLength == 0 && mPinMaxLength == 0) {
-            // Invalid length requirement is sent by the server, just accept anything and let the
-            // server decide.
-            return null;
-        }
-
-        if (password.length() < mPinMinLength) {
-            return getString(R.string.vm_change_pin_error_too_short);
-        }
-        return null;
-    }
-
-    private void setHeader(int text) {
-        mHeaderText.setText(text);
-        mPinEntry.setContentDescription(mHeaderText.getText());
-    }
-
-    /**
-     * Get the corresponding message for the {@link ChangePinResult}.<code>result</code> must not
-     * {@link OmtpConstants#CHANGE_PIN_SUCCESS}
-     */
-    private CharSequence getChangePinResultMessage(@ChangePinResult int result) {
-        switch (result) {
-            case OmtpConstants.CHANGE_PIN_TOO_SHORT:
-                return getString(R.string.vm_change_pin_error_too_short);
-            case OmtpConstants.CHANGE_PIN_TOO_LONG:
-                return getString(R.string.vm_change_pin_error_too_long);
-            case OmtpConstants.CHANGE_PIN_TOO_WEAK:
-                return getString(R.string.vm_change_pin_error_too_weak);
-            case OmtpConstants.CHANGE_PIN_INVALID_CHARACTER:
-                return getString(R.string.vm_change_pin_error_invalid);
-            case OmtpConstants.CHANGE_PIN_MISMATCH:
-                return getString(R.string.vm_change_pin_error_mismatch);
-            case OmtpConstants.CHANGE_PIN_SYSTEM_ERROR:
-                return getString(R.string.vm_change_pin_error_system_error);
-            default:
-                VvmLog.wtf(TAG, "Unexpected ChangePinResult " + result);
-                return null;
-        }
-    }
-
-    private void verifyOldPin() {
-        processPinChange(mOldPin, mOldPin);
-    }
-
-    private void setNextEnabled(boolean enabled) {
-        mNextButton.setEnabled(enabled);
-    }
-
-
-    private void showError(CharSequence message) {
-        showError(message, null);
-    }
-
-    private void showError(CharSequence message, @Nullable OnDismissListener callback) {
-        new AlertDialog.Builder(this)
-                .setMessage(message)
-                .setPositiveButton(android.R.string.ok, null)
-                .setOnDismissListener(callback)
-                .show();
-    }
-
-    /**
-     * Asynchronous call to change the PIN on the server.
-     */
-    private void processPinChange(String oldPin, String newPin) {
-        mProgressDialog = new ProgressDialog(this);
-        mProgressDialog.setCancelable(false);
-        mProgressDialog.setMessage(getString(R.string.vm_change_pin_progress_message));
-        mProgressDialog.show();
-
-        ChangePinNetworkRequestCallback callback = new ChangePinNetworkRequestCallback(oldPin,
-                newPin);
-        callback.requestNetwork();
-    }
-
-    private class ChangePinNetworkRequestCallback extends VvmNetworkRequestCallback {
-
-        private final String mOldPin;
-        private final String mNewPin;
-
-        public ChangePinNetworkRequestCallback(String oldPin, String newPin) {
-            super(mConfig, mPhoneAccountHandle,
-                VoicemailChangePinActivity.this.getVoicemailStatusEditor());
-            mOldPin = oldPin;
-            mNewPin = newPin;
-        }
-
-        @Override
-        public void onAvailable(Network network) {
-            super.onAvailable(network);
-            try (ImapHelper helper =
-                new ImapHelper(VoicemailChangePinActivity.this, mPhoneAccountHandle, network,
-                    getVoicemailStatusEditor())) {
-
-                @ChangePinResult int result =
-                        helper.changePin(mOldPin, mNewPin);
-                sendResult(result);
-            } catch (InitializingException | MessagingException e) {
-                VvmLog.e(TAG, "ChangePinNetworkRequestCallback: onAvailable: ", e);
-                sendResult(OmtpConstants.CHANGE_PIN_SYSTEM_ERROR);
-            }
-        }
-
-        @Override
-        public void onFailed(String reason) {
-            super.onFailed(reason);
-            sendResult(OmtpConstants.CHANGE_PIN_SYSTEM_ERROR);
-        }
-
-        private void sendResult(@ChangePinResult int result) {
-            VvmLog.i(TAG, "Change PIN result: " + result);
-            if (mProgressDialog.isShowing() && !VoicemailChangePinActivity.this.isDestroyed() &&
-                    !VoicemailChangePinActivity.this.isFinishing()) {
-                mProgressDialog.dismiss();
-            } else {
-                VvmLog.i(TAG, "Dialog not visible, not dismissing");
-            }
-            mHandler.obtainMessage(MESSAGE_HANDLE_RESULT, result, 0).sendToTarget();
-            releaseNetwork();
-        }
-    }
-
-}
diff --git a/src/com/android/phone/settings/VoicemailNotificationSettingsUtil.java b/src/com/android/phone/settings/VoicemailNotificationSettingsUtil.java
index 9654ea7..fb7baf5 100644
--- a/src/com/android/phone/settings/VoicemailNotificationSettingsUtil.java
+++ b/src/com/android/phone/settings/VoicemailNotificationSettingsUtil.java
@@ -16,15 +16,14 @@
 
 package com.android.phone.settings;
 
-import android.content.Context;
+import android.app.NotificationChannel;
 import android.content.SharedPreferences;
 import android.net.Uri;
 import android.preference.PreferenceManager;
-import android.provider.Settings;
 import android.telephony.TelephonyManager;
-import android.text.TextUtils;
 
 import com.android.internal.telephony.Phone;
+import com.android.internal.telephony.util.NotificationChannelController;
 import com.android.phone.R;
 
 public class VoicemailNotificationSettingsUtil {
@@ -53,9 +52,9 @@
     }
 
     public static boolean isVibrationEnabled(Phone phone) {
-        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(phone.getContext());
-        migrateVoicemailVibrationSettingsIfNeeded(phone, prefs);
-        return prefs.getBoolean(getVoicemailVibrationSharedPrefsKey(phone), false /* defValue */);
+        final NotificationChannel channel = NotificationChannelController.getChannel(
+                NotificationChannelController.CHANNEL_ID_VOICE_MAIL, phone.getContext());
+        return (channel != null) ? channel.shouldVibrate() : false;
     }
 
    public static void setRingtoneUri(Phone phone, Uri ringtoneUri) {
@@ -68,12 +67,9 @@
     }
 
     public static Uri getRingtoneUri(Phone phone) {
-        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(phone.getContext());
-        migrateVoicemailRingtoneSettingsIfNeeded(phone, prefs);
-        String uriString = prefs.getString(
-                getVoicemailRingtoneSharedPrefsKey(phone),
-                Settings.System.DEFAULT_NOTIFICATION_URI.toString());
-        return !TextUtils.isEmpty(uriString) ? Uri.parse(uriString) : null;
+        final NotificationChannel channel = NotificationChannelController.getChannel(
+                NotificationChannelController.CHANNEL_ID_VOICE_MAIL, phone.getContext());
+        return (channel != null) ? channel.getSound() : null;
     }
 
     /**
diff --git a/src/com/android/phone/settings/VoicemailRingtonePreference.java b/src/com/android/phone/settings/VoicemailRingtonePreference.java
deleted file mode 100644
index bb82d4f..0000000
--- a/src/com/android/phone/settings/VoicemailRingtonePreference.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package com.android.phone.settings;
-
-import android.content.Context;
-import android.media.RingtoneManager;
-import android.net.Uri;
-import android.os.Handler;
-import android.os.Message;
-import android.preference.Preference;
-import android.preference.RingtonePreference;
-import android.util.AttributeSet;
-
-import com.android.internal.telephony.Phone;
-import com.android.phone.common.util.SettingsUtil;
-
-/**
- * Looks up the voicemail ringtone's name asynchronously and updates the preference's summary when
- * it is created or updated.
- */
-public class VoicemailRingtonePreference extends RingtonePreference {
-    public interface VoicemailRingtoneNameChangeListener {
-        void onVoicemailRingtoneNameChanged(CharSequence name);
-    }
-
-    private static final int MSG_UPDATE_VOICEMAIL_RINGTONE_SUMMARY = 1;
-
-    private VoicemailRingtoneNameChangeListener mVoicemailRingtoneNameChangeListener;
-    private Runnable mVoicemailRingtoneLookupRunnable;
-    private Handler mVoicemailRingtoneLookupComplete;
-
-    private Phone mPhone;
-
-    public VoicemailRingtonePreference(Context context, AttributeSet attrs) {
-        super(context, attrs);
-
-        mVoicemailRingtoneLookupComplete = new Handler() {
-            @Override
-            public void handleMessage(Message msg) {
-                switch (msg.what) {
-                    case MSG_UPDATE_VOICEMAIL_RINGTONE_SUMMARY:
-                        if (mVoicemailRingtoneNameChangeListener != null) {
-                            mVoicemailRingtoneNameChangeListener.onVoicemailRingtoneNameChanged(
-                                    (CharSequence) msg.obj);
-                        }
-                        setSummary((CharSequence) msg.obj);
-                        break;
-                }
-            }
-        };
-    }
-
-    public void init(Phone phone, CharSequence oldRingtoneName) {
-        mPhone = phone;
-
-        // Requesting the ringtone will trigger migration if necessary.
-        VoicemailNotificationSettingsUtil.getRingtoneUri(phone);
-
-        final Preference preference = this;
-        final String preferenceKey =
-                VoicemailNotificationSettingsUtil.getVoicemailRingtoneSharedPrefsKey(mPhone);
-        setSummary(oldRingtoneName);
-        mVoicemailRingtoneLookupRunnable = new Runnable() {
-            @Override
-            public void run() {
-                SettingsUtil.updateRingtoneName(
-                        preference.getContext(),
-                        mVoicemailRingtoneLookupComplete,
-                        RingtoneManager.TYPE_NOTIFICATION,
-                        preferenceKey,
-                        MSG_UPDATE_VOICEMAIL_RINGTONE_SUMMARY);
-            }
-        };
-
-        updateRingtoneName();
-    }
-
-    public void setVoicemailRingtoneNameChangeListener(VoicemailRingtoneNameChangeListener l) {
-        mVoicemailRingtoneNameChangeListener = l;
-    }
-
-    @Override
-    protected Uri onRestoreRingtone() {
-        return VoicemailNotificationSettingsUtil.getRingtoneUri(mPhone);
-    }
-
-    @Override
-    protected void onSaveRingtone(Uri ringtoneUri) {
-        // Don't call superclass method because it uses the pref key as the SharedPreferences key.
-        // Delegate to the voicemail notification utility to save the ringtone instead.
-        VoicemailNotificationSettingsUtil.setRingtoneUri(mPhone, ringtoneUri);
-
-        updateRingtoneName();
-    }
-
-    private void updateRingtoneName() {
-        new Thread(mVoicemailRingtoneLookupRunnable).start();
-    }
-}
diff --git a/src/com/android/phone/settings/VoicemailSettingsActivity.java b/src/com/android/phone/settings/VoicemailSettingsActivity.java
index 6bb481f..04e8bf5 100644
--- a/src/com/android/phone/settings/VoicemailSettingsActivity.java
+++ b/src/com/android/phone/settings/VoicemailSettingsActivity.java
@@ -24,30 +24,31 @@
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
-import android.preference.CheckBoxPreference;
+import android.os.UserManager;
 import android.preference.Preference;
 import android.preference.PreferenceActivity;
 import android.preference.PreferenceScreen;
 import android.preference.SwitchPreference;
 import android.provider.ContactsContract.CommonDataKinds;
-import android.telecom.PhoneAccountHandle;
+import android.provider.Settings;
+import android.telephony.TelephonyManager;
 import android.text.BidiFormatter;
 import android.text.TextDirectionHeuristics;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.MenuItem;
 import android.widget.ListAdapter;
+import android.widget.Toast;
+
 import com.android.internal.telephony.CallForwardInfo;
 import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.PhoneConstants;
+import com.android.internal.telephony.util.NotificationChannelController;
 import com.android.phone.EditPhoneNumberPreference;
 import com.android.phone.PhoneGlobals;
-import com.android.phone.PhoneUtils;
 import com.android.phone.R;
 import com.android.phone.SubscriptionInfoHelper;
-import com.android.phone.vvm.omtp.OmtpConstants;
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-import com.android.phone.vvm.omtp.VisualVoicemailPreferences;
+
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -58,8 +59,7 @@
         implements DialogInterface.OnClickListener,
                 Preference.OnPreferenceChangeListener,
                 EditPhoneNumberPreference.OnDialogClosedListener,
-                EditPhoneNumberPreference.GetDefaultNumberListener,
-                VoicemailRingtonePreference.VoicemailRingtoneNameChangeListener {
+                EditPhoneNumberPreference.GetDefaultNumberListener{
     private static final String LOG_TAG = VoicemailSettingsActivity.class.getSimpleName();
     private static final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
 
@@ -186,8 +186,6 @@
     private CallForwardInfo[] mNewFwdSettings;
     private String mNewVMNumber;
 
-    private CharSequence mOldVmRingtoneName = "";
-
     /**
      * Used to indicate that the voicemail preference should be shown.
      */
@@ -195,17 +193,12 @@
 
     private boolean mForeground;
     private Phone mPhone;
-    private PhoneAccountHandle mPhoneAccountHandle;
     private SubscriptionInfoHelper mSubscriptionInfoHelper;
-    private OmtpVvmCarrierConfigHelper mOmtpVvmCarrierConfigHelper;
 
-    private EditPhoneNumberPreference mSubMenuVoicemailSettings;
+    private EditPhoneNumberPreference mSubMenuVoicemailSettings = null;
     private VoicemailProviderListPreference mVoicemailProviders;
     private PreferenceScreen mVoicemailSettings;
-    private VoicemailRingtonePreference mVoicemailNotificationRingtone;
-    private CheckBoxPreference mVoicemailNotificationVibrate;
-    private SwitchPreference mVoicemailVisualVoicemail;
-    private Preference mVoicemailChangePinPreference;
+    private Preference mVoicemailNotificationPreference;
 
     //*********************************************************************************************
     // Preference Activity Methods
@@ -214,7 +207,14 @@
     @Override
     protected void onCreate(Bundle icicle) {
         super.onCreate(icicle);
-
+        // Make sure we are running as the primary user only
+        UserManager userManager = getApplicationContext().getSystemService(UserManager.class);
+        if (!userManager.isPrimaryUser()) {
+           Toast.makeText(this, R.string.voice_number_setting_primary_user_only,
+                   Toast.LENGTH_SHORT).show();
+           finish();
+           return;
+        }
         // Show the voicemail preference in onResume if the calling intent specifies the
         // ACTION_ADD_VOICEMAIL action.
         mShowVoicemailPreference = (icicle == null) &&
@@ -224,9 +224,15 @@
         mSubscriptionInfoHelper.setActionBarTitle(
                 getActionBar(), getResources(), R.string.voicemail_settings_with_label);
         mPhone = mSubscriptionInfoHelper.getPhone();
-        mPhoneAccountHandle = PhoneUtils.makePstnPhoneAccountHandle(mPhone);
-        mOmtpVvmCarrierConfigHelper = new OmtpVvmCarrierConfigHelper(
-                mPhone.getContext(), mPhone.getSubId());
+        addPreferencesFromResource(R.xml.voicemail_settings);
+
+        mVoicemailNotificationPreference =
+                findPreference(getString(R.string.voicemail_notifications_key));
+        final Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);
+        intent.putExtra(Settings.EXTRA_CHANNEL_ID,
+                NotificationChannelController.CHANNEL_ID_VOICE_MAIL);
+        intent.putExtra(Settings.EXTRA_APP_PACKAGE, mPhone.getContext().getPackageName());
+        mVoicemailNotificationPreference.setIntent(intent);
     }
 
     @Override
@@ -234,18 +240,17 @@
         super.onResume();
         mForeground = true;
 
-        PreferenceScreen preferenceScreen = getPreferenceScreen();
-        if (preferenceScreen != null) {
-            preferenceScreen.removeAll();
-        }
-
-        addPreferencesFromResource(R.xml.voicemail_settings);
-
         PreferenceScreen prefSet = getPreferenceScreen();
-        mSubMenuVoicemailSettings = (EditPhoneNumberPreference) findPreference(BUTTON_VOICEMAIL_KEY);
-        mSubMenuVoicemailSettings.setParentActivity(this, VOICEMAIL_PREF_ID, this);
-        mSubMenuVoicemailSettings.setDialogOnClosedListener(this);
-        mSubMenuVoicemailSettings.setDialogTitle(R.string.voicemail_settings_number_label);
+
+        if (mSubMenuVoicemailSettings == null) {
+            mSubMenuVoicemailSettings =
+                    (EditPhoneNumberPreference) findPreference(BUTTON_VOICEMAIL_KEY);
+        }
+        if (mSubMenuVoicemailSettings != null) {
+            mSubMenuVoicemailSettings.setParentActivity(this, VOICEMAIL_PREF_ID, this);
+            mSubMenuVoicemailSettings.setDialogOnClosedListener(this);
+            mSubMenuVoicemailSettings.setDialogTitle(R.string.voicemail_settings_number_label);
+        }
 
         mVoicemailProviders = (VoicemailProviderListPreference) findPreference(
                 BUTTON_VOICEMAIL_PROVIDER_KEY);
@@ -255,42 +260,7 @@
 
         mVoicemailSettings = (PreferenceScreen) findPreference(BUTTON_VOICEMAIL_SETTING_KEY);
 
-        mVoicemailNotificationRingtone = (VoicemailRingtonePreference) findPreference(
-                getResources().getString(R.string.voicemail_notification_ringtone_key));
-        mVoicemailNotificationRingtone.setVoicemailRingtoneNameChangeListener(this);
-        mVoicemailNotificationRingtone.init(mPhone, mOldVmRingtoneName);
-
-        mVoicemailNotificationVibrate = (CheckBoxPreference) findPreference(
-                getResources().getString(R.string.voicemail_notification_vibrate_key));
-        mVoicemailNotificationVibrate.setOnPreferenceChangeListener(this);
-
-        mVoicemailVisualVoicemail = (SwitchPreference) findPreference(
-                getResources().getString(R.string.voicemail_visual_voicemail_key));
-
-        mVoicemailChangePinPreference = findPreference(
-                getResources().getString(R.string.voicemail_change_pin_key));
-        Intent changePinIntent = new Intent(new Intent(this, VoicemailChangePinActivity.class));
-        changePinIntent.putExtra(VoicemailChangePinActivity.EXTRA_PHONE_ACCOUNT_HANDLE,
-                mPhoneAccountHandle);
-
-        mVoicemailChangePinPreference.setIntent(changePinIntent);
-        if (VoicemailChangePinActivity.isDefaultOldPinSet(this, mPhoneAccountHandle)) {
-            mVoicemailChangePinPreference.setTitle(R.string.voicemail_set_pin_dialog_title);
-        } else {
-            mVoicemailChangePinPreference.setTitle(R.string.voicemail_change_pin_dialog_title);
-        }
-
-        if (mOmtpVvmCarrierConfigHelper.isValid()) {
-            mVoicemailVisualVoicemail.setOnPreferenceChangeListener(this);
-            mVoicemailVisualVoicemail.setChecked(
-                    VisualVoicemailSettingsUtil.isEnabled(this, mPhoneAccountHandle));
-            if (!isVisualVoicemailActivated()) {
-                prefSet.removePreference(mVoicemailChangePinPreference);
-            }
-        } else {
-            prefSet.removePreference(mVoicemailVisualVoicemail);
-            prefSet.removePreference(mVoicemailChangePinPreference);
-        }
+        maybeHidePublicSettings();
 
         updateVMPreferenceWidgets(mVoicemailProviders.getValue());
 
@@ -313,9 +283,22 @@
 
         updateVoiceNumberField();
         mVMProviderSettingsForced = false;
+    }
 
-        mVoicemailNotificationVibrate.setChecked(
-                VoicemailNotificationSettingsUtil.isVibrationEnabled(mPhone));
+    /**
+     * Hides a subset of voicemail settings if required by the intent extra. This is used by the
+     * default dialer to show "advanced" voicemail settings from its own custom voicemail settings
+     * UI.
+     */
+    private void maybeHidePublicSettings() {
+        if(!getIntent().getBooleanExtra(TelephonyManager.EXTRA_HIDE_PUBLIC_SETTINGS, false)){
+            return;
+        }
+        if (DBG) {
+            log("maybeHidePublicSettings: settings hidden by EXTRA_HIDE_PUBLIC_SETTINGS");
+        }
+        PreferenceScreen preferenceScreen = getPreferenceScreen();
+        preferenceScreen.removePreference(mVoicemailNotificationPreference);
     }
 
     @Override
@@ -348,6 +331,13 @@
                 dialog.getActionBar().setDisplayHomeAsUpEnabled(false);
             }
 
+            mSubMenuVoicemailSettings =
+                    (EditPhoneNumberPreference) findPreference(BUTTON_VOICEMAIL_KEY);
+            mSubMenuVoicemailSettings.setParentActivity(this, VOICEMAIL_PREF_ID, this);
+            mSubMenuVoicemailSettings.setDialogOnClosedListener(this);
+            mSubMenuVoicemailSettings.setDialogTitle(R.string.voicemail_settings_number_label);
+            updateVoiceNumberField();
+
             if (preference.getIntent() != null) {
                 if (DBG) log("Invoking cfg intent " + preference.getIntent().getPackage());
 
@@ -404,24 +394,7 @@
                 mChangingVMorFwdDueToProviderChange = true;
                 saveVoiceMailAndForwardingNumber(newProviderKey, newProviderSettings);
             }
-        } else if (preference.getKey().equals(mVoicemailNotificationVibrate.getKey())) {
-            // Check key instead of comparing reference because closing the voicemail notification
-            // ringtone dialog invokes onResume(), but leaves the old preference screen up,
-            // TODO: Revert to checking reference after migrating voicemail to its own activity.
-            VoicemailNotificationSettingsUtil.setVibrationEnabled(
-                    mPhone, Boolean.TRUE.equals(objValue));
-        } else if (preference.getKey().equals(mVoicemailVisualVoicemail.getKey())) {
-            boolean isEnabled = (boolean) objValue;
-            VisualVoicemailSettingsUtil
-                    .setEnabled(mPhone.getContext(), mPhoneAccountHandle, isEnabled);
-            PreferenceScreen prefSet = getPreferenceScreen();
-            if (isVisualVoicemailActivated()) {
-                prefSet.addPreference(mVoicemailChangePinPreference);
-            } else {
-                prefSet.removePreference(mVoicemailChangePinPreference);
-            }
         }
-
         // Always let the preference setting proceed.
         return true;
     }
@@ -553,11 +526,6 @@
         super.onActivityResult(requestCode, resultCode, data);
     }
 
-    @Override
-    public void onVoicemailRingtoneNameChanged(CharSequence name) {
-        mOldVmRingtoneName = name;
-    }
-
     /**
      * Simulates user clicking on a passed preference.
      * Usually needed when the preference is a dialog preference and we want to invoke
@@ -1026,7 +994,6 @@
             mVoicemailProviders.setSummary(getString(R.string.sum_voicemail_choose_provider));
             mVoicemailSettings.setEnabled(false);
             mVoicemailSettings.setIntent(null);
-            mVoicemailNotificationVibrate.setEnabled(false);
         } else {
             if (DBG) log("updateVMPreferenceWidget: key: " + key + " -> " + provider.toString());
 
@@ -1034,7 +1001,6 @@
             mVoicemailProviders.setSummary(providerName);
             mVoicemailSettings.setEnabled(true);
             mVoicemailSettings.setIntent(provider.intent);
-            mVoicemailNotificationVibrate.setEnabled(true);
         }
     }
 
@@ -1159,16 +1125,6 @@
         return true;
     }
 
-    private boolean isVisualVoicemailActivated() {
-        if (!VisualVoicemailSettingsUtil.isEnabled(this, mPhoneAccountHandle)) {
-            return false;
-        }
-        VisualVoicemailPreferences preferences = new VisualVoicemailPreferences(this,
-                mPhoneAccountHandle);
-        return preferences.getString(OmtpConstants.SERVER_ADDRESS, null) != null;
-
-    }
-
     private static void log(String msg) {
         Log.d(LOG_TAG, msg);
     }
diff --git a/src/com/android/phone/settings/fdn/EditFdnContactScreen.java b/src/com/android/phone/settings/fdn/EditFdnContactScreen.java
index 1387215..23ef0bb 100644
--- a/src/com/android/phone/settings/fdn/EditFdnContactScreen.java
+++ b/src/com/android/phone/settings/fdn/EditFdnContactScreen.java
@@ -281,7 +281,7 @@
       * TODO: Fix this logic.
       */
      private boolean isValidNumber(String number) {
-         return (number.length() <= 20);
+         return (number.length() <= 20) && (number.length() > 0);
      }
 
 
@@ -419,6 +419,12 @@
             } else if (v == mNumberField) {
                 mButton.requestFocus();
             } else if (v == mButton) {
+                final String number = PhoneNumberUtils.convertAndStrip(getNumberFromTextField());
+
+                if (!isValidNumber(number)) {
+                    handleResult(false, true);
+                    return;
+                }
                 // Authenticate the pin AFTER the contact information
                 // is entered, and if we're not busy.
                 if (!mDataBusy) {
diff --git a/src/com/android/phone/settings/fdn/FdnList.java b/src/com/android/phone/settings/fdn/FdnList.java
index 0174a82..61a8299 100644
--- a/src/com/android/phone/settings/fdn/FdnList.java
+++ b/src/com/android/phone/settings/fdn/FdnList.java
@@ -17,16 +17,26 @@
 package com.android.phone.settings.fdn;
 
 import android.app.ActionBar;
+import android.content.Context;
 import android.content.Intent;
 import android.content.res.Resources;
 import android.net.Uri;
 import android.os.Bundle;
+import android.os.PersistableBundle;
+import android.telecom.PhoneAccount;
+import android.telephony.CarrierConfigManager;
+import android.telephony.SubscriptionManager;
+import android.text.TextUtils;
+import android.view.Gravity;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
 import android.widget.ListView;
+import android.widget.PopupMenu;
+import android.widget.PopupMenu.OnMenuItemClickListener;
 
 import com.android.phone.ADNList;
+import com.android.phone.PhoneGlobals;
 import com.android.phone.R;
 import com.android.phone.SubscriptionInfoHelper;
 
@@ -35,9 +45,44 @@
  * that allows a user to specify a limited set of phone numbers that the SIM can dial.
  */
 public class FdnList extends ADNList {
+    private class SelectionPopupMenu extends PopupMenu {
+        private OnMenuItemClickListener mMenuItemListener = new OnMenuItemClickListener() {
+
+            @Override
+            public boolean onMenuItemClick(MenuItem item) {
+                if (item.getItemId() == MENU_EDIT) {
+                    editSelected(position);
+                } else if (item.getItemId() == MENU_DELETE) {
+                    deleteSelected(position);
+                } else if (item.getItemId() == MENU_DIAL) {
+                    dialSelected(position);
+                }
+                return true;
+            }
+        };
+
+        private final int position;
+
+        public SelectionPopupMenu(Context context, View anchor, int position) {
+            super(context, anchor, Gravity.RIGHT);
+            this.position = position;
+        }
+
+        public void showPopUp() {
+            getMenu().add(0, MENU_EDIT, 0, getString(R.string.menu_edit));
+            getMenu().add(0, MENU_DELETE, 0, getString(R.string.menu_delete));
+            if (mFdnDialDirectlySupported) {
+                getMenu().add(0, MENU_DIAL, 0, getString(R.string.menu_dial));
+            }
+            setOnMenuItemClickListener(mMenuItemListener);
+            show();
+        }
+    }
+
     private static final int MENU_ADD = 1;
     private static final int MENU_EDIT = 2;
     private static final int MENU_DELETE = 3;
+    private static final int MENU_DIAL = 4;
 
     private static final String INTENT_EXTRA_NAME = "name";
     private static final String INTENT_EXTRA_NUMBER = "number";
@@ -47,6 +92,9 @@
 
     private SubscriptionInfoHelper mSubscriptionInfoHelper;
 
+    private boolean mFdnDialDirectlySupported = false;
+    private SelectionPopupMenu mPopup;
+
     @Override
     public void onCreate(Bundle icicle) {
         super.onCreate(icicle);
@@ -63,6 +111,20 @@
     }
 
     @Override
+    protected void onResume() {
+        super.onResume();
+        mFdnDialDirectlySupported = getFdnDialDirectlySupported();
+    }
+
+    @Override
+    protected void onStop() {
+        super.onStop();
+        if (mPopup != null) {
+            mPopup.dismiss();
+        }
+    }
+
+    @Override
     protected Uri resolveIntent() {
         Intent intent = getIntent();
         intent.setData(getContentUri(mSubscriptionInfoHelper));
@@ -82,6 +144,7 @@
                 .setIcon(android.R.drawable.ic_menu_edit);
         menu.add(0, MENU_DELETE, 0, r.getString(R.string.menu_delete))
                 .setIcon(android.R.drawable.ic_menu_delete);
+        menu.add(0, MENU_DIAL, 0, r.getString(R.string.menu_dial));
         return true;
     }
 
@@ -93,6 +156,7 @@
         menu.findItem(MENU_ADD).setVisible(true);
         menu.findItem(MENU_EDIT).setVisible(hasSelection);
         menu.findItem(MENU_DELETE).setVisible(hasSelection);
+        menu.findItem(MENU_DIAL).setVisible(hasSelection && mFdnDialDirectlySupported);
 
         return true;
     }
@@ -119,6 +183,10 @@
             case MENU_DELETE:
                 deleteSelected();
                 return true;
+
+            case MENU_DIAL:
+                dialSelected();
+                return true;
         }
 
         return super.onOptionsItemSelected(item);
@@ -126,8 +194,8 @@
 
     @Override
     public void onListItemClick(ListView l, View v, int position, long id) {
-        // TODO: is this what we really want?
-        editSelected(position);
+        mPopup = new SelectionPopupMenu(this, v, position);
+        mPopup.showPopUp();
     }
 
     private void addContact() {
@@ -162,7 +230,11 @@
     }
 
     private void deleteSelected() {
-        if (mCursor.moveToPosition(getSelectedItemPosition())) {
+        deleteSelected(getSelectedItemPosition());
+    }
+
+    private void deleteSelected(int position) {
+        if (mCursor.moveToPosition(position)) {
             String name = mCursor.getString(NAME_COLUMN);
             String number = mCursor.getString(NUMBER_COLUMN);
 
@@ -173,6 +245,21 @@
         }
     }
 
+    private void dialSelected() {
+        dialSelected(getSelectedItemPosition());
+    }
+
+    private void dialSelected(int position) {
+        if (mCursor.moveToPosition(position)) {
+            String number = mCursor.getString(NUMBER_COLUMN);
+            if (!TextUtils.isEmpty(number)) {
+                Uri uri = Uri.fromParts(PhoneAccount.SCHEME_TEL, number, null);
+                final Intent intent = new Intent(Intent.ACTION_CALL_PRIVILEGED, uri);
+                startActivity(intent);
+            }
+        }
+    }
+
     /**
      * Returns the uri for updating the ICC FDN entry, taking into account the subscription id.
      */
@@ -182,4 +269,18 @@
                 : FDN_CONTENT_URI;
     }
 
+    /*
+     * Get the config of whether dialing FDN number from FDN list directly is supported
+     * from carrier config manager.
+     *
+     * @return boolean value of the config
+     */
+    private boolean getFdnDialDirectlySupported() {
+        int subId = mSubscriptionInfoHelper.hasSubId()
+                ? mSubscriptionInfoHelper.getSubId()
+                : SubscriptionManager.getDefaultSubscriptionId();
+        PersistableBundle carrierConfig =
+                PhoneGlobals.getInstance().getCarrierConfigForSubId(subId);
+        return carrierConfig.getBoolean(CarrierConfigManager.KEY_SUPPORT_DIRECT_FDN_DIALING_BOOL);
+    }
 }
diff --git a/src/com/android/phone/vvm/omtp/utils/PhoneAccountHandleConverter.java b/src/com/android/phone/vvm/PhoneAccountHandleConverter.java
similarity index 95%
rename from src/com/android/phone/vvm/omtp/utils/PhoneAccountHandleConverter.java
rename to src/com/android/phone/vvm/PhoneAccountHandleConverter.java
index ad4c423..cb05215 100644
--- a/src/com/android/phone/vvm/omtp/utils/PhoneAccountHandleConverter.java
+++ b/src/com/android/phone/vvm/PhoneAccountHandleConverter.java
@@ -14,7 +14,7 @@
  * limitations under the License
  */
 
-package com.android.phone.vvm.omtp.utils;
+package com.android.phone.vvm;
 
 import android.annotation.Nullable;
 import android.telecom.PhoneAccountHandle;
@@ -22,7 +22,7 @@
 import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.PhoneFactory;
 import com.android.phone.PhoneUtils;
-import com.android.phone.vvm.omtp.VvmLog;
+import com.android.phone.vvm.VvmLog;
 
 /**
  * Utility to convert between PhoneAccountHandle and subId, which is a common operation in OMTP
diff --git a/src/com/android/phone/vvm/RemoteVvmTaskManager.java b/src/com/android/phone/vvm/RemoteVvmTaskManager.java
new file mode 100644
index 0000000..4fc8c57
--- /dev/null
+++ b/src/com/android/phone/vvm/RemoteVvmTaskManager.java
@@ -0,0 +1,352 @@
+/*
+ * Copyright (C) 2016 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.phone.vvm;
+
+import android.annotation.Nullable;
+import android.app.Service;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Message;
+import android.os.Messenger;
+import android.os.PersistableBundle;
+import android.os.RemoteException;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
+import android.telephony.CarrierConfigManager;
+import android.telephony.VisualVoicemailService;
+import android.telephony.VisualVoicemailSms;
+import android.text.TextUtils;
+
+import com.android.phone.Assert;
+import com.android.phone.R;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Queue;
+
+/**
+ * Service to manage tasks issued to the {@link VisualVoicemailService}. This service will bind to
+ * the default dialer on a visual voicemail event if it implements the VisualVoicemailService. The
+ * service will hold all resource for the VisualVoicemailService until {@link
+ * VisualVoicemailService.VisualVoicemailTask#finish()} has been called on all issued tasks.
+ *
+ * If the service is already running it will be reused for new events. The service will stop itself
+ * after all events are handled.
+ */
+public class RemoteVvmTaskManager extends Service {
+
+    private static final String TAG = "RemoteVvmTaskManager";
+
+    private static final String ACTION_START_CELL_SERVICE_CONNECTED =
+            "ACTION_START_CELL_SERVICE_CONNECTED";
+    private static final String ACTION_START_SMS_RECEIVED = "ACTION_START_SMS_RECEIVED";
+    private static final String ACTION_START_SIM_REMOVED = "ACTION_START_SIM_REMOVED";
+
+    // TODO(b/35766990): Remove after VisualVoicemailService API is stabilized.
+    private static final String ACTION_VISUAL_VOICEMAIL_SERVICE_EVENT =
+            "com.android.phone.vvm.ACTION_VISUAL_VOICEMAIL_SERVICE_EVENT";
+    private static final String EXTRA_WHAT = "what";
+
+    // TODO(twyen): track task individually to have time outs.
+    private int mTaskReferenceCount;
+
+    private RemoteServiceConnection mConnection;
+
+    /**
+     * Handles incoming messages from the VisualVoicemailService.
+     */
+    private Messenger mMessenger;
+
+    public static void startCellServiceConnected(Context context,
+            PhoneAccountHandle phoneAccountHandle) {
+        Intent intent = new Intent(ACTION_START_CELL_SERVICE_CONNECTED, null, context,
+                RemoteVvmTaskManager.class);
+        intent.putExtra(VisualVoicemailService.DATA_PHONE_ACCOUNT_HANDLE, phoneAccountHandle);
+        context.startService(intent);
+    }
+
+    public static void startSmsReceived(Context context, VisualVoicemailSms sms) {
+        Intent intent = new Intent(ACTION_START_SMS_RECEIVED, null, context,
+                RemoteVvmTaskManager.class);
+        intent.putExtra(VisualVoicemailService.DATA_PHONE_ACCOUNT_HANDLE,
+                sms.getPhoneAccountHandle());
+        intent.putExtra(VisualVoicemailService.DATA_SMS, sms);
+        context.startService(intent);
+    }
+
+    public static void startSimRemoved(Context context, PhoneAccountHandle phoneAccountHandle) {
+        Intent intent = new Intent(ACTION_START_SIM_REMOVED, null, context,
+                RemoteVvmTaskManager.class);
+        intent.putExtra(VisualVoicemailService.DATA_PHONE_ACCOUNT_HANDLE, phoneAccountHandle);
+        context.startService(intent);
+    }
+
+    public static boolean hasRemoteService(Context context, int subId) {
+        return getRemotePackage(context, subId) != null;
+    }
+
+    @Nullable
+    public static ComponentName getRemotePackage(Context context, int subId) {
+        ComponentName broadcastPackage = getBroadcastPackage(context);
+        if (broadcastPackage != null) {
+            return broadcastPackage;
+        }
+
+        Intent bindIntent = newBindIntent(context);
+
+        TelecomManager telecomManager = context.getSystemService(TelecomManager.class);
+        List<String> packages = new ArrayList<>();
+        packages.add(telecomManager.getDefaultDialerPackage());
+        PersistableBundle carrierConfig = context
+                .getSystemService(CarrierConfigManager.class).getConfigForSubId(subId);
+        packages.add(
+                carrierConfig.getString(CarrierConfigManager.KEY_CARRIER_VVM_PACKAGE_NAME_STRING));
+        String[] vvmPackages = carrierConfig
+                .getStringArray(CarrierConfigManager.KEY_CARRIER_VVM_PACKAGE_NAME_STRING_ARRAY);
+        if (vvmPackages != null && vvmPackages.length > 0) {
+            for (String packageName : vvmPackages) {
+                packages.add(packageName);
+            }
+        }
+        packages.add(context.getResources().getString(R.string.system_visual_voicemail_client));
+        packages.add(telecomManager.getSystemDialerPackage());
+        for (String packageName : packages) {
+            if (TextUtils.isEmpty(packageName)) {
+                continue;
+            }
+            bindIntent.setPackage(packageName);
+            ResolveInfo info = context.getPackageManager()
+                    .resolveService(bindIntent, PackageManager.MATCH_ALL);
+            if (info == null) {
+                continue;
+            }
+            if (info.serviceInfo == null) {
+                VvmLog.w(TAG,
+                        "Component " + info.getComponentInfo() + " is not a service, ignoring");
+                continue;
+            }
+            if (!android.Manifest.permission.BIND_VISUAL_VOICEMAIL_SERVICE
+                    .equals(info.serviceInfo.permission)) {
+                VvmLog.w(TAG, "package " + info.serviceInfo.packageName
+                        + " does not enforce BIND_VISUAL_VOICEMAIL_SERVICE, ignoring");
+                continue;
+            }
+
+            return info.getComponentInfo().getComponentName();
+
+        }
+        return null;
+    }
+
+    @Nullable
+    private static ComponentName getBroadcastPackage(Context context) {
+        Intent broadcastIntent = new Intent(ACTION_VISUAL_VOICEMAIL_SERVICE_EVENT);
+        broadcastIntent.setPackage(
+                context.getSystemService(TelecomManager.class).getDefaultDialerPackage());
+        List<ResolveInfo> info = context.getPackageManager()
+                .queryBroadcastReceivers(broadcastIntent, PackageManager.MATCH_ALL);
+        if (info == null) {
+            return null;
+        }
+        if (info.isEmpty()) {
+            return null;
+        }
+        return info.get(0).getComponentInfo().getComponentName();
+    }
+
+    @Override
+    public void onCreate() {
+        Assert.isMainThread();
+        mMessenger = new Messenger(new Handler() {
+            @Override
+            public void handleMessage(Message msg) {
+                Assert.isMainThread();
+                switch (msg.what) {
+                    case VisualVoicemailService.MSG_TASK_ENDED:
+                        mTaskReferenceCount--;
+                        checkReference();
+                        break;
+                    default:
+                        VvmLog.wtf(TAG, "unexpected message " + msg.what);
+                }
+            }
+        });
+    }
+
+    @Override
+    public int onStartCommand(@Nullable Intent intent, int flags, int startId) {
+        Assert.isMainThread();
+        mTaskReferenceCount++;
+
+        PhoneAccountHandle phoneAccountHandle = intent.getExtras()
+                .getParcelable(VisualVoicemailService.DATA_PHONE_ACCOUNT_HANDLE);
+        int subId = PhoneAccountHandleConverter.toSubId(phoneAccountHandle);
+        ComponentName remotePackage = getRemotePackage(this, subId);
+        if (remotePackage == null) {
+            VvmLog.i(TAG, "No service to handle " + intent.getAction() + ", ignoring");
+            checkReference();
+            return START_NOT_STICKY;
+        }
+
+        switch (intent.getAction()) {
+            case ACTION_START_CELL_SERVICE_CONNECTED:
+                send(remotePackage, VisualVoicemailService.MSG_ON_CELL_SERVICE_CONNECTED,
+                        intent.getExtras());
+                break;
+            case ACTION_START_SMS_RECEIVED:
+                send(remotePackage, VisualVoicemailService.MSG_ON_SMS_RECEIVED, intent.getExtras());
+                break;
+            case ACTION_START_SIM_REMOVED:
+                send(remotePackage, VisualVoicemailService.MSG_ON_SIM_REMOVED, intent.getExtras());
+                break;
+            default:
+                Assert.fail("Unexpected action +" + intent.getAction());
+                break;
+        }
+        // Don't rerun service if processed is killed.
+        return START_NOT_STICKY;
+    }
+
+    @Override
+    @Nullable
+    public IBinder onBind(Intent intent) {
+        return null;
+    }
+
+    private int getTaskId() {
+        // TODO(twyen): generate unique IDs. Reference counting is used now so it doesn't matter.
+        return 1;
+    }
+
+    /**
+     * Class for interacting with the main interface of the service.
+     */
+    private class RemoteServiceConnection implements ServiceConnection {
+
+        private final Queue<Message> mTaskQueue = new LinkedList<>();
+
+        private boolean mConnected;
+
+        /**
+         * A handler in the VisualVoicemailService
+         */
+        private Messenger mRemoteMessenger;
+
+        public void enqueue(Message message) {
+            mTaskQueue.add(message);
+            if (mConnected) {
+                runQueue();
+            }
+        }
+
+        public boolean isConnected() {
+            return mConnected;
+        }
+
+        public void onServiceConnected(ComponentName className,
+                IBinder service) {
+            mRemoteMessenger = new Messenger(service);
+            mConnected = true;
+            runQueue();
+        }
+
+        public void onServiceDisconnected(ComponentName className) {
+            mConnection = null;
+            mConnected = false;
+            mRemoteMessenger = null;
+            VvmLog.e(TAG, "Service disconnected, " + mTaskReferenceCount + " tasks dropped.");
+            mTaskReferenceCount = 0;
+            checkReference();
+        }
+
+        private void runQueue() {
+            Assert.isMainThread();
+            Message message = mTaskQueue.poll();
+            while (message != null) {
+                message.replyTo = mMessenger;
+                message.arg1 = getTaskId();
+
+                try {
+                    mRemoteMessenger.send(message);
+                } catch (RemoteException e) {
+                    VvmLog.e(TAG, "Error sending message to remote service", e);
+                }
+                message = mTaskQueue.poll();
+            }
+        }
+    }
+
+    private void send(ComponentName remotePackage, int what, Bundle extras) {
+        Assert.isMainThread();
+
+        if (getBroadcastPackage(this) != null) {
+            /*
+             * Temporarily use a broadcast to notify dialer VVM events instead of using the
+             * VisualVoicemailService.
+             * b/35766990 The VisualVoicemailService is undergoing API changes. The dialer is in
+             * a different repository so it can not be updated in sync with android SDK. It is also
+             * hard to make a manifest service to work in the intermittent state.
+             */
+            VvmLog.i(TAG, "sending broadcast " + what + " to " + remotePackage);
+            Intent intent = new Intent(ACTION_VISUAL_VOICEMAIL_SERVICE_EVENT);
+            intent.putExtras(extras);
+            intent.putExtra(EXTRA_WHAT, what);
+            intent.setComponent(remotePackage);
+            sendBroadcast(intent);
+            return;
+        }
+
+        Message message = Message.obtain();
+        message.what = what;
+        message.setData(new Bundle(extras));
+        if (mConnection == null) {
+            mConnection = new RemoteServiceConnection();
+        }
+        mConnection.enqueue(message);
+
+        if (!mConnection.isConnected()) {
+            Intent intent = newBindIntent(this);
+            intent.setComponent(remotePackage);
+            VvmLog.i(TAG, "Binding to " + intent.getComponent());
+            bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
+        }
+    }
+
+    private void checkReference() {
+        if (mConnection == null) {
+            return;
+        }
+        if (mTaskReferenceCount == 0) {
+            unbindService(mConnection);
+            mConnection = null;
+        }
+    }
+
+    private static Intent newBindIntent(Context context) {
+        Intent intent = new Intent();
+        intent.setAction(VisualVoicemailService.SERVICE_INTERFACE);
+        return intent;
+    }
+}
diff --git a/src/com/android/phone/vvm/omtp/VisualVoicemailPreferences.java b/src/com/android/phone/vvm/VisualVoicemailPreferences.java
similarity index 98%
rename from src/com/android/phone/vvm/omtp/VisualVoicemailPreferences.java
rename to src/com/android/phone/vvm/VisualVoicemailPreferences.java
index be51ea9..b28cea4 100644
--- a/src/com/android/phone/vvm/omtp/VisualVoicemailPreferences.java
+++ b/src/com/android/phone/vvm/VisualVoicemailPreferences.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License
  */
-package com.android.phone.vvm.omtp;
+package com.android.phone.vvm;
 
 import android.annotation.Nullable;
 import android.content.Context;
diff --git a/src/com/android/phone/vvm/VisualVoicemailSettingsUtil.java b/src/com/android/phone/vvm/VisualVoicemailSettingsUtil.java
new file mode 100644
index 0000000..8215261
--- /dev/null
+++ b/src/com/android/phone/vvm/VisualVoicemailSettingsUtil.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2015 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.phone.vvm;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.telecom.PhoneAccountHandle;
+import android.telephony.TelephonyManager;
+
+/**
+ * Save whether or not a particular account is enabled in shared to be retrieved later.
+ */
+public class VisualVoicemailSettingsUtil {
+
+    private static final String IS_ENABLED_KEY = "is_enabled";
+
+    private static final String DEFAULT_OLD_PIN_KEY = "default_old_pin";
+
+    public static Bundle dump(Context context, PhoneAccountHandle phoneAccountHandle){
+        Bundle result = new Bundle();
+        VisualVoicemailPreferences prefs = new VisualVoicemailPreferences(context,
+                phoneAccountHandle);
+        if (prefs.contains(IS_ENABLED_KEY)) {
+            result.putBoolean(TelephonyManager.EXTRA_VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL,
+                    prefs.getBoolean(IS_ENABLED_KEY, false));
+        }
+        result.putString(TelephonyManager.EXTRA_VOICEMAIL_SCRAMBLED_PIN_STRING,
+                prefs.getString(DEFAULT_OLD_PIN_KEY));
+        return result;
+    }
+}
diff --git a/src/com/android/phone/VisualVoicemailSmsFilterConfig.java b/src/com/android/phone/vvm/VisualVoicemailSmsFilterConfig.java
similarity index 89%
rename from src/com/android/phone/VisualVoicemailSmsFilterConfig.java
rename to src/com/android/phone/vvm/VisualVoicemailSmsFilterConfig.java
index 2b2e2f5..058f18e 100644
--- a/src/com/android/phone/VisualVoicemailSmsFilterConfig.java
+++ b/src/com/android/phone/vvm/VisualVoicemailSmsFilterConfig.java
@@ -13,15 +13,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.android.phone;
+package com.android.phone.vvm;
 
 import android.annotation.Nullable;
+import android.content.ComponentName;
 import android.content.Context;
 import android.content.SharedPreferences;
 import android.preference.PreferenceManager;
 import android.telephony.VisualVoicemailSmsFilterSettings;
 import android.util.ArraySet;
 
+import com.android.phone.vvm.RemoteVvmTaskManager;
+
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
@@ -39,6 +42,7 @@
     private static final String PREFIX_KEY = "_prefix";
     private static final String ORIGINATING_NUMBERS_KEY = "_originating_numbers";
     private static final String DESTINATION_PORT_KEY = "_destination_port";
+    private static final String DEFAULT_PACKAGE = "com.android.phone";
 
     public static void enableVisualVoicemailSmsFilter(Context context, String callingPackage,
             int subId,
@@ -58,6 +62,21 @@
                 .apply();
     }
 
+    public static VisualVoicemailSmsFilterSettings getActiveVisualVoicemailSmsFilterSettings(
+            Context context, int subId) {
+        ComponentName componentName = RemoteVvmTaskManager.getRemotePackage(context, subId);
+        String packageName;
+        if (componentName == null) {
+            packageName = DEFAULT_PACKAGE;
+        } else {
+            packageName = componentName.getPackageName();
+        }
+        return getVisualVoicemailSmsFilterSettings(
+                context,
+                packageName,
+                subId);
+    }
+
     @Nullable
     public static VisualVoicemailSmsFilterSettings getVisualVoicemailSmsFilterSettings(
             Context context,
@@ -75,6 +94,7 @@
                         VisualVoicemailSmsFilterSettings.DEFAULT_DESTINATION_PORT))
                 .build();
     }
+
     private static SharedPreferences getSharedPreferences(Context context) {
         return PreferenceManager
                 .getDefaultSharedPreferences(context.createDeviceProtectedStorageContext());
diff --git a/src/com/android/phone/vvm/omtp/utils/VvmDumpHandler.java b/src/com/android/phone/vvm/VvmDumpHandler.java
similarity index 63%
rename from src/com/android/phone/vvm/omtp/utils/VvmDumpHandler.java
rename to src/com/android/phone/vvm/VvmDumpHandler.java
index 227cf42..866927e 100644
--- a/src/com/android/phone/vvm/omtp/utils/VvmDumpHandler.java
+++ b/src/com/android/phone/vvm/VvmDumpHandler.java
@@ -1,12 +1,11 @@
-package com.android.phone.vvm.omtp.utils;
+package com.android.phone.vvm;
 
 import android.content.Context;
 import android.telecom.PhoneAccountHandle;
 import android.telecom.TelecomManager;
+import android.telephony.TelephonyManager;
 
 import com.android.internal.util.IndentingPrintWriter;
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-import com.android.phone.vvm.omtp.VvmLog;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
@@ -15,6 +14,7 @@
 
     public static void dump(Context context, FileDescriptor fd, PrintWriter writer,
             String[] args) {
+        TelephonyManager telephonyManager = TelephonyManager.from(context);
         IndentingPrintWriter indentedWriter = new IndentingPrintWriter(writer, "  ");
         indentedWriter.println("******* OmtpVvm *******");
         indentedWriter.println("======= Configs =======");
@@ -22,8 +22,12 @@
         for (PhoneAccountHandle handle : TelecomManager.from(context)
                 .getCallCapablePhoneAccounts()) {
             int subId = PhoneAccountHandleConverter.toSubId(handle);
-            OmtpVvmCarrierConfigHelper config = new OmtpVvmCarrierConfigHelper(context, subId);
-            indentedWriter.println(config.toString());
+            indentedWriter.println(
+                    "VisualVoicemailPackageName:" + telephonyManager.createForSubscriptionId(subId)
+                            .getVisualVoicemailPackageName());
+            indentedWriter.println(
+                    "VisualVoicemailSmsFilterSettings(" + subId + "):" + telephonyManager
+                            .getActiveVisualVoicemailSmsFilterSettings(subId));
         }
         indentedWriter.decreaseIndent();
         indentedWriter.println("======== Logs =========");
diff --git a/src/com/android/phone/vvm/omtp/VvmLog.java b/src/com/android/phone/vvm/VvmLog.java
similarity index 98%
rename from src/com/android/phone/vvm/omtp/VvmLog.java
rename to src/com/android/phone/vvm/VvmLog.java
index 82d42af..9ee58b3 100644
--- a/src/com/android/phone/vvm/omtp/VvmLog.java
+++ b/src/com/android/phone/vvm/VvmLog.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License
  */
-package com.android.phone.vvm.omtp;
+package com.android.phone.vvm;
 
 import android.util.LocalLog;
 import android.util.Log;
diff --git a/src/com/android/phone/vvm/VvmSimStateTracker.java b/src/com/android/phone/vvm/VvmSimStateTracker.java
new file mode 100644
index 0000000..c648d9c
--- /dev/null
+++ b/src/com/android/phone/vvm/VvmSimStateTracker.java
@@ -0,0 +1,250 @@
+/*
+ * Copyright (C) 2016 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.phone.vvm;
+
+import android.annotation.Nullable;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.os.SystemProperties;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
+import android.telephony.CarrierConfigManager;
+import android.telephony.PhoneStateListener;
+import android.telephony.ServiceState;
+import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
+import android.util.ArrayMap;
+import android.util.ArraySet;
+
+import com.android.internal.telephony.IccCardConstants;
+import com.android.internal.telephony.PhoneConstants;
+import com.android.internal.telephony.TelephonyIntents;
+import com.android.phone.PhoneUtils;
+
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Tracks the status of all inserted SIMs. Will notify {@link RemoteVvmTaskManager} of when a SIM
+ * connected to the service for the first time after it was inserted or the system booted, and when
+ * the SIM is removed. Losing cell signal or entering airplane mode will not cause the connected
+ * event to be triggered again. Reinserting the SIM will trigger the connected event. Changing the
+ * carrier config will also trigger the connected event. Events will be delayed until the device has
+ * been fully booted (and left FBE mode).
+ */
+public class VvmSimStateTracker extends BroadcastReceiver {
+
+    private static final String TAG = "VvmSimStateTracker";
+
+    /**
+     * Map to keep track of currently inserted SIMs. If the SIM hasn't been connected to the service
+     * before the value will be a {@link ServiceStateListener} that is still waiting for the
+     * connection. A value of {@code null} means the SIM has been connected to the service before.
+     */
+    private static Map<PhoneAccountHandle, ServiceStateListener> sListeners = new ArrayMap<>();
+
+    /**
+     * Accounts that has events before the device is booted. The events should be regenerated after
+     * the device has fully booted.
+     */
+    private static Set<PhoneAccountHandle> sPreBootHandles = new ArraySet<>();
+
+    /**
+     * Waits for the account to become {@link ServiceState#STATE_IN_SERVICE} and notify the
+     * connected event. Will unregister itself once the event has been triggered.
+     */
+    private class ServiceStateListener extends PhoneStateListener {
+
+        private final PhoneAccountHandle mPhoneAccountHandle;
+        private final Context mContext;
+
+        public ServiceStateListener(Context context, PhoneAccountHandle phoneAccountHandle) {
+            mContext = context;
+            mPhoneAccountHandle = phoneAccountHandle;
+        }
+
+        public void listen() {
+            TelephonyManager telephonyManager = getTelephonyManager(mContext, mPhoneAccountHandle);
+            if(telephonyManager == null){
+                VvmLog.e(TAG, "Cannot create TelephonyManager from " + mPhoneAccountHandle);
+                return;
+            }
+            telephonyManager.listen(this, PhoneStateListener.LISTEN_SERVICE_STATE);
+        }
+
+        public void unlisten() {
+            // TelephonyManager does not need to be pinned to an account when removing a
+            // PhoneStateListener, and mPhoneAccountHandle might be invalid at this point
+            // (e.g. SIM removal)
+            mContext.getSystemService(TelephonyManager.class)
+                    .listen(this, PhoneStateListener.LISTEN_NONE);
+            sListeners.put(mPhoneAccountHandle, null);
+        }
+
+        @Override
+        public void onServiceStateChanged(ServiceState serviceState) {
+            if (serviceState.getState() == ServiceState.STATE_IN_SERVICE) {
+                VvmLog.i(TAG, "in service");
+                sendConnected(mContext, mPhoneAccountHandle);
+                unlisten();
+            }
+        }
+    }
+
+    @Override
+    public void onReceive(Context context, Intent intent) {
+
+        final String action = intent.getAction();
+        if (action == null) {
+            VvmLog.w(TAG, "Null action for intent.");
+            return;
+        }
+        VvmLog.i(TAG, action);
+        switch (action) {
+            case Intent.ACTION_BOOT_COMPLETED:
+                onBootCompleted(context);
+                break;
+            case TelephonyIntents.ACTION_SIM_STATE_CHANGED:
+                if (IccCardConstants.INTENT_VALUE_ICC_ABSENT.equals(
+                        intent.getStringExtra(IccCardConstants.INTENT_KEY_ICC_STATE))) {
+                    // checkRemovedSim will scan all known accounts with isPhoneAccountActive() to find
+                    // which SIM is removed.
+                    // ACTION_SIM_STATE_CHANGED only provides subId which cannot be converted to a
+                    // PhoneAccountHandle when the SIM is absent.
+                    checkRemovedSim(context);
+                }
+                break;
+            case CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED:
+                int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY,
+                        SubscriptionManager.INVALID_SUBSCRIPTION_ID);
+
+                if (!SubscriptionManager.isValidSubscriptionId(subId)) {
+                    VvmLog.i(TAG, "Received SIM change for invalid subscription id.");
+                    checkRemovedSim(context);
+                    return;
+                }
+
+                PhoneAccountHandle phoneAccountHandle =
+                        PhoneAccountHandleConverter.fromSubId(subId);
+
+                if ("null".equals(phoneAccountHandle.getId())) {
+                    VvmLog.e(TAG,
+                            "null phone account handle ID, possible modem crash."
+                                    + " Ignoring carrier config changed event");
+                    return;
+                }
+                onCarrierConfigChanged(context, phoneAccountHandle);
+        }
+    }
+
+    private void onBootCompleted(Context context) {
+        for (PhoneAccountHandle phoneAccountHandle : sPreBootHandles) {
+            TelephonyManager telephonyManager = getTelephonyManager(context, phoneAccountHandle);
+            if (telephonyManager == null) {
+                continue;
+            }
+            if (telephonyManager.getServiceState().getState() == ServiceState.STATE_IN_SERVICE) {
+                sListeners.put(phoneAccountHandle, null);
+                sendConnected(context, phoneAccountHandle);
+            } else {
+                listenToAccount(context, phoneAccountHandle);
+            }
+        }
+        sPreBootHandles.clear();
+    }
+
+    private void sendConnected(Context context, PhoneAccountHandle phoneAccountHandle) {
+        VvmLog.i(TAG, "Service connected on " + phoneAccountHandle);
+        RemoteVvmTaskManager.startCellServiceConnected(context, phoneAccountHandle);
+    }
+
+    private void checkRemovedSim(Context context) {
+        SubscriptionManager subscriptionManager = SubscriptionManager.from(context);
+        if (!isBootCompleted()) {
+            for (PhoneAccountHandle phoneAccountHandle : sPreBootHandles) {
+                if (!PhoneUtils.isPhoneAccountActive(subscriptionManager, phoneAccountHandle)) {
+                    sPreBootHandles.remove(phoneAccountHandle);
+                }
+            }
+            return;
+        }
+        Set<PhoneAccountHandle> removeList = new ArraySet<>();
+        for (PhoneAccountHandle phoneAccountHandle : sListeners.keySet()) {
+            if (!PhoneUtils.isPhoneAccountActive(subscriptionManager, phoneAccountHandle)) {
+                removeList.add(phoneAccountHandle);
+                ServiceStateListener listener = sListeners.get(phoneAccountHandle);
+                if (listener != null) {
+                    listener.unlisten();
+                }
+                sendSimRemoved(context, phoneAccountHandle);
+            }
+        }
+
+        for (PhoneAccountHandle phoneAccountHandle : removeList) {
+            sListeners.remove(phoneAccountHandle);
+        }
+    }
+
+    private boolean isBootCompleted() {
+        return SystemProperties.getBoolean("sys.boot_completed", false);
+    }
+
+    private void sendSimRemoved(Context context, PhoneAccountHandle phoneAccountHandle) {
+        VvmLog.i(TAG, "Sim removed on " + phoneAccountHandle);
+        RemoteVvmTaskManager.startSimRemoved(context, phoneAccountHandle);
+    }
+
+    private void onCarrierConfigChanged(Context context, PhoneAccountHandle phoneAccountHandle) {
+        if (!isBootCompleted()) {
+            sPreBootHandles.add(phoneAccountHandle);
+            return;
+        }
+        TelephonyManager telephonyManager = getTelephonyManager(context, phoneAccountHandle);
+        if(telephonyManager == null){
+            int subId = context.getSystemService(TelephonyManager.class).getSubIdForPhoneAccount(
+                    context.getSystemService(TelecomManager.class)
+                            .getPhoneAccount(phoneAccountHandle));
+            VvmLog.e(TAG, "Cannot create TelephonyManager from " + phoneAccountHandle + ", subId="
+                    + subId);
+            // TODO(b/33945549): investigate more why this is happening. The PhoneAccountHandle was
+            // just converted from a valid subId so createForPhoneAccountHandle shouldn't really
+            // return null.
+            return;
+        }
+        if (telephonyManager.getServiceState().getState()
+                == ServiceState.STATE_IN_SERVICE) {
+            sendConnected(context, phoneAccountHandle);
+            sListeners.put(phoneAccountHandle, null);
+        } else {
+            listenToAccount(context, phoneAccountHandle);
+        }
+    }
+
+    private void listenToAccount(Context context, PhoneAccountHandle phoneAccountHandle) {
+        ServiceStateListener listener = new ServiceStateListener(context, phoneAccountHandle);
+        listener.listen();
+        sListeners.put(phoneAccountHandle, listener);
+    }
+
+    @Nullable
+    private static TelephonyManager getTelephonyManager(Context context,
+            PhoneAccountHandle phoneAccountHandle) {
+        return context.getSystemService(TelephonyManager.class)
+                .createForPhoneAccountHandle(phoneAccountHandle);
+    }
+}
diff --git a/src/com/android/phone/vvm/VvmSmsReceiver.java b/src/com/android/phone/vvm/VvmSmsReceiver.java
new file mode 100644
index 0000000..4bffa97
--- /dev/null
+++ b/src/com/android/phone/vvm/VvmSmsReceiver.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2016 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.phone.vvm;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.provider.VoicemailContract;
+import android.telephony.SubscriptionManager;
+import android.telephony.VisualVoicemailSms;
+
+/**
+ * Receives the SMS filtered by {@link com.android.internal.telephony.VisualVoicemailSmsFilter} and
+ * redirect it to the visual voicemail client. The redirection is required to let telephony service
+ * handle tasks with {@link RemoteVvmTaskManager}
+ */
+public class VvmSmsReceiver extends BroadcastReceiver {
+
+    private static final String TAG = "VvmSmsReceiver";
+
+    @Override
+    public void onReceive(Context context, Intent intent) {
+        VisualVoicemailSms sms = intent.getExtras()
+                .getParcelable(VoicemailContract.EXTRA_VOICEMAIL_SMS);
+
+        if (sms.getPhoneAccountHandle() == null) {
+            // This should never happen
+            VvmLog.e(TAG, "Received message for null phone account");
+            return;
+        }
+
+        int subId = PhoneAccountHandleConverter.toSubId(sms.getPhoneAccountHandle());
+        if (!SubscriptionManager.isValidSubscriptionId(subId)) {
+            VvmLog.e(TAG, "Received message for invalid subId");
+            return;
+        }
+
+        if (RemoteVvmTaskManager.hasRemoteService(context, subId)) {
+            VvmLog.i(TAG, "Sending SMS received event to remote service");
+            RemoteVvmTaskManager.startSmsReceived(context, sms);
+        } else {
+            VvmLog.w(TAG, "Sending SMS received event to remote service");
+        };
+    }
+}
diff --git a/src/com/android/phone/vvm/omtp/ActivationTask.java b/src/com/android/phone/vvm/omtp/ActivationTask.java
deleted file mode 100644
index 6fd42fd..0000000
--- a/src/com/android/phone/vvm/omtp/ActivationTask.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp;
-
-import android.annotation.Nullable;
-import android.annotation.WorkerThread;
-import android.content.Context;
-import android.content.Intent;
-import android.database.ContentObserver;
-import android.os.Bundle;
-import android.provider.Settings;
-import android.provider.Settings.Global;
-import android.telecom.PhoneAccountHandle;
-import android.telephony.ServiceState;
-import android.telephony.TelephonyManager;
-import com.android.phone.Assert;
-import com.android.phone.PhoneGlobals;
-import com.android.phone.VoicemailStatus;
-import com.android.phone.vvm.omtp.protocol.VisualVoicemailProtocol;
-import com.android.phone.vvm.omtp.scheduling.BaseTask;
-import com.android.phone.vvm.omtp.scheduling.RetryPolicy;
-import com.android.phone.vvm.omtp.sms.StatusMessage;
-import com.android.phone.vvm.omtp.sms.StatusSmsFetcher;
-import com.android.phone.vvm.omtp.sync.OmtpVvmSourceManager;
-import com.android.phone.vvm.omtp.sync.OmtpVvmSyncService;
-import com.android.phone.vvm.omtp.sync.SyncTask;
-import com.android.phone.vvm.omtp.utils.PhoneAccountHandleConverter;
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeoutException;
-
-/**
- * Task to activate the visual voicemail service. A request to activate VVM will be sent to the
- * carrier, which will respond with a STATUS SMS. The credentials will be updated from the SMS. If
- * the user is not provisioned provisioning will be attempted. Activation happens when the phone
- * boots, the SIM is inserted, signal returned when VVM is not activated yet, and when the carrier
- * spontaneously sent a STATUS SMS.
- */
-public class ActivationTask extends BaseTask {
-
-    private static final String TAG = "VvmActivationTask";
-
-    private static final int RETRY_TIMES = 4;
-    private static final int RETRY_INTERVAL_MILLIS = 5_000;
-
-    private static final String EXTRA_MESSAGE_DATA_BUNDLE = "extra_message_data_bundle";
-
-    @Nullable
-    private static DeviceProvisionedObserver sDeviceProvisionedObserver;
-
-    private final RetryPolicy mRetryPolicy;
-
-    private Bundle mMessageData;
-
-    public ActivationTask() {
-        super(TASK_ACTIVATION);
-        mRetryPolicy = new RetryPolicy(RETRY_TIMES, RETRY_INTERVAL_MILLIS);
-        addPolicy(mRetryPolicy);
-    }
-
-    /**
-     * Has the user gone through the setup wizard yet.
-     */
-    private static boolean isDeviceProvisioned(Context context) {
-        return Settings.Global.getInt(
-            context.getContentResolver(), Settings.Global.DEVICE_PROVISIONED, 0) == 1;
-    }
-
-    /**
-     * @param messageData The optional bundle from {@link android.provider.VoicemailContract#
-     * EXTRA_VOICEMAIL_SMS_FIELDS}, if the task is initiated by a status SMS. If null the task will
-     * request a status SMS itself.
-     */
-    public static void start(Context context, int subId, @Nullable Bundle messageData) {
-        if (!isDeviceProvisioned(context)) {
-            VvmLog.i(TAG, "Activation requested while device is not provisioned, postponing");
-            // Activation might need information such as system language to be set, so wait until
-            // the setup wizard is finished. The data bundle from the SMS will be re-requested upon
-            // activation.
-            queueActivationAfterProvisioned(context, subId);
-            return;
-        }
-
-        Intent intent = BaseTask.createIntent(context, ActivationTask.class, subId);
-        if (messageData != null) {
-            intent.putExtra(EXTRA_MESSAGE_DATA_BUNDLE, messageData);
-        }
-        context.startService(intent);
-    }
-
-    public void onCreate(Context context, Intent intent, int flags, int startId) {
-        super.onCreate(context, intent, flags, startId);
-        mMessageData = intent.getParcelableExtra(EXTRA_MESSAGE_DATA_BUNDLE);
-    }
-
-    @Override
-    public Intent createRestartIntent() {
-        Intent intent = super.createRestartIntent();
-        // mMessageData is discarded, request a fresh STATUS SMS for retries.
-        return intent;
-    }
-
-    @Override
-    @WorkerThread
-    public void onExecuteInBackgroundThread() {
-        Assert.isNotMainThread();
-        int subId = getSubId();
-
-        PhoneAccountHandle phoneAccountHandle = PhoneAccountHandleConverter.fromSubId(subId);
-        if (phoneAccountHandle == null) {
-            // This should never happen
-            VvmLog.e(TAG, "null phone account for subId " + subId);
-            return;
-        }
-
-        OmtpVvmCarrierConfigHelper helper = new OmtpVvmCarrierConfigHelper(getContext(), subId);
-        if (!helper.isValid()) {
-            VvmLog.i(TAG, "VVM not supported on subId " + subId);
-            OmtpVvmSourceManager.getInstance(getContext()).removeSource(phoneAccountHandle);
-            return;
-        }
-
-        // OmtpVvmCarrierConfigHelper can start the activation process; it will pass in a vvm
-        // content provider URI which we will use.  On some occasions, setting that URI will
-        // fail, so we will perform a few attempts to ensure that the vvm content provider has
-        // a good chance of being started up.
-        if (!VoicemailStatus.edit(getContext(), phoneAccountHandle)
-            .setType(helper.getVvmType())
-            .apply()) {
-            VvmLog.e(TAG, "Failed to configure content provider - " + helper.getVvmType());
-            fail();
-        }
-        VvmLog.i(TAG, "VVM content provider configured - " + helper.getVvmType());
-
-        if (!OmtpVvmSourceManager.getInstance(getContext())
-                .isVvmSourceRegistered(phoneAccountHandle)) {
-            // This account has not been activated before during the lifetime of this boot.
-            VisualVoicemailPreferences preferences = new VisualVoicemailPreferences(getContext(),
-                    phoneAccountHandle);
-            if (preferences.getString(OmtpConstants.SERVER_ADDRESS, null) == null) {
-                // Only show the "activating" message if activation has not been completed before.
-                // Subsequent activations are more of a status check and usually does not
-                // concern the user.
-                helper.handleEvent(VoicemailStatus.edit(getContext(), phoneAccountHandle),
-                        OmtpEvents.CONFIG_ACTIVATING);
-            } else {
-                // The account has been activated on this device before. Pretend it is already
-                // activated. If there are any activation error it will overwrite this status.
-                helper.handleEvent(VoicemailStatus.edit(getContext(), phoneAccountHandle),
-                        OmtpEvents.CONFIG_ACTIVATING_SUBSEQUENT);
-            }
-
-        }
-        if (!hasSignal(getContext(), subId)) {
-            VvmLog.i(TAG, "Service lost during activation, aborting");
-            // Restore the "NO SIGNAL" state since it will be overwritten by the CONFIG_ACTIVATING
-            // event.
-            helper.handleEvent(VoicemailStatus.edit(getContext(), phoneAccountHandle),
-                    OmtpEvents.NOTIFICATION_SERVICE_LOST);
-            // Don't retry, a new activation will be started after the signal returned.
-            return;
-        }
-
-        helper.activateSmsFilter();
-        VoicemailStatus.Editor status = mRetryPolicy.getVoicemailStatusEditor();
-
-        VisualVoicemailProtocol protocol = helper.getProtocol();
-
-        Bundle data;
-        if (mMessageData != null) {
-            // The content of STATUS SMS is provided to launch this task, no need to request it
-            // again.
-            data = mMessageData;
-        } else {
-            try (StatusSmsFetcher fetcher = new StatusSmsFetcher(getContext(), subId)) {
-                protocol.startActivation(helper, fetcher.getSentIntent());
-                // Both the fetcher and OmtpMessageReceiver will be triggered, but
-                // OmtpMessageReceiver will just route the SMS back to ActivationTask, which will be
-                // rejected because the task is still running.
-                data = fetcher.get();
-            } catch (TimeoutException e) {
-                // The carrier is expected to return an STATUS SMS within STATUS_SMS_TIMEOUT_MILLIS
-                // handleEvent() will do the logging.
-                helper.handleEvent(status, OmtpEvents.CONFIG_STATUS_SMS_TIME_OUT);
-                fail();
-                return;
-            } catch (CancellationException e) {
-                VvmLog.e(TAG, "Unable to send status request SMS");
-                fail();
-                return;
-            } catch (InterruptedException | ExecutionException | IOException e) {
-                VvmLog.e(TAG, "can't get future STATUS SMS", e);
-                fail();
-                return;
-            }
-        }
-
-        StatusMessage message = new StatusMessage(data);
-        VvmLog.d(TAG, "STATUS SMS received: st=" + message.getProvisioningStatus()
-                + ", rc=" + message.getReturnCode());
-
-        if (message.getProvisioningStatus().equals(OmtpConstants.SUBSCRIBER_READY)) {
-            VvmLog.d(TAG, "subscriber ready, no activation required");
-            updateSource(getContext(), phoneAccountHandle, getSubId(), status, message);
-        } else {
-            if (helper.supportsProvisioning()) {
-                VvmLog.i(TAG, "Subscriber not ready, start provisioning");
-                helper.startProvisioning(this, phoneAccountHandle, status, message, data);
-
-            } else if (message.getProvisioningStatus().equals(OmtpConstants.SUBSCRIBER_NEW)) {
-                VvmLog.i(TAG, "Subscriber new but provisioning is not supported");
-                // Ignore the non-ready state and attempt to use the provided info as is.
-                // This is probably caused by not completing the new user tutorial.
-                updateSource(getContext(), phoneAccountHandle, getSubId(), status, message);
-            } else {
-                VvmLog.i(TAG, "Subscriber not ready but provisioning is not supported");
-                helper.handleEvent(status, OmtpEvents.CONFIG_SERVICE_NOT_AVAILABLE);
-                PhoneGlobals.getInstance().setShouldCheckVisualVoicemailConfigurationForMwi(subId, false);
-            }
-        }
-    }
-
-    public static void updateSource(Context context, PhoneAccountHandle phone, int subId,
-            VoicemailStatus.Editor status, StatusMessage message) {
-        OmtpVvmSourceManager vvmSourceManager =
-                OmtpVvmSourceManager.getInstance(context);
-
-        if (OmtpConstants.SUCCESS.equals(message.getReturnCode())) {
-            OmtpVvmCarrierConfigHelper helper = new OmtpVvmCarrierConfigHelper(context, subId);
-            helper.handleEvent(status, OmtpEvents.CONFIG_REQUEST_STATUS_SUCCESS);
-
-            // Save the IMAP credentials in preferences so they are persistent and can be retrieved.
-            VisualVoicemailPreferences prefs = new VisualVoicemailPreferences(context, phone);
-            message.putStatus(prefs.edit()).apply();
-
-            // Add the source to indicate that it is active.
-            vvmSourceManager.addSource(phone);
-
-            SyncTask.start(context, phone, OmtpVvmSyncService.SYNC_FULL_SYNC);
-            // Remove the message waiting indicator, which is a sticky notification for traditional
-            // voicemails.
-            PhoneGlobals.getInstance()
-                    .setShouldCheckVisualVoicemailConfigurationForMwi(subId, true);
-            PhoneGlobals.getInstance().clearMwiIndicator(subId);
-        } else {
-            VvmLog.e(TAG, "Visual voicemail not available for subscriber.");
-        }
-    }
-
-    private static boolean hasSignal(Context context, int subId) {
-        return context.getSystemService(TelephonyManager.class)
-                .getServiceStateForSubscriber(subId).getState() == ServiceState.STATE_IN_SERVICE;
-    }
-
-    private static void queueActivationAfterProvisioned(Context context, int subId) {
-        if (sDeviceProvisionedObserver == null) {
-            sDeviceProvisionedObserver = new DeviceProvisionedObserver(context);
-            context.getContentResolver()
-                .registerContentObserver(Settings.Global.getUriFor(Global.DEVICE_PROVISIONED),
-                    false, sDeviceProvisionedObserver);
-        }
-        sDeviceProvisionedObserver.addSubId(subId);
-    }
-
-    private static class DeviceProvisionedObserver extends ContentObserver {
-
-        private final Context mContext;
-        private final Set<Integer> mSubIds = new HashSet<>();
-
-        private DeviceProvisionedObserver(Context context) {
-            super(null);
-            mContext = context;
-        }
-
-        public void addSubId(int subId) {
-            mSubIds.add(subId);
-        }
-
-        @Override
-        public void onChange(boolean selfChange) {
-            if (isDeviceProvisioned(mContext)) {
-                VvmLog.i(TAG, "device provisioned, resuming activation");
-                for (int subId : mSubIds) {
-                    start(mContext, subId, null);
-                }
-                mContext.getContentResolver().unregisterContentObserver(sDeviceProvisionedObserver);
-                sDeviceProvisionedObserver = null;
-            }
-        }
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/DefaultOmtpEventHandler.java b/src/com/android/phone/vvm/omtp/DefaultOmtpEventHandler.java
deleted file mode 100644
index 0c19a6a..0000000
--- a/src/com/android/phone/vvm/omtp/DefaultOmtpEventHandler.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp;
-
-import android.content.Context;
-import android.provider.VoicemailContract;
-import android.provider.VoicemailContract.Status;
-
-import com.android.phone.VoicemailStatus;
-import com.android.phone.vvm.omtp.OmtpEvents.Type;
-
-public class DefaultOmtpEventHandler {
-
-    private static final String TAG = "DefErrorCodeHandler";
-
-    public static void handleEvent(Context context, OmtpVvmCarrierConfigHelper config,
-        VoicemailStatus.Editor status, OmtpEvents event) {
-        switch (event.getType()) {
-            case Type.CONFIGURATION:
-                handleConfigurationEvent(context, status, event);
-                break;
-            case Type.DATA_CHANNEL:
-                handleDataChannelEvent(context, status, event);
-                break;
-            case Type.NOTIFICATION_CHANNEL:
-                handleNotificationChannelEvent(context, config, status, event);
-                break;
-            case Type.OTHER:
-                handleOtherEvent(context, status, event);
-                break;
-            default:
-                VvmLog.wtf(TAG, "invalid event type " + event.getType() + " for " + event);
-        }
-    }
-
-    private static void handleConfigurationEvent(Context context, VoicemailStatus.Editor status,
-            OmtpEvents event) {
-        switch (event) {
-            case CONFIG_DEFAULT_PIN_REPLACED:
-            case CONFIG_REQUEST_STATUS_SUCCESS:
-            case CONFIG_PIN_SET:
-                status
-                        .setConfigurationState(VoicemailContract.Status.CONFIGURATION_STATE_OK)
-                        .setNotificationChannelState(Status.NOTIFICATION_CHANNEL_STATE_OK)
-                        .apply();
-                break;
-            case CONFIG_ACTIVATING:
-                // Wipe all errors from the last activation. All errors shown should be new errors
-                // for this activation.
-                status
-                        .setConfigurationState(Status.CONFIGURATION_STATE_CONFIGURING)
-                        .setNotificationChannelState(Status.NOTIFICATION_CHANNEL_STATE_OK)
-                        .setDataChannelState(Status.DATA_CHANNEL_STATE_OK).apply();
-                break;
-            case CONFIG_ACTIVATING_SUBSEQUENT:
-                status
-                        .setConfigurationState(Status.CONFIGURATION_STATE_OK)
-                        .setNotificationChannelState(Status.NOTIFICATION_CHANNEL_STATE_OK)
-                        .setDataChannelState(Status.DATA_CHANNEL_STATE_OK).apply();
-                break;
-            case CONFIG_SERVICE_NOT_AVAILABLE:
-                status
-                    .setConfigurationState(Status.CONFIGURATION_STATE_FAILED)
-                    .apply();
-                break;
-            case CONFIG_STATUS_SMS_TIME_OUT:
-                status
-                        .setConfigurationState(Status.CONFIGURATION_STATE_FAILED)
-                        .apply();
-                break;
-            default:
-                VvmLog.wtf(TAG, "invalid configuration event " + event);
-        }
-    }
-
-    private static void handleDataChannelEvent(Context context, VoicemailStatus.Editor status,
-            OmtpEvents event) {
-        switch (event) {
-            case DATA_IMAP_OPERATION_STARTED:
-            case DATA_IMAP_OPERATION_COMPLETED:
-                status
-                        .setDataChannelState(Status.DATA_CHANNEL_STATE_OK)
-                        .apply();
-                break;
-
-            case DATA_NO_CONNECTION:
-                status
-                        .setDataChannelState(Status.DATA_CHANNEL_STATE_NO_CONNECTION)
-                        .apply();
-                break;
-
-            case DATA_NO_CONNECTION_CELLULAR_REQUIRED:
-                status
-                        .setDataChannelState(
-                                Status.DATA_CHANNEL_STATE_NO_CONNECTION_CELLULAR_REQUIRED)
-                        .apply();
-                break;
-            case DATA_INVALID_PORT:
-                status
-                        .setDataChannelState(
-                                VoicemailContract.Status.DATA_CHANNEL_STATE_BAD_CONFIGURATION)
-                        .apply();
-                break;
-            case DATA_CANNOT_RESOLVE_HOST_ON_NETWORK:
-                status
-                        .setDataChannelState(
-                                VoicemailContract.Status.DATA_CHANNEL_STATE_SERVER_CONNECTION_ERROR)
-                        .apply();
-                break;
-            case DATA_SSL_INVALID_HOST_NAME:
-            case DATA_CANNOT_ESTABLISH_SSL_SESSION:
-            case DATA_IOE_ON_OPEN:
-            case DATA_GENERIC_IMAP_IOE:
-                status
-                        .setDataChannelState(
-                                VoicemailContract.Status.DATA_CHANNEL_STATE_COMMUNICATION_ERROR)
-                        .apply();
-                break;
-            case DATA_BAD_IMAP_CREDENTIAL:
-            case DATA_AUTH_UNKNOWN_USER:
-            case DATA_AUTH_UNKNOWN_DEVICE:
-            case DATA_AUTH_INVALID_PASSWORD:
-            case DATA_AUTH_MAILBOX_NOT_INITIALIZED:
-            case DATA_AUTH_SERVICE_NOT_PROVISIONED:
-            case DATA_AUTH_SERVICE_NOT_ACTIVATED:
-            case DATA_AUTH_USER_IS_BLOCKED:
-                status
-                        .setDataChannelState(
-                                VoicemailContract.Status.DATA_CHANNEL_STATE_BAD_CONFIGURATION)
-                        .apply();
-                break;
-
-            case DATA_REJECTED_SERVER_RESPONSE:
-            case DATA_INVALID_INITIAL_SERVER_RESPONSE:
-            case DATA_MAILBOX_OPEN_FAILED:
-            case DATA_SSL_EXCEPTION:
-            case DATA_ALL_SOCKET_CONNECTION_FAILED:
-                status
-                        .setDataChannelState(
-                                VoicemailContract.Status.DATA_CHANNEL_STATE_SERVER_ERROR)
-                        .apply();
-                break;
-
-            default:
-                VvmLog.wtf(TAG, "invalid data channel event " + event);
-        }
-    }
-
-    private static void handleNotificationChannelEvent(Context context,
-        OmtpVvmCarrierConfigHelper config, VoicemailStatus.Editor status, OmtpEvents event) {
-        switch (event) {
-            case NOTIFICATION_IN_SERVICE:
-                status
-                        .setNotificationChannelState(Status.NOTIFICATION_CHANNEL_STATE_OK)
-                        // Clear the error state. A sync should follow signal return so any error
-                        // will be reposted.
-                        .setDataChannelState(Status.DATA_CHANNEL_STATE_OK)
-                        .apply();
-                break;
-            case NOTIFICATION_SERVICE_LOST:
-                status.setNotificationChannelState(Status.NOTIFICATION_CHANNEL_STATE_NO_CONNECTION);
-                if (config.isCellularDataRequired()) {
-                    status.setDataChannelState(
-                            Status.DATA_CHANNEL_STATE_NO_CONNECTION_CELLULAR_REQUIRED);
-                }
-                status.apply();
-                break;
-            default:
-                VvmLog.wtf(TAG, "invalid notification channel event " + event);
-        }
-    }
-
-    private static void handleOtherEvent(Context context, VoicemailStatus.Editor status,
-            OmtpEvents event) {
-        switch (event) {
-            case OTHER_SOURCE_REMOVED:
-                status
-                        .setConfigurationState(Status.CONFIGURATION_STATE_NOT_CONFIGURED)
-                        .setNotificationChannelState(
-                                Status.NOTIFICATION_CHANNEL_STATE_NO_CONNECTION)
-                        .setDataChannelState(Status.DATA_CHANNEL_STATE_NO_CONNECTION)
-                        .apply();
-                break;
-            default:
-                VvmLog.wtf(TAG, "invalid other event " + event);
-        }
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/OmtpConstants.java b/src/com/android/phone/vvm/omtp/OmtpConstants.java
deleted file mode 100644
index 3f5722f..0000000
--- a/src/com/android/phone/vvm/omtp/OmtpConstants.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp;
-
-import android.annotation.IntDef;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Wrapper class to hold relevant OMTP constants as defined in the OMTP spec. <p> In essence this is
- * a programmatic representation of the relevant portions of OMTP spec.
- */
-public class OmtpConstants {
-    public static final String SMS_FIELD_SEPARATOR = ";";
-    public static final String SMS_KEY_VALUE_SEPARATOR = "=";
-    public static final String SMS_PREFIX_SEPARATOR = ":";
-
-    public static final String SYNC_SMS_PREFIX = "SYNC";
-    public static final String STATUS_SMS_PREFIX = "STATUS";
-
-    // This is the format designated by the OMTP spec.
-    public static final String DATE_TIME_FORMAT = "dd/MM/yyyy HH:mm Z";
-
-    /** OMTP protocol versions. */
-    public static final String PROTOCOL_VERSION1_1 = "11";
-    public static final String PROTOCOL_VERSION1_2 = "12";
-    public static final String PROTOCOL_VERSION1_3 = "13";
-
-    ///////////////////////// Client/Mobile originated SMS //////////////////////
-
-    /** Mobile Originated requests */
-    public static final String ACTIVATE_REQUEST = "Activate";
-    public static final String DEACTIVATE_REQUEST = "Deactivate";
-    public static final String STATUS_REQUEST = "Status";
-
-    /** fields that can be present in a Mobile Originated OMTP SMS */
-    public static final String CLIENT_TYPE = "ct";
-    public static final String APPLICATION_PORT = "pt";
-    public static final String PROTOCOL_VERSION = "pv";
-
-
-    //////////////////////////////// Sync SMS fields ////////////////////////////
-
-    /**
-     * Sync SMS fields.
-     * <p>
-     * Each string constant is the field's key in the SMS body which is used by the parser to
-     * identify the field's value, if present, in the SMS body.
-     */
-
-    /**
-     * The event that triggered this SYNC SMS.
-     * See {@link OmtpConstants#SYNC_TRIGGER_EVENT_VALUES}
-     */
-    public static final String SYNC_TRIGGER_EVENT = "ev";
-    public static final String MESSAGE_UID = "id";
-    public static final String MESSAGE_LENGTH = "l";
-    public static final String NUM_MESSAGE_COUNT = "c";
-    /** See {@link OmtpConstants#CONTENT_TYPE_VALUES} */
-    public static final String CONTENT_TYPE = "t";
-    public static final String SENDER = "s";
-    public static final String TIME = "dt";
-
-    /**
-     * SYNC message trigger events.
-     * <p>
-     * These are the possible values of {@link OmtpConstants#SYNC_TRIGGER_EVENT}.
-     */
-    public static final String NEW_MESSAGE = "NM";
-    public static final String MAILBOX_UPDATE = "MBU";
-    public static final String GREETINGS_UPDATE = "GU";
-
-    public static final String[] SYNC_TRIGGER_EVENT_VALUES = {
-        NEW_MESSAGE,
-        MAILBOX_UPDATE,
-        GREETINGS_UPDATE
-    };
-
-    /**
-     * Content types supported by OMTP VVM.
-     * <p>
-     * These are the possible values of {@link OmtpConstants#CONTENT_TYPE}.
-     */
-    public static final String VOICE = "v";
-    public static final String VIDEO = "o";
-    public static final String FAX = "f";
-    /** Voice message deposited by an external application */
-    public static final String INFOTAINMENT = "i";
-    /** Empty Call Capture - i.e. voicemail with no voice message. */
-    public static final String ECC = "e";
-
-    public static final String[] CONTENT_TYPE_VALUES = {VOICE, VIDEO, FAX, INFOTAINMENT, ECC};
-
-    ////////////////////////////// Status SMS fields ////////////////////////////
-
-    /**
-     * Status SMS fields.
-     * <p>
-     * Each string constant is the field's key in the SMS body which is used by the parser to
-     * identify the field's value, if present, in the SMS body.
-     */
-    /** See {@link OmtpConstants#PROVISIONING_STATUS_VALUES} */
-    public static final String PROVISIONING_STATUS = "st";
-    /** See {@link OmtpConstants#RETURN_CODE_VALUES} */
-    public static final String RETURN_CODE = "rc";
-    /** URL to send users to for activation VVM */
-    public static final String SUBSCRIPTION_URL = "rs";
-    /** IMAP4/SMTP server IP address or fully qualified domain name */
-    public static final String SERVER_ADDRESS = "srv";
-    /** Phone number to access voicemails through Telephony User Interface */
-    public static final String TUI_ACCESS_NUMBER = "tui";
-    public static final String TUI_PASSWORD_LENGTH = "pw_len";
-    /** Number to send client origination SMS */
-    public static final String CLIENT_SMS_DESTINATION_NUMBER = "dn";
-    public static final String IMAP_PORT = "ipt";
-    public static final String IMAP_USER_NAME = "u";
-    public static final String IMAP_PASSWORD = "pw";
-    public static final String SMTP_PORT = "spt";
-    public static final String SMTP_USER_NAME = "smtp_u";
-    public static final String SMTP_PASSWORD = "smtp_pw";
-
-    /**
-     * User provisioning status values.
-     * <p>
-     * Referred by {@link OmtpConstants#PROVISIONING_STATUS}.
-     */
-    public static final String SUBSCRIBER_NEW = "N";
-    public static final String SUBSCRIBER_READY = "R";
-    public static final String SUBSCRIBER_PROVISIONED = "P";
-    public static final String SUBSCRIBER_UNKNOWN = "U";
-    public static final String SUBSCRIBER_BLOCKED = "B";
-
-    public static final String[] PROVISIONING_STATUS_VALUES = {
-        SUBSCRIBER_NEW,
-        SUBSCRIBER_READY,
-        SUBSCRIBER_PROVISIONED,
-        SUBSCRIBER_UNKNOWN,
-        SUBSCRIBER_BLOCKED
-    };
-
-    /**
-     * The return code included in a status message.
-     * <p>
-     * These are the possible values of {@link OmtpConstants#RETURN_CODE}.
-     */
-    public static final String SUCCESS = "0";
-    public static final String SYSTEM_ERROR = "1";
-    public static final String SUBSCRIBER_ERROR = "2";
-    public static final String MAILBOX_UNKNOWN = "3";
-    public static final String VVM_NOT_ACTIVATED = "4";
-    public static final String VVM_NOT_PROVISIONED = "5";
-    public static final String VVM_CLIENT_UKNOWN = "6";
-    public static final String VVM_MAILBOX_NOT_INITIALIZED = "7";
-
-    public static final String[] RETURN_CODE_VALUES = {
-        SUCCESS,
-        SYSTEM_ERROR,
-        SUBSCRIBER_ERROR,
-        MAILBOX_UNKNOWN,
-        VVM_NOT_ACTIVATED,
-        VVM_NOT_PROVISIONED,
-        VVM_CLIENT_UKNOWN,
-        VVM_MAILBOX_NOT_INITIALIZED,
-    };
-
-    /**
-     * A map of all the field keys to the possible values they can have.
-     */
-    public static final Map<String, String[]> possibleValuesMap = new HashMap<String, String[]>() {{
-        put(SYNC_TRIGGER_EVENT, SYNC_TRIGGER_EVENT_VALUES);
-        put(CONTENT_TYPE, CONTENT_TYPE_VALUES);
-        put(PROVISIONING_STATUS, PROVISIONING_STATUS_VALUES);
-        put(RETURN_CODE, RETURN_CODE_VALUES);
-    }};
-
-    /**
-     * IMAP command extensions
-     */
-
-    /**
-     * OMTP spec v1.3 2.3.1 Change password request syntax
-     *
-     * This changes the PIN to access the Telephone User Interface, the traditional voicemail
-     * system.
-     */
-    public static final String IMAP_CHANGE_TUI_PWD_FORMAT = "XCHANGE_TUI_PWD PWD=%1$s OLD_PWD=%2$s";
-
-    /**
-     * OMTP spec v1.3 2.4.1 Change languate request syntax
-     *
-     * This changes the language in the Telephone User Interface.
-     */
-    public static final String IMAP_CHANGE_VM_LANG_FORMAT = "XCHANGE_VM_LANG LANG=%1$s";
-
-    /**
-     * OMTP spec v1.3 2.5.1 Close NUT Request syntax
-     *
-     * This disables the new user tutorial, the message played to new users calling in the Telephone
-     * User Interface.
-     */
-    public static final String IMAP_CLOSE_NUT = "XCLOSE_NUT";
-
-    /**
-     * Possible NO responses for CHANGE_TUI_PWD
-     */
-
-    public static final String RESPONSE_CHANGE_PIN_TOO_SHORT = "password too short";
-    public static final String RESPONSE_CHANGE_PIN_TOO_LONG = "password too long";
-    public static final String RESPONSE_CHANGE_PIN_TOO_WEAK = "password too weak";
-    public static final String RESPONSE_CHANGE_PIN_MISMATCH = "old password mismatch";
-    public static final String RESPONSE_CHANGE_PIN_INVALID_CHARACTER =
-            "password contains invalid characters";
-
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(value = {CHANGE_PIN_SUCCESS, CHANGE_PIN_TOO_SHORT, CHANGE_PIN_TOO_LONG,
-            CHANGE_PIN_TOO_WEAK, CHANGE_PIN_MISMATCH, CHANGE_PIN_INVALID_CHARACTER,
-            CHANGE_PIN_SYSTEM_ERROR})
-
-    public @interface ChangePinResult {
-
-    }
-
-    public static final int CHANGE_PIN_SUCCESS = 0;
-    public static final int CHANGE_PIN_TOO_SHORT = 1;
-    public static final int CHANGE_PIN_TOO_LONG = 2;
-    public static final int CHANGE_PIN_TOO_WEAK = 3;
-    public static final int CHANGE_PIN_MISMATCH = 4;
-    public static final int CHANGE_PIN_INVALID_CHARACTER = 5;
-    public static final int CHANGE_PIN_SYSTEM_ERROR = 6;
-
-    /** Indicates the client is Google visual voicemail version 1.0. */
-    public static final String CLIENT_TYPE_GOOGLE_10 = "google.vvm.10";
-}
diff --git a/src/com/android/phone/vvm/omtp/OmtpEvents.java b/src/com/android/phone/vvm/omtp/OmtpEvents.java
deleted file mode 100644
index 7a89418..0000000
--- a/src/com/android/phone/vvm/omtp/OmtpEvents.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp;
-
-import android.annotation.IntDef;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Events internal to the OMTP client. These should be translated into {@link
- * android.provider.VoicemailContract.Status} error codes before writing into the voicemail status
- * table.
- */
-public enum OmtpEvents {
-
-    // Configuration State
-    CONFIG_REQUEST_STATUS_SUCCESS(Type.CONFIGURATION, true),
-
-    CONFIG_PIN_SET(Type.CONFIGURATION, true),
-    // The voicemail PIN is replaced with a generated PIN, user should change it.
-    CONFIG_DEFAULT_PIN_REPLACED(Type.CONFIGURATION, true),
-    CONFIG_ACTIVATING(Type.CONFIGURATION, true),
-    // There are already activation records, this is only a book-keeping activation.
-    CONFIG_ACTIVATING_SUBSEQUENT(Type.CONFIGURATION, true),
-    CONFIG_STATUS_SMS_TIME_OUT(Type.CONFIGURATION),
-    CONFIG_SERVICE_NOT_AVAILABLE(Type.CONFIGURATION),
-
-    // Data channel State
-
-    // A new sync has started, old errors in data channel should be cleared.
-    DATA_IMAP_OPERATION_STARTED(Type.DATA_CHANNEL, true),
-    // Successfully downloaded/uploaded data from the server, which means the data channel is clear.
-    DATA_IMAP_OPERATION_COMPLETED(Type.DATA_CHANNEL, true),
-    // The port provided in the STATUS SMS is invalid.
-    DATA_INVALID_PORT(Type.DATA_CHANNEL),
-    // No connection to the internet, and the carrier requires cellular data
-    DATA_NO_CONNECTION_CELLULAR_REQUIRED(Type.DATA_CHANNEL),
-    // No connection to the internet.
-    DATA_NO_CONNECTION(Type.DATA_CHANNEL),
-    // Address lookup for the server hostname failed. DNS error?
-    DATA_CANNOT_RESOLVE_HOST_ON_NETWORK(Type.DATA_CHANNEL),
-    // All destination address that resolves to the server hostname are rejected or timed out
-    DATA_ALL_SOCKET_CONNECTION_FAILED(Type.DATA_CHANNEL),
-    // Failed to establish SSL with the server, either with a direct SSL connection or by
-    // STARTTLS command
-    DATA_CANNOT_ESTABLISH_SSL_SESSION(Type.DATA_CHANNEL),
-    // Identity of the server cannot be verified.
-    DATA_SSL_INVALID_HOST_NAME(Type.DATA_CHANNEL),
-    // The server rejected our username/password
-    DATA_BAD_IMAP_CREDENTIAL(Type.DATA_CHANNEL),
-
-    DATA_AUTH_UNKNOWN_USER(Type.DATA_CHANNEL),
-    DATA_AUTH_UNKNOWN_DEVICE(Type.DATA_CHANNEL),
-    DATA_AUTH_INVALID_PASSWORD(Type.DATA_CHANNEL),
-    DATA_AUTH_MAILBOX_NOT_INITIALIZED(Type.DATA_CHANNEL),
-    DATA_AUTH_SERVICE_NOT_PROVISIONED(Type.DATA_CHANNEL),
-    DATA_AUTH_SERVICE_NOT_ACTIVATED(Type.DATA_CHANNEL),
-    DATA_AUTH_USER_IS_BLOCKED(Type.DATA_CHANNEL),
-
-    // A command to the server didn't result with an "OK" or continuation request
-    DATA_REJECTED_SERVER_RESPONSE(Type.DATA_CHANNEL),
-    // The server did not greet us with a "OK", possibly not a IMAP server.
-    DATA_INVALID_INITIAL_SERVER_RESPONSE(Type.DATA_CHANNEL),
-    // An IOException occurred while trying to open an ImapConnection
-    // TODO: reduce scope
-    DATA_IOE_ON_OPEN(Type.DATA_CHANNEL),
-    // The SELECT command on a mailbox is rejected
-    DATA_MAILBOX_OPEN_FAILED(Type.DATA_CHANNEL),
-    // An IOException has occurred
-    // TODO: reduce scope
-    DATA_GENERIC_IMAP_IOE(Type.DATA_CHANNEL),
-    // An SslException has occurred while opening an ImapConnection
-    // TODO: reduce scope
-    DATA_SSL_EXCEPTION(Type.DATA_CHANNEL),
-
-    // Notification Channel
-
-    // Cell signal restored, can received VVM SMSs
-    NOTIFICATION_IN_SERVICE(Type.NOTIFICATION_CHANNEL, true),
-    // Cell signal lost, cannot received VVM SMSs
-    NOTIFICATION_SERVICE_LOST(Type.NOTIFICATION_CHANNEL, false),
-
-
-    // Other
-    OTHER_SOURCE_REMOVED(Type.OTHER, false),
-
-    // VVM3
-    VVM3_NEW_USER_SETUP_FAILED,
-    // Table 4. client internal error handling
-    VVM3_VMG_DNS_FAILURE,
-    VVM3_SPG_DNS_FAILURE,
-    VVM3_VMG_CONNECTION_FAILED,
-    VVM3_SPG_CONNECTION_FAILED,
-    VVM3_VMG_TIMEOUT,
-    VVM3_STATUS_SMS_TIMEOUT,
-
-    VVM3_SUBSCRIBER_PROVISIONED,
-    VVM3_SUBSCRIBER_BLOCKED,
-    VVM3_SUBSCRIBER_UNKNOWN;
-
-    public static class Type {
-
-        @Retention(RetentionPolicy.SOURCE)
-        @IntDef({CONFIGURATION, DATA_CHANNEL, NOTIFICATION_CHANNEL, OTHER})
-        public @interface Values {
-
-        }
-
-        public static final int CONFIGURATION = 1;
-        public static final int DATA_CHANNEL = 2;
-        public static final int NOTIFICATION_CHANNEL = 3;
-        public static final int OTHER = 4;
-    }
-
-    private final int mType;
-    private final boolean mIsSuccess;
-
-    OmtpEvents(int type, boolean isSuccess) {
-        mType = type;
-        mIsSuccess = isSuccess;
-    }
-
-    OmtpEvents(int type) {
-        mType = type;
-        mIsSuccess = false;
-    }
-
-    OmtpEvents() {
-        mType = Type.OTHER;
-        mIsSuccess = false;
-    }
-
-    @Type.Values
-    public int getType() {
-        return mType;
-    }
-
-    public boolean isSuccess() {
-        return mIsSuccess;
-    }
-
-}
diff --git a/src/com/android/phone/vvm/omtp/OmtpVvmCarrierConfigHelper.java b/src/com/android/phone/vvm/omtp/OmtpVvmCarrierConfigHelper.java
deleted file mode 100644
index 0b321b5..0000000
--- a/src/com/android/phone/vvm/omtp/OmtpVvmCarrierConfigHelper.java
+++ /dev/null
@@ -1,445 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp;
-
-import android.annotation.Nullable;
-import android.app.PendingIntent;
-import android.content.Context;
-import android.content.pm.PackageManager.NameNotFoundException;
-import android.os.Bundle;
-import android.os.PersistableBundle;
-import android.telecom.PhoneAccountHandle;
-import android.telephony.CarrierConfigManager;
-import android.telephony.SubscriptionManager;
-import android.telephony.TelephonyManager;
-import android.telephony.VisualVoicemailSmsFilterSettings;
-import android.text.TextUtils;
-import android.util.ArraySet;
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.phone.VoicemailStatus;
-import com.android.phone.vvm.omtp.protocol.VisualVoicemailProtocol;
-import com.android.phone.vvm.omtp.protocol.VisualVoicemailProtocolFactory;
-import com.android.phone.vvm.omtp.sms.StatusMessage;
-import com.android.phone.vvm.omtp.utils.PhoneAccountHandleConverter;
-import java.util.Arrays;
-import java.util.Set;
-
-/**
- * Manages carrier dependent visual voicemail configuration values. The primary source is the value
- * retrieved from CarrierConfigManager. If CarrierConfigManager does not provide the config
- * (KEY_VVM_TYPE_STRING is empty, or "hidden" configs), then the value hardcoded in telephony will
- * be used (in res/xml/vvm_config.xml)
- *
- * Hidden configs are new configs that are planned for future APIs, or miscellaneous settings that
- * may clutter CarrierConfigManager too much.
- *
- * The current hidden configs are: {@link #getSslPort()} {@link #getDisabledCapabilities()}
- */
-public class OmtpVvmCarrierConfigHelper {
-
-    private static final String TAG = "OmtpVvmCarrierCfgHlpr";
-
-    static final String KEY_VVM_TYPE_STRING = CarrierConfigManager.KEY_VVM_TYPE_STRING;
-    static final String KEY_VVM_DESTINATION_NUMBER_STRING =
-            CarrierConfigManager.KEY_VVM_DESTINATION_NUMBER_STRING;
-    static final String KEY_VVM_PORT_NUMBER_INT =
-            CarrierConfigManager.KEY_VVM_PORT_NUMBER_INT;
-    static final String KEY_CARRIER_VVM_PACKAGE_NAME_STRING =
-            CarrierConfigManager.KEY_CARRIER_VVM_PACKAGE_NAME_STRING;
-    static final String KEY_CARRIER_VVM_PACKAGE_NAME_STRING_ARRAY =
-            "carrier_vvm_package_name_string_array";
-    static final String KEY_VVM_PREFETCH_BOOL =
-            CarrierConfigManager.KEY_VVM_PREFETCH_BOOL;
-    static final String KEY_VVM_CELLULAR_DATA_REQUIRED_BOOL =
-            CarrierConfigManager.KEY_VVM_CELLULAR_DATA_REQUIRED_BOOL;
-
-    /**
-     * @see #getSslPort()
-     */
-    static final String KEY_VVM_SSL_PORT_NUMBER_INT =
-            "vvm_ssl_port_number_int";
-
-    /**
-     * @see #isLegacyModeEnabled()
-     */
-    static final String KEY_VVM_LEGACY_MODE_ENABLED_BOOL =
-            "vvm_legacy_mode_enabled_bool";
-
-    /**
-     * Ban a capability reported by the server from being used. The array of string should be a
-     * subset of the capabilities returned IMAP CAPABILITY command.
-     *
-     * @see #getDisabledCapabilities()
-     */
-    static final String KEY_VVM_DISABLED_CAPABILITIES_STRING_ARRAY =
-            "vvm_disabled_capabilities_string_array";
-    static final String KEY_VVM_CLIENT_PREFIX_STRING =
-            "vvm_client_prefix_string";
-
-    private final Context mContext;
-    private final int mSubId;
-    private final PersistableBundle mCarrierConfig;
-    private final String mVvmType;
-    private final VisualVoicemailProtocol mProtocol;
-    private final PersistableBundle mTelephonyConfig;
-
-    private PhoneAccountHandle mPhoneAccountHandle;
-
-    public OmtpVvmCarrierConfigHelper(Context context, int subId) {
-        mContext = context;
-        mSubId = subId;
-        mCarrierConfig = getCarrierConfig();
-
-        TelephonyManager telephonyManager =
-                (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
-        mTelephonyConfig = new TelephonyVvmConfigManager(context.getResources())
-                .getConfig(telephonyManager.getSimOperator(subId));
-
-        mVvmType = getVvmType();
-        mProtocol = VisualVoicemailProtocolFactory.create(mContext.getResources(), mVvmType);
-    }
-
-    public OmtpVvmCarrierConfigHelper(Context context, PhoneAccountHandle handle) {
-        this(context, PhoneAccountHandleConverter.toSubId(handle));
-        mPhoneAccountHandle = handle;
-    }
-
-    @VisibleForTesting
-    OmtpVvmCarrierConfigHelper(Context context, PersistableBundle carrierConfig,
-            PersistableBundle telephonyConfig) {
-        mContext = context;
-        mSubId = 0;
-        mCarrierConfig = carrierConfig;
-        mTelephonyConfig = telephonyConfig;
-        mVvmType = getVvmType();
-        mProtocol = VisualVoicemailProtocolFactory.create(mContext.getResources(), mVvmType);
-    }
-
-    public Context getContext() {
-        return mContext;
-    }
-
-    public int getSubId() {
-        return mSubId;
-    }
-
-    @Nullable
-    public PhoneAccountHandle getPhoneAccountHandle() {
-        if (mPhoneAccountHandle == null) {
-            mPhoneAccountHandle = PhoneAccountHandleConverter.fromSubId(mSubId);
-            if (mPhoneAccountHandle == null) {
-                VvmLog.e(TAG, "null phone account for subId " + mSubId);
-            }
-        }
-        return mPhoneAccountHandle;
-    }
-
-    /**
-     * return whether the carrier's visual voicemail is supported, with KEY_VVM_TYPE_STRING set as a
-     * known protocol.
-     */
-    public boolean isValid() {
-        return mProtocol != null;
-    }
-
-    @Nullable
-    public String getVvmType() {
-        return (String) getValue(KEY_VVM_TYPE_STRING);
-    }
-
-    @Nullable
-    public VisualVoicemailProtocol getProtocol() {
-        return mProtocol;
-    }
-
-    /**
-     * @returns arbitrary String stored in the config file. Used for protocol specific values.
-     */
-    @Nullable
-    public String getString(String key) {
-        return (String) getValue(key);
-    }
-
-    @Nullable
-    public Set<String> getCarrierVvmPackageNames() {
-        Set<String> names = getCarrierVvmPackageNames(mCarrierConfig);
-        if (names != null) {
-            return names;
-        }
-        return getCarrierVvmPackageNames(mTelephonyConfig);
-    }
-
-    private static Set<String> getCarrierVvmPackageNames(@Nullable PersistableBundle bundle) {
-        if (bundle == null) {
-            return null;
-        }
-        Set<String> names = new ArraySet<>();
-        if (bundle.containsKey(KEY_CARRIER_VVM_PACKAGE_NAME_STRING)) {
-            names.add(bundle.getString(KEY_CARRIER_VVM_PACKAGE_NAME_STRING));
-        }
-        if (bundle.containsKey(KEY_CARRIER_VVM_PACKAGE_NAME_STRING_ARRAY)) {
-            names.addAll(Arrays.asList(
-                    bundle.getStringArray(KEY_CARRIER_VVM_PACKAGE_NAME_STRING_ARRAY)));
-        }
-        if (names.isEmpty()) {
-            return null;
-        }
-        return names;
-    }
-
-    /**
-     * For checking upon sim insertion whether visual voicemail should be enabled. This method does
-     * so by checking if the carrier's voicemail app is installed.
-     */
-    public boolean isEnabledByDefault() {
-        if (!isValid()) {
-            return false;
-        }
-
-        Set<String> carrierPackages = getCarrierVvmPackageNames();
-        if (carrierPackages == null) {
-            return true;
-        }
-        for (String packageName : carrierPackages) {
-            try {
-                mContext.getPackageManager().getPackageInfo(packageName, 0);
-                return false;
-            } catch (NameNotFoundException e) {
-                // Do nothing.
-            }
-        }
-        return true;
-    }
-
-    public boolean isCellularDataRequired() {
-        return (boolean) getValue(KEY_VVM_CELLULAR_DATA_REQUIRED_BOOL, false);
-    }
-
-    public boolean isPrefetchEnabled() {
-        return (boolean) getValue(KEY_VVM_PREFETCH_BOOL, true);
-    }
-
-
-    public int getApplicationPort() {
-        return (int) getValue(KEY_VVM_PORT_NUMBER_INT, 0);
-    }
-
-    @Nullable
-    public String getDestinationNumber() {
-        return (String) getValue(KEY_VVM_DESTINATION_NUMBER_STRING);
-    }
-
-    /**
-     * Hidden config.
-     *
-     * @return Port to start a SSL IMAP connection directly.
-     *
-     * TODO: make config public and add to CarrierConfigManager
-     */
-    public int getSslPort() {
-        return (int) getValue(KEY_VVM_SSL_PORT_NUMBER_INT, 0);
-    }
-
-    /**
-     * Hidden Config.
-     *
-     * <p>Sometimes the server states it supports a certain feature but we found they have bug on
-     * the server side. For example, in b/28717550 the server reported AUTH=DIGEST-MD5 capability
-     * but using it to login will cause subsequent response to be erroneous.
-     *
-     * @return A set of capabilities that is reported by the IMAP CAPABILITY command, but determined
-     * to have issues and should not be used.
-     */
-    @Nullable
-    public Set<String> getDisabledCapabilities() {
-        Set<String> disabledCapabilities = getDisabledCapabilities(mCarrierConfig);
-        if (disabledCapabilities != null) {
-            return disabledCapabilities;
-        }
-        return getDisabledCapabilities(mTelephonyConfig);
-    }
-
-    @Nullable
-    private static Set<String> getDisabledCapabilities(@Nullable PersistableBundle bundle) {
-        if (bundle == null) {
-            return null;
-        }
-        if (!bundle.containsKey(KEY_VVM_DISABLED_CAPABILITIES_STRING_ARRAY)) {
-            return null;
-        }
-        ArraySet<String> result = new ArraySet<String>();
-        result.addAll(
-                Arrays.asList(bundle.getStringArray(KEY_VVM_DISABLED_CAPABILITIES_STRING_ARRAY)));
-        return result;
-    }
-
-    public String getClientPrefix() {
-        String prefix = (String) getValue(KEY_VVM_CLIENT_PREFIX_STRING);
-        if (prefix != null) {
-            return prefix;
-        }
-        return "//VVM";
-    }
-
-    /**
-     * Should legacy mode be used when the OMTP VVM client is disabled?
-     *
-     * <p>Legacy mode is a mode that on the carrier side visual voicemail is still activated, but on
-     * the client side all network operations are disabled. SMSs are still monitored so a new
-     * message SYNC SMS will be translated to show a message waiting indicator, like traditional
-     * voicemails.
-     *
-     * <p>This is for carriers that does not support VVM deactivation so voicemail can continue to
-     * function without the data cost.
-     */
-    public boolean isLegacyModeEnabled() {
-        return (boolean) getValue(KEY_VVM_LEGACY_MODE_ENABLED_BOOL, false);
-    }
-
-    public void startActivation() {
-        PhoneAccountHandle phoneAccountHandle = getPhoneAccountHandle();
-        if (phoneAccountHandle == null) {
-            // This should never happen
-            // Error logged in getPhoneAccountHandle().
-            return;
-        }
-
-        if (mVvmType == null || mVvmType.isEmpty()) {
-            // The VVM type is invalid; we should never have gotten here in the first place since
-            // this is loaded initially in the constructor, and callers should check isValid()
-            // before trying to start activation anyways.
-            VvmLog.e(TAG, "startActivation : vvmType is null or empty for account " +
-                    phoneAccountHandle);
-            return;
-        }
-
-        activateSmsFilter();
-
-        if (mProtocol != null) {
-            ActivationTask.start(mContext, mSubId, null);
-        }
-    }
-
-    public void activateSmsFilter() {
-        TelephonyManager telephonyManager = mContext.getSystemService(TelephonyManager.class);
-        telephonyManager.enableVisualVoicemailSmsFilter(mSubId,
-                new VisualVoicemailSmsFilterSettings.Builder().setClientPrefix(getClientPrefix())
-                        .build());
-    }
-
-    public void startDeactivation() {
-        if (!isLegacyModeEnabled()) {
-            // SMS should still be filtered in legacy mode
-            mContext.getSystemService(TelephonyManager.class)
-                    .disableVisualVoicemailSmsFilter(mSubId);
-        }
-        if (mProtocol != null) {
-            mProtocol.startDeactivation(this);
-        }
-    }
-
-    public boolean supportsProvisioning() {
-        if (mProtocol != null) {
-            return mProtocol.supportsProvisioning();
-        }
-        return false;
-    }
-
-    public void startProvisioning(ActivationTask task, PhoneAccountHandle phone,
-        VoicemailStatus.Editor status, StatusMessage message, Bundle data) {
-        if (mProtocol != null) {
-            mProtocol.startProvisioning(task, phone, this, status, message, data);
-        }
-    }
-
-    public void requestStatus(@Nullable PendingIntent sentIntent) {
-        if (mProtocol != null) {
-            mProtocol.requestStatus(this, sentIntent);
-        }
-    }
-
-    public void handleEvent(VoicemailStatus.Editor status, OmtpEvents event) {
-        VvmLog.i(TAG, "OmtpEvent:" + event);
-        if (mProtocol != null) {
-            mProtocol.handleEvent(mContext, this, status, event);
-        }
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder builder = new StringBuilder("OmtpVvmCarrierConfigHelper [");
-        builder.append("subId: ").append(getSubId())
-                .append(", carrierConfig: ").append(mCarrierConfig != null)
-                .append(", telephonyConfig: ").append(mTelephonyConfig != null)
-                .append(", type: ").append(getVvmType())
-                .append(", destinationNumber: ").append(getDestinationNumber())
-                .append(", applicationPort: ").append(getApplicationPort())
-                .append(", sslPort: ").append(getSslPort())
-                .append(", isEnabledByDefault: ").append(isEnabledByDefault())
-                .append(", isCellularDataRequired: ").append(isCellularDataRequired())
-                .append(", isPrefetchEnabled: ").append(isPrefetchEnabled())
-                .append(", isLegacyModeEnabled: ").append(isLegacyModeEnabled())
-                .append("]");
-        return builder.toString();
-    }
-
-    @Nullable
-    private PersistableBundle getCarrierConfig() {
-        if (!SubscriptionManager.isValidSubscriptionId(mSubId)) {
-            VvmLog
-                    .w(TAG, "Invalid subscriptionId or subscriptionId not provided in intent.");
-            return null;
-        }
-
-        CarrierConfigManager carrierConfigManager = (CarrierConfigManager)
-                mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE);
-        if (carrierConfigManager == null) {
-            VvmLog.w(TAG, "No carrier config service found.");
-            return null;
-        }
-
-        PersistableBundle config = carrierConfigManager.getConfigForSubId(mSubId);
-
-        if (TextUtils.isEmpty(config.getString(CarrierConfigManager.KEY_VVM_TYPE_STRING))) {
-            return null;
-        }
-        return config;
-    }
-
-    @Nullable
-    private Object getValue(String key) {
-        return getValue(key, null);
-    }
-
-    @Nullable
-    private Object getValue(String key, Object defaultValue) {
-        Object result;
-        if (mCarrierConfig != null) {
-            result = mCarrierConfig.get(key);
-            if (result != null) {
-                return result;
-            }
-        }
-        if (mTelephonyConfig != null) {
-            result = mTelephonyConfig.get(key);
-            if (result != null) {
-                return result;
-            }
-        }
-        return defaultValue;
-    }
-
-}
\ No newline at end of file
diff --git a/src/com/android/phone/vvm/omtp/SimChangeReceiver.java b/src/com/android/phone/vvm/omtp/SimChangeReceiver.java
deleted file mode 100644
index a506a12..0000000
--- a/src/com/android/phone/vvm/omtp/SimChangeReceiver.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.IPackageManager;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.os.UserManager;
-import android.telecom.PhoneAccountHandle;
-import android.telephony.CarrierConfigManager;
-import android.telephony.ServiceState;
-import android.telephony.SubscriptionManager;
-import android.telephony.TelephonyManager;
-import android.text.TextUtils;
-import com.android.internal.telephony.IccCardConstants;
-import com.android.internal.telephony.PhoneConstants;
-import com.android.internal.telephony.TelephonyIntents;
-import com.android.phone.settings.VisualVoicemailSettingsUtil;
-import com.android.phone.vvm.omtp.sync.OmtpVvmSourceManager;
-import com.android.phone.vvm.omtp.utils.PhoneAccountHandleConverter;
-
-/**
- * This class listens to the {@link CarrierConfigManager#ACTION_CARRIER_CONFIG_CHANGED} and {@link
- * TelephonyIntents#ACTION_SIM_STATE_CHANGED} to determine when a SIM is added, replaced, or
- * removed.
- *
- * When a SIM is added, send an activate SMS. When a SIM is removed, remove the sync accounts and
- * change the status in the voicemail_status table.
- */
-public class SimChangeReceiver extends BroadcastReceiver {
-
-    private static final String TAG = "VvmSimChangeReceiver";
-
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        final String action = intent.getAction();
-        if (action == null) {
-            VvmLog.w(TAG, "Null action for intent.");
-            return;
-        }
-
-        switch (action) {
-            case TelephonyIntents.ACTION_SIM_STATE_CHANGED:
-                if (IccCardConstants.INTENT_VALUE_ICC_ABSENT.equals(
-                        intent.getStringExtra(IccCardConstants.INTENT_KEY_ICC_STATE))) {
-                    VvmLog.i(TAG, "Sim removed, removing inactive accounts");
-                    OmtpVvmSourceManager.getInstance(context).removeInactiveSources();
-                }
-                break;
-            case CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED:
-                int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY,
-                        SubscriptionManager.INVALID_SUBSCRIPTION_ID);
-
-                if (!SubscriptionManager.isValidSubscriptionId(subId)) {
-                    VvmLog.i(TAG, "Received SIM change for invalid subscription id.");
-                    return;
-                }
-
-                TelephonyManager telephonyManager = context
-                        .getSystemService(TelephonyManager.class);
-                if(TextUtils.isEmpty(telephonyManager.getSimOperator())){
-                    VvmLog.e(TAG,
-                            "Empty MCCMNC, possible modem crash."
-                                    + " Ignoring carrier config changed event");
-                    return;
-                }
-
-                PhoneAccountHandle phoneAccountHandle = PhoneAccountHandleConverter
-                        .fromSubId(subId);
-                if("null".equals(phoneAccountHandle.getId())){
-                    VvmLog.e(TAG,
-                            "null phone account handle ID, possible modem crash."
-                                    + " Ignoring carrier config changed event");
-                    return;
-                }
-
-                VvmLog.d(TAG, "Carrier config changed");
-                if (UserManager.get(context).isUserUnlocked() && !isCryptKeeperMode()) {
-                    processSubId(context, subId);
-                } else {
-                    VvmLog.d(TAG, "User locked, activation request delayed until unlock");
-                    // After the device is unlocked, VvmBootCompletedReceiver will iterate through
-                    // all call capable subIds, nothing need to be done here.
-                }
-                break;
-        }
-    }
-
-    public static void processSubId(Context context, int subId) {
-        PhoneAccountHandle phoneAccount = PhoneAccountHandleConverter.fromSubId(subId);
-        if (phoneAccount == null) {
-            // This should never happen
-            VvmLog.e(TAG, "unable to convert subId " + subId + " to PhoneAccountHandle");
-            return;
-        }
-
-        OmtpVvmCarrierConfigHelper carrierConfigHelper =
-                new OmtpVvmCarrierConfigHelper(context, subId);
-        if (carrierConfigHelper.isValid()) {
-            if (VisualVoicemailSettingsUtil.isEnabled(context, phoneAccount)) {
-                VvmLog.i(TAG, "Sim state or carrier config changed for " + subId);
-                // Add a phone state listener so that changes to the communication channels
-                // can be recorded.
-                OmtpVvmSourceManager.getInstance(context).addPhoneStateListener(
-                        phoneAccount);
-                if (context.getSystemService(TelephonyManager.class)
-                        .getServiceStateForSubscriber(subId).getState()
-                        != ServiceState.STATE_IN_SERVICE) {
-                    VvmLog.i(TAG, "Cellular signal not available, not activating");
-                    return;
-                }
-                carrierConfigHelper.startActivation();
-            } else {
-                if (carrierConfigHelper.isLegacyModeEnabled()) {
-                    // SMS still need to be filtered under legacy mode.
-                    VvmLog.i(TAG, "activating SMS filter for legacy mode");
-                    carrierConfigHelper.activateSmsFilter();
-                }
-                // It may be that the source was not registered to begin with but we want
-                // to run through the steps to remove the source just in case.
-                OmtpVvmSourceManager.getInstance(context).removeSource(phoneAccount);
-                VvmLog.v(TAG, "Sim change for disabled account.");
-            }
-        } else {
-            String mccMnc = context.getSystemService(TelephonyManager.class).getSimOperator(subId);
-            VvmLog.d(TAG,
-                    "visual voicemail not supported for carrier " + mccMnc + " on subId " + subId);
-            OmtpVvmSourceManager.getInstance(context).removeSource(phoneAccount);
-        }
-    }
-
-    /**
-     * CryptKeeper mode is the pre-file based encryption locked state, when the user has selected
-     * "Require password to boot" and the device hasn't been unlocked yet during a reboot. {@link
-     * UserManager#isUserUnlocked()} will still return true in this mode, but storage in /data and
-     * all content providers will not be available(including SharedPreference).
-     */
-    private static boolean isCryptKeeperMode() {
-        try {
-            return IPackageManager.Stub.asInterface(ServiceManager.getService("package")).
-                    isOnlyCoreApps();
-        } catch (RemoteException e) {
-        }
-        return false;
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/vvm/omtp/TelephonyVvmConfigManager.java b/src/com/android/phone/vvm/omtp/TelephonyVvmConfigManager.java
deleted file mode 100644
index e91481e..0000000
--- a/src/com/android/phone/vvm/omtp/TelephonyVvmConfigManager.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp;
-
-import android.annotation.Nullable;
-import android.content.res.Resources;
-import android.os.PersistableBundle;
-import android.util.ArrayMap;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.phone.R;
-import com.android.phone.vvm.omtp.utils.XmlUtils;
-
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.Map.Entry;
-
-/**
- * Load and caches telephony vvm config from res/xml/vvm_config.xml
- */
-public class TelephonyVvmConfigManager {
-
-    private static final String TAG = "TelephonyVvmCfgMgr";
-
-    private static final boolean USE_DEBUG_CONFIG = false; //STOPSHIP if true
-
-    private static final String TAG_PERSISTABLEMAP = "pbundle_as_map";
-
-    static final String KEY_MCCMNC = "mccmnc";
-
-    private static Map<String, PersistableBundle> sCachedConfigs;
-
-    private final Map<String, PersistableBundle> mConfigs;
-
-    public TelephonyVvmConfigManager(Resources resources) {
-        if (sCachedConfigs == null) {
-            sCachedConfigs = loadConfigs(resources.getXml(R.xml.vvm_config));
-        }
-        mConfigs = sCachedConfigs;
-    }
-
-    @VisibleForTesting
-    TelephonyVvmConfigManager(XmlPullParser parser) {
-        mConfigs = loadConfigs(parser);
-    }
-
-    @Nullable
-    public PersistableBundle getConfig(String mccMnc) {
-        if (USE_DEBUG_CONFIG) {
-            return mConfigs.get("TEST");
-        }
-        return mConfigs.get(mccMnc);
-    }
-
-    private static Map<String, PersistableBundle> loadConfigs(XmlPullParser parser) {
-        Map<String, PersistableBundle> configs = new ArrayMap<>();
-        try {
-            ArrayList list = readBundleList(parser);
-            for (Object object : list) {
-                if (!(object instanceof PersistableBundle)) {
-                    throw new IllegalArgumentException("PersistableBundle expected, got " + object);
-                }
-                PersistableBundle bundle = (PersistableBundle) object;
-                String[] mccMncs = bundle.getStringArray(KEY_MCCMNC);
-                if (mccMncs == null) {
-                    throw new IllegalArgumentException("MCCMNC is null");
-                }
-                for (String mccMnc : mccMncs) {
-                    configs.put(mccMnc, bundle);
-                }
-            }
-        } catch (IOException | XmlPullParserException e) {
-            throw new RuntimeException(e);
-        }
-        return configs;
-    }
-
-    @Nullable
-    public static ArrayList readBundleList(XmlPullParser in) throws IOException,
-            XmlPullParserException {
-        final int outerDepth = in.getDepth();
-        int event;
-        while (((event = in.next()) != XmlPullParser.END_DOCUMENT) &&
-                (event != XmlPullParser.END_TAG || in.getDepth() < outerDepth)) {
-            if (event == XmlPullParser.START_TAG) {
-                final String startTag = in.getName();
-                final String[] tagName = new String[1];
-                in.next();
-                return XmlUtils.readThisListXml(in, startTag, tagName,
-                        new MyReadMapCallback(), false);
-            }
-        }
-        return null;
-    }
-
-    public static PersistableBundle restoreFromXml(XmlPullParser in) throws IOException,
-            XmlPullParserException {
-        final int outerDepth = in.getDepth();
-        final String startTag = in.getName();
-        final String[] tagName = new String[1];
-        int event;
-        while (((event = in.next()) != XmlPullParser.END_DOCUMENT) &&
-                (event != XmlPullParser.END_TAG || in.getDepth() < outerDepth)) {
-            if (event == XmlPullParser.START_TAG) {
-                ArrayMap<String, ?> map =
-                        XmlUtils.readThisArrayMapXml(in, startTag, tagName,
-                                new MyReadMapCallback());
-                PersistableBundle result = new PersistableBundle();
-                for (Entry<String, ?> entry : map.entrySet()) {
-                    Object value = entry.getValue();
-                    if (value instanceof Integer) {
-                        result.putInt(entry.getKey(), (int) value);
-                    } else if (value instanceof Boolean) {
-                        result.putBoolean(entry.getKey(), (boolean) value);
-                    } else if (value instanceof String) {
-                        result.putString(entry.getKey(), (String) value);
-                    } else if (value instanceof String[]) {
-                        result.putStringArray(entry.getKey(), (String[]) value);
-                    } else if (value instanceof PersistableBundle) {
-                        result.putPersistableBundle(entry.getKey(), (PersistableBundle) value);
-                    }
-                }
-                return result;
-            }
-        }
-        return PersistableBundle.EMPTY;
-    }
-
-    static class MyReadMapCallback implements XmlUtils.ReadMapCallback {
-
-        @Override
-        public Object readThisUnknownObjectXml(XmlPullParser in, String tag)
-                throws XmlPullParserException, IOException {
-            if (TAG_PERSISTABLEMAP.equals(tag)) {
-                return restoreFromXml(in);
-            }
-            throw new XmlPullParserException("Unknown tag=" + tag);
-        }
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/VvmBootCompletedReceiver.java b/src/com/android/phone/vvm/omtp/VvmBootCompletedReceiver.java
deleted file mode 100644
index 9809c64..0000000
--- a/src/com/android/phone/vvm/omtp/VvmBootCompletedReceiver.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.telecom.PhoneAccountHandle;
-import android.telecom.TelecomManager;
-import android.telephony.SubscriptionManager;
-import com.android.phone.vvm.omtp.utils.PhoneAccountHandleConverter;
-
-/**
- * Upon boot iterate through all callable phone account to activate visual voicemail. This happens
- * after the device has been unlocked. {@link android.telephony.CarrierConfigManager#
- * ACTION_CARRIER_CONFIG_CHANGED} can also trigger activation upon boot but it can happen before the
- * device is unlocked and visual voicemail will not be activated.
- *
- * <p>TODO: An additional duplicated activation request will be sent as a result of this receiver,
- * but similar issues is already covered in b/28730056 and a scheduling system should be used to
- * resolve this.
- */
-public class VvmBootCompletedReceiver extends BroadcastReceiver {
-
-    private static final String TAG = "VvmBootCompletedRcvr";
-
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        // Listens to android.intent.action.BOOT_COMPLETED
-        if (!intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {
-            return;
-        }
-
-        VvmLog.v(TAG, "processing subId list");
-        for (PhoneAccountHandle handle : TelecomManager.from(context)
-                .getCallCapablePhoneAccounts()) {
-            int subId = PhoneAccountHandleConverter.toSubId(handle);
-            if (!SubscriptionManager.isValidSubscriptionId(subId)) {
-                // getCallCapablePhoneAccounts() might return a PhoneAccountHandle with invalid
-                // subId if no SIM is inserted. This is intended as it is for emergency calls.
-                VvmLog.e(TAG, "phone account " + handle + " has invalid subId " + subId);
-                continue;
-            }
-            VvmLog.v(TAG, "processing subId " + subId);
-            SimChangeReceiver.processSubId(context, subId);
-        }
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/VvmPackageInstallReceiver.java b/src/com/android/phone/vvm/omtp/VvmPackageInstallReceiver.java
deleted file mode 100644
index 7c20065..0000000
--- a/src/com/android/phone/vvm/omtp/VvmPackageInstallReceiver.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.telecom.PhoneAccountHandle;
-
-import com.android.phone.PhoneUtils;
-import com.android.phone.settings.VisualVoicemailSettingsUtil;
-import com.android.phone.vvm.omtp.sync.OmtpVvmSourceManager;
-
-import java.util.Set;
-
-/**
- * When a new package is installed, check if it matches any of the vvm carrier apps of the currently
- * enabled dialer vvm sources.
- */
-public class VvmPackageInstallReceiver extends BroadcastReceiver {
-
-    private static final String TAG = "VvmPkgInstallReceiver";
-
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        if (intent.getData() == null) {
-            return;
-        }
-
-        String packageName = intent.getData().getSchemeSpecificPart();
-        if (packageName == null) {
-            return;
-        }
-
-        OmtpVvmSourceManager vvmSourceManager = OmtpVvmSourceManager.getInstance(context);
-        Set<PhoneAccountHandle> phoneAccounts = vvmSourceManager.getOmtpVvmSources();
-        for (PhoneAccountHandle phoneAccount : phoneAccounts) {
-            if (VisualVoicemailSettingsUtil.isEnabledUserSet(context, phoneAccount)) {
-                // Skip the check if this voicemail source's setting is overridden by the user.
-                continue;
-            }
-
-            OmtpVvmCarrierConfigHelper carrierConfigHelper = new OmtpVvmCarrierConfigHelper(
-                    context, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccount));
-            if (carrierConfigHelper.getCarrierVvmPackageNames() == null) {
-                continue;
-            }
-            if (carrierConfigHelper.getCarrierVvmPackageNames().contains(packageName)) {
-                // Force deactivate the client. The user can re-enable it in the settings.
-                // There are no need to update the settings for deactivation. At this point, if the
-                // default value is used it should be false because a carrier package is present.
-                VvmLog.i(TAG, "Carrier VVM package installed, disabling system VVM client");
-                OmtpVvmSourceManager.getInstance(context).removeSource(phoneAccount);
-                carrierConfigHelper.startDeactivation();
-            }
-        }
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/VvmPhoneStateListener.java b/src/com/android/phone/vvm/omtp/VvmPhoneStateListener.java
deleted file mode 100644
index 7e2472b..0000000
--- a/src/com/android/phone/vvm/omtp/VvmPhoneStateListener.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp;
-
-import android.content.Context;
-import android.telecom.PhoneAccountHandle;
-import android.telephony.PhoneStateListener;
-import android.telephony.ServiceState;
-import android.telephony.SubscriptionManager;
-
-import com.android.phone.PhoneUtils;
-import com.android.phone.VoicemailStatus;
-import com.android.phone.vvm.omtp.sync.OmtpVvmSourceManager;
-import com.android.phone.vvm.omtp.sync.OmtpVvmSyncService;
-import com.android.phone.vvm.omtp.sync.SyncTask;
-import com.android.phone.vvm.omtp.sync.VoicemailStatusQueryHelper;
-import com.android.phone.vvm.omtp.utils.PhoneAccountHandleConverter;
-
-/**
- * Check if service is lost and indicate this in the voicemail status.
- */
-public class VvmPhoneStateListener extends PhoneStateListener {
-
-    private static final String TAG = "VvmPhoneStateListener";
-
-    private PhoneAccountHandle mPhoneAccount;
-    private Context mContext;
-    private int mPreviousState = -1;
-
-    public VvmPhoneStateListener(Context context, PhoneAccountHandle accountHandle) {
-        super(PhoneUtils.getSubIdForPhoneAccountHandle(accountHandle));
-        mContext = context;
-        mPhoneAccount = accountHandle;
-    }
-
-    @Override
-    public void onServiceStateChanged(ServiceState serviceState) {
-        int subId = PhoneAccountHandleConverter.toSubId(mPhoneAccount);
-        if (!SubscriptionManager.isValidSubscriptionId(subId)) {
-            VvmLog.e(TAG, "onServiceStateChanged on phoneAccount " + mPhoneAccount
-                    + " with invalid subId, ignoring");
-            return;
-        }
-
-        int state = serviceState.getState();
-        if (state == mPreviousState || (state != ServiceState.STATE_IN_SERVICE
-                && mPreviousState != ServiceState.STATE_IN_SERVICE)) {
-            // Only interested in state changes or transitioning into or out of "in service".
-            // Otherwise just quit.
-            mPreviousState = state;
-            return;
-        }
-
-        OmtpVvmCarrierConfigHelper helper = new OmtpVvmCarrierConfigHelper(mContext, subId);
-
-        if (state == ServiceState.STATE_IN_SERVICE) {
-            VoicemailStatusQueryHelper voicemailStatusQueryHelper =
-                    new VoicemailStatusQueryHelper(mContext);
-            if (voicemailStatusQueryHelper.isVoicemailSourceConfigured(mPhoneAccount)) {
-                if (!voicemailStatusQueryHelper.isNotificationsChannelActive(mPhoneAccount)) {
-                    VvmLog
-                            .v(TAG, "Notifications channel is active for " + subId);
-                    helper.handleEvent(VoicemailStatus.edit(mContext, mPhoneAccount),
-                        OmtpEvents.NOTIFICATION_IN_SERVICE);
-                }
-            }
-
-            if (OmtpVvmSourceManager.getInstance(mContext).isVvmSourceRegistered(mPhoneAccount)) {
-                VvmLog
-                        .v(TAG, "Signal returned: requesting resync for " + subId);
-                // If the source is already registered, run a full sync in case something was missed
-                // while signal was down.
-                SyncTask.start(mContext, mPhoneAccount, OmtpVvmSyncService.SYNC_FULL_SYNC);
-            } else {
-                VvmLog.v(TAG,
-                        "Signal returned: reattempting activation for " + subId);
-                // Otherwise initiate an activation because this means that an OMTP source was
-                // recognized but either the activation text was not successfully sent or a response
-                // was not received.
-                helper.startActivation();
-            }
-        } else {
-            VvmLog.v(TAG, "Notifications channel is inactive for " + subId);
-
-            if (!OmtpVvmSourceManager.getInstance(mContext).isVvmSourceRegistered(mPhoneAccount)) {
-                return;
-            }
-            helper.handleEvent(VoicemailStatus.edit(mContext, mPhoneAccount),
-                OmtpEvents.NOTIFICATION_SERVICE_LOST);
-        }
-        mPreviousState = state;
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/fetch/FetchVoicemailReceiver.java b/src/com/android/phone/vvm/omtp/fetch/FetchVoicemailReceiver.java
deleted file mode 100644
index 9bda638..0000000
--- a/src/com/android/phone/vvm/omtp/fetch/FetchVoicemailReceiver.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp.fetch;
-
-import android.annotation.Nullable;
-import android.content.BroadcastReceiver;
-import android.content.ComponentName;
-import android.content.ContentResolver;
-import android.content.Context;
-import android.content.Intent;
-import android.database.Cursor;
-import android.net.ConnectivityManager;
-import android.net.Network;
-import android.net.NetworkRequest;
-import android.net.Uri;
-import android.provider.VoicemailContract;
-import android.provider.VoicemailContract.Voicemails;
-import android.telecom.PhoneAccountHandle;
-import android.telephony.TelephonyManager;
-import android.text.TextUtils;
-import com.android.internal.telephony.Phone;
-import com.android.phone.PhoneUtils;
-import com.android.phone.VoicemailStatus;
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-import com.android.phone.vvm.omtp.VvmLog;
-import com.android.phone.vvm.omtp.imap.ImapHelper;
-import com.android.phone.vvm.omtp.imap.ImapHelper.InitializingException;
-import com.android.phone.vvm.omtp.sync.OmtpVvmSourceManager;
-import com.android.phone.vvm.omtp.sync.VvmNetworkRequestCallback;
-import java.util.concurrent.Executor;
-import java.util.concurrent.Executors;
-
-public class FetchVoicemailReceiver extends BroadcastReceiver {
-
-    private static final String TAG = "FetchVoicemailReceiver";
-
-    final static String[] PROJECTION = new String[]{
-            Voicemails.SOURCE_DATA,      // 0
-            Voicemails.PHONE_ACCOUNT_ID, // 1
-            Voicemails.PHONE_ACCOUNT_COMPONENT_NAME, // 2
-    };
-
-    public static final int SOURCE_DATA = 0;
-    public static final int PHONE_ACCOUNT_ID = 1;
-    public static final int PHONE_ACCOUNT_COMPONENT_NAME = 2;
-
-    // Timeout used to call ConnectivityManager.requestNetwork
-    private static final int NETWORK_REQUEST_TIMEOUT_MILLIS = 60 * 1000;
-
-    // Number of retries
-    private static final int NETWORK_RETRY_COUNT = 3;
-
-    private ContentResolver mContentResolver;
-    private Uri mUri;
-    private NetworkRequest mNetworkRequest;
-    private VvmNetworkRequestCallback mNetworkCallback;
-    private Context mContext;
-    private String mUid;
-    private ConnectivityManager mConnectivityManager;
-    private PhoneAccountHandle mPhoneAccount;
-    private int mRetryCount = NETWORK_RETRY_COUNT;
-
-    @Override
-    public void onReceive(final Context context, Intent intent) {
-        if (VoicemailContract.ACTION_FETCH_VOICEMAIL.equals(intent.getAction())) {
-            VvmLog.i(TAG, "ACTION_FETCH_VOICEMAIL received");
-            mContext = context;
-            mContentResolver = context.getContentResolver();
-            mUri = intent.getData();
-
-            if (mUri == null) {
-                VvmLog.w(TAG,
-                        VoicemailContract.ACTION_FETCH_VOICEMAIL + " intent sent with no data");
-                return;
-            }
-
-            if (!context.getPackageName().equals(
-                    mUri.getQueryParameter(VoicemailContract.PARAM_KEY_SOURCE_PACKAGE))) {
-                // Ignore if the fetch request is for a voicemail not from this package.
-                VvmLog.e(TAG,
-                        "ACTION_FETCH_VOICEMAIL from foreign pacakge " + context.getPackageName());
-                return;
-            }
-
-            Cursor cursor = mContentResolver.query(mUri, PROJECTION, null, null, null);
-            if (cursor == null) {
-                VvmLog.i(TAG, "ACTION_FETCH_VOICEMAIL query returned null");
-                return;
-            }
-            try {
-                if (cursor.moveToFirst()) {
-                    mUid = cursor.getString(SOURCE_DATA);
-                    String accountId = cursor.getString(PHONE_ACCOUNT_ID);
-                    if (TextUtils.isEmpty(accountId)) {
-                        TelephonyManager telephonyManager = (TelephonyManager)
-                                context.getSystemService(Context.TELEPHONY_SERVICE);
-                        accountId = telephonyManager.getSimSerialNumber();
-
-                        if (TextUtils.isEmpty(accountId)) {
-                            VvmLog.e(TAG, "Account null and no default sim found.");
-                            return;
-                        }
-                    }
-
-                    mPhoneAccount = new PhoneAccountHandle(
-                            ComponentName.unflattenFromString(
-                                    cursor.getString(PHONE_ACCOUNT_COMPONENT_NAME)),
-                            cursor.getString(PHONE_ACCOUNT_ID));
-                    if (!OmtpVvmSourceManager.getInstance(context)
-                            .isVvmSourceRegistered(mPhoneAccount)) {
-                        mPhoneAccount = getAccountFromMarshmallowAccount(context, mPhoneAccount);
-                        if (mPhoneAccount == null) {
-                            VvmLog.w(TAG, "Account not registered - cannot retrieve message.");
-                            return;
-                        }
-                        VvmLog.i(TAG, "Fetching voicemail with Marshmallow PhoneAccountHandle");
-                    }
-
-                    int subId = PhoneUtils.getSubIdForPhoneAccountHandle(mPhoneAccount);
-                    OmtpVvmCarrierConfigHelper carrierConfigHelper =
-                            new OmtpVvmCarrierConfigHelper(context, subId);
-                    VvmLog.i(TAG, "Requesting network to fetch voicemail");
-                    mNetworkCallback = new fetchVoicemailNetworkRequestCallback(context,
-                            mPhoneAccount);
-                    mNetworkCallback.requestNetwork();
-                }
-            } finally {
-                cursor.close();
-            }
-        }
-    }
-
-    /**
-     * In ag/930496 the format of PhoneAccountHandle has changed between Marshmallow and Nougat.
-     * This method attempts to search the account from the old database in registered sources using
-     * the old format. There's a chance of M phone account collisions on multi-SIM devices, but
-     * visual voicemail is not supported on M multi-SIM.
-     */
-    @Nullable
-    private static PhoneAccountHandle getAccountFromMarshmallowAccount(Context context,
-            PhoneAccountHandle oldAccount) {
-        for (PhoneAccountHandle handle : OmtpVvmSourceManager.getInstance(context)
-                .getOmtpVvmSources()) {
-            Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(handle);
-            if (phone == null) {
-                continue;
-            }
-            // getIccSerialNumber() is used for ID before N, and getFullIccSerialNumber() after.
-            if (phone.getIccSerialNumber().equals(oldAccount.getId())) {
-                return handle;
-            }
-        }
-        return null;
-    }
-
-    private class fetchVoicemailNetworkRequestCallback extends VvmNetworkRequestCallback {
-
-        public fetchVoicemailNetworkRequestCallback(Context context,
-                PhoneAccountHandle phoneAccount) {
-            super(context, phoneAccount, VoicemailStatus.edit(context, phoneAccount));
-        }
-
-        @Override
-        public void onAvailable(final Network network) {
-            super.onAvailable(network);
-            fetchVoicemail(network, getVoicemailStatusEditor());
-        }
-    }
-
-    private void fetchVoicemail(final Network network, final VoicemailStatus.Editor status) {
-        Executor executor = Executors.newCachedThreadPool();
-        executor.execute(new Runnable() {
-            @Override
-            public void run() {
-                try {
-                    while (mRetryCount > 0) {
-                        VvmLog.i(TAG, "fetching voicemail, retry count=" + mRetryCount);
-                        try (ImapHelper imapHelper = new ImapHelper(mContext, mPhoneAccount,
-                            network, status)) {
-                            boolean success = imapHelper.fetchVoicemailPayload(
-                                    new VoicemailFetchedCallback(mContext, mUri, mPhoneAccount),
-                                    mUid);
-                            if (!success && mRetryCount > 0) {
-                                VvmLog.i(TAG, "fetch voicemail failed, retrying");
-                                mRetryCount--;
-                            } else {
-                                return;
-                            }
-                        } catch (InitializingException e) {
-                          VvmLog.w(TAG, "Can't retrieve Imap credentials ", e);
-                            return;
-                        }
-                    }
-                } finally {
-                    if (mNetworkCallback != null) {
-                        mNetworkCallback.releaseNetwork();
-                    }
-                }
-            }
-        });
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/fetch/VoicemailFetchedCallback.java b/src/com/android/phone/vvm/omtp/fetch/VoicemailFetchedCallback.java
deleted file mode 100644
index e70ba49..0000000
--- a/src/com/android/phone/vvm/omtp/fetch/VoicemailFetchedCallback.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp.fetch;
-
-import android.annotation.Nullable;
-import android.content.ContentResolver;
-import android.content.ContentValues;
-import android.content.Context;
-import android.net.Uri;
-import android.provider.VoicemailContract.Voicemails;
-import android.telecom.PhoneAccountHandle;
-import android.telecom.TelecomManager;
-import com.android.phone.R;
-import com.android.phone.vvm.omtp.VvmLog;
-import com.android.phone.vvm.omtp.imap.VoicemailPayload;
-import java.io.IOException;
-import java.io.OutputStream;
-import libcore.io.IoUtils;
-
-/**
- * Callback for when a voicemail payload is fetched. It copies the returned stream to the data
- * file corresponding to the voicemail.
- */
-public class VoicemailFetchedCallback {
-    private static final String TAG = "VoicemailFetchedCallback";
-
-    private final Context mContext;
-    private final ContentResolver mContentResolver;
-    private final Uri mUri;
-    private final PhoneAccountHandle mPhoneAccountHandle;
-
-    public VoicemailFetchedCallback(Context context, Uri uri,
-        PhoneAccountHandle phoneAccountHandle) {
-        mContext = context;
-        mContentResolver = context.getContentResolver();
-        mUri = uri;
-        mPhoneAccountHandle = phoneAccountHandle;
-    }
-
-    /**
-     * Saves the voicemail payload data into the voicemail provider then sets the "has_content" bit
-     * of the voicemail to "1".
-     *
-     * @param voicemailPayload The object containing the content data for the voicemail
-     */
-    public void setVoicemailContent(@Nullable VoicemailPayload voicemailPayload) {
-        if (voicemailPayload == null) {
-            VvmLog.i(TAG, "Payload not found, message has unsupported format");
-            ContentValues values = new ContentValues();
-            values.put(Voicemails.TRANSCRIPTION,
-                mContext.getString(R.string.vvm_unsupported_message_format,
-                    TelecomManager.from(mContext).getVoiceMailNumber(mPhoneAccountHandle)));
-            updateVoicemail(values);
-            return;
-        }
-
-        VvmLog.d(TAG, String.format("Writing new voicemail content: %s", mUri));
-        OutputStream outputStream = null;
-
-        try {
-            outputStream = mContentResolver.openOutputStream(mUri);
-            byte[] inputBytes = voicemailPayload.getBytes();
-            if (inputBytes != null) {
-                outputStream.write(inputBytes);
-            }
-        } catch (IOException e) {
-            VvmLog.w(TAG, String.format("File not found for %s", mUri));
-            return;
-        } finally {
-            IoUtils.closeQuietly(outputStream);
-        }
-
-        // Update mime_type & has_content after we are done with file update.
-        ContentValues values = new ContentValues();
-        values.put(Voicemails.MIME_TYPE, voicemailPayload.getMimeType());
-        values.put(Voicemails.HAS_CONTENT, true);
-        updateVoicemail(values);
-    }
-
-    private void updateVoicemail(ContentValues values) {
-        int updatedCount = mContentResolver.update(mUri, values, null, null);
-        if (updatedCount != 1) {
-            VvmLog
-                .e(TAG, "Updating voicemail should have updated 1 row, was: " + updatedCount);
-        }
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/imap/ImapHelper.java b/src/com/android/phone/vvm/omtp/imap/ImapHelper.java
deleted file mode 100644
index a03e421..0000000
--- a/src/com/android/phone/vvm/omtp/imap/ImapHelper.java
+++ /dev/null
@@ -1,705 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp.imap;
-
-import android.content.Context;
-import android.net.ConnectivityManager;
-import android.net.Network;
-import android.net.NetworkInfo;
-import android.provider.VoicemailContract;
-import android.telecom.PhoneAccountHandle;
-import android.telecom.Voicemail;
-import android.util.Base64;
-import com.android.phone.PhoneUtils;
-import com.android.phone.VoicemailStatus;
-import com.android.phone.common.mail.Address;
-import com.android.phone.common.mail.Body;
-import com.android.phone.common.mail.BodyPart;
-import com.android.phone.common.mail.FetchProfile;
-import com.android.phone.common.mail.Flag;
-import com.android.phone.common.mail.Message;
-import com.android.phone.common.mail.MessagingException;
-import com.android.phone.common.mail.Multipart;
-import com.android.phone.common.mail.TempDirectory;
-import com.android.phone.common.mail.internet.MimeMessage;
-import com.android.phone.common.mail.store.ImapConnection;
-import com.android.phone.common.mail.store.ImapFolder;
-import com.android.phone.common.mail.store.ImapStore;
-import com.android.phone.common.mail.store.imap.ImapConstants;
-import com.android.phone.common.mail.store.imap.ImapResponse;
-import com.android.phone.common.mail.utils.LogUtils;
-import com.android.phone.vvm.omtp.OmtpConstants;
-import com.android.phone.vvm.omtp.OmtpConstants.ChangePinResult;
-import com.android.phone.vvm.omtp.OmtpEvents;
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-import com.android.phone.vvm.omtp.VisualVoicemailPreferences;
-import com.android.phone.vvm.omtp.VvmLog;
-import com.android.phone.vvm.omtp.fetch.VoicemailFetchedCallback;
-import com.android.phone.vvm.omtp.sync.OmtpVvmSyncService.TranscriptionFetchedCallback;
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.Closeable;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Locale;
-import libcore.io.IoUtils;
-
-/**
- * A helper interface to abstract commands sent across IMAP interface for a given account.
- */
-public class ImapHelper implements Closeable {
-
-    private static final String TAG = "ImapHelper";
-
-    private ImapFolder mFolder;
-    private ImapStore mImapStore;
-
-    private final Context mContext;
-    private final PhoneAccountHandle mPhoneAccount;
-    private final Network mNetwork;
-    private final VoicemailStatus.Editor mStatus;
-
-    VisualVoicemailPreferences mPrefs;
-    private static final String PREF_KEY_QUOTA_OCCUPIED = "quota_occupied_";
-    private static final String PREF_KEY_QUOTA_TOTAL = "quota_total_";
-
-    private int mQuotaOccupied;
-    private int mQuotaTotal;
-
-    private final OmtpVvmCarrierConfigHelper mConfig;
-
-    public class InitializingException extends Exception {
-
-        public InitializingException(String message) {
-            super(message);
-        }
-    }
-
-    public ImapHelper(Context context, PhoneAccountHandle phoneAccount, Network network,
-        VoicemailStatus.Editor status)
-        throws InitializingException {
-        this(context, new OmtpVvmCarrierConfigHelper(context,
-            PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccount)), phoneAccount, network, status);
-    }
-
-    public ImapHelper(Context context, OmtpVvmCarrierConfigHelper config,
-        PhoneAccountHandle phoneAccount, Network network, VoicemailStatus.Editor status)
-        throws InitializingException {
-        mContext = context;
-        mPhoneAccount = phoneAccount;
-        mNetwork = network;
-        mStatus = status;
-        mConfig = config;
-        mPrefs = new VisualVoicemailPreferences(context,
-                phoneAccount);
-
-        try {
-            TempDirectory.setTempDirectory(context);
-
-            String username = mPrefs.getString(OmtpConstants.IMAP_USER_NAME, null);
-            String password = mPrefs.getString(OmtpConstants.IMAP_PASSWORD, null);
-            String serverName = mPrefs.getString(OmtpConstants.SERVER_ADDRESS, null);
-            int port = Integer.parseInt(
-                    mPrefs.getString(OmtpConstants.IMAP_PORT, null));
-            int auth = ImapStore.FLAG_NONE;
-
-            int sslPort = mConfig.getSslPort();
-            if (sslPort != 0) {
-                port = sslPort;
-                auth = ImapStore.FLAG_SSL;
-            }
-
-            mImapStore = new ImapStore(
-                    context, this, username, password, port, serverName, auth, network);
-        } catch (NumberFormatException e) {
-            handleEvent(OmtpEvents.DATA_INVALID_PORT);
-            LogUtils.w(TAG, "Could not parse port number");
-            throw new InitializingException("cannot initialize ImapHelper:" + e.toString());
-        }
-
-        mQuotaOccupied = mPrefs
-                .getInt(PREF_KEY_QUOTA_OCCUPIED, VoicemailContract.Status.QUOTA_UNAVAILABLE);
-        mQuotaTotal = mPrefs
-                .getInt(PREF_KEY_QUOTA_TOTAL, VoicemailContract.Status.QUOTA_UNAVAILABLE);
-    }
-
-    @Override
-    public void close() {
-        mImapStore.closeConnection();
-    }
-
-    public boolean isRoaming() {
-        ConnectivityManager connectivityManager = (ConnectivityManager) mContext.getSystemService(
-                Context.CONNECTIVITY_SERVICE);
-        NetworkInfo info = connectivityManager.getNetworkInfo(mNetwork);
-        if (info == null) {
-            return false;
-        }
-        return info.isRoaming();
-    }
-
-    public OmtpVvmCarrierConfigHelper getConfig() {
-        return mConfig;
-    }
-
-    public ImapConnection connect() {
-        return mImapStore.getConnection();
-    }
-
-    /**
-     * The caller thread will block until the method returns.
-     */
-    public boolean markMessagesAsRead(List<Voicemail> voicemails) {
-        return setFlags(voicemails, Flag.SEEN);
-    }
-
-    /**
-     * The caller thread will block until the method returns.
-     */
-    public boolean markMessagesAsDeleted(List<Voicemail> voicemails) {
-        return setFlags(voicemails, Flag.DELETED);
-    }
-
-    public void handleEvent(OmtpEvents event) {
-        mConfig.handleEvent(mStatus, event);
-    }
-
-    /**
-     * Set flags on the server for a given set of voicemails.
-     *
-     * @param voicemails The voicemails to set flags for.
-     * @param flags The flags to set on the voicemails.
-     * @return {@code true} if the operation completes successfully, {@code false} otherwise.
-     */
-    private boolean setFlags(List<Voicemail> voicemails, String... flags) {
-        if (voicemails.size() == 0) {
-            return false;
-        }
-        try {
-            mFolder = openImapFolder(ImapFolder.MODE_READ_WRITE);
-            if (mFolder != null) {
-                mFolder.setFlags(convertToImapMessages(voicemails), flags, true);
-                return true;
-            }
-            return false;
-        } catch (MessagingException e) {
-            LogUtils.e(TAG, e, "Messaging exception");
-            return false;
-        } finally {
-            closeImapFolder();
-        }
-    }
-
-    /**
-     * Fetch a list of voicemails from the server.
-     *
-     * @return A list of voicemail objects containing data about voicemails stored on the server.
-     */
-    public List<Voicemail> fetchAllVoicemails() {
-        List<Voicemail> result = new ArrayList<Voicemail>();
-        Message[] messages;
-        try {
-            mFolder = openImapFolder(ImapFolder.MODE_READ_WRITE);
-            if (mFolder == null) {
-                // This means we were unable to successfully open the folder.
-                return null;
-            }
-
-            // This method retrieves lightweight messages containing only the uid of the message.
-            messages = mFolder.getMessages(null);
-
-            for (Message message : messages) {
-                // Get the voicemail details (message structure).
-                MessageStructureWrapper messageStructureWrapper = fetchMessageStructure(message);
-                if (messageStructureWrapper != null) {
-                    result.add(getVoicemailFromMessageStructure(messageStructureWrapper));
-                }
-            }
-            return result;
-        } catch (MessagingException e) {
-            LogUtils.e(TAG, e, "Messaging Exception");
-            return null;
-        } finally {
-            closeImapFolder();
-        }
-    }
-
-    /**
-     * Extract voicemail details from the message structure. Also fetch transcription if a
-     * transcription exists.
-     */
-    private Voicemail getVoicemailFromMessageStructure(
-            MessageStructureWrapper messageStructureWrapper) throws MessagingException {
-        Message messageDetails = messageStructureWrapper.messageStructure;
-
-        TranscriptionFetchedListener listener = new TranscriptionFetchedListener();
-        if (messageStructureWrapper.transcriptionBodyPart != null) {
-            FetchProfile fetchProfile = new FetchProfile();
-            fetchProfile.add(messageStructureWrapper.transcriptionBodyPart);
-
-            mFolder.fetch(new Message[]{messageDetails}, fetchProfile, listener);
-        }
-
-        // Found an audio attachment, this is a valid voicemail.
-        long time = messageDetails.getSentDate().getTime();
-        String number = getNumber(messageDetails.getFrom());
-        boolean isRead = Arrays.asList(messageDetails.getFlags()).contains(Flag.SEEN);
-        return Voicemail.createForInsertion(time, number)
-                .setPhoneAccount(mPhoneAccount)
-                .setSourcePackage(mContext.getPackageName())
-                .setSourceData(messageDetails.getUid())
-                .setIsRead(isRead)
-                .setTranscription(listener.getVoicemailTranscription())
-                .build();
-    }
-
-    /**
-     * The "from" field of a visual voicemail IMAP message is the number of the caller who left the
-     * message. Extract this number from the list of "from" addresses.
-     *
-     * @param fromAddresses A list of addresses that comprise the "from" line.
-     * @return The number of the voicemail sender.
-     */
-    private String getNumber(Address[] fromAddresses) {
-        if (fromAddresses != null && fromAddresses.length > 0) {
-            if (fromAddresses.length != 1) {
-                LogUtils.w(TAG, "More than one from addresses found. Using the first one.");
-            }
-            String sender = fromAddresses[0].getAddress();
-            int atPos = sender.indexOf('@');
-            if (atPos != -1) {
-                // Strip domain part of the address.
-                sender = sender.substring(0, atPos);
-            }
-            return sender;
-        }
-        return null;
-    }
-
-    /**
-     * Fetches the structure of the given message and returns a wrapper containing the message
-     * structure and the transcription structure (if applicable).
-     *
-     * @throws MessagingException if fetching the structure of the message fails
-     */
-    private MessageStructureWrapper fetchMessageStructure(Message message)
-            throws MessagingException {
-        LogUtils.d(TAG, "Fetching message structure for " + message.getUid());
-
-        MessageStructureFetchedListener listener = new MessageStructureFetchedListener();
-
-        FetchProfile fetchProfile = new FetchProfile();
-        fetchProfile.addAll(Arrays.asList(FetchProfile.Item.FLAGS, FetchProfile.Item.ENVELOPE,
-                FetchProfile.Item.STRUCTURE));
-
-        // The IMAP folder fetch method will call "messageRetrieved" on the listener when the
-        // message is successfully retrieved.
-        mFolder.fetch(new Message[]{message}, fetchProfile, listener);
-        return listener.getMessageStructure();
-    }
-
-    public boolean fetchVoicemailPayload(VoicemailFetchedCallback callback, final String uid) {
-        try {
-            mFolder = openImapFolder(ImapFolder.MODE_READ_WRITE);
-            if (mFolder == null) {
-                // This means we were unable to successfully open the folder.
-                return false;
-            }
-            Message message = mFolder.getMessage(uid);
-            if (message == null) {
-                return false;
-            }
-            VoicemailPayload voicemailPayload = fetchVoicemailPayload(message);
-            callback.setVoicemailContent(voicemailPayload);
-            return true;
-        } catch (MessagingException e) {
-        } finally {
-            closeImapFolder();
-        }
-        return false;
-    }
-
-    /**
-     * Fetches the body of the given message and returns the parsed voicemail payload.
-     *
-     * @throws MessagingException if fetching the body of the message fails
-     */
-    private VoicemailPayload fetchVoicemailPayload(Message message)
-            throws MessagingException {
-        LogUtils.d(TAG, "Fetching message body for " + message.getUid());
-
-        MessageBodyFetchedListener listener = new MessageBodyFetchedListener();
-
-        FetchProfile fetchProfile = new FetchProfile();
-        fetchProfile.add(FetchProfile.Item.BODY);
-
-        mFolder.fetch(new Message[]{message}, fetchProfile, listener);
-        return listener.getVoicemailPayload();
-    }
-
-    public boolean fetchTranscription(TranscriptionFetchedCallback callback, String uid) {
-        try {
-            mFolder = openImapFolder(ImapFolder.MODE_READ_WRITE);
-            if (mFolder == null) {
-                // This means we were unable to successfully open the folder.
-                return false;
-            }
-
-            Message message = mFolder.getMessage(uid);
-            if (message == null) {
-                return false;
-            }
-
-            MessageStructureWrapper messageStructureWrapper = fetchMessageStructure(message);
-            if (messageStructureWrapper != null) {
-                TranscriptionFetchedListener listener = new TranscriptionFetchedListener();
-                if (messageStructureWrapper.transcriptionBodyPart != null) {
-                    FetchProfile fetchProfile = new FetchProfile();
-                    fetchProfile.add(messageStructureWrapper.transcriptionBodyPart);
-
-                    // This method is called synchronously so the transcription will be populated
-                    // in the listener once the next method is called.
-                    mFolder.fetch(new Message[]{message}, fetchProfile, listener);
-                    callback.setVoicemailTranscription(listener.getVoicemailTranscription());
-                }
-            }
-            return true;
-        } catch (MessagingException e) {
-            LogUtils.e(TAG, e, "Messaging Exception");
-            return false;
-        } finally {
-            closeImapFolder();
-        }
-    }
-
-
-    @ChangePinResult
-    public int changePin(String oldPin, String newPin)
-            throws MessagingException {
-        ImapConnection connection = mImapStore.getConnection();
-        try {
-            String command = getConfig().getProtocol()
-                    .getCommand(OmtpConstants.IMAP_CHANGE_TUI_PWD_FORMAT);
-            connection.sendCommand(
-                    String.format(Locale.US, command, newPin, oldPin), true);
-            return getChangePinResultFromImapResponse(connection.readResponse());
-        } catch (IOException ioe) {
-            VvmLog.e(TAG, "changePin: ", ioe);
-            return OmtpConstants.CHANGE_PIN_SYSTEM_ERROR;
-        } finally {
-            connection.destroyResponses();
-        }
-    }
-
-    public void changeVoicemailTuiLanguage(String languageCode)
-            throws MessagingException {
-        ImapConnection connection = mImapStore.getConnection();
-        try {
-            String command = getConfig().getProtocol()
-                    .getCommand(OmtpConstants.IMAP_CHANGE_VM_LANG_FORMAT);
-            connection.sendCommand(
-                    String.format(Locale.US, command, languageCode), true);
-        } catch (IOException ioe) {
-            LogUtils.e(TAG, ioe.toString());
-        } finally {
-            connection.destroyResponses();
-        }
-    }
-
-    public void closeNewUserTutorial() throws MessagingException {
-        ImapConnection connection = mImapStore.getConnection();
-        try {
-            String command = getConfig().getProtocol()
-                    .getCommand(OmtpConstants.IMAP_CLOSE_NUT);
-            connection.executeSimpleCommand(command, false);
-        } catch (IOException ioe) {
-            throw new MessagingException(MessagingException.SERVER_ERROR, ioe.toString());
-        } finally {
-            connection.destroyResponses();
-        }
-    }
-
-    @ChangePinResult
-    private static int getChangePinResultFromImapResponse(ImapResponse response)
-            throws MessagingException {
-        if (!response.isTagged()) {
-            throw new MessagingException(MessagingException.SERVER_ERROR,
-                    "tagged response expected");
-        }
-        if (!response.isOk()) {
-            String message = response.getStringOrEmpty(1).getString();
-            LogUtils.d(TAG, "change PIN failed: " + message);
-            if (OmtpConstants.RESPONSE_CHANGE_PIN_TOO_SHORT.equals(message)) {
-                return OmtpConstants.CHANGE_PIN_TOO_SHORT;
-            }
-            if (OmtpConstants.RESPONSE_CHANGE_PIN_TOO_LONG.equals(message)) {
-                return OmtpConstants.CHANGE_PIN_TOO_LONG;
-            }
-            if (OmtpConstants.RESPONSE_CHANGE_PIN_TOO_WEAK.equals(message)) {
-                return OmtpConstants.CHANGE_PIN_TOO_WEAK;
-            }
-            if (OmtpConstants.RESPONSE_CHANGE_PIN_MISMATCH.equals(message)) {
-                return OmtpConstants.CHANGE_PIN_MISMATCH;
-            }
-            if (OmtpConstants.RESPONSE_CHANGE_PIN_INVALID_CHARACTER.equals(message)) {
-                return OmtpConstants.CHANGE_PIN_INVALID_CHARACTER;
-            }
-            return OmtpConstants.CHANGE_PIN_SYSTEM_ERROR;
-        }
-        LogUtils.d(TAG, "change PIN succeeded");
-        return OmtpConstants.CHANGE_PIN_SUCCESS;
-    }
-
-    public void updateQuota() {
-        try {
-            mFolder = openImapFolder(ImapFolder.MODE_READ_WRITE);
-            if (mFolder == null) {
-                // This means we were unable to successfully open the folder.
-                return;
-            }
-            updateQuota(mFolder);
-        } catch (MessagingException e) {
-            LogUtils.e(TAG, e, "Messaging Exception");
-        } finally {
-            closeImapFolder();
-        }
-    }
-
-    private void updateQuota(ImapFolder folder) throws MessagingException {
-        setQuota(folder.getQuota());
-    }
-
-    private void setQuota(ImapFolder.Quota quota) {
-        if (quota == null) {
-            return;
-        }
-        if (quota.occupied == mQuotaOccupied && quota.total == mQuotaTotal) {
-            VvmLog.v(TAG, "Quota hasn't changed");
-            return;
-        }
-        mQuotaOccupied = quota.occupied;
-        mQuotaTotal = quota.total;
-        VoicemailStatus.edit(mContext, mPhoneAccount)
-                .setQuota(mQuotaOccupied, mQuotaTotal)
-                .apply();
-        mPrefs.edit()
-                .putInt(PREF_KEY_QUOTA_OCCUPIED, mQuotaOccupied)
-                .putInt(PREF_KEY_QUOTA_TOTAL, mQuotaTotal)
-                .apply();
-        VvmLog.v(TAG, "Quota changed to " + mQuotaOccupied + "/" + mQuotaTotal);
-    }
-
-    /**
-     * A wrapper to hold a message with its header details and the structure for transcriptions (so
-     * they can be fetched in the future).
-     */
-    public class MessageStructureWrapper {
-
-        public Message messageStructure;
-        public BodyPart transcriptionBodyPart;
-
-        public MessageStructureWrapper() {
-        }
-    }
-
-    /**
-     * Listener for the message structure being fetched.
-     */
-    private final class MessageStructureFetchedListener
-            implements ImapFolder.MessageRetrievalListener {
-
-        private MessageStructureWrapper mMessageStructure;
-
-        public MessageStructureFetchedListener() {
-        }
-
-        public MessageStructureWrapper getMessageStructure() {
-            return mMessageStructure;
-        }
-
-        @Override
-        public void messageRetrieved(Message message) {
-            LogUtils.d(TAG, "Fetched message structure for " + message.getUid());
-            LogUtils.d(TAG, "Message retrieved: " + message);
-            try {
-                mMessageStructure = getMessageOrNull(message);
-                if (mMessageStructure == null) {
-                    LogUtils.d(TAG, "This voicemail does not have an attachment...");
-                    return;
-                }
-            } catch (MessagingException e) {
-                LogUtils.e(TAG, e, "Messaging Exception");
-                closeImapFolder();
-            }
-        }
-
-        /**
-         * Check if this IMAP message is a valid voicemail and whether it contains a transcription.
-         *
-         * @param message The IMAP message.
-         * @return The MessageStructureWrapper object corresponding to an IMAP message and
-         * transcription.
-         */
-        private MessageStructureWrapper getMessageOrNull(Message message)
-                throws MessagingException {
-            if (!message.getMimeType().startsWith("multipart/")) {
-                LogUtils.w(TAG, "Ignored non multi-part message");
-                return null;
-            }
-
-            MessageStructureWrapper messageStructureWrapper = new MessageStructureWrapper();
-
-            Multipart multipart = (Multipart) message.getBody();
-            for (int i = 0; i < multipart.getCount(); ++i) {
-                BodyPart bodyPart = multipart.getBodyPart(i);
-                String bodyPartMimeType = bodyPart.getMimeType().toLowerCase();
-                LogUtils.d(TAG, "bodyPart mime type: " + bodyPartMimeType);
-
-                if (bodyPartMimeType.startsWith("audio/")) {
-                    messageStructureWrapper.messageStructure = message;
-                } else if (bodyPartMimeType.startsWith("text/")) {
-                    messageStructureWrapper.transcriptionBodyPart = bodyPart;
-                } else {
-                    VvmLog.v(TAG, "Unknown bodyPart MIME: " + bodyPartMimeType);
-                }
-            }
-
-            if (messageStructureWrapper.messageStructure != null) {
-                return messageStructureWrapper;
-            }
-
-            // No attachment found, this is not a voicemail.
-            return null;
-        }
-    }
-
-    /**
-     * Listener for the message body being fetched.
-     */
-    private final class MessageBodyFetchedListener implements ImapFolder.MessageRetrievalListener {
-
-        private VoicemailPayload mVoicemailPayload;
-
-        /**
-         * Returns the fetch voicemail payload.
-         */
-        public VoicemailPayload getVoicemailPayload() {
-            return mVoicemailPayload;
-        }
-
-        @Override
-        public void messageRetrieved(Message message) {
-            LogUtils.d(TAG, "Fetched message body for " + message.getUid());
-            LogUtils.d(TAG, "Message retrieved: " + message);
-            try {
-                mVoicemailPayload = getVoicemailPayloadFromMessage(message);
-            } catch (MessagingException e) {
-                LogUtils.e(TAG, "Messaging Exception:", e);
-            } catch (IOException e) {
-                LogUtils.e(TAG, "IO Exception:", e);
-            }
-        }
-
-        private VoicemailPayload getVoicemailPayloadFromMessage(Message message)
-                throws MessagingException, IOException {
-            Multipart multipart = (Multipart) message.getBody();
-            List<String> mimeTypes = new ArrayList<>();
-            for (int i = 0; i < multipart.getCount(); ++i) {
-                BodyPart bodyPart = multipart.getBodyPart(i);
-                String bodyPartMimeType = bodyPart.getMimeType().toLowerCase();
-                mimeTypes.add(bodyPartMimeType);
-                if (bodyPartMimeType.startsWith("audio/")) {
-                    byte[] bytes = getDataFromBody(bodyPart.getBody());
-                    LogUtils.d(TAG, String.format("Fetched %s bytes of data", bytes.length));
-                    return new VoicemailPayload(bodyPartMimeType, bytes);
-                }
-            }
-            LogUtils.e(TAG, "No audio attachment found on this voicemail, mimeTypes:" + mimeTypes);
-            return null;
-        }
-    }
-
-    /**
-     * Listener for the transcription being fetched.
-     */
-    private final class TranscriptionFetchedListener implements
-            ImapFolder.MessageRetrievalListener {
-
-        private String mVoicemailTranscription;
-
-        /**
-         * Returns the fetched voicemail transcription.
-         */
-        public String getVoicemailTranscription() {
-            return mVoicemailTranscription;
-        }
-
-        @Override
-        public void messageRetrieved(Message message) {
-            LogUtils.d(TAG, "Fetched transcription for " + message.getUid());
-            try {
-                mVoicemailTranscription = new String(getDataFromBody(message.getBody()));
-            } catch (MessagingException e) {
-                LogUtils.e(TAG, "Messaging Exception:", e);
-            } catch (IOException e) {
-                LogUtils.e(TAG, "IO Exception:", e);
-            }
-        }
-    }
-
-    private ImapFolder openImapFolder(String modeReadWrite) {
-        try {
-            if (mImapStore == null) {
-                return null;
-            }
-            ImapFolder folder = new ImapFolder(mImapStore, ImapConstants.INBOX);
-            folder.open(modeReadWrite);
-            return folder;
-        } catch (MessagingException e) {
-            LogUtils.e(TAG, e, "Messaging Exception");
-        }
-        return null;
-    }
-
-    private Message[] convertToImapMessages(List<Voicemail> voicemails) {
-        Message[] messages = new Message[voicemails.size()];
-        for (int i = 0; i < voicemails.size(); ++i) {
-            messages[i] = new MimeMessage();
-            messages[i].setUid(voicemails.get(i).getSourceData());
-        }
-        return messages;
-    }
-
-    private void closeImapFolder() {
-        if (mFolder != null) {
-            mFolder.close(true);
-        }
-    }
-
-    private byte[] getDataFromBody(Body body) throws IOException, MessagingException {
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
-        BufferedOutputStream bufferedOut = new BufferedOutputStream(out);
-        try {
-            body.writeTo(bufferedOut);
-            return Base64.decode(out.toByteArray(), Base64.DEFAULT);
-        } finally {
-            IoUtils.closeQuietly(bufferedOut);
-            IoUtils.closeQuietly(out);
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/vvm/omtp/imap/VoicemailPayload.java b/src/com/android/phone/vvm/omtp/imap/VoicemailPayload.java
deleted file mode 100644
index 0ffa018..0000000
--- a/src/com/android/phone/vvm/omtp/imap/VoicemailPayload.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp.imap;
-
-/**
- * The payload for a voicemail, usually audio data.
- */
-public class VoicemailPayload {
-    private final String mMimeType;
-    private final byte[] mBytes;
-
-    public VoicemailPayload(String mimeType, byte[] bytes) {
-        mMimeType = mimeType;
-        mBytes = bytes;
-    }
-
-    public byte[] getBytes() {
-        return mBytes;
-    }
-
-    public String getMimeType() {
-        return mMimeType;
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/vvm/omtp/protocol/CvvmProtocol.java b/src/com/android/phone/vvm/omtp/protocol/CvvmProtocol.java
deleted file mode 100644
index 9960b18..0000000
--- a/src/com/android/phone/vvm/omtp/protocol/CvvmProtocol.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.protocol;
-
-import android.telephony.SmsManager;
-
-import com.android.phone.vvm.omtp.OmtpConstants;
-import com.android.phone.vvm.omtp.sms.OmtpCvvmMessageSender;
-import com.android.phone.vvm.omtp.sms.OmtpMessageSender;
-
-/**
- * A flavor of OMTP protocol with a different mobile originated (MO) format
- *
- * Used by carriers such as T-Mobile
- */
-public class CvvmProtocol extends VisualVoicemailProtocol {
-
-    private static String IMAP_CHANGE_TUI_PWD_FORMAT = "CHANGE_TUI_PWD PWD=%1$s OLD_PWD=%2$s";
-    private static String IMAP_CHANGE_VM_LANG_FORMAT = "CHANGE_VM_LANG Lang=%1$s";
-    private static String IMAP_CLOSE_NUT = "CLOSE_NUT";
-
-    @Override
-    public OmtpMessageSender createMessageSender(SmsManager smsManager, short applicationPort,
-            String destinationNumber) {
-        return new OmtpCvvmMessageSender(smsManager, applicationPort, destinationNumber);
-    }
-
-    @Override
-    public String getCommand(String command) {
-        if (command == OmtpConstants.IMAP_CHANGE_TUI_PWD_FORMAT) {
-            return IMAP_CHANGE_TUI_PWD_FORMAT;
-        }
-        if (command == OmtpConstants.IMAP_CLOSE_NUT) {
-            return IMAP_CLOSE_NUT;
-        }
-        if (command == OmtpConstants.IMAP_CHANGE_VM_LANG_FORMAT) {
-            return IMAP_CHANGE_VM_LANG_FORMAT;
-        }
-        return super.getCommand(command);
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/protocol/OmtpProtocol.java b/src/com/android/phone/vvm/omtp/protocol/OmtpProtocol.java
deleted file mode 100644
index 7ec3dba..0000000
--- a/src/com/android/phone/vvm/omtp/protocol/OmtpProtocol.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.protocol;
-
-import android.telephony.SmsManager;
-
-import com.android.phone.vvm.omtp.OmtpConstants;
-import com.android.phone.vvm.omtp.sms.OmtpMessageSender;
-import com.android.phone.vvm.omtp.sms.OmtpStandardMessageSender;
-
-public class OmtpProtocol extends VisualVoicemailProtocol {
-
-    @Override
-    public OmtpMessageSender createMessageSender(SmsManager smsManager, short applicationPort,
-            String destinationNumber) {
-        return new OmtpStandardMessageSender(smsManager, applicationPort, destinationNumber,
-                OmtpConstants.CLIENT_TYPE_GOOGLE_10, OmtpConstants.PROTOCOL_VERSION1_1,
-                null /*clientPrefix*/);
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/protocol/ProtocolHelper.java b/src/com/android/phone/vvm/omtp/protocol/ProtocolHelper.java
deleted file mode 100644
index 748fd39..0000000
--- a/src/com/android/phone/vvm/omtp/protocol/ProtocolHelper.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.protocol;
-
-import android.telephony.SmsManager;
-import android.text.TextUtils;
-
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-import com.android.phone.vvm.omtp.VvmLog;
-import com.android.phone.vvm.omtp.sms.OmtpMessageSender;
-
-public class ProtocolHelper {
-
-    private static final String TAG = "ProtocolHelper";
-
-    public static OmtpMessageSender getMessageSender(VisualVoicemailProtocol protocol,
-            OmtpVvmCarrierConfigHelper config) {
-
-        int applicationPort = config.getApplicationPort();
-        String destinationNumber = config.getDestinationNumber();
-        if (TextUtils.isEmpty(destinationNumber)) {
-            VvmLog.w(TAG, "No destination number for this carrier.");
-            return null;
-        }
-
-        SmsManager smsManager = SmsManager.getSmsManagerForSubscriptionId(config.getSubId());
-        return protocol.createMessageSender(smsManager, (short) applicationPort, destinationNumber);
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/protocol/VisualVoicemailProtocol.java b/src/com/android/phone/vvm/omtp/protocol/VisualVoicemailProtocol.java
deleted file mode 100644
index 6e6d6ef..0000000
--- a/src/com/android/phone/vvm/omtp/protocol/VisualVoicemailProtocol.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.protocol;
-
-import android.annotation.Nullable;
-import android.app.PendingIntent;
-import android.content.Context;
-import android.os.Bundle;
-import android.telecom.PhoneAccountHandle;
-import android.telephony.SmsManager;
-import com.android.phone.VoicemailStatus;
-import com.android.phone.vvm.omtp.ActivationTask;
-import com.android.phone.vvm.omtp.DefaultOmtpEventHandler;
-import com.android.phone.vvm.omtp.OmtpEvents;
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-import com.android.phone.vvm.omtp.sms.OmtpMessageSender;
-import com.android.phone.vvm.omtp.sms.StatusMessage;
-
-public abstract class VisualVoicemailProtocol {
-
-    /**
-     * Activation should cause the carrier to respond with a STATUS SMS.
-     */
-    public void startActivation(OmtpVvmCarrierConfigHelper config, PendingIntent sentIntent) {
-        OmtpMessageSender messageSender = ProtocolHelper.getMessageSender(this, config);
-        if (messageSender != null) {
-            messageSender.requestVvmActivation(sentIntent);
-        }
-    }
-
-    public void startDeactivation(OmtpVvmCarrierConfigHelper config) {
-        OmtpMessageSender messageSender = ProtocolHelper.getMessageSender(this, config);
-        if (messageSender != null) {
-            messageSender.requestVvmDeactivation(null);
-        }
-    }
-
-    public boolean supportsProvisioning() {
-        return false;
-    }
-
-    public void startProvisioning(ActivationTask task, PhoneAccountHandle handle,
-        OmtpVvmCarrierConfigHelper config, VoicemailStatus.Editor editor, StatusMessage message,
-        Bundle data) {
-        // Do nothing
-    }
-
-    public void requestStatus(OmtpVvmCarrierConfigHelper config,
-            @Nullable PendingIntent sentIntent) {
-        OmtpMessageSender messageSender = ProtocolHelper.getMessageSender(this, config);
-        if (messageSender != null) {
-            messageSender.requestVvmStatus(sentIntent);
-        }
-    }
-
-    public abstract OmtpMessageSender createMessageSender(SmsManager smsManager,
-            short applicationPort, String destinationNumber);
-
-    /**
-     * Translate an OMTP IMAP command to the protocol specific one. For example, changing the TUI
-     * password on OMTP is XCHANGE_TUI_PWD, but on CVVM and VVM3 it is CHANGE_TUI_PWD.
-     *
-     * @param command A String command in {@link com.android.phone.vvm.omtp.OmtpConstants}, the exact
-     * instance should be used instead of its' value.
-     * @returns Translated command, or {@code null} if not available in this protocol
-     */
-    public String getCommand(String command) {
-        return command;
-    }
-
-    public void handleEvent(Context context, OmtpVvmCarrierConfigHelper config,
-        VoicemailStatus.Editor status, OmtpEvents event) {
-        DefaultOmtpEventHandler.handleEvent(context, config, status, event);
-    }
-
-    /**
-     * Given an VVM SMS with an unknown {@code event}, let the protocol attempt to translate it into
-     * an equivalent STATUS SMS. Returns {@code null} if it cannot be translated.
-     */
-    @Nullable
-    public Bundle translateStatusSmsBundle(OmtpVvmCarrierConfigHelper config, String event,
-            Bundle data) {
-        return null;
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/protocol/VisualVoicemailProtocolFactory.java b/src/com/android/phone/vvm/omtp/protocol/VisualVoicemailProtocolFactory.java
deleted file mode 100644
index 4d39ae2..0000000
--- a/src/com/android/phone/vvm/omtp/protocol/VisualVoicemailProtocolFactory.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.protocol;
-
-import android.annotation.Nullable;
-import android.content.res.Resources;
-import android.telephony.TelephonyManager;
-
-import com.android.phone.R;
-import com.android.phone.vvm.omtp.VvmLog;
-
-public class VisualVoicemailProtocolFactory {
-
-    private static final String TAG = "VvmProtocolFactory";
-
-    private static final String VVM_TYPE_VVM3 = "vvm_type_vvm3";
-
-    @Nullable
-    public static VisualVoicemailProtocol create(Resources resources, String type) {
-        if (type == null) {
-            return null;
-        }
-        switch (type) {
-            case TelephonyManager.VVM_TYPE_OMTP:
-                return new OmtpProtocol();
-            case TelephonyManager.VVM_TYPE_CVVM:
-                return new CvvmProtocol();
-            case VVM_TYPE_VVM3:
-                if (resources.getBoolean(R.bool.vvm3_enabled)) {
-                    return new Vvm3Protocol();
-                } else {
-                    VvmLog.e(TAG, "VVM3 is disabled");
-                    return null;
-                }
-            default:
-                VvmLog.e(TAG, "Unexpected visual voicemail type: " + type);
-        }
-        return null;
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/protocol/Vvm3EventHandler.java b/src/com/android/phone/vvm/omtp/protocol/Vvm3EventHandler.java
deleted file mode 100644
index 524c96d..0000000
--- a/src/com/android/phone/vvm/omtp/protocol/Vvm3EventHandler.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.protocol;
-
-import android.annotation.IntDef;
-import android.content.Context;
-import android.provider.VoicemailContract.Status;
-import android.telecom.PhoneAccountHandle;
-import android.util.Log;
-
-import com.android.phone.VoicemailStatus;
-import com.android.phone.settings.VoicemailChangePinActivity;
-import com.android.phone.vvm.omtp.DefaultOmtpEventHandler;
-import com.android.phone.vvm.omtp.OmtpEvents;
-import com.android.phone.vvm.omtp.OmtpEvents.Type;
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Handles {@link OmtpEvents} when {@link Vvm3Protocol} is being used. This handler writes custom
- * error codes into the voicemail status table so support on the dialer side is required.
- *
- * TODO(b/29577838) disable VVM3 by default so support on system dialer can be ensured.
- */
-public class Vvm3EventHandler {
-
-    private static final String TAG = "Vvm3EventHandler";
-
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef({VMS_DNS_FAILURE, VMG_DNS_FAILURE, SPG_DNS_FAILURE, VMS_NO_CELLULAR, VMG_NO_CELLULAR,
-            SPG_NO_CELLULAR, VMS_TIMEOUT, VMG_TIMEOUT, STATUS_SMS_TIMEOUT, SUBSCRIBER_BLOCKED,
-            UNKNOWN_USER, UNKNOWN_DEVICE, INVALID_PASSWORD, MAILBOX_NOT_INITIALIZED,
-            SERVICE_NOT_PROVISIONED, SERVICE_NOT_ACTIVATED, USER_BLOCKED, IMAP_GETQUOTA_ERROR,
-            IMAP_SELECT_ERROR, IMAP_ERROR, VMG_INTERNAL_ERROR, VMG_DB_ERROR,
-            VMG_COMMUNICATION_ERROR, SPG_URL_NOT_FOUND, VMG_UNKNOWN_ERROR, PIN_NOT_SET})
-    public @interface ErrorCode {
-
-    }
-
-    public static final int VMS_DNS_FAILURE = -9001;
-    public static final int VMG_DNS_FAILURE = -9002;
-    public static final int SPG_DNS_FAILURE = -9003;
-    public static final int VMS_NO_CELLULAR = -9004;
-    public static final int VMG_NO_CELLULAR = -9005;
-    public static final int SPG_NO_CELLULAR = -9006;
-    public static final int VMS_TIMEOUT = -9007;
-    public static final int VMG_TIMEOUT = -9008;
-    public static final int STATUS_SMS_TIMEOUT = -9009;
-
-    public static final int SUBSCRIBER_BLOCKED = -9990;
-    public static final int UNKNOWN_USER = -9991;
-    public static final int UNKNOWN_DEVICE = -9992;
-    public static final int INVALID_PASSWORD = -9993;
-    public static final int MAILBOX_NOT_INITIALIZED = -9994;
-    public static final int SERVICE_NOT_PROVISIONED = -9995;
-    public static final int SERVICE_NOT_ACTIVATED = -9996;
-    public static final int USER_BLOCKED = -9998;
-    public static final int IMAP_GETQUOTA_ERROR = -9997;
-    public static final int IMAP_SELECT_ERROR = -9989;
-    public static final int IMAP_ERROR = -9999;
-
-    public static final int VMG_INTERNAL_ERROR = -101;
-    public static final int VMG_DB_ERROR = -102;
-    public static final int VMG_COMMUNICATION_ERROR = -103;
-    public static final int SPG_URL_NOT_FOUND = -301;
-
-    // Non VVM3 codes:
-    public static final int VMG_UNKNOWN_ERROR = -1;
-    public static final int PIN_NOT_SET = -100;
-    // STATUS SMS returned st=U and rc!=2. The user cannot be provisioned and must contact customer
-    // support.
-    public static final int SUBSCRIBER_UNKNOWN = -99;
-
-
-    public static void handleEvent(Context context, OmtpVvmCarrierConfigHelper config,
-        VoicemailStatus.Editor status, OmtpEvents event) {
-        boolean handled = false;
-        switch (event.getType()) {
-            case Type.CONFIGURATION:
-                handled = handleConfigurationEvent(context, status, event);
-                break;
-            case Type.DATA_CHANNEL:
-                handled = handleDataChannelEvent(status, event);
-                break;
-            case Type.NOTIFICATION_CHANNEL:
-                handled = handleNotificationChannelEvent(status, event);
-                break;
-            case Type.OTHER:
-                handled = handleOtherEvent(status, event);
-                break;
-            default:
-                com.android.services.telephony.Log
-                        .wtf(TAG, "invalid event type " + event.getType() + " for " + event);
-        }
-        if (!handled) {
-            DefaultOmtpEventHandler.handleEvent(context, config, status, event);
-        }
-    }
-
-    private static boolean handleConfigurationEvent(Context context, VoicemailStatus.Editor status,
-        OmtpEvents event) {
-        switch (event) {
-            case CONFIG_REQUEST_STATUS_SUCCESS:
-                if (!isPinRandomized(context, status.getPhoneAccountHandle())) {
-                    return false;
-                } else {
-                    postError(status, PIN_NOT_SET);
-                }
-                break;
-            case CONFIG_ACTIVATING_SUBSEQUENT:
-                if (isPinRandomized(context, status.getPhoneAccountHandle())) {
-                    status.setConfigurationState(PIN_NOT_SET);
-                } else {
-                    status.setConfigurationState(Status.CONFIGURATION_STATE_OK);
-                }
-                status
-                        .setNotificationChannelState(Status.NOTIFICATION_CHANNEL_STATE_OK)
-                        .setDataChannelState(Status.DATA_CHANNEL_STATE_OK).apply();
-                break;
-            case CONFIG_DEFAULT_PIN_REPLACED:
-                postError(status, PIN_NOT_SET);
-                break;
-            case CONFIG_STATUS_SMS_TIME_OUT:
-                postError(status, STATUS_SMS_TIMEOUT);
-                break;
-            default:
-                return false;
-        }
-        return true;
-    }
-
-    private static boolean handleDataChannelEvent(VoicemailStatus.Editor status, OmtpEvents event) {
-        switch (event) {
-            case DATA_NO_CONNECTION:
-            case DATA_NO_CONNECTION_CELLULAR_REQUIRED:
-            case DATA_ALL_SOCKET_CONNECTION_FAILED:
-                postError(status, VMS_NO_CELLULAR);
-                break;
-            case DATA_SSL_INVALID_HOST_NAME:
-            case DATA_CANNOT_ESTABLISH_SSL_SESSION:
-            case DATA_IOE_ON_OPEN:
-                postError(status, VMS_TIMEOUT);
-                break;
-            case DATA_CANNOT_RESOLVE_HOST_ON_NETWORK:
-                postError(status, VMS_DNS_FAILURE);
-                break;
-            case DATA_BAD_IMAP_CREDENTIAL:
-                postError(status, IMAP_ERROR);
-                break;
-            case DATA_AUTH_UNKNOWN_USER:
-                postError(status, UNKNOWN_USER);
-                break;
-            case DATA_AUTH_UNKNOWN_DEVICE:
-                postError(status, UNKNOWN_DEVICE);
-                break;
-            case DATA_AUTH_INVALID_PASSWORD:
-                postError(status, INVALID_PASSWORD);
-                break;
-            case DATA_AUTH_MAILBOX_NOT_INITIALIZED:
-                postError(status, MAILBOX_NOT_INITIALIZED);
-                break;
-            case DATA_AUTH_SERVICE_NOT_PROVISIONED:
-                postError(status, SERVICE_NOT_PROVISIONED);
-                break;
-            case DATA_AUTH_SERVICE_NOT_ACTIVATED:
-                postError(status, SERVICE_NOT_ACTIVATED);
-                break;
-            case DATA_AUTH_USER_IS_BLOCKED:
-                postError(status, USER_BLOCKED);
-                break;
-            case DATA_REJECTED_SERVER_RESPONSE:
-            case DATA_INVALID_INITIAL_SERVER_RESPONSE:
-            case DATA_SSL_EXCEPTION:
-                postError(status, IMAP_ERROR);
-                break;
-            default:
-                return false;
-        }
-        return true;
-    }
-
-    private static boolean handleNotificationChannelEvent(VoicemailStatus.Editor status,
-        OmtpEvents event) {
-        return false;
-    }
-
-    private static boolean handleOtherEvent(VoicemailStatus.Editor status,
-            OmtpEvents event) {
-        switch (event) {
-            case VVM3_NEW_USER_SETUP_FAILED:
-                postError(status, MAILBOX_NOT_INITIALIZED);
-                break;
-            case VVM3_VMG_DNS_FAILURE:
-                postError(status, VMG_DNS_FAILURE);
-                break;
-            case VVM3_SPG_DNS_FAILURE:
-                postError(status, SPG_DNS_FAILURE);
-                break;
-            case VVM3_VMG_CONNECTION_FAILED:
-                postError(status, VMG_NO_CELLULAR);
-                break;
-            case VVM3_SPG_CONNECTION_FAILED:
-                postError(status, SPG_NO_CELLULAR);
-                break;
-            case VVM3_VMG_TIMEOUT:
-                postError(status, VMG_TIMEOUT);
-                break;
-            case VVM3_SUBSCRIBER_PROVISIONED:
-                postError(status, SERVICE_NOT_ACTIVATED);
-                break;
-            case VVM3_SUBSCRIBER_BLOCKED:
-                postError(status, SUBSCRIBER_BLOCKED);
-                break;
-            case VVM3_SUBSCRIBER_UNKNOWN:
-                postError(status, SUBSCRIBER_UNKNOWN);
-                break;
-            default:
-                return false;
-        }
-        return true;
-    }
-
-    private static void postError(VoicemailStatus.Editor editor, @ErrorCode int errorCode) {
-        switch (errorCode) {
-            case VMG_DNS_FAILURE:
-            case SPG_DNS_FAILURE:
-            case VMG_NO_CELLULAR:
-            case SPG_NO_CELLULAR:
-            case VMG_TIMEOUT:
-            case SUBSCRIBER_BLOCKED:
-            case UNKNOWN_USER:
-            case UNKNOWN_DEVICE:
-            case INVALID_PASSWORD:
-            case MAILBOX_NOT_INITIALIZED:
-            case SERVICE_NOT_PROVISIONED:
-            case SERVICE_NOT_ACTIVATED:
-            case USER_BLOCKED:
-            case VMG_UNKNOWN_ERROR:
-            case SPG_URL_NOT_FOUND:
-            case VMG_INTERNAL_ERROR:
-            case VMG_DB_ERROR:
-            case VMG_COMMUNICATION_ERROR:
-            case PIN_NOT_SET:
-            case SUBSCRIBER_UNKNOWN:
-                editor.setConfigurationState(errorCode);
-                break;
-            case VMS_NO_CELLULAR:
-            case VMS_DNS_FAILURE:
-            case VMS_TIMEOUT:
-            case IMAP_GETQUOTA_ERROR:
-            case IMAP_SELECT_ERROR:
-            case IMAP_ERROR:
-                editor.setDataChannelState(errorCode);
-                break;
-            case STATUS_SMS_TIMEOUT:
-                editor.setNotificationChannelState(errorCode);
-                break;
-            default:
-                Log.wtf(TAG, "unknown error code: " + errorCode);
-        }
-        editor.apply();
-    }
-
-    private static boolean isPinRandomized(Context context, PhoneAccountHandle phoneAccountHandle) {
-        if (phoneAccountHandle == null) {
-            // This should never happen.
-            Log.e(TAG, "status editor has null phone account handle");
-            return false;
-        }
-        return VoicemailChangePinActivity.isDefaultOldPinSet(context, phoneAccountHandle);
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/protocol/Vvm3Protocol.java b/src/com/android/phone/vvm/omtp/protocol/Vvm3Protocol.java
deleted file mode 100644
index 93e8fb9..0000000
--- a/src/com/android/phone/vvm/omtp/protocol/Vvm3Protocol.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.protocol;
-
-import android.annotation.Nullable;
-import android.app.PendingIntent;
-import android.content.Context;
-import android.net.Network;
-import android.os.Bundle;
-import android.telecom.PhoneAccountHandle;
-import android.telephony.SmsManager;
-import android.text.TextUtils;
-
-import com.android.phone.PhoneGlobals;
-import com.android.phone.VoicemailStatus;
-import com.android.phone.common.mail.MessagingException;
-import com.android.phone.settings.VisualVoicemailSettingsUtil;
-import com.android.phone.settings.VoicemailChangePinActivity;
-import com.android.phone.vvm.omtp.ActivationTask;
-import com.android.phone.vvm.omtp.OmtpConstants;
-import com.android.phone.vvm.omtp.OmtpEvents;
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-import com.android.phone.vvm.omtp.VisualVoicemailPreferences;
-import com.android.phone.vvm.omtp.VvmLog;
-import com.android.phone.vvm.omtp.imap.ImapHelper;
-import com.android.phone.vvm.omtp.imap.ImapHelper.InitializingException;
-import com.android.phone.vvm.omtp.sms.OmtpMessageSender;
-import com.android.phone.vvm.omtp.sms.StatusMessage;
-import com.android.phone.vvm.omtp.sms.Vvm3MessageSender;
-import com.android.phone.vvm.omtp.sync.VvmNetworkRequest;
-import com.android.phone.vvm.omtp.sync.VvmNetworkRequest.NetworkWrapper;
-import com.android.phone.vvm.omtp.sync.VvmNetworkRequest.RequestFailedException;
-
-import java.io.IOException;
-import java.security.SecureRandom;
-import java.util.Locale;
-
-/**
- * A flavor of OMTP protocol with a different provisioning process
- *
- * Used by carriers such as Verizon Wireless
- */
-public class Vvm3Protocol extends VisualVoicemailProtocol {
-
-    private static final String TAG = "Vvm3Protocol";
-
-    private static final String SMS_EVENT_UNRECOGNIZED = "UNRECOGNIZED";
-    private static final String SMS_EVENT_UNRECOGNIZED_CMD = "cmd";
-    private static final String SMS_EVENT_UNRECOGNIZED_STATUS = "STATUS";
-    private static final String DEFAULT_VMG_URL_KEY = "default_vmg_url";
-
-    private static final String IMAP_CHANGE_TUI_PWD_FORMAT = "CHANGE_TUI_PWD PWD=%1$s OLD_PWD=%2$s";
-    private static final String IMAP_CHANGE_VM_LANG_FORMAT = "CHANGE_VM_LANG Lang=%1$s";
-    private static final String IMAP_CLOSE_NUT = "CLOSE_NUT";
-
-    private static final String ISO639_Spanish = "es";
-
-    /**
-     * For VVM3, if the STATUS SMS returns {@link StatusMessage#getProvisioningStatus()} of {@link
-     * OmtpConstants#SUBSCRIBER_UNKNOWN} and {@link StatusMessage#getReturnCode()} of this value,
-     * the user can self-provision visual voicemail service. For other response codes, the user must
-     * contact customer support to resolve the issue.
-     */
-    private static final String VVM3_UNKNOWN_SUBSCRIBER_CAN_SUBSCRIBE_RESPONSE_CODE = "2";
-
-    // Default prompt level when using the telephone user interface.
-    // Standard prompt when the user call into the voicemail, and no prompts when someone else is
-    // leaving a voicemail.
-    private static final String VVM3_VM_LANGUAGE_ENGLISH_STANDARD_NO_GUEST_PROMPTS = "5";
-    private static final String VVM3_VM_LANGUAGE_SPANISH_STANDARD_NO_GUEST_PROMPTS = "6";
-
-    private static final int DEFAULT_PIN_LENGTH = 6;
-
-    @Override
-    public void startActivation(OmtpVvmCarrierConfigHelper config,
-            @Nullable PendingIntent sentIntent) {
-        // VVM3 does not support activation SMS.
-        // Send a status request which will start the provisioning process if the user is not
-        // provisioned.
-        VvmLog.i(TAG, "Activating");
-        config.requestStatus(sentIntent);
-    }
-
-    @Override
-    public void startDeactivation(OmtpVvmCarrierConfigHelper config) {
-        // VVM3 does not support deactivation.
-        // do nothing.
-    }
-
-    @Override
-    public boolean supportsProvisioning() {
-        return true;
-    }
-
-    @Override
-    public void startProvisioning(ActivationTask task, PhoneAccountHandle phoneAccountHandle,
-            OmtpVvmCarrierConfigHelper config, VoicemailStatus.Editor status, StatusMessage message,
-            Bundle data) {
-        VvmLog.i(TAG, "start vvm3 provisioning");
-        if (OmtpConstants.SUBSCRIBER_UNKNOWN.equals(message.getProvisioningStatus())) {
-            VvmLog.i(TAG, "Provisioning status: Unknown");
-            if (VVM3_UNKNOWN_SUBSCRIBER_CAN_SUBSCRIBE_RESPONSE_CODE
-                    .equals(message.getReturnCode())) {
-                VvmLog.i(TAG, "Self provisioning available, subscribing");
-                new Vvm3Subscriber(task, phoneAccountHandle, config, status, data).subscribe();
-            } else {
-                config.handleEvent(status, OmtpEvents.VVM3_SUBSCRIBER_UNKNOWN);
-                PhoneGlobals.getInstance().setShouldCheckVisualVoicemailConfigurationForMwi(task.getSubId(),
-                        false);
-            }
-        } else if (OmtpConstants.SUBSCRIBER_NEW.equals(message.getProvisioningStatus())) {
-            VvmLog.i(TAG, "setting up new user");
-            // Save the IMAP credentials in preferences so they are persistent and can be retrieved.
-            VisualVoicemailPreferences prefs =
-                    new VisualVoicemailPreferences(config.getContext(), phoneAccountHandle);
-            message.putStatus(prefs.edit()).apply();
-
-            startProvisionNewUser(task, phoneAccountHandle, config, status, message);
-        } else if (OmtpConstants.SUBSCRIBER_PROVISIONED.equals(message.getProvisioningStatus())) {
-            VvmLog.i(TAG, "User provisioned but not activated, disabling VVM");
-            VisualVoicemailSettingsUtil
-                    .setEnabled(config.getContext(), phoneAccountHandle, false);
-            PhoneGlobals.getInstance().setShouldCheckVisualVoicemailConfigurationForMwi(task.getSubId(),
-                    false);
-        } else if (OmtpConstants.SUBSCRIBER_BLOCKED.equals(message.getProvisioningStatus())) {
-            VvmLog.i(TAG, "User blocked");
-            config.handleEvent(status, OmtpEvents.VVM3_SUBSCRIBER_BLOCKED);
-            PhoneGlobals.getInstance().setShouldCheckVisualVoicemailConfigurationForMwi(task.getSubId(),
-                    false);
-        }
-    }
-
-    @Override
-    public OmtpMessageSender createMessageSender(SmsManager smsManager, short applicationPort,
-            String destinationNumber) {
-        return new Vvm3MessageSender(smsManager, applicationPort, destinationNumber);
-    }
-
-    @Override
-    public void handleEvent(Context context, OmtpVvmCarrierConfigHelper config,
-            VoicemailStatus.Editor status, OmtpEvents event) {
-        Vvm3EventHandler.handleEvent(context, config, status, event);
-    }
-
-    @Override
-    public String getCommand(String command) {
-        if (command == OmtpConstants.IMAP_CHANGE_TUI_PWD_FORMAT) {
-            return IMAP_CHANGE_TUI_PWD_FORMAT;
-        }
-        if (command == OmtpConstants.IMAP_CLOSE_NUT) {
-            return IMAP_CLOSE_NUT;
-        }
-        if (command == OmtpConstants.IMAP_CHANGE_VM_LANG_FORMAT) {
-            return IMAP_CHANGE_VM_LANG_FORMAT;
-        }
-        return super.getCommand(command);
-    }
-
-    @Override
-    public Bundle translateStatusSmsBundle(OmtpVvmCarrierConfigHelper config, String event,
-            Bundle data) {
-        // UNRECOGNIZED?cmd=STATUS is the response of a STATUS request when the user is provisioned
-        // with iPhone visual voicemail without VoLTE. Translate it into an unprovisioned status
-        // so provisioning can be done.
-        if (!SMS_EVENT_UNRECOGNIZED.equals(event)) {
-            return null;
-        }
-        if (!SMS_EVENT_UNRECOGNIZED_STATUS.equals(data.getString(SMS_EVENT_UNRECOGNIZED_CMD))) {
-            return null;
-        }
-        Bundle bundle = new Bundle();
-        bundle.putString(OmtpConstants.PROVISIONING_STATUS, OmtpConstants.SUBSCRIBER_UNKNOWN);
-        bundle.putString(OmtpConstants.RETURN_CODE,
-                VVM3_UNKNOWN_SUBSCRIBER_CAN_SUBSCRIBE_RESPONSE_CODE);
-        String vmgUrl = config.getString(DEFAULT_VMG_URL_KEY);
-        if (TextUtils.isEmpty(vmgUrl)) {
-            VvmLog.e(TAG, "Unable to translate STATUS SMS: VMG URL is not set in config");
-            return null;
-        }
-        bundle.putString(Vvm3Subscriber.VMG_URL_KEY, vmgUrl);
-        VvmLog.i(TAG, "UNRECOGNIZED?cmd=STATUS translated into unprovisioned STATUS SMS");
-        return bundle;
-    }
-
-    private void startProvisionNewUser(ActivationTask task, PhoneAccountHandle phoneAccountHandle,
-            OmtpVvmCarrierConfigHelper config, VoicemailStatus.Editor status,
-            StatusMessage message) {
-        try (NetworkWrapper wrapper = VvmNetworkRequest
-                .getNetwork(config, phoneAccountHandle, status)) {
-            Network network = wrapper.get();
-
-            VvmLog.i(TAG, "new user: network available");
-            try (ImapHelper helper = new ImapHelper(config.getContext(), phoneAccountHandle,
-                    network, status)) {
-                // VVM3 has inconsistent error language code to OMTP. Just issue a raw command
-                // here.
-                // TODO(b/29082671): use LocaleList
-                if (Locale.getDefault().getLanguage()
-                        .equals(new Locale(ISO639_Spanish).getLanguage())) {
-                    // Spanish
-                    helper.changeVoicemailTuiLanguage(
-                            VVM3_VM_LANGUAGE_SPANISH_STANDARD_NO_GUEST_PROMPTS);
-                } else {
-                    // English
-                    helper.changeVoicemailTuiLanguage(
-                            VVM3_VM_LANGUAGE_ENGLISH_STANDARD_NO_GUEST_PROMPTS);
-                }
-                VvmLog.i(TAG, "new user: language set");
-
-                if (setPin(config.getContext(), phoneAccountHandle, helper, message)) {
-                    // Only close new user tutorial if the PIN has been changed.
-                    helper.closeNewUserTutorial();
-                    VvmLog.i(TAG, "new user: NUT closed");
-
-                    config.requestStatus(null);
-                }
-            } catch (InitializingException | MessagingException | IOException e) {
-                config.handleEvent(status, OmtpEvents.VVM3_NEW_USER_SETUP_FAILED);
-                task.fail();
-                VvmLog.e(TAG, e.toString());
-            }
-        } catch (RequestFailedException e) {
-            config.handleEvent(status, OmtpEvents.DATA_NO_CONNECTION_CELLULAR_REQUIRED);
-            task.fail();
-        }
-
-    }
-
-
-    private static boolean setPin(Context context, PhoneAccountHandle phoneAccountHandle,
-            ImapHelper helper, StatusMessage message)
-            throws IOException, MessagingException {
-        String defaultPin = getDefaultPin(message);
-        if (defaultPin == null) {
-            VvmLog.i(TAG, "cannot generate default PIN");
-            return false;
-        }
-
-        if (VoicemailChangePinActivity.isDefaultOldPinSet(context, phoneAccountHandle)) {
-            // The pin was already set
-            VvmLog.i(TAG, "PIN already set");
-            return true;
-        }
-        String newPin = generatePin(getMinimumPinLength(context, phoneAccountHandle));
-        if (helper.changePin(defaultPin, newPin) == OmtpConstants.CHANGE_PIN_SUCCESS) {
-            VoicemailChangePinActivity.setDefaultOldPIN(context, phoneAccountHandle, newPin);
-            helper.handleEvent(OmtpEvents.CONFIG_DEFAULT_PIN_REPLACED);
-        }
-        VvmLog.i(TAG, "new user: PIN set");
-        return true;
-    }
-
-    @Nullable
-    private static String getDefaultPin(StatusMessage message) {
-        // The IMAP username is [phone number]@example.com
-        String username = message.getImapUserName();
-        try {
-            String number = username.substring(0, username.indexOf('@'));
-            if (number.length() < 4) {
-                VvmLog.e(TAG, "unable to extract number from IMAP username");
-                return null;
-            }
-            return "1" + number.substring(number.length() - 4);
-        } catch (StringIndexOutOfBoundsException e) {
-            VvmLog.e(TAG, "unable to extract number from IMAP username");
-            return null;
-        }
-
-    }
-
-    private static int getMinimumPinLength(Context context, PhoneAccountHandle phoneAccountHandle) {
-        VisualVoicemailPreferences preferences = new VisualVoicemailPreferences(context,
-                phoneAccountHandle);
-        // The OMTP pin length format is {min}-{max}
-        String[] lengths = preferences.getString(OmtpConstants.TUI_PASSWORD_LENGTH, "").split("-");
-        if (lengths.length == 2) {
-            try {
-                return Integer.parseInt(lengths[0]);
-            } catch (NumberFormatException e) {
-                return DEFAULT_PIN_LENGTH;
-            }
-        }
-        return DEFAULT_PIN_LENGTH;
-    }
-
-    private static String generatePin(int length) {
-        SecureRandom random = new SecureRandom();
-        return String.format(Locale.US, "%010d", Math.abs(random.nextLong()))
-                .substring(0, length);
-
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/protocol/Vvm3Subscriber.java b/src/com/android/phone/vvm/omtp/protocol/Vvm3Subscriber.java
deleted file mode 100644
index ad00aa4..0000000
--- a/src/com/android/phone/vvm/omtp/protocol/Vvm3Subscriber.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.protocol;
-
-import android.annotation.WorkerThread;
-import android.net.Network;
-import android.os.Build;
-import android.os.Bundle;
-import android.telecom.PhoneAccountHandle;
-import android.telephony.TelephonyManager;
-import android.text.Html;
-import android.text.Spanned;
-import android.text.style.URLSpan;
-import android.util.ArrayMap;
-import com.android.phone.Assert;
-import com.android.phone.VoicemailStatus;
-import com.android.phone.vvm.omtp.ActivationTask;
-import com.android.phone.vvm.omtp.OmtpEvents;
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-import com.android.phone.vvm.omtp.VvmLog;
-import com.android.phone.vvm.omtp.sync.VvmNetworkRequest;
-import com.android.phone.vvm.omtp.sync.VvmNetworkRequest.NetworkWrapper;
-import com.android.phone.vvm.omtp.sync.VvmNetworkRequest.RequestFailedException;
-import com.android.volley.AuthFailureError;
-import com.android.volley.Request;
-import com.android.volley.RequestQueue;
-import com.android.volley.toolbox.HurlStack;
-import com.android.volley.toolbox.RequestFuture;
-import com.android.volley.toolbox.StringRequest;
-import com.android.volley.toolbox.Volley;
-import java.io.IOException;
-import java.net.CookieHandler;
-import java.net.CookieManager;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Random;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Class to subscribe to basic VVM3 visual voicemail, for example, Verizon. Subscription is required
- * when the user is unprovisioned. This could happen when the user is on a legacy service, or
- * switched over from devices that used other type of visual voicemail.
- *
- * The STATUS SMS will come with a URL to the voicemail management gateway. From it we can find the
- * self provisioning gateway URL that we can modify voicemail services.
- *
- * A request to the self provisioning gateway to activate basic visual voicemail will return us with
- * a web page. If the user hasn't subscribe to it yet it will contain a link to confirm the
- * subscription. This link should be clicked through cellular network, and have cookies enabled.
- *
- * After the process is completed, the carrier should send us another STATUS SMS with a new or ready
- * user.
- */
-public class Vvm3Subscriber {
-
-    private static final String TAG = "Vvm3Subscriber";
-
-    private static final String OPERATION_GET_SPG_URL = "retrieveSPGURL";
-    private static final String SPG_URL_TAG = "spgurl";
-    private static final String TRANSACTION_ID_TAG = "transactionid";
-    //language=XML
-    private static final String VMG_XML_REQUEST_FORMAT = ""
-            + "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-            + "<VMGVVMRequest>"
-            + "  <MessageHeader>"
-            + "    <transactionid>%1$s</transactionid>"
-            + "  </MessageHeader>"
-            + "  <MessageBody>"
-            + "    <mdn>%2$s</mdn>"
-            + "    <operation>%3$s</operation>"
-            + "    <source>Device</source>"
-            + "    <devicemodel>%4$s</devicemodel>"
-            + "  </MessageBody>"
-            + "</VMGVVMRequest>";
-
-    static final String VMG_URL_KEY = "vmg_url";
-
-    // Self provisioning POST key/values. VVM3 API 2.1.0 12.3
-    private static final String SPG_VZW_MDN_PARAM = "VZW_MDN";
-    private static final String SPG_VZW_SERVICE_PARAM = "VZW_SERVICE";
-    private static final String SPG_VZW_SERVICE_BASIC = "BVVM";
-    private static final String SPG_DEVICE_MODEL_PARAM = "DEVICE_MODEL";
-    // Value for all android device
-    private static final String SPG_DEVICE_MODEL_ANDROID = "DROID_4G";
-    private static final String SPG_APP_TOKEN_PARAM = "APP_TOKEN";
-    private static final String SPG_APP_TOKEN = "q8e3t5u2o1";
-    private static final String SPG_LANGUAGE_PARAM = "SPG_LANGUAGE_PARAM";
-    private static final String SPG_LANGUAGE_EN = "ENGLISH";
-
-    private static final String BASIC_SUBSCRIBE_LINK_TEXT = "Subscribe to Basic Visual Voice Mail";
-
-    private static final int REQUEST_TIMEOUT_SECONDS = 30;
-
-    private final ActivationTask mTask;
-    private final PhoneAccountHandle mHandle;
-    private final OmtpVvmCarrierConfigHelper mHelper;
-    private final VoicemailStatus.Editor mStatus;
-    private final Bundle mData;
-
-    private final String mNumber;
-
-    private RequestQueue mRequestQueue;
-
-    private static class ProvisioningException extends Exception {
-
-        public ProvisioningException(String message) {
-            super(message);
-        }
-    }
-
-    static {
-        // Set the default cookie handler to retain session data for the self provisioning gateway.
-        // Note; this is not ideal as it is application-wide, and can easily get clobbered.
-        // But it seems to be the preferred way to manage cookie for HttpURLConnection, and manually
-        // managing cookies will greatly increase complexity.
-        CookieManager cookieManager = new CookieManager();
-        CookieHandler.setDefault(cookieManager);
-    }
-
-    @WorkerThread
-    public Vvm3Subscriber(ActivationTask task, PhoneAccountHandle handle,
-            OmtpVvmCarrierConfigHelper helper, VoicemailStatus.Editor status, Bundle data) {
-        Assert.isNotMainThread();
-        mTask = task;
-        mHandle = handle;
-        mHelper = helper;
-        mStatus = status;
-        mData = data;
-
-        // Assuming getLine1Number() will work with VVM3. For unprovisioned users the IMAP username
-        // is not included in the status SMS, thus no other way to get the current phone number.
-        mNumber = mHelper.getContext().getSystemService(TelephonyManager.class)
-                .getLine1Number(mHelper.getSubId());
-    }
-
-    @WorkerThread
-    public void subscribe() {
-        Assert.isNotMainThread();
-        // Cellular data is required to subscribe.
-        // processSubscription() is called after network is available.
-        VvmLog.i(TAG, "Subscribing");
-
-        try (NetworkWrapper wrapper = VvmNetworkRequest.getNetwork(mHelper, mHandle, mStatus)) {
-            Network network = wrapper.get();
-            VvmLog.d(TAG, "provisioning: network available");
-            mRequestQueue = Volley
-                    .newRequestQueue(mHelper.getContext(), new NetworkSpecifiedHurlStack(network));
-            processSubscription();
-        } catch (RequestFailedException e) {
-            mHelper.handleEvent(mStatus, OmtpEvents.VVM3_VMG_CONNECTION_FAILED);
-            mTask.fail();
-        }
-    }
-
-    private void processSubscription() {
-        try {
-            String gatewayUrl = getSelfProvisioningGateway();
-            String selfProvisionResponse = getSelfProvisionResponse(gatewayUrl);
-            String subscribeLink = findSubscribeLink(selfProvisionResponse);
-            clickSubscribeLink(subscribeLink);
-        } catch (ProvisioningException e) {
-            VvmLog.e(TAG, e.toString());
-            mTask.fail();
-        }
-    }
-
-    /**
-     * Get the URL to perform self-provisioning from the voicemail management gateway.
-     */
-    private String getSelfProvisioningGateway() throws ProvisioningException {
-        VvmLog.i(TAG, "retrieving SPG URL");
-        String response = vvm3XmlRequest(OPERATION_GET_SPG_URL);
-        return extractText(response, SPG_URL_TAG);
-    }
-
-    /**
-     * Sent a request to the self-provisioning gateway, which will return us with a webpage. The
-     * page might contain a "Subscribe to Basic Visual Voice Mail" link to complete the
-     * subscription. The cookie from this response and cellular data is required to click the link.
-     */
-    private String getSelfProvisionResponse(String url) throws ProvisioningException {
-        VvmLog.i(TAG, "Retrieving self provisioning response");
-
-        RequestFuture<String> future = RequestFuture.newFuture();
-
-        StringRequest stringRequest = new StringRequest(Request.Method.POST, url, future, future) {
-            @Override
-            protected Map<String, String> getParams() {
-                Map<String, String> params = new ArrayMap<>();
-                params.put(SPG_VZW_MDN_PARAM, mNumber);
-                params.put(SPG_VZW_SERVICE_PARAM, SPG_VZW_SERVICE_BASIC);
-                params.put(SPG_DEVICE_MODEL_PARAM, SPG_DEVICE_MODEL_ANDROID);
-                params.put(SPG_APP_TOKEN_PARAM, SPG_APP_TOKEN);
-                // Language to display the subscription page. The page is never shown to the user
-                // so just use English.
-                params.put(SPG_LANGUAGE_PARAM, SPG_LANGUAGE_EN);
-                return params;
-            }
-        };
-
-        mRequestQueue.add(stringRequest);
-        try {
-            return future.get(REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS);
-        } catch (InterruptedException | ExecutionException | TimeoutException e) {
-            mHelper.handleEvent(mStatus, OmtpEvents.VVM3_SPG_CONNECTION_FAILED);
-            throw new ProvisioningException(e.toString());
-        }
-    }
-
-    private void clickSubscribeLink(String subscribeLink) throws ProvisioningException {
-        VvmLog.i(TAG, "Clicking subscribe link");
-        RequestFuture<String> future = RequestFuture.newFuture();
-
-        StringRequest stringRequest = new StringRequest(Request.Method.POST,
-                subscribeLink, future, future);
-        mRequestQueue.add(stringRequest);
-        try {
-            // A new STATUS SMS will be sent after this request.
-            future.get(REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS);
-        } catch (TimeoutException | ExecutionException | InterruptedException e) {
-            mHelper.handleEvent(mStatus, OmtpEvents.VVM3_SPG_CONNECTION_FAILED);
-            throw new ProvisioningException(e.toString());
-        }
-        // It could take very long for the STATUS SMS to return. Waiting for it is unreliable.
-        // Just leave the CONFIG STATUS as CONFIGURING and end the task. The user can always
-        // manually retry if it took too long.
-    }
-
-    private String vvm3XmlRequest(String operation) throws ProvisioningException {
-        VvmLog.d(TAG, "Sending vvm3XmlRequest for " + operation);
-        String voicemailManagementGateway = mData.getString(VMG_URL_KEY);
-        if (voicemailManagementGateway == null) {
-            VvmLog.e(TAG, "voicemailManagementGateway url unknown");
-            return null;
-        }
-        String transactionId = createTransactionId();
-        String body = String.format(Locale.US, VMG_XML_REQUEST_FORMAT,
-                transactionId, mNumber, operation, Build.MODEL);
-
-        RequestFuture<String> future = RequestFuture.newFuture();
-        StringRequest stringRequest = new StringRequest(Request.Method.POST,
-                voicemailManagementGateway, future, future) {
-            @Override
-            public byte[] getBody() throws AuthFailureError {
-                return body.getBytes();
-            }
-        };
-        mRequestQueue.add(stringRequest);
-
-        try {
-            String response = future.get(REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS);
-            if (!transactionId.equals(extractText(response, TRANSACTION_ID_TAG))) {
-                throw new ProvisioningException("transactionId mismatch");
-            }
-            return response;
-        } catch (InterruptedException | ExecutionException | TimeoutException e) {
-            mHelper.handleEvent(mStatus, OmtpEvents.VVM3_VMG_CONNECTION_FAILED);
-            throw new ProvisioningException(e.toString());
-        }
-    }
-
-    private String findSubscribeLink(String response) throws ProvisioningException {
-        Spanned doc = Html.fromHtml(response, Html.FROM_HTML_MODE_LEGACY);
-        URLSpan[] spans = doc.getSpans(0, doc.length(), URLSpan.class);
-        StringBuilder fulltext = new StringBuilder();
-        for (URLSpan span : spans) {
-            String text = doc.subSequence(doc.getSpanStart(span), doc.getSpanEnd(span)).toString();
-            if (BASIC_SUBSCRIBE_LINK_TEXT.equals(text)) {
-                return span.getURL();
-            }
-            fulltext.append(text);
-        }
-        throw new ProvisioningException("Subscribe link not found: " + fulltext);
-    }
-
-    private String createTransactionId() {
-        return String.valueOf(Math.abs(new Random().nextLong()));
-    }
-
-    private String extractText(String xml, String tag) throws ProvisioningException {
-        Pattern pattern = Pattern.compile("<" + tag + ">(.*)<\\/" + tag + ">");
-        Matcher matcher = pattern.matcher(xml);
-        if (matcher.find()) {
-            return matcher.group(1);
-        }
-        throw new ProvisioningException("Tag " + tag + " not found in xml response");
-    }
-
-    private static class NetworkSpecifiedHurlStack extends HurlStack {
-
-        private final Network mNetwork;
-
-        public NetworkSpecifiedHurlStack(Network network) {
-            mNetwork = network;
-        }
-
-        @Override
-        protected HttpURLConnection createConnection(URL url) throws IOException {
-            return (HttpURLConnection) mNetwork.openConnection(url);
-        }
-
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/scheduling/BaseTask.java b/src/com/android/phone/vvm/omtp/scheduling/BaseTask.java
deleted file mode 100644
index 76537fa..0000000
--- a/src/com/android/phone/vvm/omtp/scheduling/BaseTask.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.scheduling;
-
-import android.annotation.CallSuper;
-import android.annotation.MainThread;
-import android.annotation.WorkerThread;
-import android.content.Context;
-import android.content.Intent;
-import android.os.SystemClock;
-import android.support.annotation.NonNull;
-import android.telephony.SubscriptionManager;
-import com.android.phone.Assert;
-import com.android.phone.NeededForTesting;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Provides common utilities for task implementations, such as execution time and managing {@link
- * Policy}
- */
-public abstract class BaseTask implements Task {
-
-    private static final String EXTRA_SUB_ID = "extra_sub_id";
-
-    private Context mContext;
-
-    private int mId;
-    private int mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
-
-    private boolean mHasStarted;
-    private volatile boolean mHasFailed;
-
-    @NonNull
-    private final List<Policy> mPolicies = new ArrayList<>();
-
-    private long mExecutionTime;
-
-    private static Clock sClock = new Clock();
-
-    protected BaseTask(int id) {
-        mId = id;
-        mExecutionTime = getTimeMillis();
-    }
-
-    /**
-     * Modify the task ID to prevent arbitrary task from executing. Can only be called before {@link
-     * #onCreate(Context, Intent, int, int)} returns.
-     */
-    @MainThread
-    public void setId(int id) {
-        Assert.isMainThread();
-        mId = id;
-    }
-
-    @MainThread
-    public boolean hasStarted() {
-        Assert.isMainThread();
-        return mHasStarted;
-    }
-
-    @MainThread
-    public boolean hasFailed() {
-        Assert.isMainThread();
-        return mHasFailed;
-    }
-
-    public Context getContext() {
-        return mContext;
-    }
-
-    public int getSubId() {
-        return mSubId;
-    }
-    /**
-     * Should be call in the constructor or {@link Policy#onCreate(BaseTask, Intent, int, int)} will
-     * be missed.
-     */
-    @MainThread
-    public BaseTask addPolicy(Policy policy) {
-        Assert.isMainThread();
-        mPolicies.add(policy);
-        return this;
-    }
-
-    /**
-     * Indicate the task has failed. {@link Policy#onFail()} will be triggered once the execution
-     * ends. This mechanism is used by policies for actions such as determining whether to schedule
-     * a retry. Must be call inside {@link #onExecuteInBackgroundThread()}
-     */
-    @WorkerThread
-    public void fail() {
-        Assert.isNotMainThread();
-        mHasFailed = true;
-    }
-
-    @MainThread
-    public void setExecutionTime(long timeMillis) {
-        Assert.isMainThread();
-        mExecutionTime = timeMillis;
-    }
-
-    public long getTimeMillis() {
-        return sClock.getTimeMillis();
-    }
-
-    /**
-     * Creates an intent that can be used to restart the current task. Derived class should build
-     * their intent upon this.
-     */
-    public Intent createRestartIntent() {
-        return createIntent(getContext(), this.getClass(), mSubId);
-    }
-
-    /**
-     * Creates an intent that can be used to start the {@link TaskSchedulerService}. Derived class
-     * should build their intent upon this.
-     */
-    public static Intent createIntent(Context context, Class<? extends BaseTask> task, int subId) {
-        Intent intent = TaskSchedulerService.createIntent(context, task);
-        intent.putExtra(EXTRA_SUB_ID, subId);
-        return intent;
-    }
-
-    @Override
-    public TaskId getId() {
-        return new TaskId(mId, mSubId);
-    }
-
-    @Override
-    @CallSuper
-    public void onCreate(Context context, Intent intent, int flags, int startId) {
-        mContext = context;
-        mSubId = intent.getIntExtra(EXTRA_SUB_ID, SubscriptionManager.INVALID_SUBSCRIPTION_ID);
-        for (Policy policy : mPolicies) {
-            policy.onCreate(this, intent, flags, startId);
-        }
-    }
-
-    @Override
-    public long getReadyInMilliSeconds() {
-        return mExecutionTime - getTimeMillis();
-    }
-
-    @Override
-    @CallSuper
-    public void onBeforeExecute() {
-        for (Policy policy : mPolicies) {
-            policy.onBeforeExecute();
-        }
-        mHasStarted = true;
-    }
-
-    @Override
-    @CallSuper
-    public void onCompleted() {
-        if (mHasFailed) {
-            for (Policy policy : mPolicies) {
-                policy.onFail();
-            }
-        }
-
-        for (Policy policy : mPolicies) {
-            policy.onCompleted();
-        }
-    }
-
-    @Override
-    public void onDuplicatedTaskAdded(Task task) {
-        for (Policy policy : mPolicies) {
-            policy.onDuplicatedTaskAdded();
-        }
-    }
-
-    @NeededForTesting
-    static class Clock {
-
-        public long getTimeMillis() {
-            return SystemClock.elapsedRealtime();
-        }
-    }
-
-    /**
-     * Used to replace the clock with an deterministic clock
-     */
-    @NeededForTesting
-    static void setClockForTesting(Clock clock) {
-        sClock = clock;
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/scheduling/BlockerTask.java b/src/com/android/phone/vvm/omtp/scheduling/BlockerTask.java
deleted file mode 100644
index 9d91828..0000000
--- a/src/com/android/phone/vvm/omtp/scheduling/BlockerTask.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.scheduling;
-
-import android.content.Context;
-import android.content.Intent;
-
-import com.android.phone.vvm.omtp.VvmLog;
-
-/**
- * Task to block another task of the same ID from being queued for a certain amount of time.
- */
-public class BlockerTask extends BaseTask {
-
-    private static final String TAG = "BlockerTask";
-
-    public static final String EXTRA_TASK_ID = "extra_task_id";
-    public static final String EXTRA_BLOCK_FOR_MILLIS = "extra_block_for_millis";
-
-    public BlockerTask() {
-        super(TASK_INVALID);
-    }
-
-    @Override
-    public void onCreate(Context context, Intent intent, int flags, int startId) {
-        super.onCreate(context, intent, flags, startId);
-        setId(intent.getIntExtra(EXTRA_TASK_ID, TASK_INVALID));
-        setExecutionTime(getTimeMillis() + intent.getIntExtra(EXTRA_BLOCK_FOR_MILLIS, 0));
-    }
-
-    @Override
-    public void onExecuteInBackgroundThread() {
-        // Do nothing.
-    }
-
-    @Override
-    public void onDuplicatedTaskAdded(Task task) {
-        VvmLog
-            .v(TAG, task.toString() + "blocked, " + getReadyInMilliSeconds() + "millis remaining");
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/scheduling/MinimalIntervalPolicy.java b/src/com/android/phone/vvm/omtp/scheduling/MinimalIntervalPolicy.java
deleted file mode 100644
index 8bb22ca..0000000
--- a/src/com/android/phone/vvm/omtp/scheduling/MinimalIntervalPolicy.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.scheduling;
-
-import android.content.Intent;
-
-import com.android.phone.vvm.omtp.scheduling.Task.TaskId;
-
-/**
- * If a task with this policy succeeds, a {@link BlockerTask} with the same {@link TaskId} of the
- * task will be queued immediately, preventing the same task from running for a certain amount of
- * time.
- */
-public class MinimalIntervalPolicy implements Policy {
-
-    BaseTask mTask;
-    TaskId mId;
-    int mBlockForMillis;
-
-    public MinimalIntervalPolicy(int blockForMillis) {
-        mBlockForMillis = blockForMillis;
-    }
-
-    @Override
-    public void onCreate(BaseTask task, Intent intent, int flags, int startId) {
-        mTask = task;
-        mId = mTask.getId();
-    }
-
-    @Override
-    public void onBeforeExecute() {
-
-    }
-
-    @Override
-    public void onCompleted() {
-        if (!mTask.hasFailed()) {
-            Intent intent = mTask
-                    .createIntent(mTask.getContext(), BlockerTask.class, mId.subId);
-            intent.putExtra(BlockerTask.EXTRA_TASK_ID, mId.id);
-            intent.putExtra(BlockerTask.EXTRA_BLOCK_FOR_MILLIS, mBlockForMillis);
-            mTask.getContext().startService(intent);
-        }
-    }
-
-    @Override
-    public void onFail() {
-
-    }
-
-    @Override
-    public void onDuplicatedTaskAdded() {
-
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/scheduling/Policy.java b/src/com/android/phone/vvm/omtp/scheduling/Policy.java
deleted file mode 100644
index fcb01b8..0000000
--- a/src/com/android/phone/vvm/omtp/scheduling/Policy.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.scheduling;
-
-import android.content.Intent;
-
-/**
- * A set of listeners managed by {@link BaseTask} for common behaviors such as retrying. Call {@link
- * BaseTask#addPolicy(Policy)} to add a policy.
- */
-public interface Policy {
-
-    void onCreate(BaseTask task, Intent intent, int flags, int startId);
-
-    void onBeforeExecute();
-
-    void onCompleted();
-
-    void onFail();
-
-    void onDuplicatedTaskAdded();
-}
diff --git a/src/com/android/phone/vvm/omtp/scheduling/PostponePolicy.java b/src/com/android/phone/vvm/omtp/scheduling/PostponePolicy.java
deleted file mode 100644
index f23d7f7..0000000
--- a/src/com/android/phone/vvm/omtp/scheduling/PostponePolicy.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.scheduling;
-
-import android.content.Intent;
-
-import com.android.phone.vvm.omtp.VvmLog;
-
-/**
- * A task with Postpone policy will not be executed immediately. It will wait for a while and if a
- * duplicated task is queued during the duration, the task will be postponed further. The task will
- * only be executed if no new task was added in postponeMillis. Useful to batch small tasks in quick
- * succession together.
- */
-public class PostponePolicy implements Policy {
-
-    private static final String TAG = "PostponePolicy";
-
-    private final int mPostponeMillis;
-    private BaseTask mTask;
-
-    public PostponePolicy(int postponeMillis) {
-        mPostponeMillis = postponeMillis;
-    }
-
-    @Override
-    public void onCreate(BaseTask task, Intent intent, int flags, int startId) {
-        mTask = task;
-        mTask.setExecutionTime(mTask.getTimeMillis() + mPostponeMillis);
-    }
-
-    @Override
-    public void onBeforeExecute() {
-        // Do nothing
-    }
-
-    @Override
-    public void onCompleted() {
-        // Do nothing
-    }
-
-    @Override
-    public void onFail() {
-        // Do nothing
-    }
-
-    @Override
-    public void onDuplicatedTaskAdded() {
-        if (mTask.hasStarted()) {
-            return;
-        }
-        VvmLog.d(TAG, "postponing " + mTask);
-        mTask.setExecutionTime(mTask.getTimeMillis() + mPostponeMillis);
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/scheduling/RetryPolicy.java b/src/com/android/phone/vvm/omtp/scheduling/RetryPolicy.java
deleted file mode 100644
index 4f4126a..0000000
--- a/src/com/android/phone/vvm/omtp/scheduling/RetryPolicy.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.scheduling;
-
-import android.content.Intent;
-import android.telecom.PhoneAccountHandle;
-import com.android.phone.VoicemailStatus;
-import com.android.phone.vvm.omtp.VvmLog;
-import com.android.phone.vvm.omtp.utils.PhoneAccountHandleConverter;
-
-/**
- * A task with this policy will automatically re-queue itself if {@link BaseTask#fail()} has been
- * called during {@link BaseTask#onExecuteInBackgroundThread()}. A task will be retried at most
- * <code>retryLimit</code> times and with a <code>retryDelayMillis</code> interval in between.
- */
-public class RetryPolicy implements Policy {
-
-    private static final String TAG = "RetryPolicy";
-    private static final String EXTRA_RETRY_COUNT = "extra_retry_count";
-
-    private final int mRetryLimit;
-    private final int mRetryDelayMillis;
-
-    private BaseTask mTask;
-
-    private int mRetryCount;
-    private boolean mFailed;
-
-    private VoicemailStatus.DeferredEditor mVoicemailStatusEditor;
-
-    public RetryPolicy(int retryLimit, int retryDelayMillis) {
-        mRetryLimit = retryLimit;
-        mRetryDelayMillis = retryDelayMillis;
-    }
-
-    private boolean hasMoreRetries() {
-        return mRetryCount < mRetryLimit;
-    }
-
-    /**
-     * Error status should only be set if retries has exhausted or the task is successful. Status
-     * writes to this editor will be deferred until the task has ended, and will only be committed
-     * if the task is successful or there are no retries left.
-     */
-    public VoicemailStatus.Editor getVoicemailStatusEditor() {
-        return mVoicemailStatusEditor;
-    }
-
-    @Override
-    public void onCreate(BaseTask task, Intent intent, int flags, int startId) {
-        mTask = task;
-        mRetryCount = intent.getIntExtra(EXTRA_RETRY_COUNT, 0);
-        if (mRetryCount > 0) {
-            VvmLog.d(TAG, "retry #" + mRetryCount + " for " + mTask + " queued, executing in "
-                    + mRetryDelayMillis);
-            mTask.setExecutionTime(mTask.getTimeMillis() + mRetryDelayMillis);
-        }
-        PhoneAccountHandle phoneAccountHandle = PhoneAccountHandleConverter
-                .fromSubId(task.getSubId());
-        if (phoneAccountHandle == null) {
-            VvmLog.e(TAG, "null phone account for subId " + task.getSubId());
-            // This should never happen, but continue on if it does. The status write will be
-            // discarded.
-        }
-        mVoicemailStatusEditor = VoicemailStatus
-                .deferredEdit(task.getContext(), phoneAccountHandle);
-    }
-
-    @Override
-    public void onBeforeExecute() {
-
-    }
-
-    @Override
-    public void onCompleted() {
-        if (!mFailed || !hasMoreRetries()) {
-            if (!mFailed) {
-                VvmLog.d(TAG, mTask.toString() + " completed successfully");
-            }
-            if (!hasMoreRetries()) {
-                VvmLog.d(TAG, "Retry limit for " + mTask + " reached");
-            }
-            VvmLog.i(TAG, "committing deferred status: " + mVoicemailStatusEditor.getValues());
-            mVoicemailStatusEditor.deferredApply();
-            return;
-        }
-        VvmLog.i(TAG, "discarding deferred status: " + mVoicemailStatusEditor.getValues());
-        Intent intent = mTask.createRestartIntent();
-        intent.putExtra(EXTRA_RETRY_COUNT, mRetryCount + 1);
-
-        mTask.getContext().startService(intent);
-    }
-
-    @Override
-    public void onFail() {
-        mFailed = true;
-    }
-
-    @Override
-    public void onDuplicatedTaskAdded() {
-
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/scheduling/Task.java b/src/com/android/phone/vvm/omtp/scheduling/Task.java
deleted file mode 100644
index 05d86fd..0000000
--- a/src/com/android/phone/vvm/omtp/scheduling/Task.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.scheduling;
-
-import android.annotation.MainThread;
-import android.annotation.WorkerThread;
-import android.content.Context;
-import android.content.Intent;
-import java.util.Objects;
-
-/**
- * A task for {@link TaskSchedulerService} to execute. Since the task is sent through a intent to
- * the scheduler, The task must be constructable with the intent. Specifically, It must have a
- * constructor with zero arguments, and have all relevant data packed inside the intent. Use {@link
- * TaskSchedulerService#createIntent(Context, Class)} to create a intent that will construct the
- * Task.
- *
- * <p>Only {@link #onExecuteInBackgroundThread()} is run on the worker thread.
- */
-public interface Task {
-
-    /**
-     * TaskId to indicate it has not be set. If a task does not provide a default TaskId it should
-     * be set before {@link Task#onCreate(Context, Intent, int, int) returns}
-     */
-    int TASK_INVALID = -1;
-
-    /**
-     * TaskId to indicate it should always be queued regardless of duplicates. {@link
-     * Task#onDuplicatedTaskAdded(Task)} will never be called on tasks with this TaskId.
-     */
-    int TASK_ALLOW_DUPLICATES = -2;
-
-    int TASK_UPLOAD = 1;
-    int TASK_SYNC = 2;
-    int TASK_ACTIVATION = 3;
-
-    /**
-     * Used to differentiate between types of tasks. If a task with the same TaskId is already in
-     * the queue the new task will be rejected.
-     */
-    class TaskId {
-
-        /**
-         * Indicates the operation type of the task.
-         */
-        public final int id;
-        /**
-         * Same operation for a different subId is allowed. subId is used to differentiate phone
-         * accounts in multi-SIM scenario. For example, each SIM can queue a sync task for their
-         * own.
-         */
-        public final int subId;
-
-        public TaskId(int id, int subId) {
-            this.id = id;
-            this.subId = subId;
-        }
-
-        @Override
-        public boolean equals(Object object) {
-            if (!(object instanceof TaskId)) {
-                return false;
-            }
-            TaskId other = (TaskId) object;
-            return id == other.id && subId == other.subId;
-        }
-
-        @Override
-        public int hashCode() {
-            return Objects.hash(id, subId);
-        }
-    }
-
-    TaskId getId();
-
-    @MainThread
-    void onCreate(Context context, Intent intent, int flags, int startId);
-
-    /**
-     * @return number of milliSeconds the scheduler should wait before running this task. A value
-     * less than {@link TaskSchedulerService#READY_TOLERANCE_MILLISECONDS} will be considered ready.
-     * If no tasks are ready, the scheduler will sleep for this amount of time before doing another
-     * check (it will still wake if a new task is added). The first task in the queue that is ready
-     * will be executed.
-     */
-    @MainThread
-    long getReadyInMilliSeconds();
-
-    /**
-     * Called on the main thread when the scheduler is about to send the task into the worker
-     * thread, calling {@link #onExecuteInBackgroundThread()}
-     */
-    @MainThread
-    void onBeforeExecute();
-
-    /**
-     * The actual payload of the task, executed on the worker thread.
-     */
-    @WorkerThread
-    void onExecuteInBackgroundThread();
-
-    /**
-     * Called on the main thread when {@link #onExecuteInBackgroundThread()} has finished or thrown
-     * an uncaught exception. The task is already removed from the queue at this point, and a same
-     * task can be queued again.
-     */
-    @MainThread
-    void onCompleted();
-
-    /**
-     * Another task with the same TaskId has been added. Necessary data can be retrieved from the
-     * other task, and after this returns the task will be discarded.
-     */
-    @MainThread
-    void onDuplicatedTaskAdded(Task task);
-}
diff --git a/src/com/android/phone/vvm/omtp/scheduling/TaskSchedulerService.java b/src/com/android/phone/vvm/omtp/scheduling/TaskSchedulerService.java
deleted file mode 100644
index 3d6fcdb..0000000
--- a/src/com/android/phone/vvm/omtp/scheduling/TaskSchedulerService.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.scheduling;
-
-import android.annotation.MainThread;
-import android.annotation.Nullable;
-import android.annotation.WorkerThread;
-import android.app.AlarmManager;
-import android.app.PendingIntent;
-import android.app.Service;
-import android.content.Context;
-import android.content.Intent;
-import android.os.Binder;
-import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.IBinder;
-import android.os.Looper;
-import android.os.Message;
-import android.os.PowerManager;
-import android.os.PowerManager.WakeLock;
-import android.os.SystemClock;
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.phone.Assert;
-import com.android.phone.NeededForTesting;
-import com.android.phone.vvm.omtp.VvmLog;
-import com.android.phone.vvm.omtp.scheduling.Task.TaskId;
-import java.util.ArrayDeque;
-import java.util.Queue;
-
-/**
- * A service to queue and run {@link Task} on a worker thread. Only one task will be ran at a time,
- * and same task cannot exist in the queue at the same time. The service will be started when a
- * intent is received, and stopped when there are no more tasks in the queue.
- */
-public class TaskSchedulerService extends Service {
-
-    private static final String TAG = "VvmTaskScheduler";
-
-    private static final String ACTION_WAKEUP = "action_wakeup";
-
-    private static final int READY_TOLERANCE_MILLISECONDS = 100;
-
-    /**
-     * Threshold to determine whether to do a short or long sleep when a task is scheduled in the
-     * future.
-     *
-     * <p>A short sleep will continue to held the wake lock and use {@link
-     * Handler#postDelayed(Runnable, long)} to wait for the next task.
-     *
-     * <p>A long sleep will release the wake lock and set a {@link AlarmManager} alarm. The alarm is
-     * exact and will wake up the device. Note: as this service is run in the telephony process it
-     * does not seem to be restricted by doze or sleep, it will fire exactly at the moment. The
-     * unbundled version should take doze into account.
-     */
-    private static final int SHORT_SLEEP_THRESHOLD_MILLISECONDS = 60_000;
-    /**
-     * When there are no more tasks to be run the service should be stopped. But when all tasks has
-     * finished there might still be more tasks in the message queue waiting to be processed,
-     * especially the ones submitted in {@link Task#onCompleted()}. Wait for a while before stopping
-     * the service to make sure there are no pending messages.
-     */
-    private static final int STOP_DELAY_MILLISECONDS = 5_000;
-    private static final String EXTRA_CLASS_NAME = "extra_class_name";
-
-    private static final String WAKE_LOCK_TAG = "TaskSchedulerService_wakelock";
-
-    // The thread to run tasks on
-    private volatile WorkerThreadHandler mWorkerThreadHandler;
-
-    private Context mContext = this;
-    /**
-     * Used by tests to turn task handling into a single threaded process by calling {@link
-     * Handler#handleMessage(Message)} directly
-     */
-    private MessageSender mMessageSender = new MessageSender();
-
-    private MainThreadHandler mMainThreadHandler;
-
-    private WakeLock mWakeLock;
-
-    /**
-     * Main thread only, access through {@link #getTasks()}
-     */
-    private final Queue<Task> mTasks = new ArrayDeque<>();
-    private boolean mWorkerThreadIsBusy = false;
-
-    private final Runnable mStopServiceWithDelay = new Runnable() {
-        @Override
-        public void run() {
-            VvmLog.d(TAG, "Stopping service");
-            stopSelf();
-        }
-    };
-    /**
-     * Should attempt to run the next task when a task has finished or been added.
-     */
-    private boolean mTaskAutoRunDisabledForTesting = false;
-
-    @VisibleForTesting
-    final class WorkerThreadHandler extends Handler {
-
-        public WorkerThreadHandler(Looper looper) {
-            super(looper);
-        }
-
-        @Override
-        @WorkerThread
-        public void handleMessage(Message msg) {
-            Assert.isNotMainThread();
-            Task task = (Task) msg.obj;
-            try {
-                VvmLog.v(TAG, "executing task " + task);
-                task.onExecuteInBackgroundThread();
-            } catch (Throwable throwable) {
-                VvmLog.e(TAG, "Exception while executing task " + task + ":", throwable);
-            }
-
-            Message schedulerMessage = mMainThreadHandler.obtainMessage();
-            schedulerMessage.obj = task;
-            mMessageSender.send(schedulerMessage);
-        }
-    }
-
-    @VisibleForTesting
-    final class MainThreadHandler extends Handler {
-
-        public MainThreadHandler(Looper looper) {
-            super(looper);
-        }
-
-        @Override
-        @MainThread
-        public void handleMessage(Message msg) {
-            Assert.isMainThread();
-            Task task = (Task) msg.obj;
-            getTasks().remove(task);
-            task.onCompleted();
-            mWorkerThreadIsBusy = false;
-            maybeRunNextTask();
-        }
-    }
-
-    @Override
-    @MainThread
-    public void onCreate() {
-        super.onCreate();
-        mWakeLock = getSystemService(PowerManager.class)
-                .newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, WAKE_LOCK_TAG);
-        mWakeLock.setReferenceCounted(false);
-        HandlerThread thread = new HandlerThread("VvmTaskSchedulerService");
-        thread.start();
-
-        mWorkerThreadHandler = new WorkerThreadHandler(thread.getLooper());
-        mMainThreadHandler = new MainThreadHandler(Looper.getMainLooper());
-    }
-
-    @Override
-    public void onDestroy() {
-        mWorkerThreadHandler.getLooper().quit();
-        mWakeLock.release();
-    }
-
-    @Override
-    @MainThread
-    public int onStartCommand(@Nullable Intent intent, int flags, int startId) {
-        Assert.isMainThread();
-        // maybeRunNextTask() will release the wakelock either by entering a long sleep or stopping
-        // the service.
-        mWakeLock.acquire();
-        if (ACTION_WAKEUP.equals(intent.getAction())) {
-            VvmLog.d(TAG, "woke up by AlarmManager");
-        } else {
-            Task task = createTask(intent, flags, startId);
-            if (task == null) {
-                VvmLog.e(TAG, "cannot create task form intent");
-            } else {
-                addTask(task);
-            }
-        }
-        maybeRunNextTask();
-        // STICKY means the service will be automatically restarted will the last intent if it is
-        // killed.
-        return START_NOT_STICKY;
-    }
-
-    @MainThread
-    @VisibleForTesting
-    void addTask(Task task) {
-        Assert.isMainThread();
-        if (task.getId().id == Task.TASK_INVALID) {
-            throw new AssertionError("Task id was not set to a valid value before adding.");
-        }
-        if (task.getId().id != Task.TASK_ALLOW_DUPLICATES) {
-            Task oldTask = getTask(task.getId());
-            if (oldTask != null) {
-                oldTask.onDuplicatedTaskAdded(task);
-                return;
-            }
-        }
-        mMainThreadHandler.removeCallbacks(mStopServiceWithDelay);
-        getTasks().add(task);
-        maybeRunNextTask();
-    }
-
-    @MainThread
-    @Nullable
-    private Task getTask(TaskId taskId) {
-        Assert.isMainThread();
-        for (Task task : getTasks()) {
-            if (task.getId().equals(taskId)) {
-                return task;
-            }
-        }
-        return null;
-    }
-
-    @MainThread
-    private Queue<Task> getTasks() {
-        Assert.isMainThread();
-        return mTasks;
-    }
-
-    /**
-     * Create an intent that will queue the <code>task</code>
-     */
-    public static Intent createIntent(Context context, Class<? extends Task> task) {
-        Intent intent = new Intent(context, TaskSchedulerService.class);
-        intent.putExtra(EXTRA_CLASS_NAME, task.getName());
-        return intent;
-    }
-
-    @VisibleForTesting
-    @MainThread
-    @Nullable
-    Task createTask(@Nullable Intent intent, int flags, int startId) {
-        Assert.isMainThread();
-        if (intent == null) {
-            return null;
-        }
-        String className = intent.getStringExtra(EXTRA_CLASS_NAME);
-        VvmLog.d(TAG, "create task:" + className);
-        if (className == null) {
-            throw new IllegalArgumentException("EXTRA_CLASS_NAME expected");
-        }
-        try {
-            Task task = (Task) Class.forName(className).newInstance();
-            task.onCreate(mContext, intent, flags, startId);
-            return task;
-        } catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) {
-            throw new IllegalArgumentException(e);
-        }
-    }
-
-    @MainThread
-    private void maybeRunNextTask() {
-        Assert.isMainThread();
-        if (mWorkerThreadIsBusy) {
-            return;
-        }
-        if (mTaskAutoRunDisabledForTesting) {
-            // If mTaskAutoRunDisabledForTesting is true, runNextTask() must be explicitly called
-            // to run the next task.
-            return;
-        }
-
-        runNextTask();
-    }
-
-    @VisibleForTesting
-    @MainThread
-    void runNextTask() {
-        Assert.isMainThread();
-        // The current alarm is no longer valid, a new one will be set up if required.
-        getSystemService(AlarmManager.class).cancel(getWakeupIntent());
-        if (getTasks().isEmpty()) {
-            prepareStop();
-            return;
-        }
-        Long minimalWaitTime = null;
-        for (Task task : getTasks()) {
-            long waitTime = task.getReadyInMilliSeconds();
-            if (waitTime < READY_TOLERANCE_MILLISECONDS) {
-                task.onBeforeExecute();
-                Message message = mWorkerThreadHandler.obtainMessage();
-                message.obj = task;
-                mWorkerThreadIsBusy = true;
-                mMessageSender.send(message);
-                return;
-            } else {
-                if (minimalWaitTime == null || waitTime < minimalWaitTime) {
-                    minimalWaitTime = waitTime;
-                }
-            }
-        }
-        VvmLog.d(TAG, "minimal wait time:" + minimalWaitTime);
-        if (!mTaskAutoRunDisabledForTesting && minimalWaitTime != null) {
-            // No tasks are currently ready. Sleep until the next one should be.
-            // If a new task is added during the sleep the service will wake immediately.
-            sleep(minimalWaitTime);
-        }
-    }
-
-    private void sleep(long timeMillis) {
-        if (timeMillis < SHORT_SLEEP_THRESHOLD_MILLISECONDS) {
-            mMainThreadHandler.postDelayed(new Runnable() {
-                @Override
-                public void run() {
-                    maybeRunNextTask();
-                }
-            }, timeMillis);
-            return;
-        }
-
-        // Tasks does not have a strict timing requirement, use AlarmManager.set() so the OS could
-        // optimize the battery usage. As this service currently run in the telephony process the
-        // OS give it privileges to behave the same as setExact(), but set() is the targeted
-        // behavior once this is unbundled.
-        getSystemService(AlarmManager.class).set(AlarmManager.ELAPSED_REALTIME_WAKEUP,
-                SystemClock.elapsedRealtime() + timeMillis,
-                getWakeupIntent());
-        mWakeLock.release();
-        VvmLog.d(TAG, "Long sleep for " + timeMillis + " millis");
-    }
-
-    private PendingIntent getWakeupIntent() {
-        Intent intent = new Intent(ACTION_WAKEUP, null, this, getClass());
-        return PendingIntent.getService(this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
-    }
-
-    private void prepareStop() {
-        VvmLog.d(TAG,
-                "No more tasks, stopping service if no task are added in "
-                        + STOP_DELAY_MILLISECONDS + " millis");
-        mMainThreadHandler.postDelayed(mStopServiceWithDelay, STOP_DELAY_MILLISECONDS);
-    }
-
-    static class MessageSender {
-
-        public void send(Message message) {
-            message.sendToTarget();
-        }
-    }
-
-    @NeededForTesting
-    void setContextForTest(Context context) {
-        mContext = context;
-    }
-
-    @NeededForTesting
-    void setTaskAutoRunDisabledForTest(boolean value) {
-        mTaskAutoRunDisabledForTesting = value;
-    }
-
-    @NeededForTesting
-    void setMessageSenderForTest(MessageSender sender) {
-        mMessageSender = sender;
-    }
-
-    @NeededForTesting
-    void clearTasksForTest() {
-        mTasks.clear();
-    }
-
-    @Override
-    @Nullable
-    public IBinder onBind(Intent intent) {
-        return new LocalBinder();
-    }
-
-    @NeededForTesting
-    class LocalBinder extends Binder {
-
-        @NeededForTesting
-        public TaskSchedulerService getService() {
-            return TaskSchedulerService.this;
-        }
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/sms/LegacyModeSmsHandler.java b/src/com/android/phone/vvm/omtp/sms/LegacyModeSmsHandler.java
deleted file mode 100644
index ba5bd70..0000000
--- a/src/com/android/phone/vvm/omtp/sms/LegacyModeSmsHandler.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2016 Google Inc. All Rights Reserved.
- *
- * 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.phone.vvm.omtp.sms;
-
-import android.content.Context;
-import android.content.Intent;
-import android.os.Bundle;
-import android.provider.VoicemailContract;
-import android.telecom.PhoneAccountHandle;
-
-import com.android.internal.telephony.Phone;
-import com.android.phone.PhoneUtils;
-import com.android.phone.vvm.omtp.OmtpConstants;
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-import com.android.phone.vvm.omtp.VvmLog;
-
-/**
- * Class ot handle voicemail SMS under legacy mode
- *
- * @see OmtpVvmCarrierConfigHelper#isLegacyModeEnabled()
- */
-public class LegacyModeSmsHandler {
-
-    private static final String TAG = "LegacyModeSmsHandler";
-
-    public static void handle(Context context, Intent intent, PhoneAccountHandle handle) {
-        VvmLog.v(TAG, "processing VVM SMS on legacy mode");
-        String eventType = intent.getExtras()
-                .getString(VoicemailContract.EXTRA_VOICEMAIL_SMS_PREFIX);
-        Bundle data = intent.getExtras().getBundle(VoicemailContract.EXTRA_VOICEMAIL_SMS_FIELDS);
-
-        if (eventType.equals(OmtpConstants.SYNC_SMS_PREFIX)) {
-            SyncMessage message = new SyncMessage(data);
-            VvmLog.v(TAG, "Received SYNC sms for " + handle.getId() +
-                    " with event " + message.getSyncTriggerEvent());
-
-            switch (message.getSyncTriggerEvent()) {
-                case OmtpConstants.NEW_MESSAGE:
-                case OmtpConstants.MAILBOX_UPDATE:
-                    // The user has called into the voicemail and the new message count could
-                    // change.
-                    // For some carriers new message count could be set to 0 even if there are still
-                    // unread messages, to clear the message waiting indicator.
-                    VvmLog.v(TAG, "updating MWI");
-                    Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(handle);
-                    // Setting voicemail message count to non-zero will show the telephony voicemail
-                    // notification, and zero will clear it.
-                    phone.setVoiceMessageCount(message.getNewMessageCount());
-                    break;
-                default:
-                    break;
-            }
-        }
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/sms/OmtpCvvmMessageSender.java b/src/com/android/phone/vvm/omtp/sms/OmtpCvvmMessageSender.java
deleted file mode 100644
index 98d8594..0000000
--- a/src/com/android/phone/vvm/omtp/sms/OmtpCvvmMessageSender.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2015 Google Inc. All Rights Reserved.
- *
- * 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.phone.vvm.omtp.sms;
-
-import android.annotation.Nullable;
-import android.app.PendingIntent;
-import android.telephony.SmsManager;
-
-import com.android.phone.vvm.omtp.OmtpConstants;
-
-/**
- * An implementation of the OmtpMessageSender for T-Mobile.
- */
-public class OmtpCvvmMessageSender extends OmtpMessageSender {
-    public OmtpCvvmMessageSender(SmsManager smsManager, short applicationPort,
-            String destinationNumber) {
-        super(smsManager, applicationPort, destinationNumber);
-    }
-
-    @Override
-    public void requestVvmActivation(@Nullable PendingIntent sentIntent) {
-        sendCvvmMessage(OmtpConstants.ACTIVATE_REQUEST, sentIntent);
-    }
-
-    @Override
-    public void requestVvmDeactivation(@Nullable PendingIntent sentIntent) {
-        sendCvvmMessage(OmtpConstants.DEACTIVATE_REQUEST, sentIntent);
-    }
-
-    @Override
-    public void requestVvmStatus(@Nullable PendingIntent sentIntent) {
-        sendCvvmMessage(OmtpConstants.STATUS_REQUEST, sentIntent);
-    }
-
-    private void sendCvvmMessage(String request, PendingIntent sentIntent) {
-        StringBuilder sb = new StringBuilder().append(request);
-        sb.append(OmtpConstants.SMS_PREFIX_SEPARATOR);
-        appendField(sb, "dt" /* device type */, "6" /* no VTT (transcription) support*/);
-        sendSms(sb.toString(), sentIntent);
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/sms/OmtpMessageReceiver.java b/src/com/android/phone/vvm/omtp/sms/OmtpMessageReceiver.java
deleted file mode 100644
index 397caf8..0000000
--- a/src/com/android/phone/vvm/omtp/sms/OmtpMessageReceiver.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp.sms;
-
-import android.content.BroadcastReceiver;
-import android.content.ContentUris;
-import android.content.Context;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.UserManager;
-import android.provider.VoicemailContract;
-import android.telecom.PhoneAccountHandle;
-import android.telecom.Voicemail;
-import com.android.phone.settings.VisualVoicemailSettingsUtil;
-import com.android.phone.vvm.omtp.ActivationTask;
-import com.android.phone.vvm.omtp.OmtpConstants;
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-import com.android.phone.vvm.omtp.VvmLog;
-import com.android.phone.vvm.omtp.protocol.VisualVoicemailProtocol;
-import com.android.phone.vvm.omtp.sync.OmtpVvmSyncService;
-import com.android.phone.vvm.omtp.sync.SyncOneTask;
-import com.android.phone.vvm.omtp.sync.SyncTask;
-import com.android.phone.vvm.omtp.sync.VoicemailsQueryHelper;
-import com.android.phone.vvm.omtp.utils.PhoneAccountHandleConverter;
-
-/**
- * Receive SMS messages and send for processing by the OMTP visual voicemail source.
- */
-public class OmtpMessageReceiver extends BroadcastReceiver {
-
-    private static final String TAG = "OmtpMessageReceiver";
-
-    private Context mContext;
-
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        mContext = context;
-        int subId = intent.getExtras().getInt(VoicemailContract.EXTRA_VOICEMAIL_SMS_SUBID);
-        PhoneAccountHandle phone = PhoneAccountHandleConverter.fromSubId(subId);
-
-        if (phone == null) {
-            // This should never happen
-            VvmLog.i(TAG, "Received message for null phone account on subId " + subId);
-            return;
-        }
-
-        if (!UserManager.get(context).isUserUnlocked()) {
-            VvmLog.i(TAG, "Received message on locked device");
-            // LegacyModeSmsHandler can handle new message notifications without storage access
-            LegacyModeSmsHandler.handle(context, intent, phone);
-            // A full sync will happen after the device is unlocked, so nothing else need to be
-            // done.
-            return;
-        }
-
-        OmtpVvmCarrierConfigHelper helper = new OmtpVvmCarrierConfigHelper(mContext, subId);
-        if (!VisualVoicemailSettingsUtil.isEnabled(mContext, phone)) {
-            if (helper.isLegacyModeEnabled()) {
-                LegacyModeSmsHandler.handle(context, intent, phone);
-            } else {
-                VvmLog.i(TAG, "Received vvm message for disabled vvm source.");
-            }
-            return;
-        }
-
-        String eventType = intent.getExtras()
-                .getString(VoicemailContract.EXTRA_VOICEMAIL_SMS_PREFIX);
-        Bundle data = intent.getExtras().getBundle(VoicemailContract.EXTRA_VOICEMAIL_SMS_FIELDS);
-
-        if (eventType == null || data == null) {
-            VvmLog.e(TAG, "Unparsable VVM SMS received, ignoring");
-            return;
-        }
-
-        if (eventType.equals(OmtpConstants.SYNC_SMS_PREFIX)) {
-            SyncMessage message = new SyncMessage(data);
-
-            VvmLog.v(TAG, "Received SYNC sms for " + subId +
-                    " with event " + message.getSyncTriggerEvent());
-            processSync(phone, message);
-        } else if (eventType.equals(OmtpConstants.STATUS_SMS_PREFIX)) {
-            VvmLog.v(TAG, "Received Status sms for " + subId);
-            // If the STATUS SMS is initiated by ActivationTask the TaskSchedulerService will reject
-            // the follow request. Providing the data will also prevent ActivationTask from
-            // requesting another STATUS SMS. The following task will only run if the carrier
-            // spontaneous send a STATUS SMS, in that case, the VVM service should be reactivated.
-            ActivationTask.start(context, subId, data);
-        } else {
-            VvmLog.w(TAG, "Unknown prefix: " + eventType);
-            VisualVoicemailProtocol protocol = helper.getProtocol();
-            if (protocol == null) {
-                return;
-            }
-            Bundle statusData = helper.getProtocol()
-                    .translateStatusSmsBundle(helper, eventType, data);
-            if (statusData != null) {
-                VvmLog.i(TAG, "Protocol recognized the SMS as STATUS, activating");
-                ActivationTask.start(context, subId, data);
-            }
-        }
-    }
-
-    /**
-     * A sync message has two purposes: to signal a new voicemail message, and to indicate the
-     * voicemails on the server have changed remotely (usually through the TUI). Save the new
-     * message to the voicemail provider if it is the former case and perform a full sync in the
-     * latter case.
-     *
-     * @param message The sync message to extract data from.
-     */
-    private void processSync(PhoneAccountHandle phone, SyncMessage message) {
-        Intent serviceIntent = null;
-        switch (message.getSyncTriggerEvent()) {
-            case OmtpConstants.NEW_MESSAGE:
-                if (!OmtpConstants.VOICE.equals(message.getContentType())) {
-                    VvmLog.i(TAG, "Non-voice message of type '" + message.getContentType()
-                        + "' received, ignoring");
-                    return;
-                }
-
-                Voicemail.Builder builder = Voicemail.createForInsertion(
-                        message.getTimestampMillis(), message.getSender())
-                        .setPhoneAccount(phone)
-                        .setSourceData(message.getId())
-                        .setDuration(message.getLength())
-                        .setSourcePackage(mContext.getPackageName());
-                Voicemail voicemail = builder.build();
-
-                VoicemailsQueryHelper queryHelper = new VoicemailsQueryHelper(mContext);
-                if (queryHelper.isVoicemailUnique(voicemail)) {
-                    Uri uri = VoicemailContract.Voicemails.insert(mContext, voicemail);
-                    voicemail = builder.setId(ContentUris.parseId(uri)).setUri(uri).build();
-                    SyncOneTask.start(mContext, phone, voicemail);
-                }
-                break;
-            case OmtpConstants.MAILBOX_UPDATE:
-                SyncTask.start(mContext, phone, OmtpVvmSyncService.SYNC_DOWNLOAD_ONLY);
-                break;
-            case OmtpConstants.GREETINGS_UPDATE:
-                // Not implemented in V1
-                break;
-            default:
-                VvmLog.e(TAG,
-                        "Unrecognized sync trigger event: " + message.getSyncTriggerEvent());
-                break;
-        }
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/sms/OmtpMessageSender.java b/src/com/android/phone/vvm/omtp/sms/OmtpMessageSender.java
deleted file mode 100644
index 9a775f0..0000000
--- a/src/com/android/phone/vvm/omtp/sms/OmtpMessageSender.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2015 Google Inc. All Rights Reserved.
- *
- * 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.phone.vvm.omtp.sms;
-
-import android.annotation.Nullable;
-import android.app.PendingIntent;
-import android.telephony.SmsManager;
-
-import com.android.phone.vvm.omtp.OmtpConstants;
-import com.android.phone.vvm.omtp.VvmLog;
-
-import java.io.UnsupportedEncodingException;
-import java.util.Locale;
-
-/**
- * Send client originated OMTP messages to the OMTP server.
- * <p>
- * Uses {@link PendingIntent} instead of a call back to notify when the message is
- * sent. This is primarily to keep the implementation simple and reuse what the underlying
- * {@link SmsManager} interface provides.
- * <p>
- * Provides simple APIs to send different types of mobile originated OMTP SMS to the VVM server.
- */
-public abstract class OmtpMessageSender {
-    protected static final String TAG = "OmtpMessageSender";
-    protected short mApplicationPort;
-    protected String mDestinationNumber;
-    protected SmsManager mSmsManager;
-
-    public OmtpMessageSender(SmsManager smsManager, short applicationPort,
-            String destinationNumber) {
-        mSmsManager = smsManager;
-        mApplicationPort = applicationPort;
-        mDestinationNumber = destinationNumber;
-    }
-
-    /**
-     * Sends a request to the VVM server to activate VVM for the current subscriber.
-     *
-     * @param sentIntent If not NULL this PendingIntent is broadcast when the message is
-     *            successfully sent, or failed.
-     */
-    public void requestVvmActivation(@Nullable PendingIntent sentIntent) {}
-
-    /**
-     * Sends a request to the VVM server to deactivate VVM for the current subscriber.
-     *
-     * @param sentIntent If not NULL this PendingIntent is broadcast when the message is
-     *            successfully sent, or failed.
-     */
-    public void requestVvmDeactivation(@Nullable PendingIntent sentIntent) {}
-
-    /**
-     * Send a request to the VVM server to get account status of the current subscriber.
-     *
-     * @param sentIntent If not NULL this PendingIntent is broadcast when the message is
-     *            successfully sent, or failed.
-     */
-    public void requestVvmStatus(@Nullable PendingIntent sentIntent) {}
-
-    protected void sendSms(String text, PendingIntent sentIntent) {
-        // If application port is set to 0 then send simple text message, else send data message.
-        if (mApplicationPort == 0) {
-            VvmLog
-                    .v(TAG, String.format("Sending TEXT sms '%s' to %s", text, mDestinationNumber));
-            mSmsManager.sendTextMessageWithSelfPermissions(mDestinationNumber, null, text,
-                    sentIntent, null, false);
-        } else {
-            byte[] data;
-            try {
-                data = text.getBytes("UTF-8");
-            } catch (UnsupportedEncodingException e) {
-                throw new IllegalStateException("Failed to encode: " + text);
-            }
-            VvmLog.v(TAG,
-                    String.format(Locale.US, "Sending BINARY sms '%s' to %s:%d", text,
-                            mDestinationNumber, mApplicationPort));
-            mSmsManager.sendDataMessageWithSelfPermissions(mDestinationNumber, null,
-                    mApplicationPort, data, sentIntent, null);
-        }
-    }
-
-    protected void appendField(StringBuilder sb, String field, Object value) {
-        sb.append(field).append(OmtpConstants.SMS_KEY_VALUE_SEPARATOR).append(value);
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/sms/OmtpProvisioningService.java b/src/com/android/phone/vvm/omtp/sms/OmtpProvisioningService.java
deleted file mode 100644
index 154eeeb..0000000
--- a/src/com/android/phone/vvm/omtp/sms/OmtpProvisioningService.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.sms;
-
-import android.app.IntentService;
-import android.content.Context;
-import android.content.Intent;
-import android.os.Bundle;
-import android.provider.VoicemailContract;
-import android.telecom.PhoneAccountHandle;
-
-import com.android.phone.PhoneUtils;
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-import com.android.phone.vvm.omtp.utils.PhoneAccountHandleConverter;
-
-/**
- * Performs visual voicemail provisioning in background thread. Not exported.
- */
-public class OmtpProvisioningService extends IntentService {
-
-    public OmtpProvisioningService() {
-        super("OmtpProvisioningService");
-    }
-
-    /**
-     * Create an intent to start OmtpProvisioningService from a {@link
-     * VoicemailContract.ACTION_VOICEMAIL_SMS_RECEIVED} intent.
-     */
-    public static Intent getProvisionIntent(Context context, Intent messageIntent) {
-        Intent serviceIntent = new Intent(context, OmtpProvisioningService.class);
-
-        serviceIntent.putExtra(VoicemailContract.EXTRA_VOICEMAIL_SMS_SUBID,
-                messageIntent.getExtras().getInt(VoicemailContract.EXTRA_VOICEMAIL_SMS_SUBID));
-        serviceIntent.putExtra(VoicemailContract.EXTRA_VOICEMAIL_SMS_FIELDS,
-                messageIntent.getExtras().getBundle(VoicemailContract.EXTRA_VOICEMAIL_SMS_FIELDS));
-
-        return serviceIntent;
-    }
-
-    @Override
-    public void onHandleIntent(Intent intent) {
-        int subId = intent.getExtras().getInt(VoicemailContract.EXTRA_VOICEMAIL_SMS_SUBID);
-        PhoneAccountHandle phone = PhoneAccountHandleConverter.fromSubId(subId);
-
-        Bundle data = intent.getExtras().getBundle(VoicemailContract.EXTRA_VOICEMAIL_SMS_FIELDS);
-
-        StatusMessage message = new StatusMessage(data);
-        startProvisioning(phone, message, data);
-    }
-
-    private void startProvisioning(PhoneAccountHandle phone, StatusMessage message, Bundle data) {
-        OmtpVvmCarrierConfigHelper helper = new OmtpVvmCarrierConfigHelper(this,
-                PhoneUtils.getSubIdForPhoneAccountHandle(phone));
-
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/sms/OmtpStandardMessageSender.java b/src/com/android/phone/vvm/omtp/sms/OmtpStandardMessageSender.java
deleted file mode 100644
index 05276e1..0000000
--- a/src/com/android/phone/vvm/omtp/sms/OmtpStandardMessageSender.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (C) 2015 Google Inc. All Rights Reserved.
- *
- * 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.phone.vvm.omtp.sms;
-
-import android.annotation.Nullable;
-import android.app.PendingIntent;
-import android.telephony.SmsManager;
-import android.text.TextUtils;
-
-import com.android.phone.vvm.omtp.OmtpConstants;
-
-/**
- * A implementation of the OmtpMessageSender using the standard OMTP sms protocol.
- */
-public class OmtpStandardMessageSender extends OmtpMessageSender {
-    private final String mClientType;
-    private final String mProtocolVersion;
-    private final String mClientPrefix;
-
-    /**
-     * Creates a new instance of OmtpStandardMessageSender.
-     *
-     * @param smsManager SMS sending library. There is a different SmsManager for each SIM.
-     * @param applicationPort If set to a value > 0 then a binary sms is sent to this port number.
-     *            Otherwise, a standard text SMS is sent.
-     * @param destinationNumber Destination number to be used.
-     * @param clientType The "ct" field to be set in the MO message. This is the value used by the
-     *            VVM server to identify the client. Certain VVM servers require a specific agreed
-     *            value for this field.
-     * @param protocolVersion OMTP protocol version.
-     * @param clientPrefix The client prefix requested to be used by the server in its MT messages.
-     */
-    public OmtpStandardMessageSender(SmsManager smsManager, short applicationPort,
-            String destinationNumber, String clientType, String protocolVersion,
-            String clientPrefix) {
-        super(smsManager, applicationPort, destinationNumber);
-        mClientType = clientType;
-        mProtocolVersion = protocolVersion;
-        mClientPrefix = clientPrefix;
-    }
-
-    // Activate message:
-    // V1.1: Activate:pv=<value>;ct=<value>
-    // V1.2: Activate:pv=<value>;ct=<value>;pt=<value>;<Clientprefix>
-    // V1.3: Activate:pv=<value>;ct=<value>;pt=<value>;<Clientprefix>
-    @Override
-    public void requestVvmActivation(@Nullable PendingIntent sentIntent) {
-        StringBuilder sb = new StringBuilder().append(OmtpConstants.ACTIVATE_REQUEST);
-
-        appendProtocolVersionAndClientType(sb);
-        if (TextUtils.equals(mProtocolVersion, OmtpConstants.PROTOCOL_VERSION1_2) ||
-                TextUtils.equals(mProtocolVersion, OmtpConstants.PROTOCOL_VERSION1_3)) {
-            appendApplicationPort(sb);
-            appendClientPrefix(sb);
-        }
-
-        sendSms(sb.toString(), sentIntent);
-    }
-
-    // Deactivate message:
-    // V1.1: Deactivate:pv=<value>;ct=<string>
-    // V1.2: Deactivate:pv=<value>;ct=<string>
-    // V1.3: Deactivate:pv=<value>;ct=<string>
-    @Override
-    public void requestVvmDeactivation(@Nullable PendingIntent sentIntent) {
-        StringBuilder sb = new StringBuilder().append(OmtpConstants.DEACTIVATE_REQUEST);
-        appendProtocolVersionAndClientType(sb);
-
-        sendSms(sb.toString(), sentIntent);
-    }
-
-    // Status message:
-    // V1.1: STATUS
-    // V1.2: STATUS
-    // V1.3: STATUS:pv=<value>;ct=<value>;pt=<value>;<Clientprefix>
-    @Override
-    public void requestVvmStatus(@Nullable PendingIntent sentIntent) {
-        StringBuilder sb = new StringBuilder().append(OmtpConstants.STATUS_REQUEST);
-
-        if (TextUtils.equals(mProtocolVersion, OmtpConstants.PROTOCOL_VERSION1_3)) {
-            appendProtocolVersionAndClientType(sb);
-            appendApplicationPort(sb);
-            appendClientPrefix(sb);
-        }
-
-        sendSms(sb.toString(), sentIntent);
-    }
-
-    private void appendProtocolVersionAndClientType(StringBuilder sb) {
-        sb.append(OmtpConstants.SMS_PREFIX_SEPARATOR);
-        appendField(sb, OmtpConstants.PROTOCOL_VERSION, mProtocolVersion);
-        sb.append(OmtpConstants.SMS_FIELD_SEPARATOR);
-        appendField(sb, OmtpConstants.CLIENT_TYPE, mClientType);
-    }
-
-    private void appendApplicationPort(StringBuilder sb) {
-        sb.append(OmtpConstants.SMS_FIELD_SEPARATOR);
-        appendField(sb, OmtpConstants.APPLICATION_PORT, mApplicationPort);
-    }
-
-    private void appendClientPrefix(StringBuilder sb) {
-        sb.append(OmtpConstants.SMS_FIELD_SEPARATOR);
-        sb.append(mClientPrefix);
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/sms/StatusMessage.java b/src/com/android/phone/vvm/omtp/sms/StatusMessage.java
deleted file mode 100644
index 65455d0..0000000
--- a/src/com/android/phone/vvm/omtp/sms/StatusMessage.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp.sms;
-
-import android.os.Bundle;
-import android.telecom.Log;
-
-import com.android.phone.NeededForTesting;
-import com.android.phone.vvm.omtp.OmtpConstants;
-import com.android.phone.vvm.omtp.VisualVoicemailPreferences;
-
-/**
- * Structured data representation of OMTP STATUS message.
- *
- * The getters will return null if the field was not set in the message body or it could not be
- * parsed.
- */
-public class StatusMessage {
-    // NOTE: Following Status SMS fields are not yet parsed, as they do not seem
-    // to be useful for initial omtp source implementation.
-    // lang, g_len, vs_len, pw_len, pm, gm, vtc, vt
-
-    private final String mProvisioningStatus;
-    private final String mStatusReturnCode;
-    private final String mSubscriptionUrl;
-    private final String mServerAddress;
-    private final String mTuiAccessNumber;
-    private final String mClientSmsDestinationNumber;
-    private final String mImapPort;
-    private final String mImapUserName;
-    private final String mImapPassword;
-    private final String mSmtpPort;
-    private final String mSmtpUserName;
-    private final String mSmtpPassword;
-    private final String mTuiPasswordLength;
-
-    @Override
-    public String toString() {
-        return "StatusMessage [mProvisioningStatus=" + mProvisioningStatus
-                + ", mStatusReturnCode=" + mStatusReturnCode
-                + ", mSubscriptionUrl=" + mSubscriptionUrl
-                + ", mServerAddress=" + mServerAddress
-                + ", mTuiAccessNumber=" + mTuiAccessNumber
-                + ", mClientSmsDestinationNumber=" + mClientSmsDestinationNumber
-                + ", mImapPort=" + mImapPort
-                + ", mImapUserName=" + mImapUserName
-                + ", mImapPassword=" + Log.pii(mImapPassword)
-                + ", mSmtpPort=" + mSmtpPort
-                + ", mSmtpUserName=" + mSmtpUserName
-                + ", mSmtpPassword=" + Log.pii(mSmtpPassword)
-                + ", mTuiPasswordLength=" + mTuiPasswordLength + "]";
-    }
-
-    public StatusMessage(Bundle wrappedData) {
-        mProvisioningStatus = unquote(getString(wrappedData, OmtpConstants.PROVISIONING_STATUS));
-        mStatusReturnCode = getString(wrappedData, OmtpConstants.RETURN_CODE);
-        mSubscriptionUrl = getString(wrappedData, OmtpConstants.SUBSCRIPTION_URL);
-        mServerAddress = getString(wrappedData, OmtpConstants.SERVER_ADDRESS);
-        mTuiAccessNumber = getString(wrappedData, OmtpConstants.TUI_ACCESS_NUMBER);
-        mClientSmsDestinationNumber = getString(wrappedData,
-                OmtpConstants.CLIENT_SMS_DESTINATION_NUMBER);
-        mImapPort = getString(wrappedData, OmtpConstants.IMAP_PORT);
-        mImapUserName = getString(wrappedData, OmtpConstants.IMAP_USER_NAME);
-        mImapPassword = getString(wrappedData, OmtpConstants.IMAP_PASSWORD);
-        mSmtpPort = getString(wrappedData, OmtpConstants.SMTP_PORT);
-        mSmtpUserName = getString(wrappedData, OmtpConstants.SMTP_USER_NAME);
-        mSmtpPassword = getString(wrappedData, OmtpConstants.SMTP_PASSWORD);
-        mTuiPasswordLength = getString(wrappedData, OmtpConstants.TUI_PASSWORD_LENGTH);
-    }
-
-    private static String unquote(String string) {
-        if (string.length() < 2) {
-            return string;
-        }
-        if (string.startsWith("\"") && string.endsWith("\"")) {
-            return string.substring(1, string.length() - 1);
-        }
-        return string;
-    }
-
-    /**
-     * @return the subscriber's VVM provisioning status.
-     */
-    public String getProvisioningStatus() {
-        return mProvisioningStatus;
-    }
-
-    /**
-     * @return the return-code of the status SMS.
-     */
-    public String getReturnCode() {
-        return mStatusReturnCode;
-    }
-
-    /**
-     * @return the URL of the voicemail server. This is the URL to send the users to for subscribing
-     * to the visual voicemail service.
-     */
-    @NeededForTesting
-    public String getSubscriptionUrl() {
-        return mSubscriptionUrl;
-    }
-
-    /**
-     * @return the voicemail server address. Either server IP address or fully qualified domain
-     * name.
-     */
-    public String getServerAddress() {
-        return mServerAddress;
-    }
-
-    /**
-     * @return the Telephony User Interface number to call to access voicemails directly from the
-     * IVR.
-     */
-    @NeededForTesting
-    public String getTuiAccessNumber() {
-        return mTuiAccessNumber;
-    }
-
-    /**
-     * @return the number to which client originated SMSes should be sent to.
-     */
-    @NeededForTesting
-    public String getClientSmsDestinationNumber() {
-        return mClientSmsDestinationNumber;
-    }
-
-    /**
-     * @return the IMAP server port to talk to.
-     */
-    public String getImapPort() {
-        return mImapPort;
-    }
-
-    /**
-     * @return the IMAP user name to be used for authentication.
-     */
-    public String getImapUserName() {
-        return mImapUserName;
-    }
-
-    /**
-     * @return the IMAP password to be used for authentication.
-     */
-    public String getImapPassword() {
-        return mImapPassword;
-    }
-
-    /**
-     * @return the SMTP server port to talk to.
-     */
-    @NeededForTesting
-    public String getSmtpPort() {
-        return mSmtpPort;
-    }
-
-    /**
-     * @return the SMTP user name to be used for SMTP authentication.
-     */
-    @NeededForTesting
-    public String getSmtpUserName() {
-        return mSmtpUserName;
-    }
-
-    /**
-     * @return the SMTP password to be used for SMTP authentication.
-     */
-    @NeededForTesting
-    public String getSmtpPassword() {
-        return mSmtpPassword;
-    }
-
-    public String getTuiPasswordLength() {
-        return mTuiPasswordLength;
-    }
-
-    private static String getString(Bundle bundle, String key) {
-        String value = bundle.getString(key);
-        if (value == null) {
-            return "";
-        }
-        return value;
-    }
-
-    /**
-     * Saves a StatusMessage to the {@link VisualVoicemailPreferences}. Not all fields are saved.
-     */
-    public VisualVoicemailPreferences.Editor putStatus(VisualVoicemailPreferences.Editor editor) {
-        return editor
-                .putString(OmtpConstants.IMAP_PORT, getImapPort())
-                .putString(OmtpConstants.SERVER_ADDRESS, getServerAddress())
-                .putString(OmtpConstants.IMAP_USER_NAME, getImapUserName())
-                .putString(OmtpConstants.IMAP_PASSWORD, getImapPassword())
-                .putString(OmtpConstants.TUI_PASSWORD_LENGTH, getTuiPasswordLength());
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/vvm/omtp/sms/StatusSmsFetcher.java b/src/com/android/phone/vvm/omtp/sms/StatusSmsFetcher.java
deleted file mode 100644
index 69e4f5f..0000000
--- a/src/com/android/phone/vvm/omtp/sms/StatusSmsFetcher.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp.sms;
-
-import android.annotation.MainThread;
-import android.annotation.Nullable;
-import android.annotation.WorkerThread;
-import android.app.Activity;
-import android.app.PendingIntent;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Bundle;
-import android.provider.VoicemailContract;
-import android.telephony.SmsManager;
-
-import com.android.phone.Assert;
-import com.android.phone.vvm.omtp.OmtpConstants;
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-import com.android.phone.vvm.omtp.VvmLog;
-import com.android.phone.vvm.omtp.protocol.VisualVoicemailProtocol;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-/**
- * Intercepts a incoming STATUS SMS with a blocking call.
- */
-public class StatusSmsFetcher extends BroadcastReceiver implements Closeable {
-
-    private static final String TAG = "VvmStatusSmsFetcher";
-
-    private static final long STATUS_SMS_TIMEOUT_MILLIS = 60_000;
-    private static final String ACTION_REQUEST_SENT_INTENT
-            = "com.android.phone.vvm.omtp.sms.REQUEST_SENT";
-    private static final int ACTION_REQUEST_SENT_REQUEST_CODE = 0;
-
-    private CompletableFuture<Bundle> mFuture = new CompletableFuture<>();
-
-    private final Context mContext;
-    private final int mSubId;
-
-    public StatusSmsFetcher(Context context, int subId) {
-        mContext = context;
-        mSubId = subId;
-        IntentFilter filter = new IntentFilter(VoicemailContract.ACTION_VOICEMAIL_SMS_RECEIVED);
-        filter.addAction(ACTION_REQUEST_SENT_INTENT);
-        context.registerReceiver(this, filter);
-    }
-
-    @Override
-    public void close() throws IOException {
-        mContext.unregisterReceiver(this);
-    }
-
-    @WorkerThread
-    @Nullable
-    public Bundle get() throws InterruptedException, ExecutionException, TimeoutException,
-            CancellationException {
-        Assert.isNotMainThread();
-        return mFuture.get(STATUS_SMS_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
-    }
-
-    public PendingIntent getSentIntent() {
-        Intent intent = new Intent(ACTION_REQUEST_SENT_INTENT);
-        intent.setPackage(mContext.getPackageName());
-        // Because the receiver is registered dynamically, implicit intent must be used.
-        // There should only be a single status SMS request at a time.
-        return PendingIntent.getBroadcast(mContext, ACTION_REQUEST_SENT_REQUEST_CODE, intent,
-                PendingIntent.FLAG_CANCEL_CURRENT);
-    }
-
-    @Override
-    @MainThread
-    public void onReceive(Context context, Intent intent) {
-        Assert.isMainThread();
-        if (ACTION_REQUEST_SENT_INTENT.equals(intent.getAction())) {
-            int resultCode = getResultCode();
-
-            if (resultCode == Activity.RESULT_OK) {
-                VvmLog.d(TAG, "Request SMS successfully sent");
-                return;
-            }
-
-            VvmLog.e(TAG, "Request SMS send failed: " + sentSmsResultToString(resultCode));
-            mFuture.cancel(true);
-            return;
-        }
-
-        int subId = intent.getExtras().getInt(VoicemailContract.EXTRA_VOICEMAIL_SMS_SUBID);
-
-        if (mSubId != subId) {
-            return;
-        }
-        String eventType = intent.getExtras()
-                .getString(VoicemailContract.EXTRA_VOICEMAIL_SMS_PREFIX);
-
-        if (eventType.equals(OmtpConstants.STATUS_SMS_PREFIX)) {
-            mFuture.complete(intent.getBundleExtra(VoicemailContract.EXTRA_VOICEMAIL_SMS_FIELDS));
-            return;
-        }
-
-        if (eventType.equals(OmtpConstants.SYNC_SMS_PREFIX)) {
-            return;
-        }
-
-        VvmLog.i(TAG, "VVM SMS with event " + eventType
-                + " received, attempting to translate to STATUS SMS");
-        OmtpVvmCarrierConfigHelper helper = new OmtpVvmCarrierConfigHelper(context, subId);
-        VisualVoicemailProtocol protocol = helper.getProtocol();
-        if (protocol == null) {
-            return;
-        }
-        Bundle translatedBundle = protocol.translateStatusSmsBundle(helper, eventType,
-                intent.getBundleExtra(VoicemailContract.EXTRA_VOICEMAIL_SMS_FIELDS));
-
-        if (translatedBundle != null) {
-            VvmLog.i(TAG, "Translated to STATUS SMS");
-            mFuture.complete(translatedBundle);
-        }
-    }
-
-    private static String sentSmsResultToString(int resultCode) {
-        switch (resultCode) {
-            case Activity.RESULT_OK:
-                return "OK";
-            case SmsManager.RESULT_ERROR_GENERIC_FAILURE:
-                return "RESULT_ERROR_GENERIC_FAILURE";
-            case SmsManager.RESULT_ERROR_NO_SERVICE:
-                return "RESULT_ERROR_GENERIC_FAILURE";
-            case SmsManager.RESULT_ERROR_NULL_PDU:
-                return "RESULT_ERROR_GENERIC_FAILURE";
-            case SmsManager.RESULT_ERROR_RADIO_OFF:
-                return "RESULT_ERROR_GENERIC_FAILURE";
-            default:
-                return "UNKNOWN CODE: " + resultCode;
-        }
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/sms/SyncMessage.java b/src/com/android/phone/vvm/omtp/sms/SyncMessage.java
deleted file mode 100644
index 632ff9e..0000000
--- a/src/com/android/phone/vvm/omtp/sms/SyncMessage.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp.sms;
-
-import android.annotation.Nullable;
-import android.os.Bundle;
-
-import com.android.phone.NeededForTesting;
-import com.android.phone.vvm.omtp.OmtpConstants;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Locale;
-
-/**
- * Structured data representation of an OMTP SYNC message.
- *
- * Getters will return null if the field was not set in the message body or it could not be parsed.
- */
-public class SyncMessage {
-    // Sync event that triggered this message.
-    private final String mSyncTriggerEvent;
-    // Total number of new messages on the server.
-    private final int mNewMessageCount;
-    // UID of the new message.
-    private final String mMessageId;
-    // Length of the message.
-    private final int mMessageLength;
-    // Content type (voice, video, fax...) of the new message.
-    private final String mContentType;
-    // Sender of the new message.
-    private final String mSender;
-    // Timestamp (in millis) of the new message.
-    private final long mMsgTimeMillis;
-
-    @Override
-    public String toString() {
-        return "SyncMessage [mSyncTriggerEvent=" + mSyncTriggerEvent
-                + ", mNewMessageCount=" + mNewMessageCount
-                + ", mMessageId=" + mMessageId
-                + ", mMessageLength=" + mMessageLength
-                + ", mContentType=" + mContentType
-                + ", mSender=" + mSender
-                + ", mMsgTimeMillis=" + mMsgTimeMillis + "]";
-    }
-
-    public SyncMessage(Bundle wrappedData) {
-        mSyncTriggerEvent = getString(wrappedData, OmtpConstants.SYNC_TRIGGER_EVENT);
-        mMessageId = getString(wrappedData, OmtpConstants.MESSAGE_UID);
-        mMessageLength = getInt(wrappedData, OmtpConstants.MESSAGE_LENGTH);
-        mContentType = getString(wrappedData, OmtpConstants.CONTENT_TYPE);
-        mSender = getString(wrappedData, OmtpConstants.SENDER);
-        mNewMessageCount = getInt(wrappedData, OmtpConstants.NUM_MESSAGE_COUNT);
-        mMsgTimeMillis = parseTime(wrappedData.getString(OmtpConstants.TIME));
-    }
-
-    private static long parseTime(@Nullable String value) {
-        if (value == null) {
-            return 0L;
-        }
-        try {
-            return new SimpleDateFormat(
-                    OmtpConstants.DATE_TIME_FORMAT, Locale.US)
-                    .parse(value).getTime();
-        } catch (ParseException e) {
-            return 0L;
-        }
-    }
-    /**
-     * @return the event that triggered the sync message. This is a mandatory field and must always
-     * be set.
-     */
-    public String getSyncTriggerEvent() {
-        return mSyncTriggerEvent;
-    }
-
-    /**
-     * @return the number of new messages stored on the voicemail server.
-     */
-    @NeededForTesting
-    public int getNewMessageCount() {
-        return mNewMessageCount;
-    }
-
-    /**
-     * @return the message ID of the new message.
-     * <p>
-     * Expected to be set only for
-     * {@link com.android.phone.vvm.omtp.OmtpConstants#NEW_MESSAGE}
-     */
-    public String getId() {
-        return mMessageId;
-    }
-
-    /**
-     * @return the content type of the new message.
-     * <p>
-     * Expected to be set only for
-     * {@link com.android.phone.vvm.omtp.OmtpConstants#NEW_MESSAGE}
-     */
-    @NeededForTesting
-    public String getContentType() {
-        return mContentType;
-    }
-
-    /**
-     * @return the message length of the new message.
-     * <p>
-     * Expected to be set only for
-     * {@link com.android.phone.vvm.omtp.OmtpConstants#NEW_MESSAGE}
-     */
-    public int getLength() {
-        return mMessageLength;
-    }
-
-    /**
-     * @return the sender's phone number of the new message specified as MSISDN.
-     * <p>
-     * Expected to be set only for
-     * {@link com.android.phone.vvm.omtp.OmtpConstants#NEW_MESSAGE}
-     */
-    public String getSender() {
-        return mSender;
-    }
-
-    /**
-     * @return the timestamp as milliseconds for the new message.
-     * <p>
-     * Expected to be set only for
-     * {@link com.android.phone.vvm.omtp.OmtpConstants#NEW_MESSAGE}
-     */
-    public long getTimestampMillis() {
-        return mMsgTimeMillis;
-    }
-
-    private static int getInt(Bundle wrappedData, String key) {
-        String value = wrappedData.getString(key);
-        if (value == null) {
-            return 0;
-        }
-        try {
-            return Integer.parseInt(value);
-        } catch (NumberFormatException e) {
-            return 0;
-        }
-    }
-
-    private static String getString(Bundle wrappedData, String key) {
-        String value = wrappedData.getString(key);
-        if (value == null) {
-            return "";
-        }
-        return value;
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/vvm/omtp/sms/Vvm3MessageSender.java b/src/com/android/phone/vvm/omtp/sms/Vvm3MessageSender.java
deleted file mode 100644
index dc2ea58..0000000
--- a/src/com/android/phone/vvm/omtp/sms/Vvm3MessageSender.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.sms;
-
-import android.annotation.Nullable;
-import android.app.PendingIntent;
-import android.telephony.SmsManager;
-
-public class Vvm3MessageSender extends OmtpMessageSender {
-
-    /**
-     * Creates a new instance of Vvm3MessageSender.
-     *
-     * @param smsManager SMS sending library. There is a different SmsManager for each SIM.
-     * @param applicationPort If set to a value > 0 then a binary sms is sent to this port number.
-     * Otherwise, a standard text SMS is sent.
-     */
-    public Vvm3MessageSender(SmsManager smsManager, short applicationPort,
-            String destinationNumber) {
-        super(smsManager, applicationPort, destinationNumber);
-    }
-
-    @Override
-    public void requestVvmActivation(@Nullable PendingIntent sentIntent) {
-        // Activation not supported for VVM3, send a status request instead.
-        requestVvmStatus(sentIntent);
-    }
-
-    @Override
-    public void requestVvmDeactivation(@Nullable PendingIntent sentIntent) {
-        // Deactivation not supported for VVM3, do nothing
-    }
-
-
-    @Override
-    public void requestVvmStatus(@Nullable PendingIntent sentIntent) {
-        // Status message:
-        // STATUS
-        StringBuilder sb = new StringBuilder().append("STATUS");
-        sendSms(sb.toString(), sentIntent);
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/sync/OmtpVvmSourceManager.java b/src/com/android/phone/vvm/omtp/sync/OmtpVvmSourceManager.java
deleted file mode 100644
index 9b06462..0000000
--- a/src/com/android/phone/vvm/omtp/sync/OmtpVvmSourceManager.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp.sync;
-
-import android.content.Context;
-import android.telecom.PhoneAccountHandle;
-import android.telephony.PhoneStateListener;
-import android.telephony.SubscriptionManager;
-import android.telephony.TelephonyManager;
-import com.android.internal.telephony.Phone;
-import com.android.phone.PhoneUtils;
-import com.android.phone.VoicemailStatus;
-import com.android.phone.vvm.omtp.VvmPhoneStateListener;
-import java.util.Collections;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * A singleton class designed to remember the active OMTP visual voicemail sources. Because a
- * voicemail source is tied 1:1 to a phone account, the phone account handle is used as the key
- * for each voicemail source and the associated data.
- */
-public class OmtpVvmSourceManager {
-    public static final String TAG = "OmtpVvmSourceManager";
-
-    private static OmtpVvmSourceManager sInstance = new OmtpVvmSourceManager();
-
-    private Context mContext;
-    private SubscriptionManager mSubscriptionManager;
-    private TelephonyManager mTelephonyManager;
-    // Each phone account is associated with a phone state listener for updates to whether the
-    // device is able to sync.
-    private Set<PhoneAccountHandle> mActiveVvmSources;
-    private Map<PhoneAccountHandle, PhoneStateListener> mPhoneStateListenerMap;
-
-    /**
-     * Private constructor. Instance should only be acquired through getInstance().
-     */
-    private OmtpVvmSourceManager() {}
-
-    public static OmtpVvmSourceManager getInstance(Context context) {
-        sInstance.setup(context);
-        return sInstance;
-    }
-
-    /**
-     * Set the context and system services so they do not need to be retrieved every time.
-     * @param context The context to get the subscription and telephony manager for.
-     */
-    private void setup(Context context) {
-        if (mContext == null) {
-            mContext = context;
-            mSubscriptionManager = SubscriptionManager.from(context);
-            mTelephonyManager = (TelephonyManager)
-                    mContext.getSystemService(Context.TELEPHONY_SERVICE);
-            mActiveVvmSources = Collections.newSetFromMap(
-                    new ConcurrentHashMap<PhoneAccountHandle, Boolean>(8, 0.9f, 1));
-            mPhoneStateListenerMap =
-                    new ConcurrentHashMap<PhoneAccountHandle, PhoneStateListener>(8, 0.9f, 1);
-        }
-    }
-
-    public void addSource(PhoneAccountHandle phoneAccount) {
-        mActiveVvmSources.add(phoneAccount);
-    }
-
-    /**
-     * When a voicemail source is removed, we don't always know which one was removed. Check the
-     * list of registered phone accounts against the active subscriptions list and remove the
-     * inactive sources.
-     */
-    public void removeInactiveSources() {
-        for (PhoneAccountHandle phoneAccount : mActiveVvmSources) {
-            if (!PhoneUtils.isPhoneAccountActive(mSubscriptionManager, phoneAccount)) {
-                removeSource(phoneAccount);
-            }
-        }
-
-        // Remove any orphaned phone state listeners as well.
-        for (PhoneAccountHandle phoneAccount : mPhoneStateListenerMap.keySet()) {
-            if (!PhoneUtils.isPhoneAccountActive(mSubscriptionManager, phoneAccount)) {
-                removePhoneStateListener(phoneAccount);
-            }
-        }
-    }
-
-    public void removeSource(Phone phone) {
-        removeSource(PhoneUtils.makePstnPhoneAccountHandle(phone));
-    }
-
-    public void removeSource(PhoneAccountHandle phoneAccount) {
-        // TODO: should use OmtpVvmCarrierConfigHelper to handle the event. But currently it
-        // couldn't handle events on removed SIMs
-        VoicemailStatus.disable(mContext, phoneAccount);
-        removePhoneStateListener(phoneAccount);
-        mActiveVvmSources.remove(phoneAccount);
-    }
-
-    public void addPhoneStateListener(Phone phone) {
-        addPhoneStateListener(PhoneUtils.makePstnPhoneAccountHandle(phone));
-    }
-
-    public void addPhoneStateListener(PhoneAccountHandle phoneAccount) {
-        if (!mPhoneStateListenerMap.containsKey(phoneAccount)) {
-            VvmPhoneStateListener phoneStateListener = new VvmPhoneStateListener(mContext,
-                    PhoneUtils.makePstnPhoneAccountHandle(phoneAccount.getId()));
-            mPhoneStateListenerMap.put(phoneAccount, phoneStateListener);
-            mTelephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_SERVICE_STATE);
-        }
-    }
-
-    public void removePhoneStateListener(PhoneAccountHandle phoneAccount) {
-        PhoneStateListener phoneStateListener =
-                mPhoneStateListenerMap.remove(phoneAccount);
-        mTelephonyManager.listen(phoneStateListener, 0);
-    }
-
-    public Set<PhoneAccountHandle> getOmtpVvmSources() {
-        return mActiveVvmSources;
-    }
-
-    /**
-     * Check if a certain account is registered.
-     *
-     * @param phoneAccount The account to look for.
-     * @return {@code true} if the account is in the list of registered OMTP voicemail sources.
-     * {@code false} otherwise.
-     */
-    public boolean isVvmSourceRegistered(PhoneAccountHandle phoneAccount) {
-        if (phoneAccount == null) {
-            return false;
-        }
-
-        return mActiveVvmSources.contains(phoneAccount);
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/phone/vvm/omtp/sync/OmtpVvmSyncReceiver.java b/src/com/android/phone/vvm/omtp/sync/OmtpVvmSyncReceiver.java
deleted file mode 100644
index 41178eb..0000000
--- a/src/com/android/phone/vvm/omtp/sync/OmtpVvmSyncReceiver.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.sync;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.provider.VoicemailContract;
-import android.telecom.PhoneAccountHandle;
-import android.telecom.TelecomManager;
-import com.android.phone.settings.VisualVoicemailSettingsUtil;
-import com.android.phone.vvm.omtp.ActivationTask;
-import com.android.phone.vvm.omtp.VvmLog;
-import com.android.phone.vvm.omtp.utils.PhoneAccountHandleConverter;
-import java.util.List;
-
-public class OmtpVvmSyncReceiver extends BroadcastReceiver {
-
-    private static final String TAG = "OmtpVvmSyncReceiver";
-
-    @Override
-    public void onReceive(final Context context, Intent intent) {
-        if (VoicemailContract.ACTION_SYNC_VOICEMAIL.equals(intent.getAction())) {
-            VvmLog.v(TAG, "Sync intent received");
-            for (PhoneAccountHandle source : OmtpVvmSourceManager.getInstance(context)
-                    .getOmtpVvmSources()) {
-                SyncTask.start(context, source, OmtpVvmSyncService.SYNC_FULL_SYNC);
-            }
-            activateUnactivatedAccounts(context);
-        }
-    }
-
-    private static void activateUnactivatedAccounts(Context context) {
-        List<PhoneAccountHandle> accounts =
-                context.getSystemService(TelecomManager.class).getCallCapablePhoneAccounts();
-        for (PhoneAccountHandle phoneAccount : accounts) {
-            if (!VisualVoicemailSettingsUtil.isEnabled(context, phoneAccount)) {
-                continue;
-            }
-            int subId = PhoneAccountHandleConverter.toSubId(phoneAccount);
-            if (!OmtpVvmSourceManager.getInstance(context).isVvmSourceRegistered(phoneAccount)) {
-                VvmLog.i(TAG, "Unactivated account " + phoneAccount + " found, activating");
-                ActivationTask.start(context, subId, null);
-            }
-        }
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/sync/OmtpVvmSyncService.java b/src/com/android/phone/vvm/omtp/sync/OmtpVvmSyncService.java
deleted file mode 100644
index 58797de..0000000
--- a/src/com/android/phone/vvm/omtp/sync/OmtpVvmSyncService.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp.sync;
-
-import android.content.Context;
-import android.net.Network;
-import android.net.Uri;
-import android.provider.VoicemailContract;
-import android.telecom.PhoneAccountHandle;
-import android.telecom.Voicemail;
-import android.text.TextUtils;
-import com.android.phone.Assert;
-import com.android.phone.PhoneUtils;
-import com.android.phone.VoicemailStatus;
-import com.android.phone.settings.VisualVoicemailSettingsUtil;
-import com.android.phone.vvm.omtp.ActivationTask;
-import com.android.phone.vvm.omtp.OmtpEvents;
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-import com.android.phone.vvm.omtp.VvmLog;
-import com.android.phone.vvm.omtp.fetch.VoicemailFetchedCallback;
-import com.android.phone.vvm.omtp.imap.ImapHelper;
-import com.android.phone.vvm.omtp.imap.ImapHelper.InitializingException;
-import com.android.phone.vvm.omtp.scheduling.BaseTask;
-import com.android.phone.vvm.omtp.sync.VvmNetworkRequest.NetworkWrapper;
-import com.android.phone.vvm.omtp.sync.VvmNetworkRequest.RequestFailedException;
-import com.android.phone.vvm.omtp.utils.PhoneAccountHandleConverter;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Sync OMTP visual voicemail.
- */
-public class OmtpVvmSyncService {
-
-    private static final String TAG = OmtpVvmSyncService.class.getSimpleName();
-
-    /**
-     * Signifies a sync with both uploading to the server and downloading from the server.
-     */
-    public static final String SYNC_FULL_SYNC = "full_sync";
-    /**
-     * Only upload to the server.
-     */
-    public static final String SYNC_UPLOAD_ONLY = "upload_only";
-    /**
-     * Only download from the server.
-     */
-    public static final String SYNC_DOWNLOAD_ONLY = "download_only";
-    /**
-     * Only download single voicemail transcription.
-     */
-    public static final String SYNC_DOWNLOAD_ONE_TRANSCRIPTION =
-            "download_one_transcription";
-
-    private final Context mContext;
-
-    // Record the timestamp of the last full sync so that duplicate syncs can be reduced.
-    private static final String LAST_FULL_SYNC_TIMESTAMP = "last_full_sync_timestamp";
-    // Constant indicating that there has never been a full sync.
-    public static final long NO_PRIOR_FULL_SYNC = -1;
-
-    private VoicemailsQueryHelper mQueryHelper;
-
-    public OmtpVvmSyncService(Context context) {
-        mContext = context;
-        mQueryHelper = new VoicemailsQueryHelper(mContext);
-    }
-
-    public void sync(BaseTask task, String action, PhoneAccountHandle phoneAccount,
-            Voicemail voicemail, VoicemailStatus.Editor status) {
-        Assert.isTrue(phoneAccount != null);
-        VvmLog.v(TAG, "Sync requested: " + action + " - for account: " + phoneAccount);
-        setupAndSendRequest(task, phoneAccount, voicemail, action, status);
-    }
-
-    private void setupAndSendRequest(BaseTask task, PhoneAccountHandle phoneAccount,
-            Voicemail voicemail, String action, VoicemailStatus.Editor status) {
-        if (!VisualVoicemailSettingsUtil.isEnabled(mContext, phoneAccount)) {
-            VvmLog.v(TAG, "Sync requested for disabled account");
-            return;
-        }
-        int subId = PhoneAccountHandleConverter.toSubId(phoneAccount);
-        if (!OmtpVvmSourceManager.getInstance(mContext).isVvmSourceRegistered(phoneAccount)) {
-            ActivationTask.start(mContext, subId, null);
-            return;
-        }
-
-        OmtpVvmCarrierConfigHelper config = new OmtpVvmCarrierConfigHelper(mContext, subId);
-        // DATA_IMAP_OPERATION_STARTED posting should not be deferred. This event clears all data
-        // channel errors, which should happen when the task starts, not when it ends. It is the
-        // "Sync in progress..." status.
-        config.handleEvent(VoicemailStatus.edit(mContext, phoneAccount),
-                OmtpEvents.DATA_IMAP_OPERATION_STARTED);
-        try (NetworkWrapper network = VvmNetworkRequest.getNetwork(config, phoneAccount, status)) {
-            if (network == null) {
-                VvmLog.e(TAG, "unable to acquire network");
-                task.fail();
-                return;
-            }
-            doSync(task, network.get(), phoneAccount, voicemail, action, status);
-        } catch (RequestFailedException e) {
-            config.handleEvent(status, OmtpEvents.DATA_NO_CONNECTION_CELLULAR_REQUIRED);
-            task.fail();
-        }
-    }
-
-    private void doSync(BaseTask task, Network network, PhoneAccountHandle phoneAccount,
-            Voicemail voicemail, String action, VoicemailStatus.Editor status) {
-        try (ImapHelper imapHelper = new ImapHelper(mContext, phoneAccount, network, status)) {
-            boolean success;
-            if (voicemail == null) {
-                success = syncAll(action, imapHelper, phoneAccount);
-            } else {
-                success = syncOne(imapHelper, voicemail, phoneAccount);
-            }
-            if (success) {
-                // TODO: b/30569269 failure should interrupt all subsequent task via exceptions
-                imapHelper.updateQuota();
-                imapHelper.handleEvent(OmtpEvents.DATA_IMAP_OPERATION_COMPLETED);
-            } else {
-                task.fail();
-            }
-        } catch (InitializingException e) {
-            VvmLog.w(TAG, "Can't retrieve Imap credentials.", e);
-            return;
-        }
-    }
-
-    private boolean syncAll(String action, ImapHelper imapHelper, PhoneAccountHandle account) {
-        boolean uploadSuccess = true;
-        boolean downloadSuccess = true;
-
-        if (SYNC_FULL_SYNC.equals(action) || SYNC_UPLOAD_ONLY.equals(action)) {
-            uploadSuccess = upload(imapHelper);
-        }
-        if (SYNC_FULL_SYNC.equals(action) || SYNC_DOWNLOAD_ONLY.equals(action)) {
-            downloadSuccess = download(imapHelper, account);
-        }
-
-        VvmLog.v(TAG, "upload succeeded: [" + String.valueOf(uploadSuccess)
-                + "] download succeeded: [" + String.valueOf(downloadSuccess) + "]");
-
-        return uploadSuccess && downloadSuccess;
-    }
-
-    private boolean syncOne(ImapHelper imapHelper, Voicemail voicemail,
-            PhoneAccountHandle account) {
-        if (shouldPerformPrefetch(account, imapHelper)) {
-            VoicemailFetchedCallback callback = new VoicemailFetchedCallback(mContext,
-                    voicemail.getUri(), account);
-            imapHelper.fetchVoicemailPayload(callback, voicemail.getSourceData());
-        }
-
-        return imapHelper.fetchTranscription(
-                new TranscriptionFetchedCallback(mContext, voicemail),
-                voicemail.getSourceData());
-    }
-
-    private boolean upload(ImapHelper imapHelper) {
-        List<Voicemail> readVoicemails = mQueryHelper.getReadVoicemails();
-        List<Voicemail> deletedVoicemails = mQueryHelper.getDeletedVoicemails();
-
-        boolean success = true;
-
-        if (deletedVoicemails.size() > 0) {
-            if (imapHelper.markMessagesAsDeleted(deletedVoicemails)) {
-                // We want to delete selectively instead of all the voicemails for this provider
-                // in case the state changed since the IMAP query was completed.
-                mQueryHelper.deleteFromDatabase(deletedVoicemails);
-            } else {
-                success = false;
-            }
-        }
-
-        if (readVoicemails.size() > 0) {
-            if (imapHelper.markMessagesAsRead(readVoicemails)) {
-                mQueryHelper.markCleanInDatabase(readVoicemails);
-            } else {
-                success = false;
-            }
-        }
-
-        return success;
-    }
-
-    private boolean download(ImapHelper imapHelper, PhoneAccountHandle account) {
-        List<Voicemail> serverVoicemails = imapHelper.fetchAllVoicemails();
-        List<Voicemail> localVoicemails = mQueryHelper.getAllVoicemails();
-
-        if (localVoicemails == null || serverVoicemails == null) {
-            // Null value means the query failed.
-            return false;
-        }
-
-        Map<String, Voicemail> remoteMap = buildMap(serverVoicemails);
-
-        // Go through all the local voicemails and check if they are on the server.
-        // They may be read or deleted on the server but not locally. Perform the
-        // appropriate local operation if the status differs from the server. Remove
-        // the messages that exist both locally and on the server to know which server
-        // messages to insert locally.
-        for (int i = 0; i < localVoicemails.size(); i++) {
-            Voicemail localVoicemail = localVoicemails.get(i);
-            Voicemail remoteVoicemail = remoteMap.remove(localVoicemail.getSourceData());
-            if (remoteVoicemail == null) {
-                mQueryHelper.deleteFromDatabase(localVoicemail);
-            } else {
-                if (remoteVoicemail.isRead() != localVoicemail.isRead()) {
-                    mQueryHelper.markReadInDatabase(localVoicemail);
-                }
-
-                if (!TextUtils.isEmpty(remoteVoicemail.getTranscription()) &&
-                        TextUtils.isEmpty(localVoicemail.getTranscription())) {
-                    mQueryHelper.updateWithTranscription(localVoicemail,
-                            remoteVoicemail.getTranscription());
-                }
-            }
-        }
-
-        // The leftover messages are messages that exist on the server but not locally.
-        boolean prefetchEnabled = shouldPerformPrefetch(account, imapHelper);
-        for (Voicemail remoteVoicemail : remoteMap.values()) {
-            Uri uri = VoicemailContract.Voicemails.insert(mContext, remoteVoicemail);
-            if (prefetchEnabled) {
-                VoicemailFetchedCallback fetchedCallback =
-                        new VoicemailFetchedCallback(mContext, uri, account);
-                imapHelper.fetchVoicemailPayload(fetchedCallback, remoteVoicemail.getSourceData());
-            }
-        }
-
-        return true;
-    }
-
-    private boolean shouldPerformPrefetch(PhoneAccountHandle account, ImapHelper imapHelper) {
-        OmtpVvmCarrierConfigHelper carrierConfigHelper = new OmtpVvmCarrierConfigHelper(
-                mContext, PhoneUtils.getSubIdForPhoneAccountHandle(account));
-        return carrierConfigHelper.isPrefetchEnabled() && !imapHelper.isRoaming();
-    }
-
-    /**
-     * Builds a map from provider data to message for the given collection of voicemails.
-     */
-    private Map<String, Voicemail> buildMap(List<Voicemail> messages) {
-        Map<String, Voicemail> map = new HashMap<String, Voicemail>();
-        for (Voicemail message : messages) {
-            map.put(message.getSourceData(), message);
-        }
-        return map;
-    }
-
-    public class TranscriptionFetchedCallback {
-
-        private Context mContext;
-        private Voicemail mVoicemail;
-
-        public TranscriptionFetchedCallback(Context context, Voicemail voicemail) {
-            mContext = context;
-            mVoicemail = voicemail;
-        }
-
-        public void setVoicemailTranscription(String transcription) {
-            VoicemailsQueryHelper queryHelper = new VoicemailsQueryHelper(mContext);
-            queryHelper.updateWithTranscription(mVoicemail, transcription);
-        }
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/sync/SyncOneTask.java b/src/com/android/phone/vvm/omtp/sync/SyncOneTask.java
deleted file mode 100644
index 510efc7..0000000
--- a/src/com/android/phone/vvm/omtp/sync/SyncOneTask.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.sync;
-
-import android.content.Context;
-import android.content.Intent;
-import android.telecom.PhoneAccountHandle;
-import android.telecom.Voicemail;
-import com.android.phone.VoicemailStatus;
-import com.android.phone.vvm.omtp.scheduling.BaseTask;
-import com.android.phone.vvm.omtp.scheduling.RetryPolicy;
-import com.android.phone.vvm.omtp.utils.PhoneAccountHandleConverter;
-
-/**
- * Task to download a single voicemail from the server. This task is initiated by a SMS notifying
- * the new voicemail arrival, and ignores the duplicated tasks constraint.
- */
-public class SyncOneTask extends BaseTask {
-
-    private static final int RETRY_TIMES = 2;
-    private static final int RETRY_INTERVAL_MILLIS = 5_000;
-
-    private static final String EXTRA_PHONE_ACCOUNT_HANDLE = "extra_phone_account_handle";
-    private static final String EXTRA_SYNC_TYPE = "extra_sync_type";
-    private static final String EXTRA_VOICEMAIL = "extra_voicemail";
-
-    private PhoneAccountHandle mPhone;
-    private String mSyncType;
-    private Voicemail mVoicemail;
-
-    public static void start(Context context, PhoneAccountHandle phone, Voicemail voicemail) {
-        Intent intent = BaseTask
-                .createIntent(context, SyncOneTask.class,
-                        PhoneAccountHandleConverter.toSubId(phone));
-        intent.putExtra(EXTRA_PHONE_ACCOUNT_HANDLE, phone);
-        intent.putExtra(EXTRA_SYNC_TYPE, OmtpVvmSyncService.SYNC_DOWNLOAD_ONE_TRANSCRIPTION);
-        intent.putExtra(EXTRA_VOICEMAIL, voicemail);
-        context.startService(intent);
-    }
-
-    public SyncOneTask() {
-        super(TASK_ALLOW_DUPLICATES);
-        addPolicy(new RetryPolicy(RETRY_TIMES, RETRY_INTERVAL_MILLIS));
-    }
-
-    public void onCreate(Context context, Intent intent, int flags, int startId) {
-        super.onCreate(context, intent, flags, startId);
-        mPhone = intent.getParcelableExtra(EXTRA_PHONE_ACCOUNT_HANDLE);
-        mSyncType = intent.getStringExtra(EXTRA_SYNC_TYPE);
-        mVoicemail = intent.getParcelableExtra(EXTRA_VOICEMAIL);
-    }
-
-    @Override
-    public void onExecuteInBackgroundThread() {
-        OmtpVvmSyncService service = new OmtpVvmSyncService(getContext());
-        service.sync(this, mSyncType, mPhone, mVoicemail,
-                VoicemailStatus.edit(getContext(), mPhone));
-    }
-
-    @Override
-    public Intent createRestartIntent() {
-        Intent intent = super.createRestartIntent();
-        intent.putExtra(EXTRA_PHONE_ACCOUNT_HANDLE, mPhone);
-        intent.putExtra(EXTRA_SYNC_TYPE, mSyncType);
-        intent.putExtra(EXTRA_VOICEMAIL, mVoicemail);
-        return intent;
-    }
-
-}
diff --git a/src/com/android/phone/vvm/omtp/sync/SyncTask.java b/src/com/android/phone/vvm/omtp/sync/SyncTask.java
deleted file mode 100644
index 7374ee6..0000000
--- a/src/com/android/phone/vvm/omtp/sync/SyncTask.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.sync;
-
-import android.content.Context;
-import android.content.Intent;
-import android.telecom.PhoneAccountHandle;
-import com.android.phone.vvm.omtp.scheduling.BaseTask;
-import com.android.phone.vvm.omtp.scheduling.MinimalIntervalPolicy;
-import com.android.phone.vvm.omtp.scheduling.RetryPolicy;
-import com.android.phone.vvm.omtp.utils.PhoneAccountHandleConverter;
-
-/**
- * System initiated sync request.
- */
-public class SyncTask extends BaseTask {
-
-    // Try sync for a total of 5 times, should take around 5 minutes before finally giving up.
-    private static final int RETRY_TIMES = 4;
-    private static final int RETRY_INTERVAL_MILLIS = 5_000;
-    private static final int MINIMAL_INTERVAL_MILLIS = 60_000;
-
-    private static final String EXTRA_PHONE_ACCOUNT_HANDLE = "extra_phone_account_handle";
-    private static final String EXTRA_SYNC_TYPE = "extra_sync_type";
-
-    private final RetryPolicy mRetryPolicy;
-
-    private PhoneAccountHandle mPhone;
-    private String mSyncType;
-
-    public static void start(Context context, PhoneAccountHandle phone, String syncType) {
-        Intent intent = BaseTask
-                .createIntent(context, SyncTask.class, PhoneAccountHandleConverter.toSubId(phone));
-        intent.putExtra(EXTRA_PHONE_ACCOUNT_HANDLE, phone);
-        intent.putExtra(EXTRA_SYNC_TYPE, syncType);
-        context.startService(intent);
-    }
-
-    public SyncTask() {
-        super(TASK_SYNC);
-        mRetryPolicy = new RetryPolicy(RETRY_TIMES, RETRY_INTERVAL_MILLIS);
-        addPolicy(mRetryPolicy);
-        addPolicy(new MinimalIntervalPolicy(MINIMAL_INTERVAL_MILLIS));
-    }
-
-    public void onCreate(Context context, Intent intent, int flags, int startId) {
-        super.onCreate(context, intent, flags, startId);
-        mPhone = intent.getParcelableExtra(EXTRA_PHONE_ACCOUNT_HANDLE);
-        mSyncType = intent.getStringExtra(EXTRA_SYNC_TYPE);
-    }
-
-    @Override
-    public void onExecuteInBackgroundThread() {
-        OmtpVvmSyncService service = new OmtpVvmSyncService(getContext());
-        service.sync(this, mSyncType, mPhone, null, mRetryPolicy.getVoicemailStatusEditor());
-    }
-
-    @Override
-    public Intent createRestartIntent() {
-        Intent intent = super.createRestartIntent();
-        intent.putExtra(EXTRA_PHONE_ACCOUNT_HANDLE, mPhone);
-        intent.putExtra(EXTRA_SYNC_TYPE, mSyncType);
-        return intent;
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/sync/UploadTask.java b/src/com/android/phone/vvm/omtp/sync/UploadTask.java
deleted file mode 100644
index 87c0a46..0000000
--- a/src/com/android/phone/vvm/omtp/sync/UploadTask.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.sync;
-
-import android.content.Context;
-import android.content.Intent;
-import android.telecom.PhoneAccountHandle;
-import com.android.phone.VoicemailStatus;
-import com.android.phone.vvm.omtp.VvmLog;
-import com.android.phone.vvm.omtp.scheduling.BaseTask;
-import com.android.phone.vvm.omtp.scheduling.PostponePolicy;
-import com.android.phone.vvm.omtp.utils.PhoneAccountHandleConverter;
-
-/**
- * Upload task triggered by database changes. Will wait until the database has been stable for
- * {@link #POSTPONE_MILLIS} to execute.
- */
-public class UploadTask extends BaseTask {
-
-    private static final String TAG = "VvmUploadTask";
-
-    private static final int POSTPONE_MILLIS = 5_000;
-
-    public UploadTask() {
-        super(TASK_UPLOAD);
-        addPolicy(new PostponePolicy(POSTPONE_MILLIS));
-    }
-
-    public static void start(Context context, PhoneAccountHandle phoneAccountHandle) {
-        Intent intent = BaseTask
-                .createIntent(context, UploadTask.class,
-                        PhoneAccountHandleConverter.toSubId(phoneAccountHandle));
-        context.startService(intent);
-    }
-
-    @Override
-    public void onCreate(Context context, Intent intent, int flags, int startId) {
-        super.onCreate(context, intent, flags, startId);
-    }
-
-    @Override
-    public void onExecuteInBackgroundThread() {
-        OmtpVvmSyncService service = new OmtpVvmSyncService(getContext());
-
-        PhoneAccountHandle phoneAccountHandle = PhoneAccountHandleConverter.fromSubId(getSubId());
-        if (phoneAccountHandle == null) {
-            // This should never happen
-            VvmLog.e(TAG, "null phone account for subId " + getSubId());
-            return;
-        }
-        service.sync(this, OmtpVvmSyncService.SYNC_UPLOAD_ONLY,
-                phoneAccountHandle, null,
-                VoicemailStatus.edit(getContext(), phoneAccountHandle));
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/sync/VoicemailProviderChangeReceiver.java b/src/com/android/phone/vvm/omtp/sync/VoicemailProviderChangeReceiver.java
deleted file mode 100644
index bc9e6e1..0000000
--- a/src/com/android/phone/vvm/omtp/sync/VoicemailProviderChangeReceiver.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp.sync;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.provider.VoicemailContract;
-import android.telecom.PhoneAccountHandle;
-
-/**
- * Receives changes to the voicemail provider so they can be sent to the voicemail server.
- */
-public class VoicemailProviderChangeReceiver extends BroadcastReceiver {
-
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        boolean isSelfChanged = intent.getBooleanExtra(VoicemailContract.EXTRA_SELF_CHANGE, false);
-        OmtpVvmSourceManager vvmSourceManager =
-                OmtpVvmSourceManager.getInstance(context);
-        if (vvmSourceManager.getOmtpVvmSources().size() > 0 && !isSelfChanged) {
-            for (PhoneAccountHandle source : OmtpVvmSourceManager.getInstance(context)
-                    .getOmtpVvmSources()) {
-                UploadTask.start(context, source);
-            }
-        }
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/sync/VoicemailStatusQueryHelper.java b/src/com/android/phone/vvm/omtp/sync/VoicemailStatusQueryHelper.java
deleted file mode 100644
index 66f3e9d..0000000
--- a/src/com/android/phone/vvm/omtp/sync/VoicemailStatusQueryHelper.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp.sync;
-
-import android.content.ContentResolver;
-import android.content.Context;
-import android.database.Cursor;
-import android.net.Uri;
-import android.provider.VoicemailContract;
-import android.provider.VoicemailContract.Status;
-import android.telecom.PhoneAccountHandle;
-
-/**
- * Construct queries to interact with the voicemail status table.
- */
-public class VoicemailStatusQueryHelper {
-
-    final static String[] PROJECTION = new String[] {
-            Status._ID,                        // 0
-            Status.CONFIGURATION_STATE,        // 1
-            Status.NOTIFICATION_CHANNEL_STATE, // 2
-            Status.SOURCE_PACKAGE              // 3
-   };
-
-    public static final int _ID = 0;
-    public static final int CONFIGURATION_STATE = 1;
-    public static final int NOTIFICATION_CHANNEL_STATE = 2;
-    public static final int SOURCE_PACKAGE = 3;
-
-    private Context mContext;
-    private ContentResolver mContentResolver;
-    private Uri mSourceUri;
-
-    public VoicemailStatusQueryHelper(Context context) {
-        mContext = context;
-        mContentResolver = context.getContentResolver();
-        mSourceUri = VoicemailContract.Status.buildSourceUri(mContext.getPackageName());
-    }
-
-    /**
-     * Check if the configuration state for the voicemail source is "ok", meaning that the
-     * source is set up.
-     *
-     * @param phoneAccount The phone account for the voicemail source to check.
-     * @return {@code true} if the voicemail source is configured, {@code} false otherwise,
-     * including if the voicemail source is not registered in the table.
-     */
-    public boolean isVoicemailSourceConfigured(PhoneAccountHandle phoneAccount) {
-        return isFieldEqualTo(phoneAccount, CONFIGURATION_STATE, Status.CONFIGURATION_STATE_OK);
-    }
-
-    /**
-     * Check if the notifications channel of a voicemail source is active. That is, when a new
-     * voicemail is available, if the server able to notify the device.
-     *
-     * @return {@code true} if notifications channel is active, {@code false} otherwise.
-     */
-    public boolean isNotificationsChannelActive(PhoneAccountHandle phoneAccount) {
-        return isFieldEqualTo(phoneAccount, NOTIFICATION_CHANNEL_STATE,
-                Status.NOTIFICATION_CHANNEL_STATE_OK);
-    }
-
-    /**
-     * Check if a field for an entry in the status table is equal to a specific value.
-     *
-     * @param phoneAccount The phone account of the voicemail source to query for.
-     * @param columnIndex The column index of the field in the returned query.
-     * @param value The value to compare against.
-     * @return {@code true} if the stored value is equal to the provided value. {@code false}
-     * otherwise.
-     */
-    private boolean isFieldEqualTo(PhoneAccountHandle phoneAccount, int columnIndex, int value) {
-        Cursor cursor = null;
-        if (phoneAccount != null) {
-            String phoneAccountComponentName = phoneAccount.getComponentName().flattenToString();
-            String phoneAccountId = phoneAccount.getId();
-            if (phoneAccountComponentName == null || phoneAccountId == null) {
-                return false;
-            }
-            try {
-                String whereClause =
-                        Status.PHONE_ACCOUNT_COMPONENT_NAME + "=? AND " +
-                        Status.PHONE_ACCOUNT_ID + "=? AND " + Status.SOURCE_PACKAGE + "=?";
-                String[] whereArgs = { phoneAccountComponentName, phoneAccountId,
-                        mContext.getPackageName()};
-                cursor = mContentResolver.query(
-                        mSourceUri, PROJECTION, whereClause, whereArgs, null);
-                if (cursor != null && cursor.moveToFirst()) {
-                    return cursor.getInt(columnIndex) == value;
-                }
-            }
-            finally {
-                if (cursor != null) {
-                    cursor.close();
-                }
-            }
-        }
-        return false;
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/sync/VoicemailsQueryHelper.java b/src/com/android/phone/vvm/omtp/sync/VoicemailsQueryHelper.java
deleted file mode 100644
index 9906386..0000000
--- a/src/com/android/phone/vvm/omtp/sync/VoicemailsQueryHelper.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp.sync;
-
-import android.content.ContentResolver;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.Context;
-import android.database.Cursor;
-import android.net.Uri;
-import android.provider.VoicemailContract;
-import android.provider.VoicemailContract.Voicemails;
-import android.telecom.PhoneAccountHandle;
-import android.telecom.Voicemail;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Construct queries to interact with the voicemails table.
- */
-public class VoicemailsQueryHelper {
-    final static String[] PROJECTION = new String[] {
-            Voicemails._ID,              // 0
-            Voicemails.SOURCE_DATA,      // 1
-            Voicemails.IS_READ,          // 2
-            Voicemails.DELETED,          // 3
-            Voicemails.TRANSCRIPTION     // 4
-    };
-
-    public static final int _ID = 0;
-    public static final int SOURCE_DATA = 1;
-    public static final int IS_READ = 2;
-    public static final int DELETED = 3;
-    public static final int TRANSCRIPTION = 4;
-
-    final static String READ_SELECTION = Voicemails.DIRTY + "=1 AND "
-                + Voicemails.DELETED + "!=1 AND " + Voicemails.IS_READ + "=1";
-    final static String DELETED_SELECTION = Voicemails.DELETED + "=1";
-
-    private Context mContext;
-    private ContentResolver mContentResolver;
-    private Uri mSourceUri;
-
-    public VoicemailsQueryHelper(Context context) {
-        mContext = context;
-        mContentResolver = context.getContentResolver();
-        mSourceUri = VoicemailContract.Voicemails.buildSourceUri(mContext.getPackageName());
-    }
-
-    /**
-     * Get all the local read voicemails that have not been synced to the server.
-     *
-     * @return A list of read voicemails.
-     */
-    public List<Voicemail> getReadVoicemails() {
-        return getLocalVoicemails(READ_SELECTION);
-    }
-
-    /**
-     * Get all the locally deleted voicemails that have not been synced to the server.
-     *
-     * @return A list of deleted voicemails.
-     */
-    public List<Voicemail> getDeletedVoicemails() {
-        return getLocalVoicemails(DELETED_SELECTION);
-    }
-
-    /**
-     * Get all voicemails locally stored.
-     *
-     * @return A list of all locally stored voicemails.
-     */
-    public List<Voicemail> getAllVoicemails() {
-        return getLocalVoicemails(null);
-    }
-
-    /**
-     * Utility method to make queries to the voicemail database.
-     *
-     * @param selection A filter declaring which rows to return. {@code null} returns all rows.
-     * @return A list of voicemails according to the selection statement.
-     */
-    private List<Voicemail> getLocalVoicemails(String selection) {
-        Cursor cursor = mContentResolver.query(mSourceUri, PROJECTION, selection, null, null);
-        if (cursor == null) {
-            return null;
-        }
-        try {
-            List<Voicemail> voicemails = new ArrayList<Voicemail>();
-            while (cursor.moveToNext()) {
-                final long id = cursor.getLong(_ID);
-                final String sourceData = cursor.getString(SOURCE_DATA);
-                final boolean isRead = cursor.getInt(IS_READ) == 1;
-                final String transcription = cursor.getString(TRANSCRIPTION);
-                Voicemail voicemail = Voicemail
-                        .createForUpdate(id, sourceData)
-                        .setIsRead(isRead)
-                        .setTranscription(transcription).build();
-                voicemails.add(voicemail);
-            }
-            return voicemails;
-        } finally {
-            cursor.close();
-        }
-    }
-
-    /**
-     * Deletes a list of voicemails from the voicemail content provider.
-     *
-     * @param voicemails The list of voicemails to delete
-     * @return The number of voicemails deleted
-     */
-    public int deleteFromDatabase(List<Voicemail> voicemails) {
-        int count = voicemails.size();
-        if (count == 0) {
-            return 0;
-        }
-
-        StringBuilder sb = new StringBuilder();
-        for (int i = 0; i < count; i++) {
-            if (i > 0) {
-                sb.append(",");
-            }
-            sb.append(voicemails.get(i).getId());
-        }
-
-        String selectionStatement = String.format(Voicemails._ID + " IN (%s)", sb.toString());
-        return mContentResolver.delete(Voicemails.CONTENT_URI, selectionStatement, null);
-    }
-
-    /**
-     * Utility method to delete a single voicemail.
-     */
-    public void deleteFromDatabase(Voicemail voicemail) {
-        mContentResolver.delete(Voicemails.CONTENT_URI, Voicemails._ID + "=?",
-                new String[] { Long.toString(voicemail.getId()) });
-    }
-
-    public int markReadInDatabase(List<Voicemail> voicemails) {
-        int count = voicemails.size();
-        for (int i = 0; i < count; i++) {
-            markReadInDatabase(voicemails.get(i));
-        }
-        return count;
-    }
-
-    /**
-     * Utility method to mark single message as read.
-     */
-    public void markReadInDatabase(Voicemail voicemail) {
-        Uri uri = ContentUris.withAppendedId(mSourceUri, voicemail.getId());
-        ContentValues contentValues = new ContentValues();
-        contentValues.put(Voicemails.IS_READ, "1");
-        mContentResolver.update(uri, contentValues, null, null);
-    }
-
-    /**
-     * Sends an update command to the voicemail content provider for a list of voicemails. From the
-     * view of the provider, since the updater is the owner of the entry, a blank "update" means
-     * that the voicemail source is indicating that the server has up-to-date information on the
-     * voicemail. This flips the "dirty" bit to "0".
-     *
-     * @param voicemails The list of voicemails to update
-     * @return The number of voicemails updated
-     */
-    public int markCleanInDatabase(List<Voicemail> voicemails) {
-        int count = voicemails.size();
-        for (int i = 0; i < count; i++) {
-            markCleanInDatabase(voicemails.get(i));
-        }
-        return count;
-    }
-
-    /**
-     * Utility method to mark single message as clean.
-     */
-    public void markCleanInDatabase(Voicemail voicemail) {
-        Uri uri = ContentUris.withAppendedId(mSourceUri, voicemail.getId());
-        ContentValues contentValues = new ContentValues();
-        mContentResolver.update(uri, contentValues, null, null);
-    }
-
-    /**
-     * Utility method to add a transcription to the voicemail.
-     */
-    public void updateWithTranscription(Voicemail voicemail, String transcription) {
-        Uri uri = ContentUris.withAppendedId(mSourceUri, voicemail.getId());
-        ContentValues contentValues = new ContentValues();
-        contentValues.put(Voicemails.TRANSCRIPTION, transcription);
-        mContentResolver.update(uri, contentValues, null, null);
-    }
-
-    /**
-     * Voicemail is unique if the tuple of (phone account component name, phone account id, source
-     * data) is unique. If the phone account is missing, we also consider this unique since it's
-     * simply an "unknown" account.
-     * @param voicemail The voicemail to check if it is unique.
-     * @return {@code true} if the voicemail is unique, {@code false} otherwise.
-     */
-    public boolean isVoicemailUnique(Voicemail voicemail) {
-        Cursor cursor = null;
-        PhoneAccountHandle phoneAccount = voicemail.getPhoneAccount();
-        if (phoneAccount != null) {
-            String phoneAccountComponentName = phoneAccount.getComponentName().flattenToString();
-            String phoneAccountId = phoneAccount.getId();
-            String sourceData = voicemail.getSourceData();
-            if (phoneAccountComponentName == null || phoneAccountId == null || sourceData == null) {
-                return true;
-            }
-            try {
-                String whereClause =
-                        Voicemails.PHONE_ACCOUNT_COMPONENT_NAME + "=? AND " +
-                        Voicemails.PHONE_ACCOUNT_ID + "=? AND " + Voicemails.SOURCE_DATA + "=?";
-                String[] whereArgs = { phoneAccountComponentName, phoneAccountId, sourceData };
-                cursor = mContentResolver.query(
-                        mSourceUri, PROJECTION, whereClause, whereArgs, null);
-                if (cursor.getCount() == 0) {
-                    return true;
-                } else {
-                    return false;
-                }
-            }
-            finally {
-                if (cursor != null) {
-                    cursor.close();
-                }
-            }
-        }
-        return true;
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/sync/VvmNetworkRequest.java b/src/com/android/phone/vvm/omtp/sync/VvmNetworkRequest.java
deleted file mode 100644
index 3bdb45b..0000000
--- a/src/com/android/phone/vvm/omtp/sync/VvmNetworkRequest.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.sync;
-
-import android.net.Network;
-import android.support.annotation.NonNull;
-import android.telecom.PhoneAccountHandle;
-import com.android.phone.VoicemailStatus;
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-import com.android.phone.vvm.omtp.VvmLog;
-import java.io.Closeable;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-
-/**
- * Class to retrieve a {@link Network} synchronously. {@link #getNetwork(OmtpVvmCarrierConfigHelper,
- * PhoneAccountHandle)} will block until a suitable network is retrieved or it has failed.
- */
-public class VvmNetworkRequest {
-
-    private static final String TAG = "VvmNetworkRequest";
-
-    /**
-     * A wrapper around a Network returned by a {@link VvmNetworkRequestCallback}, which should be
-     * closed once not needed anymore.
-     */
-    public static class NetworkWrapper implements Closeable {
-
-        private final Network mNetwork;
-        private final VvmNetworkRequestCallback mCallback;
-
-        private NetworkWrapper(Network network, VvmNetworkRequestCallback callback) {
-            mNetwork = network;
-            mCallback = callback;
-        }
-
-        public Network get() {
-            return mNetwork;
-        }
-
-        @Override
-        public void close() {
-            mCallback.releaseNetwork();
-        }
-    }
-
-    public static class RequestFailedException extends Exception {
-
-        private RequestFailedException(Throwable cause) {
-            super(cause);
-        }
-    }
-
-    @NonNull
-    public static NetworkWrapper getNetwork(OmtpVvmCarrierConfigHelper config,
-        PhoneAccountHandle handle, VoicemailStatus.Editor status) throws RequestFailedException {
-        FutureNetworkRequestCallback callback = new FutureNetworkRequestCallback(config, handle,
-            status);
-        callback.requestNetwork();
-        try {
-            return callback.getFuture().get();
-        } catch (InterruptedException | ExecutionException e) {
-            callback.releaseNetwork();
-            VvmLog.e(TAG, "can't get future network", e);
-            throw new RequestFailedException(e);
-        }
-    }
-
-    private static class FutureNetworkRequestCallback extends VvmNetworkRequestCallback {
-
-        /**
-         * {@link CompletableFuture#get()} will block until {@link CompletableFuture#
-         * complete(Object) } has been called on the other thread.
-         */
-        private final CompletableFuture<NetworkWrapper> mFuture = new CompletableFuture<>();
-
-        public FutureNetworkRequestCallback(OmtpVvmCarrierConfigHelper config,
-            PhoneAccountHandle phoneAccount, VoicemailStatus.Editor status) {
-            super(config, phoneAccount, status);
-        }
-
-        public Future<NetworkWrapper> getFuture() {
-            return mFuture;
-        }
-
-        @Override
-        public void onAvailable(Network network) {
-            super.onAvailable(network);
-            mFuture.complete(new NetworkWrapper(network, this));
-        }
-
-        @Override
-        public void onFailed(String reason) {
-            super.onFailed(reason);
-            mFuture.complete(null);
-        }
-
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/sync/VvmNetworkRequestCallback.java b/src/com/android/phone/vvm/omtp/sync/VvmNetworkRequestCallback.java
deleted file mode 100644
index 787fdcd..0000000
--- a/src/com/android/phone/vvm/omtp/sync/VvmNetworkRequestCallback.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (C) 2015 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.phone.vvm.omtp.sync;
-
-import android.annotation.CallSuper;
-import android.content.Context;
-import android.net.ConnectivityManager;
-import android.net.Network;
-import android.net.NetworkCapabilities;
-import android.net.NetworkRequest;
-import android.os.Handler;
-import android.os.Looper;
-import android.telecom.PhoneAccountHandle;
-import com.android.phone.PhoneUtils;
-import com.android.phone.VoicemailStatus;
-import com.android.phone.vvm.omtp.OmtpEvents;
-import com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper;
-import com.android.phone.vvm.omtp.VvmLog;
-
-/**
- * Base class for network request call backs for visual voicemail syncing with the Imap server. This
- * handles retries and network requests.
- */
-public abstract class VvmNetworkRequestCallback extends ConnectivityManager.NetworkCallback {
-
-    private static final String TAG = "VvmNetworkRequest";
-
-    // Timeout used to call ConnectivityManager.requestNetwork
-    private static final int NETWORK_REQUEST_TIMEOUT_MILLIS = 60 * 1000;
-
-    public static final String NETWORK_REQUEST_FAILED_TIMEOUT = "timeout";
-    public static final String NETWORK_REQUEST_FAILED_LOST = "lost";
-
-    protected Context mContext;
-    protected PhoneAccountHandle mPhoneAccount;
-    protected NetworkRequest mNetworkRequest;
-    private ConnectivityManager mConnectivityManager;
-    private final OmtpVvmCarrierConfigHelper mCarrierConfigHelper;
-    private final int mSubId;
-    private final VoicemailStatus.Editor mStatus;
-    private boolean mRequestSent = false;
-    private boolean mResultReceived = false;
-
-    public VvmNetworkRequestCallback(Context context, PhoneAccountHandle phoneAccount,
-        VoicemailStatus.Editor status) {
-        mContext = context;
-        mPhoneAccount = phoneAccount;
-        mSubId = PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccount);
-        mStatus = status;
-        mCarrierConfigHelper = new OmtpVvmCarrierConfigHelper(context, mSubId);
-        mNetworkRequest = createNetworkRequest();
-    }
-
-    public VvmNetworkRequestCallback(OmtpVvmCarrierConfigHelper config,
-        PhoneAccountHandle phoneAccount, VoicemailStatus.Editor status) {
-        mContext = config.getContext();
-        mPhoneAccount = phoneAccount;
-        mSubId = config.getSubId();
-        mStatus = status;
-        mCarrierConfigHelper = config;
-        mNetworkRequest = createNetworkRequest();
-    }
-
-    public VoicemailStatus.Editor getVoicemailStatusEditor() {
-        return mStatus;
-    }
-
-    /**
-     * @return NetworkRequest for a proper transport type. Use only cellular network if the carrier
-     * requires it. Otherwise use whatever available.
-     */
-    private NetworkRequest createNetworkRequest() {
-
-        NetworkRequest.Builder builder = new NetworkRequest.Builder()
-                .addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET);
-
-        if (mCarrierConfigHelper.isCellularDataRequired()) {
-            VvmLog.d(TAG, "Transport type: CELLULAR");
-            builder.addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR)
-                    .setNetworkSpecifier(Integer.toString(mSubId));
-        } else {
-            VvmLog.d(TAG, "Transport type: ANY");
-        }
-        return builder.build();
-    }
-
-    public NetworkRequest getNetworkRequest() {
-        return mNetworkRequest;
-    }
-
-    @Override
-    @CallSuper
-    public void onLost(Network network) {
-        VvmLog.d(TAG, "onLost");
-        mResultReceived = true;
-        onFailed(NETWORK_REQUEST_FAILED_LOST);
-    }
-
-    @Override
-    @CallSuper
-    public void onAvailable(Network network) {
-        super.onAvailable(network);
-        mResultReceived = true;
-    }
-
-    @Override
-    @CallSuper
-    public void onUnavailable() {
-        mResultReceived = true;
-        onFailed(NETWORK_REQUEST_FAILED_TIMEOUT);
-    }
-
-    public void requestNetwork() {
-        if (mRequestSent == true) {
-            VvmLog.e(TAG, "requestNetwork() called twice");
-            return;
-        }
-        mRequestSent = true;
-        getConnectivityManager().requestNetwork(getNetworkRequest(), this);
-        /**
-         * Somehow requestNetwork() with timeout doesn't work, and it's a hidden method.
-         * Implement our own timeout mechanism instead.
-         */
-        Handler handler = new Handler(Looper.getMainLooper());
-        handler.postDelayed(new Runnable() {
-            @Override
-            public void run() {
-                if (mResultReceived == false) {
-                    onFailed(NETWORK_REQUEST_FAILED_TIMEOUT);
-                }
-            }
-        }, NETWORK_REQUEST_TIMEOUT_MILLIS);
-    }
-
-    public void releaseNetwork() {
-        VvmLog.d(TAG, "releaseNetwork");
-        getConnectivityManager().unregisterNetworkCallback(this);
-    }
-
-    public ConnectivityManager getConnectivityManager() {
-        if (mConnectivityManager == null) {
-            mConnectivityManager = (ConnectivityManager) mContext.getSystemService(
-                    Context.CONNECTIVITY_SERVICE);
-        }
-        return mConnectivityManager;
-    }
-
-    @CallSuper
-    public void onFailed(String reason) {
-        VvmLog.d(TAG, "onFailed: " + reason);
-        if (mCarrierConfigHelper.isCellularDataRequired()) {
-            mCarrierConfigHelper
-                .handleEvent(mStatus, OmtpEvents.DATA_NO_CONNECTION_CELLULAR_REQUIRED);
-        } else {
-            mCarrierConfigHelper.handleEvent(mStatus, OmtpEvents.DATA_NO_CONNECTION);
-        }
-        releaseNetwork();
-    }
-}
diff --git a/src/com/android/phone/vvm/omtp/utils/XmlUtils.java b/src/com/android/phone/vvm/omtp/utils/XmlUtils.java
deleted file mode 100644
index 4eeb5ce..0000000
--- a/src/com/android/phone/vvm/omtp/utils/XmlUtils.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.utils;
-
-import android.util.ArrayMap;
-
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-public class XmlUtils {
-
-    public static final ArrayMap<String, ?> readThisArrayMapXml(XmlPullParser parser, String endTag,
-            String[] name, ReadMapCallback callback)
-            throws XmlPullParserException, java.io.IOException {
-        ArrayMap<String, Object> map = new ArrayMap<>();
-
-        int eventType = parser.getEventType();
-        do {
-            if (eventType == XmlPullParser.START_TAG) {
-                Object val = readThisValueXml(parser, name, callback, true);
-                map.put(name[0], val);
-            } else if (eventType == XmlPullParser.END_TAG) {
-                if (parser.getName().equals(endTag)) {
-                    return map;
-                }
-                throw new XmlPullParserException(
-                        "Expected " + endTag + " end tag at: " + parser.getName());
-            }
-            eventType = parser.next();
-        } while (eventType != XmlPullParser.END_DOCUMENT);
-
-        throw new XmlPullParserException(
-                "Document ended before " + endTag + " end tag");
-    }
-
-    /**
-     * Read an ArrayList object from an XmlPullParser.  The XML data could previously have been
-     * generated by writeListXml().  The XmlPullParser must be positioned <em>after</em> the tag
-     * that begins the list.
-     *
-     * @param parser The XmlPullParser from which to read the list data.
-     * @param endTag Name of the tag that will end the list, usually "list".
-     * @param name An array of one string, used to return the name attribute of the list's tag.
-     * @return HashMap The newly generated list.
-     */
-    public static final ArrayList readThisListXml(XmlPullParser parser, String endTag,
-            String[] name, ReadMapCallback callback, boolean arrayMap)
-            throws XmlPullParserException, java.io.IOException {
-        ArrayList list = new ArrayList();
-
-        int eventType = parser.getEventType();
-        do {
-            if (eventType == XmlPullParser.START_TAG) {
-                Object val = readThisValueXml(parser, name, callback, arrayMap);
-                list.add(val);
-            } else if (eventType == XmlPullParser.END_TAG) {
-                if (parser.getName().equals(endTag)) {
-                    return list;
-                }
-                throw new XmlPullParserException(
-                        "Expected " + endTag + " end tag at: " + parser.getName());
-            }
-            eventType = parser.next();
-        } while (eventType != XmlPullParser.END_DOCUMENT);
-
-        throw new XmlPullParserException(
-                "Document ended before " + endTag + " end tag");
-    }
-
-    /**
-     * Read a String[] object from an XmlPullParser.  The XML data could previously have been
-     * generated by writeStringArrayXml().  The XmlPullParser must be positioned <em>after</em> the
-     * tag that begins the list.
-     *
-     * @param parser The XmlPullParser from which to read the list data.
-     * @param endTag Name of the tag that will end the list, usually "string-array".
-     * @param name An array of one string, used to return the name attribute of the list's tag.
-     * @return Returns a newly generated String[].
-     */
-    public static String[] readThisStringArrayXml(XmlPullParser parser, String endTag,
-            String[] name) throws XmlPullParserException, java.io.IOException {
-
-        parser.next();
-
-        List<String> array = new ArrayList<>();
-
-        int eventType = parser.getEventType();
-        do {
-            if (eventType == XmlPullParser.START_TAG) {
-                if (parser.getName().equals("item")) {
-                    try {
-                        array.add(parser.getAttributeValue(null, "value"));
-                    } catch (NullPointerException e) {
-                        throw new XmlPullParserException("Need value attribute in item");
-                    } catch (NumberFormatException e) {
-                        throw new XmlPullParserException("Not a number in value attribute in item");
-                    }
-                } else {
-                    throw new XmlPullParserException("Expected item tag at: " + parser.getName());
-                }
-            } else if (eventType == XmlPullParser.END_TAG) {
-                if (parser.getName().equals(endTag)) {
-                    return array.toArray(new String[0]);
-                } else if (parser.getName().equals("item")) {
-
-                } else {
-                    throw new XmlPullParserException("Expected " + endTag + " end tag at: " +
-                            parser.getName());
-                }
-            }
-            eventType = parser.next();
-        } while (eventType != XmlPullParser.END_DOCUMENT);
-
-        throw new XmlPullParserException("Document ended before " + endTag + " end tag");
-    }
-
-    private static Object readThisValueXml(XmlPullParser parser, String[] name,
-            ReadMapCallback callback, boolean arrayMap)
-            throws XmlPullParserException, java.io.IOException {
-        final String valueName = parser.getAttributeValue(null, "name");
-        final String tagName = parser.getName();
-
-        Object res;
-
-        if (tagName.equals("null")) {
-            res = null;
-        } else if (tagName.equals("string")) {
-            String value = "";
-            int eventType;
-            while ((eventType = parser.next()) != XmlPullParser.END_DOCUMENT) {
-                if (eventType == XmlPullParser.END_TAG) {
-                    if (parser.getName().equals("string")) {
-                        name[0] = valueName;
-                        return value;
-                    }
-                    throw new XmlPullParserException(
-                            "Unexpected end tag in <string>: " + parser.getName());
-                } else if (eventType == XmlPullParser.TEXT) {
-                    value += parser.getText();
-                } else if (eventType == XmlPullParser.START_TAG) {
-                    throw new XmlPullParserException(
-                            "Unexpected start tag in <string>: " + parser.getName());
-                }
-            }
-            throw new XmlPullParserException(
-                    "Unexpected end of document in <string>");
-        } else if ((res = readThisPrimitiveValueXml(parser, tagName)) != null) {
-            // all work already done by readThisPrimitiveValueXml
-        } else if (tagName.equals("string-array")) {
-            res = readThisStringArrayXml(parser, "string-array", name);
-            name[0] = valueName;
-            return res;
-        } else if (tagName.equals("list")) {
-            parser.next();
-            res = readThisListXml(parser, "list", name, callback, arrayMap);
-            name[0] = valueName;
-            return res;
-        } else if (callback != null) {
-            res = callback.readThisUnknownObjectXml(parser, tagName);
-            name[0] = valueName;
-            return res;
-        } else {
-            throw new XmlPullParserException("Unknown tag: " + tagName);
-        }
-
-        // Skip through to end tag.
-        int eventType;
-        while ((eventType = parser.next()) != XmlPullParser.END_DOCUMENT) {
-            if (eventType == XmlPullParser.END_TAG) {
-                if (parser.getName().equals(tagName)) {
-                    name[0] = valueName;
-                    return res;
-                }
-                throw new XmlPullParserException(
-                        "Unexpected end tag in <" + tagName + ">: " + parser.getName());
-            } else if (eventType == XmlPullParser.TEXT) {
-                throw new XmlPullParserException(
-                        "Unexpected text in <" + tagName + ">: " + parser.getName());
-            } else if (eventType == XmlPullParser.START_TAG) {
-                throw new XmlPullParserException(
-                        "Unexpected start tag in <" + tagName + ">: " + parser.getName());
-            }
-        }
-        throw new XmlPullParserException(
-                "Unexpected end of document in <" + tagName + ">");
-    }
-
-    private static final Object readThisPrimitiveValueXml(XmlPullParser parser, String tagName)
-            throws XmlPullParserException, java.io.IOException {
-        try {
-            if (tagName.equals("int")) {
-                return Integer.parseInt(parser.getAttributeValue(null, "value"));
-            } else if (tagName.equals("long")) {
-                return Long.valueOf(parser.getAttributeValue(null, "value"));
-            } else if (tagName.equals("float")) {
-                return Float.valueOf(parser.getAttributeValue(null, "value"));
-            } else if (tagName.equals("double")) {
-                return Double.valueOf(parser.getAttributeValue(null, "value"));
-            } else if (tagName.equals("boolean")) {
-                return Boolean.valueOf(parser.getAttributeValue(null, "value"));
-            } else {
-                return null;
-            }
-        } catch (NullPointerException e) {
-            throw new XmlPullParserException("Need value attribute in <" + tagName + ">");
-        } catch (NumberFormatException e) {
-            throw new XmlPullParserException(
-                    "Not a number in value attribute in <" + tagName + ">");
-        }
-    }
-
-    public interface ReadMapCallback {
-
-        /**
-         * Called from readThisMapXml when a START_TAG is not recognized. The input stream is
-         * positioned within the start tag so that attributes can be read using in.getAttribute.
-         *
-         * @param in the XML input stream
-         * @param tag the START_TAG that was not recognized.
-         * @return the Object parsed from the stream which will be put into the map.
-         * @throws XmlPullParserException if the START_TAG is not recognized.
-         * @throws IOException on XmlPullParser serialization errors.
-         */
-        Object readThisUnknownObjectXml(XmlPullParser in, String tag)
-                throws XmlPullParserException, IOException;
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/services/telephony/ConferenceParticipantConnection.java b/src/com/android/services/telephony/ConferenceParticipantConnection.java
index ed7ad44..19dda54 100644
--- a/src/com/android/services/telephony/ConferenceParticipantConnection.java
+++ b/src/com/android/services/telephony/ConferenceParticipantConnection.java
@@ -16,6 +16,7 @@
 
 package com.android.services.telephony;
 
+import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.PhoneConstants;
 
@@ -70,7 +71,7 @@
             address = null;
         } else {
             String countryIso = getCountryIso(parentConnection.getCall().getPhone());
-            address = getParticipantAddress(participant, countryIso);
+            address = getParticipantAddress(participant.getHandle(), countryIso);
         }
         setAddress(address, presentation);
         setCallerDisplayName(participant.getDisplayName(), presentation);
@@ -212,21 +213,19 @@
      * Conference event package data contains SIP URIs, so we try to extract the phone number and
      * format into a typical tel: style URI.
      *
-     * @param participant The conference participant.
+     * @param address The conference participant's address.
      * @param countryIso The country ISO of the current subscription; used when formatting the
      *                   participant phone number to E.164 format.
      * @return The participant's address URI.
      */
-    private Uri getParticipantAddress(ConferenceParticipant participant, String countryIso) {
-        Uri address = participant.getHandle();
+    @VisibleForTesting
+    public static Uri getParticipantAddress(Uri address, String countryIso) {
         if (address == null) {
             return address;
         }
-
-        // If the participant's address is already a TEL scheme, just return it as is.
-        if (PhoneAccount.SCHEME_TEL.equals(address.getScheme())) {
-            return address;
-        }
+        // Even if address is already in tel: format, still parse it and rebuild.
+        // This is to recognize tel URIs such as:
+        // tel:6505551212;phone-context=ims.mnc012.mcc034.3gppnetwork.org
 
         // Conference event package participants are identified using SIP URIs (see RFC3261).
         // A valid SIP uri has the format: sip:user:password@host:port;uri-parameters?headers
diff --git a/src/com/android/services/telephony/DisconnectCauseUtil.java b/src/com/android/services/telephony/DisconnectCauseUtil.java
index 92f202a..fcc37f4 100644
--- a/src/com/android/services/telephony/DisconnectCauseUtil.java
+++ b/src/com/android/services/telephony/DisconnectCauseUtil.java
@@ -128,6 +128,8 @@
             case android.telephony.DisconnectCause.DATA_LIMIT_REACHED:
             case android.telephony.DisconnectCause.DIALED_ON_WRONG_SLOT:
             case android.telephony.DisconnectCause.DIALED_CALL_FORWARDING_WHILE_ROAMING:
+            case android.telephony.DisconnectCause.IMEI_NOT_ACCEPTED:
+            case android.telephony.DisconnectCause.WIFI_LOST:
                 return DisconnectCause.ERROR;
 
             case android.telephony.DisconnectCause.DIALED_MMI:
@@ -383,6 +385,14 @@
                 resourceId = com.android.internal.R.string.mmiErrorWhileRoaming;
                 break;
 
+            case android.telephony.DisconnectCause.IMEI_NOT_ACCEPTED:
+                resourceId = R.string.callFailed_imei_not_accepted;
+                break;
+
+            case android.telephony.DisconnectCause.WIFI_LOST:
+                resourceId = R.string.callFailed_wifi_lost;
+                break;
+
             default:
                 break;
         }
diff --git a/src/com/android/services/telephony/RadioOnHelper.java b/src/com/android/services/telephony/EmergencyCallHelper.java
similarity index 73%
rename from src/com/android/services/telephony/RadioOnHelper.java
rename to src/com/android/services/telephony/EmergencyCallHelper.java
index 81a5b19..295f4f7 100644
--- a/src/com/android/services/telephony/RadioOnHelper.java
+++ b/src/com/android/services/telephony/EmergencyCallHelper.java
@@ -30,22 +30,21 @@
 import java.util.List;
 
 /**
- * Helper class that implements special behavior related to emergency calls or make phone calls when
- * radio is power off due to the device being on Bluetooth. Specifically, this class handles the
- * case of the user trying to dial an emergency number while the radio is off (i.e. the device is
- * in airplane mode) or a normal number while the radio is off (because of the device is on
- * Bluetooth), by forcibly turning the radio back on, waiting for it to come up, and then retrying
- * the call.
+ * Helper class that implements special behavior related to emergency calls. Specifically, this
+ * class handles the case of the user trying to dial an emergency number while the radio is off
+ * (i.e. the device is in airplane mode), by forcibly turning the radio back on, waiting for it to
+ * come up, and then retrying the emergency call.
  */
-public class RadioOnHelper implements RadioOnStateListener.Callback {
+public class EmergencyCallHelper implements EmergencyCallStateListener.Callback {
 
     private final Context mContext;
-    private RadioOnStateListener.Callback mCallback;
-    private List<RadioOnStateListener> mListeners;
-    private List<RadioOnStateListener> mInProgressListeners;
-    private boolean mIsRadioOnCallingEnabled;
+    private EmergencyCallStateListener.Callback mCallback;
+    private List<EmergencyCallStateListener> mListeners;
+    private List<EmergencyCallStateListener> mInProgressListeners;
+    private boolean mIsEmergencyCallingEnabled;
 
-    public RadioOnHelper(Context context) {
+
+    public EmergencyCallHelper(Context context) {
         mContext = context;
         mInProgressListeners = new ArrayList<>(2);
     }
@@ -56,12 +55,12 @@
         }
         mListeners = new ArrayList<>(2);
         for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
-            mListeners.add(new RadioOnStateListener());
+            mListeners.add(new EmergencyCallStateListener());
         }
     }
     /**
      * Starts the "turn on radio" sequence. This is the (single) external API of the
-     * RadioOnHelper class.
+     * EmergencyCallHelper class.
      *
      * This method kicks off the following sequence:
      * - Power on the radio for each Phone
@@ -70,14 +69,14 @@
      * - Finally, clean up any leftover state.
      *
      * This method is safe to call from any thread, since it simply posts a message to the
-     * RadioOnHelper's handler (thus ensuring that the rest of the sequence is entirely
+     * EmergencyCallHelper's handler (thus ensuring that the rest of the sequence is entirely
      * serialized, and runs on the main looper.)
      */
-    public void enableRadioOnCalling(RadioOnStateListener.Callback callback) {
+    public void enableEmergencyCalling(EmergencyCallStateListener.Callback callback) {
         setupListeners();
         mCallback = callback;
         mInProgressListeners.clear();
-        mIsRadioOnCallingEnabled = false;
+        mIsEmergencyCallingEnabled = false;
         for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
             Phone phone = PhoneFactory.getPhone(i);
             if (phone == null)
@@ -121,16 +120,11 @@
      * Synchronization is not necessary.
      */
     @Override
-    public void onComplete(RadioOnStateListener listener, boolean isRadioReady) {
-        mIsRadioOnCallingEnabled |= isRadioReady;
+    public void onComplete(EmergencyCallStateListener listener, boolean isRadioReady) {
+        mIsEmergencyCallingEnabled |= isRadioReady;
         mInProgressListeners.remove(listener);
         if (mCallback != null && mInProgressListeners.isEmpty()) {
-            mCallback.onComplete(null, mIsRadioOnCallingEnabled);
+            mCallback.onComplete(null, mIsEmergencyCallingEnabled);
         }
     }
-
-    @Override
-    public boolean isOkToCall(Phone phone, int serviceState) {
-        return (mCallback == null) ? false : mCallback.isOkToCall(phone, serviceState);
-    }
 }
diff --git a/src/com/android/services/telephony/RadioOnStateListener.java b/src/com/android/services/telephony/EmergencyCallStateListener.java
similarity index 92%
rename from src/com/android/services/telephony/RadioOnStateListener.java
rename to src/com/android/services/telephony/EmergencyCallStateListener.java
index 7bfa9c6..036872d 100644
--- a/src/com/android/services/telephony/RadioOnStateListener.java
+++ b/src/com/android/services/telephony/EmergencyCallStateListener.java
@@ -31,16 +31,15 @@
 
 /**
  * Helper class that listens to a Phone's radio state and sends a callback when the radio state of
- * that Phone is either "in service" or ("emergency calls only." if is emergency).
+ * that Phone is either "in service" or "emergency calls only."
  */
-public class RadioOnStateListener {
+public class EmergencyCallStateListener {
 
     /**
-     * Receives the result of the RadioOnStateListener's attempt to turn on the radio.
+     * Receives the result of the EmergencyCallStateListener's attempt to turn on the radio.
      */
     interface Callback {
-        void onComplete(RadioOnStateListener listener, boolean isRadioReady);
-        boolean isOkToCall(Phone phone, int serviceState);
+        void onComplete(EmergencyCallStateListener listener, boolean isRadioReady);
     }
 
     // Number of times to retry the call, and time between retry attempts.
@@ -63,8 +62,8 @@
                     SomeArgs args = (SomeArgs) msg.obj;
                     try {
                         Phone phone = (Phone) args.arg1;
-                        RadioOnStateListener.Callback callback =
-                                (RadioOnStateListener.Callback) args.arg2;
+                        EmergencyCallStateListener.Callback callback =
+                                (EmergencyCallStateListener.Callback) args.arg2;
                         startSequenceInternal(phone, callback);
                     } finally {
                         args.recycle();
@@ -90,7 +89,7 @@
 
     /**
      * Starts the "wait for radio" sequence. This is the (single) external API of the
-     * RadioOnStateListener class.
+     * EmergencyCallStateListener class.
      *
      * This method kicks off the following sequence:
      * - Listen for the service state change event telling us the radio has come up.
@@ -99,7 +98,7 @@
      * - Finally, clean up any leftover state.
      *
      * This method is safe to call from any thread, since it simply posts a message to the
-     * RadioOnStateListener's handler (thus ensuring that the rest of the sequence is entirely
+     * EmergencyCallStateListener's handler (thus ensuring that the rest of the sequence is entirely
      * serialized, and runs only on the handler thread.)
      */
     public void waitForRadioOn(Phone phone, Callback callback) {
@@ -124,7 +123,7 @@
     private void startSequenceInternal(Phone phone, Callback callback) {
         Log.d(this, "startSequenceInternal: Phone " + phone.getPhoneId());
 
-        // First of all, clean up any state left over from a prior RadioOn call sequence. This
+        // First of all, clean up any state left over from a prior emergency call sequence. This
         // ensures that we'll behave sanely if another startTurnOnRadioSequence() comes in while
         // we're already in the middle of the sequence.
         cleanup();
@@ -141,7 +140,7 @@
 
     /**
      * Handles the SERVICE_STATE_CHANGED event. Normally this event tells us that the radio has
-     * finally come up. In that case, it's now safe to actually place the RadioOn call.
+     * finally come up. In that case, it's now safe to actually place the emergency call.
      */
     private void onServiceStateChanged(ServiceState state) {
         Log.d(this, "onServiceStateChanged(), new state = %s, Phone = %s", state,
@@ -172,7 +171,8 @@
      * UNAVAILABLE state, even if it is reporting the OUT_OF_SERVICE state.
      */
     private boolean isOkToCall(int serviceState) {
-        return (mCallback == null) ? false : mCallback.isOkToCall(mPhone, serviceState);
+        return (mPhone.getState() == PhoneConstants.State.OFFHOOK) ||
+                mPhone.getServiceStateTracker().isRadioOn();
     }
 
     /**
@@ -223,7 +223,7 @@
      * - Clean up any extraneous handler messages (like retry timeouts) still in the queue
      *
      * Basically this method guarantees that there will be no more activity from the
-     * RadioOnStateListener until someone kicks off the whole sequence again with another call
+     * EmergencyCallStateListener until someone kicks off the whole sequence again with another call
      * to {@link #waitForRadioOn}
      *
      * TODO: Do the work for the comment below:
@@ -298,7 +298,7 @@
         if (this == o) return true;
         if (o == null || !getClass().equals(o.getClass())) return false;
 
-        RadioOnStateListener that = (RadioOnStateListener) o;
+        EmergencyCallStateListener that = (EmergencyCallStateListener) o;
 
         if (mNumRetriesSoFar != that.mNumRetriesSoFar) {
             return false;
diff --git a/src/com/android/services/telephony/ImsConference.java b/src/com/android/services/telephony/ImsConference.java
index 4acb6f8..eb1fccf 100644
--- a/src/com/android/services/telephony/ImsConference.java
+++ b/src/com/android/services/telephony/ImsConference.java
@@ -215,7 +215,7 @@
     /**
      * The telephony connection service; used to add new participant connections to Telecom.
      */
-    private TelephonyConnectionService mTelephonyConnectionService;
+    private TelephonyConnectionServiceProxy mTelephonyConnectionService;
 
     /**
      * The connection to the conference server which is hosting the conference.
@@ -232,6 +232,8 @@
      */
     private Uri[] mConferenceHostAddress;
 
+    private TelecomAccountRegistry mTelecomAccountRegistry;
+
     /**
      * The known conference participant connections.  The HashMap is keyed by a Pair containing
      * the handle and endpoint Uris.
@@ -267,11 +269,14 @@
      * @param conferenceHost The telephony connection hosting the conference.
      * @param phoneAccountHandle The phone account handle associated with the conference.
      */
-    public ImsConference(TelephonyConnectionService telephonyConnectionService,
+    public ImsConference(TelecomAccountRegistry telecomAccountRegistry,
+                         TelephonyConnectionServiceProxy telephonyConnectionService,
             TelephonyConnection conferenceHost, PhoneAccountHandle phoneAccountHandle) {
 
         super(phoneAccountHandle);
 
+        mTelecomAccountRegistry = telecomAccountRegistry;
+
         // Specify the connection time of the conference to be the connection time of the original
         // connection.
         long connectTime = conferenceHost.getOriginalConnection().getConnectTime();
@@ -330,6 +335,10 @@
                 Connection.CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO,
                 can(capabilities, Connection.CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO));
 
+        conferenceCapabilities = changeBitmask(conferenceCapabilities,
+                Connection.CAPABILITY_CAN_PAUSE_VIDEO,
+                mConferenceHost.getVideoPauseSupported() && isVideoCapable());
+
         return conferenceCapabilities;
     }
 
@@ -589,8 +598,7 @@
             Phone imsPhone = mConferenceHost.getPhone();
             mConferenceHostPhoneAccountHandle =
                     PhoneUtils.makePstnPhoneAccountHandle(imsPhone.getDefaultPhone());
-            Uri hostAddress = TelecomAccountRegistry.getInstance(mTelephonyConnectionService)
-                    .getAddress(mConferenceHostPhoneAccountHandle);
+            Uri hostAddress = mTelecomAccountRegistry.getAddress(mConferenceHostPhoneAccountHandle);
 
             ArrayList<Uri> hostAddresses = new ArrayList<>();
 
@@ -940,6 +948,16 @@
         }
     }
 
+    /**
+     * Determines if the host of this conference is capable of video calling.
+     * @return {@code true} if video capable, {@code false} otherwise.
+     */
+    private boolean isVideoCapable() {
+        int capabilities = mConferenceHost.getConnectionCapabilities();
+        return can(capabilities, Connection.CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL)
+                && can(capabilities, Connection.CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL);
+    }
+
     private void updateStatusHints() {
         if (mConferenceHost == null) {
             setStatusHints(null);
@@ -1000,4 +1018,47 @@
         }
         return PhoneGlobals.getInstance().getCarrierConfigForSubId(phone.getSubId());
     }
+
+    /**
+     * @return {@code true} if the carrier associated with the conference requires that the maximum
+     *      size of the conference is enforced, {@code false} otherwise.
+     */
+    public boolean isMaximumConferenceSizeEnforced() {
+        PersistableBundle b = getCarrierConfig();
+        // Return false if the CarrierConfig is unavailable
+        return b != null && b.getBoolean(
+                CarrierConfigManager.KEY_IS_IMS_CONFERENCE_SIZE_ENFORCED_BOOL);
+    }
+
+    /**
+     * @return The maximum size of a conference call where
+     * {@link #isMaximumConferenceSizeEnforced()} is true.
+     */
+    public int getMaximumConferenceSize() {
+        PersistableBundle b = getCarrierConfig();
+
+        // If there is no carrier config its really a problem, but we'll still define a sane limit
+        // of 5 so that we can still make a conference.
+        if (b == null) {
+            Log.w(this, "getMaximumConferenceSize - failed to get conference size");
+            return 5;
+        }
+        return b.getInt(CarrierConfigManager.KEY_IMS_CONFERENCE_SIZE_LIMIT_INT);
+    }
+
+    /**
+     * @return The number of participants in the conference.
+     */
+    public int getNumberOfParticipants() {
+        return mConferenceParticipantConnections.size();
+    }
+
+    /**
+     * @return {@code True} if the carrier enforces a maximum conference size, and the number of
+     *      participants in the conference has reached the limit, {@code false} otherwise.
+     */
+    public boolean isFullConference() {
+        return isMaximumConferenceSizeEnforced()
+                && getNumberOfParticipants() >= getMaximumConferenceSize();
+    }
 }
diff --git a/src/com/android/services/telephony/ImsConferenceController.java b/src/com/android/services/telephony/ImsConferenceController.java
index f7d587d..c2319a7 100644
--- a/src/com/android/services/telephony/ImsConferenceController.java
+++ b/src/com/android/services/telephony/ImsConferenceController.java
@@ -91,7 +91,7 @@
     /**
      * The current {@link ConnectionService}.
      */
-    private final TelephonyConnectionService mConnectionService;
+    private final TelephonyConnectionServiceProxy mConnectionService;
 
     /**
      * List of known {@link TelephonyConnection}s.
@@ -104,13 +104,17 @@
      */
     private final ArrayList<ImsConference> mImsConferences = new ArrayList<>(1);
 
+    private TelecomAccountRegistry mTelecomAccountRegistry;
+
     /**
      * Creates a new instance of the Ims conference controller.
      *
      * @param connectionService The current connection service.
      */
-    public ImsConferenceController(TelephonyConnectionService connectionService) {
+    public ImsConferenceController(TelecomAccountRegistry telecomAccountRegistry,
+                                   TelephonyConnectionServiceProxy connectionService) {
         mConnectionService = connectionService;
+        mTelecomAccountRegistry = telecomAccountRegistry;
     }
 
     /**
@@ -241,8 +245,10 @@
                 case Connection.STATE_ACTIVE:
                     //fall through
                 case Connection.STATE_HOLDING:
-                    conferenceParticipantsSet.addAll(conference.getConnections());
-                    conferenceableSet.add(conference);
+                    if (!conference.isFullConference()) {
+                        conferenceParticipantsSet.addAll(conference.getConnections());
+                        conferenceableSet.add(conference);
+                    }
                     continue;
                 default:
                     break;
@@ -269,7 +275,14 @@
                 conferenceables.addAll(conferenceParticipantsSet);
 
                 ((Connection) c).setConferenceables(conferenceables);
-            } else if (c instanceof Conference) {
+            } else if (c instanceof ImsConference) {
+                ImsConference imsConference = (ImsConference) c;
+
+                // If the conference is full, don't allow anything to be conferenced with it.
+                if (imsConference.isFullConference()) {
+                    imsConference.setConferenceableConnections(Collections.<Connection>emptyList());
+                }
+
                 // Remove all conferences from the set, since we can not conference a conference
                 // to another conference.
                 List<Connection> connections = conferenceableSet
@@ -278,7 +291,7 @@
                         .map(conferenceable -> (Connection) conferenceable)
                         .collect(Collectors.toList());
                 // Conference equivalent to setConferenceables that only accepts Connections
-                ((Conference) c).setConferenceableConnections(connections);
+                imsConference.setConferenceableConnections(connections);
             }
         }
     }
@@ -310,7 +323,6 @@
         Iterator<TelephonyConnection> it = mTelephonyConnections.iterator();
         while (it.hasNext()) {
             TelephonyConnection connection = it.next();
-
             if (connection.isImsConnection() && connection.getOriginalConnection() != null &&
                     connection.getOriginalConnection().isMultiparty()) {
 
@@ -343,6 +355,7 @@
         // This is necessary since the Connection Service does not support removing a connection
         // from Telecom.  Instead we create a new instance and remove the old one from telecom.
         TelephonyConnection conferenceHostConnection = connection.cloneConnection();
+        conferenceHostConnection.setVideoPauseSupported(connection.getVideoPauseSupported());
 
         PhoneAccountHandle phoneAccountHandle = null;
 
@@ -356,8 +369,8 @@
                     PhoneUtils.makePstnPhoneAccountHandle(imsPhone.getDefaultPhone());
         }
 
-        ImsConference conference = new ImsConference(mConnectionService, conferenceHostConnection,
-                phoneAccountHandle);
+        ImsConference conference = new ImsConference(mTelecomAccountRegistry, mConnectionService,
+                conferenceHostConnection, phoneAccountHandle);
         conference.setState(conferenceHostConnection.getState());
         conference.addListener(mConferenceListener);
         conference.updateConferenceParticipantsAfterCreation();
diff --git a/src/com/android/services/telephony/Log.java b/src/com/android/services/telephony/Log.java
index 30aa367..a56e8b1 100644
--- a/src/com/android/services/telephony/Log.java
+++ b/src/com/android/services/telephony/Log.java
@@ -16,10 +16,7 @@
 
 package com.android.services.telephony;
 
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.IllegalFormatException;
-import java.util.Locale;
+import android.content.Context;
 
 /**
  * Manages logging for the entire module.
@@ -42,138 +39,73 @@
         return FORCE_LOGGING || android.util.Log.isLoggable(TAG, level);
     }
 
+    public static void initLogging(Context context) {
+        // Register Telephony with the Telecom Logger.
+        android.telecom.Log.setTag(TAG);
+        android.telecom.Log.setSessionContext(context);
+        android.telecom.Log.initMd5Sum();
+    }
+
+    // Relay log messages to Telecom
+    // TODO: Redo namespace of Telephony to use these methods directly.
+
     public static void d(String prefix, String format, Object... args) {
-        if (DEBUG) {
-            android.util.Log.d(TAG, buildMessage(prefix, format, args));
-        }
+        android.telecom.Log.d(prefix, format, args);
     }
 
     public static void d(Object objectPrefix, String format, Object... args) {
-        if (DEBUG) {
-            android.util.Log.d(TAG, buildMessage(getPrefixFromObject(objectPrefix), format, args));
-        }
+        android.telecom.Log.d(objectPrefix, format, args);
     }
 
     public static void i(String prefix, String format, Object... args) {
-        if (INFO) {
-            android.util.Log.i(TAG, buildMessage(prefix, format, args));
-        }
+        android.telecom.Log.i(prefix, format, args);
     }
 
     public static void i(Object objectPrefix, String format, Object... args) {
-        if (INFO) {
-            android.util.Log.i(TAG, buildMessage(getPrefixFromObject(objectPrefix), format, args));
-        }
+        android.telecom.Log.i(objectPrefix, format, args);
     }
 
     public static void v(String prefix, String format, Object... args) {
-        if (VERBOSE) {
-            android.util.Log.v(TAG, buildMessage(prefix, format, args));
-        }
+        android.telecom.Log.v(prefix, format, args);
     }
 
     public static void v(Object objectPrefix, String format, Object... args) {
-        if (VERBOSE) {
-            android.util.Log.v(TAG, buildMessage(getPrefixFromObject(objectPrefix), format, args));
-        }
+        android.telecom.Log.v(objectPrefix, format, args);
     }
 
     public static void w(String prefix, String format, Object... args) {
-        if (WARN) {
-            android.util.Log.w(TAG, buildMessage(prefix, format, args));
-        }
+        android.telecom.Log.w(prefix, format, args);
     }
 
     public static void w(Object objectPrefix, String format, Object... args) {
-        if (WARN) {
-            android.util.Log.w(TAG, buildMessage(getPrefixFromObject(objectPrefix), format, args));
-        }
+        android.telecom.Log.w(objectPrefix, format, args);
     }
 
     public static void e(String prefix, Throwable tr, String format, Object... args) {
-        if (ERROR) {
-            android.util.Log.e(TAG, buildMessage(prefix, format, args), tr);
-        }
+        android.telecom.Log.e(prefix, tr, format, args);
     }
 
     public static void e(Object objectPrefix, Throwable tr, String format, Object... args) {
-        if (ERROR) {
-            android.util.Log.e(TAG, buildMessage(getPrefixFromObject(objectPrefix), format, args),
-                    tr);
-        }
+        android.telecom.Log.e(objectPrefix, tr, format, args);
     }
 
     public static void wtf(String prefix, Throwable tr, String format, Object... args) {
-        android.util.Log.wtf(TAG, buildMessage(prefix, format, args), tr);
+        android.telecom.Log.wtf(prefix, tr, format, args);
     }
 
     public static void wtf(Object objectPrefix, Throwable tr, String format, Object... args) {
-        android.util.Log.wtf(TAG, buildMessage(getPrefixFromObject(objectPrefix), format, args),
-                tr);
+        android.telecom.Log.wtf(objectPrefix, tr, format, args);
     }
 
     public static void wtf(String prefix, String format, Object... args) {
-        String msg = buildMessage(prefix, format, args);
-        android.util.Log.wtf(TAG, msg, new IllegalStateException(msg));
+        android.telecom.Log.wtf(prefix, format, args);
     }
 
     public static void wtf(Object objectPrefix, String format, Object... args) {
-        String msg = buildMessage(getPrefixFromObject(objectPrefix), format, args);
-        android.util.Log.wtf(TAG, msg, new IllegalStateException(msg));
+        android.telecom.Log.wtf(objectPrefix, format, args);
     }
 
-    /**
-     * Redact personally identifiable information for production users.
-     * If we are running in verbose mode, return the original string, otherwise
-     * return a SHA-1 hash of the input string.
-     */
     public static String pii(Object pii) {
-        if (pii == null || VERBOSE) {
-            return String.valueOf(pii);
-        }
-        return "[" + secureHash(String.valueOf(pii).getBytes()) + "]";
-    }
-
-    private static String secureHash(byte[] input) {
-        MessageDigest messageDigest;
-        try {
-            messageDigest = MessageDigest.getInstance("SHA-1");
-        } catch (NoSuchAlgorithmException e) {
-            return null;
-        }
-        messageDigest.update(input);
-        byte[] result = messageDigest.digest();
-        return encodeHex(result);
-    }
-
-    private static String encodeHex(byte[] bytes) {
-        StringBuffer hex = new StringBuffer(bytes.length * 2);
-
-        for (int i = 0; i < bytes.length; i++) {
-            int byteIntValue = bytes[i] & 0xff;
-            if (byteIntValue < 0x10) {
-                hex.append("0");
-            }
-            hex.append(Integer.toString(byteIntValue, 16));
-        }
-
-        return hex.toString();
-    }
-
-    private static String getPrefixFromObject(Object obj) {
-        return obj == null ? "<null>" : obj.getClass().getSimpleName();
-    }
-
-    private static String buildMessage(String prefix, String format, Object... args) {
-        String msg;
-        try {
-            msg = (args == null || args.length == 0) ? format
-                    : String.format(Locale.US, format, args);
-        } catch (IllegalFormatException ife) {
-            wtf("Log", ife, "IllegalFormatException: formatString='%s' numArgs=%d", format,
-                    args.length);
-            msg = format + " (An error occurred while formatting the message.)";
-        }
-        return String.format(Locale.US, "%s: %s", prefix, msg);
+        return android.telecom.Log.pii(pii);
     }
 }
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java
index 02215d5..d0af44f 100644
--- a/src/com/android/services/telephony/TelecomAccountRegistry.java
+++ b/src/com/android/services/telephony/TelecomAccountRegistry.java
@@ -44,6 +44,7 @@
 import android.telephony.TelephonyManager;
 import android.text.TextUtils;
 
+import com.android.ims.ImsManager;
 import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.PhoneFactory;
 import com.android.phone.PhoneGlobals;
@@ -151,7 +152,7 @@
                 }
 
                 String slotIdString;
-                if (SubscriptionManager.isValidSlotId(slotId)) {
+                if (SubscriptionManager.isValidSlotIndex(slotId)) {
                     slotIdString = Integer.toString(slotId);
                 } else {
                     slotIdString = mContext.getResources().getString(R.string.unknown);
@@ -181,16 +182,23 @@
             }
 
             mIsVideoCapable = mPhone.isVideoEnabled();
+            boolean isVideoEnabledByPlatform =
+                    ImsManager.isVtEnabledByPlatform(mPhone.getContext());
 
             if (!mIsPrimaryUser) {
                 Log.i(this, "Disabling video calling for secondary user.");
                 mIsVideoCapable = false;
+                isVideoEnabledByPlatform = false;
             }
 
             if (mIsVideoCapable) {
                 capabilities |= PhoneAccount.CAPABILITY_VIDEO_CALLING;
             }
 
+            if (isVideoEnabledByPlatform) {
+                capabilities |= PhoneAccount.CAPABILITY_SUPPORTS_VIDEO_CALLING;
+            }
+
             mIsVideoPresenceSupported = isCarrierVideoPresenceSupported();
             if (mIsVideoCapable && mIsVideoPresenceSupported) {
                 capabilities |= PhoneAccount.CAPABILITY_VIDEO_CALLING_RELIES_ON_PRESENCE;
diff --git a/src/com/android/services/telephony/TelephonyConferenceController.java b/src/com/android/services/telephony/TelephonyConferenceController.java
index 5d59e17..1386e19 100644
--- a/src/com/android/services/telephony/TelephonyConferenceController.java
+++ b/src/com/android/services/telephony/TelephonyConferenceController.java
@@ -68,13 +68,12 @@
     /** The known connections. */
     private final List<TelephonyConnection> mTelephonyConnections = new ArrayList<>();
 
-    private final TelephonyConnectionService mConnectionService;
+    private final TelephonyConnectionServiceProxy mConnectionService;
     private boolean mTriggerRecalculate = false;
 
-    public TelephonyConferenceController(TelephonyConnectionService connectionService) {
+    public TelephonyConferenceController(TelephonyConnectionServiceProxy connectionService) {
         mConnectionService = connectionService;
     }
-
     /** The TelephonyConference connection object. */
     private TelephonyConference mTelephonyConference;
 
@@ -89,7 +88,6 @@
             Log.w(this, "add - connection already tracked; connection=%s", connection);
             return;
         }
-
         mTelephonyConnections.add(connection);
         connection.addConnectionListener(mConnectionListener);
         recalculate();
@@ -182,13 +180,11 @@
         for (TelephonyConnection connection : mTelephonyConnections) {
             com.android.internal.telephony.Connection radioConnection =
                 connection.getOriginalConnection();
-
             if (radioConnection != null) {
                 Call.State state = radioConnection.getState();
                 Call call = radioConnection.getCall();
                 if ((state == Call.State.ACTIVE || state == Call.State.HOLDING) &&
                         (call != null && call.isMultiparty())) {
-
                     numGsmConnections++;
                     conferencedConnections.add(connection);
                 }
diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java
index 4199d5d..5ae1a26 100644
--- a/src/com/android/services/telephony/TelephonyConnection.java
+++ b/src/com/android/services/telephony/TelephonyConnection.java
@@ -825,6 +825,7 @@
         setVideoState(mOriginalConnection.getVideoState());
         setOriginalConnectionCapabilities(mOriginalConnection.getConnectionCapabilities());
         setWifi(mOriginalConnection.isWifi());
+        setAudioModeIsVoip(mOriginalConnection.getAudioModeIsVoip());
         setVideoProvider(mOriginalConnection.getVideoProvider());
         setAudioQuality(mOriginalConnection.getAudioQuality());
         setTechnologyTypeExtra();
@@ -884,7 +885,7 @@
         String[] filteredCnapNames = null;
         if (carrierConfig != null) {
             filteredCnapNames = carrierConfig.getStringArray(
-                    CarrierConfigManager.FILTERED_CNAP_NAMES_STRING_ARRAY);
+                    CarrierConfigManager.KEY_FILTERED_CNAP_NAMES_STRING_ARRAY);
         }
         if (filteredCnapNames != null) {
             long cnapNameMatches = Arrays.asList(filteredCnapNames)
@@ -1548,6 +1549,14 @@
     }
 
     /**
+     * @return {@code true} if this connection supports pausing the outgoing video using the
+     * {@link android.telecom.VideoProfile#STATE_PAUSED} VideoState.
+     */
+    public boolean getVideoPauseSupported() {
+        return mIsVideoPauseSupported;
+    }
+
+    /**
      * Sets whether this connection supports conference calling.
      * @param isConferenceSupported {@code true} if conference calling is supported by this
      *                                         connection, {@code false} otherwise.
diff --git a/src/com/android/services/telephony/TelephonyConnectionService.java b/src/com/android/services/telephony/TelephonyConnectionService.java
index 409d720..b9be502 100644
--- a/src/com/android/services/telephony/TelephonyConnectionService.java
+++ b/src/com/android/services/telephony/TelephonyConnectionService.java
@@ -41,14 +41,15 @@
 import android.text.TextUtils;
 import android.util.Pair;
 
+import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.telephony.Call;
 import com.android.internal.telephony.CallStateException;
+import com.android.internal.telephony.GsmCdmaPhone;
 import com.android.internal.telephony.IccCard;
 import com.android.internal.telephony.IccCardConstants;
 import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.PhoneConstants;
 import com.android.internal.telephony.PhoneFactory;
-import com.android.internal.telephony.SubscriptionController;
 import com.android.internal.telephony.imsphone.ImsExternalCallTracker;
 import com.android.internal.telephony.imsphone.ImsPhone;
 import com.android.phone.MMIDialogActivity;
@@ -72,14 +73,46 @@
     private static final Pattern CDMA_ACTIVATION_CODE_REGEX_PATTERN =
             Pattern.compile("\\*228[0-9]{0,2}");
 
+    private final TelephonyConnectionServiceProxy mTelephonyConnectionServiceProxy =
+            new TelephonyConnectionServiceProxy() {
+        @Override
+        public Collection<Connection> getAllConnections() {
+            return TelephonyConnectionService.this.getAllConnections();
+        }
+        @Override
+        public void addConference(TelephonyConference mTelephonyConference) {
+            TelephonyConnectionService.this.addConference(mTelephonyConference);
+        }
+        @Override
+        public void addConference(ImsConference mImsConference) {
+            TelephonyConnectionService.this.addConference(mImsConference);
+        }
+        @Override
+        public void removeConnection(Connection connection) {
+            TelephonyConnectionService.this.removeConnection(connection);
+        }
+        @Override
+        public void addExistingConnection(PhoneAccountHandle phoneAccountHandle,
+                                          Connection connection) {
+            TelephonyConnectionService.this
+                    .addExistingConnection(phoneAccountHandle, connection);
+        }
+        @Override
+        public void addConnectionToConferenceController(TelephonyConnection connection) {
+            TelephonyConnectionService.this.addConnectionToConferenceController(connection);
+        }
+    };
+
     private final TelephonyConferenceController mTelephonyConferenceController =
-            new TelephonyConferenceController(this);
+            new TelephonyConferenceController(mTelephonyConnectionServiceProxy);
     private final CdmaConferenceController mCdmaConferenceController =
             new CdmaConferenceController(this);
     private final ImsConferenceController mImsConferenceController =
-            new ImsConferenceController(this);
+            new ImsConferenceController(TelecomAccountRegistry.getInstance(this),
+                    mTelephonyConnectionServiceProxy);
 
     private ComponentName mExpectedComponentName = null;
+    private EmergencyCallHelper mEmergencyCallHelper;
     private EmergencyTonePlayer mEmergencyTonePlayer;
 
     // Contains one TelephonyConnection that has placed a call and a memory of which Phones it has
@@ -90,6 +123,105 @@
     private Pair<WeakReference<TelephonyConnection>, List<Phone>> mEmergencyRetryCache;
 
     /**
+     * Keeps track of the status of a SIM slot.
+     */
+    private static class SlotStatus {
+        public int slotId;
+        // RAT capabilities
+        public int capabilities;
+        // By default, we will assume that the slots are not locked.
+        public boolean isLocked = false;
+
+        public SlotStatus(int slotId, int capabilities) {
+            this.slotId = slotId;
+            this.capabilities = capabilities;
+        }
+    }
+
+    // SubscriptionManager Proxy interface for testing
+    public interface SubscriptionManagerProxy {
+        int getDefaultVoicePhoneId();
+        int getSimStateForSlotIdx(int slotId);
+        int getPhoneId(int subId);
+    }
+
+    private SubscriptionManagerProxy mSubscriptionManagerProxy = new SubscriptionManagerProxy() {
+        @Override
+        public int getDefaultVoicePhoneId() {
+            return SubscriptionManager.getDefaultVoicePhoneId();
+        }
+
+        @Override
+        public int getSimStateForSlotIdx(int slotId) {
+            return SubscriptionManager.getSimStateForSlotIndex(slotId);
+        }
+
+        @Override
+        public int getPhoneId(int subId) {
+            return SubscriptionManager.getPhoneId(subId);
+        }
+    };
+
+    // TelephonyManager Proxy interface for testing
+    public interface TelephonyManagerProxy {
+        int getPhoneCount();
+        boolean hasIccCard(int slotId);
+    }
+
+    private TelephonyManagerProxy mTelephonyManagerProxy = new TelephonyManagerProxy() {
+        private final TelephonyManager sTelephonyManager = TelephonyManager.getDefault();
+
+        @Override
+        public int getPhoneCount() {
+            return sTelephonyManager.getPhoneCount();
+        }
+
+        @Override
+        public boolean hasIccCard(int slotId) {
+            return sTelephonyManager.hasIccCard(slotId);
+        }
+    };
+
+    //PhoneFactory proxy interface for testing
+    public interface PhoneFactoryProxy {
+        Phone getPhone(int index);
+        Phone getDefaultPhone();
+        Phone[] getPhones();
+    }
+
+    private PhoneFactoryProxy mPhoneFactoryProxy = new PhoneFactoryProxy() {
+        @Override
+        public Phone getPhone(int index) {
+            return PhoneFactory.getPhone(index);
+        }
+
+        @Override
+        public Phone getDefaultPhone() {
+            return PhoneFactory.getDefaultPhone();
+        }
+
+        @Override
+        public Phone[] getPhones() {
+            return PhoneFactory.getPhones();
+        }
+    };
+
+    @VisibleForTesting
+    public void setSubscriptionManagerProxy(SubscriptionManagerProxy proxy) {
+        mSubscriptionManagerProxy = proxy;
+    }
+
+    @VisibleForTesting
+    public void setTelephonyManagerProxy(TelephonyManagerProxy proxy) {
+        mTelephonyManagerProxy = proxy;
+    }
+
+    @VisibleForTesting
+    public void setPhoneFactoryProxy(PhoneFactoryProxy proxy) {
+        mPhoneFactoryProxy = proxy;
+    }
+
+    /**
      * A listener to actionable events specific to the TelephonyConnection.
      */
     private final TelephonyConnection.TelephonyConnectionListener mTelephonyConnectionListener =
@@ -108,6 +240,7 @@
     @Override
     public void onCreate() {
         super.onCreate();
+        Log.initLogging(this);
         mExpectedComponentName = new ComponentName(this, this.getClass());
         mEmergencyTonePlayer = new EmergencyTonePlayer(this);
         TelecomAccountRegistry.getInstance(this).setTelephonyConnectionService(this);
@@ -217,39 +350,73 @@
         final boolean isEmergencyNumber =
                 PhoneNumberUtils.isLocalEmergencyNumber(this, numberToDial);
 
-        if ((isEmergencyNumber && !isRadioOn()) || isRadioPowerDownOnBluetooth()) {
-            final Uri resultHandle = handle;
+        final boolean isAirplaneModeOn = Settings.Global.getInt(getContentResolver(),
+                Settings.Global.AIRPLANE_MODE_ON, 0) > 0;
+
+        if (isEmergencyNumber && (!isRadioOn() || isAirplaneModeOn)) {
+            final Uri emergencyHandle = handle;
             // By default, Connection based on the default Phone, since we need to return to Telecom
             // now.
-            final Connection resultConnection = getTelephonyConnection(request, numberToDial,
-                    isEmergencyNumber, resultHandle, PhoneFactory.getDefaultPhone());
-            RadioOnHelper radioOnHelper = new RadioOnHelper(this);
-            radioOnHelper.enableRadioOnCalling(new RadioOnStateListener.Callback() {
+            final int defaultPhoneType = mPhoneFactoryProxy.getDefaultPhone().getPhoneType();
+            final Connection emergencyConnection = getTelephonyConnection(request, numberToDial,
+                    isEmergencyNumber, emergencyHandle, mPhoneFactoryProxy.getDefaultPhone());
+            if (mEmergencyCallHelper == null) {
+                mEmergencyCallHelper = new EmergencyCallHelper(this);
+            }
+            mEmergencyCallHelper.enableEmergencyCalling(new EmergencyCallStateListener.Callback() {
                 @Override
-                public void onComplete(RadioOnStateListener listener,
-                        boolean isRadioReady) {
-                    handleOnComplete(isRadioReady,
-                            isEmergencyNumber,
-                            resultConnection,
-                            request,
-                            numberToDial,
-                            resultHandle);
-                }
-
-                @Override
-                public boolean isOkToCall(Phone phone, int serviceState) {
-                    if (isEmergencyNumber) {
-                        return (phone.getState() == PhoneConstants.State.OFFHOOK) ||
-                                phone.getServiceStateTracker().isRadioOn();
+                public void onComplete(EmergencyCallStateListener listener, boolean isRadioReady) {
+                    // Make sure the Call has not already been canceled by the user.
+                    if (emergencyConnection.getState() == Connection.STATE_DISCONNECTED) {
+                        Log.i(this, "Emergency call disconnected before the outgoing call was " +
+                                "placed. Skipping emergency call placement.");
+                        return;
+                    }
+                    if (isRadioReady) {
+                        // Get the right phone object since the radio has been turned on
+                        // successfully.
+                        final Phone phone = getPhoneForAccount(request.getAccountHandle(),
+                                isEmergencyNumber);
+                        // If the PhoneType of the Phone being used is different than the Default
+                        // Phone, then we need create a new Connection using that PhoneType and
+                        // replace it in Telecom.
+                        if (phone.getPhoneType() != defaultPhoneType) {
+                            Connection repConnection = getTelephonyConnection(request, numberToDial,
+                                    isEmergencyNumber, emergencyHandle, phone);
+                            // If there was a failure, the resulting connection will not be a
+                            // TelephonyConnection, so don't place the call, just return!
+                            if (repConnection instanceof TelephonyConnection) {
+                                placeOutgoingConnection((TelephonyConnection) repConnection, phone,
+                                        request);
+                            }
+                            // Notify Telecom of the new Connection type.
+                            // TODO: Switch out the underlying connection instead of creating a new
+                            // one and causing UI Jank.
+                            addExistingConnection(PhoneUtils.makePstnPhoneAccountHandle(phone),
+                                    repConnection);
+                            // Remove the old connection from Telecom after.
+                            emergencyConnection.setDisconnected(
+                                    DisconnectCauseUtil.toTelecomDisconnectCause(
+                                            android.telephony.DisconnectCause.OUTGOING_CANCELED,
+                                            "Reconnecting outgoing Emergency Call."));
+                            emergencyConnection.destroy();
+                        } else {
+                            placeOutgoingConnection((TelephonyConnection) emergencyConnection,
+                                    phone, request);
+                        }
                     } else {
-                        return (phone.getState() == PhoneConstants.State.OFFHOOK) ||
-                                serviceState == ServiceState.STATE_IN_SERVICE;
+                        Log.w(this, "onCreateOutgoingConnection, failed to turn on radio");
+                        emergencyConnection.setDisconnected(
+                                DisconnectCauseUtil.toTelecomDisconnectCause(
+                                        android.telephony.DisconnectCause.POWER_OFF,
+                                        "Failed to turn on radio."));
+                        emergencyConnection.destroy();
                     }
                 }
             });
             // Return the still unconnected GsmConnection and wait for the Radios to boot before
             // connecting it to the underlying Phone.
-            return resultConnection;
+            return emergencyConnection;
         } else {
             if (!canAddCall() && !isEmergencyNumber) {
                 Log.d(this, "onCreateOutgoingConnection, cannot add call .");
@@ -276,76 +443,6 @@
     }
 
     /**
-     * Whether the cellular radio is power off because the device is on Bluetooth.
-     */
-    private boolean isRadioPowerDownOnBluetooth() {
-        final Context context = getApplicationContext();
-        final boolean allowed = context.getResources().getBoolean(
-                R.bool.config_allowRadioPowerDownOnBluetooth);
-        final int cellOn = Settings.Global.getInt(context.getContentResolver(),
-                Settings.Global.CELL_ON,
-                PhoneConstants.CELL_ON_FLAG);
-        return (allowed && cellOn == PhoneConstants.CELL_ON_FLAG && !isRadioOn());
-    }
-
-    /**
-     * Handle the onComplete callback of RadioOnStateListener.
-     */
-    private void handleOnComplete(boolean isRadioReady,
-            boolean isEmergencyNumber,
-            Connection originalConnection,
-            ConnectionRequest request,
-            String numberToDial,
-            Uri handle) {
-        // Make sure the Call has not already been canceled by the user.
-        if (originalConnection.getState() == Connection.STATE_DISCONNECTED) {
-            Log.i(this, "Emergency call disconnected before the outgoing call was " +
-                    "placed. Skipping emergency call placement.");
-            return;
-        }
-        if (isRadioReady) {
-            // Get the right phone object since the radio has been turned on
-            // successfully.
-            final Phone phone = getPhoneForAccount(request.getAccountHandle(),
-                    isEmergencyNumber);
-            // If the PhoneType of the Phone being used is different than the Default
-            // Phone, then we need create a new Connection using that PhoneType and
-            // replace it in Telecom.
-            if (phone.getPhoneType() != PhoneFactory.getDefaultPhone().getPhoneType()) {
-                Connection repConnection = getTelephonyConnection(request, numberToDial,
-                        isEmergencyNumber, handle, phone);
-                // If there was a failure, the resulting connection will not be a
-                // TelephonyConnection, so don't place the call, just return!
-                if (repConnection instanceof TelephonyConnection) {
-                    placeOutgoingConnection((TelephonyConnection) repConnection, phone,
-                            request);
-                }
-                // Notify Telecom of the new Connection type.
-                // TODO: Switch out the underlying connection instead of creating a new
-                // one and causing UI Jank.
-                addExistingConnection(PhoneUtils.makePstnPhoneAccountHandle(phone),
-                        repConnection);
-                // Remove the old connection from Telecom after.
-                originalConnection.setDisconnected(
-                        DisconnectCauseUtil.toTelecomDisconnectCause(
-                                android.telephony.DisconnectCause.OUTGOING_CANCELED,
-                                "Reconnecting outgoing Emergency Call."));
-                originalConnection.destroy();
-            } else {
-                placeOutgoingConnection((TelephonyConnection) originalConnection,
-                        phone, request);
-            }
-        } else {
-            Log.w(this, "onCreateOutgoingConnection, failed to turn on radio");
-            originalConnection.setDisconnected(
-                    DisconnectCauseUtil.toTelecomDisconnectCause(
-                            android.telephony.DisconnectCause.POWER_OFF,
-                            "Failed to turn on radio."));
-            originalConnection.destroy();
-        }
-    }
-
-    /**
      * @return {@code true} if any other call is disabling the ability to add calls, {@code false}
      *      otherwise.
      */
@@ -368,7 +465,7 @@
             if (context.getResources().getBoolean(R.bool.config_checkSimStateBeforeOutgoingCall)) {
                 // Check SIM card state before the outgoing call.
                 // Start the SIM unlock activity if PIN_REQUIRED.
-                final Phone defaultPhone = PhoneFactory.getDefaultPhone();
+                final Phone defaultPhone = mPhoneFactoryProxy.getDefaultPhone();
                 final IccCard icc = defaultPhone.getIccCard();
                 IccCardConstants.State simState = IccCardConstants.State.UNKNOWN;
                 if (icc != null) {
@@ -449,10 +546,6 @@
                                         "ServiceState.STATE_OUT_OF_SERVICE"));
                     }
                 case ServiceState.STATE_POWER_OFF:
-                    // Don't disconnect if radio is power off because the device is on Bluetooth.
-                    if (isRadioPowerDownOnBluetooth()) {
-                        break;
-                    }
                     return Connection.createFailedConnection(
                             DisconnectCauseUtil.toTelecomDisconnectCause(
                                     android.telephony.DisconnectCause.POWER_OFF,
@@ -723,7 +816,7 @@
 
     private boolean isRadioOn() {
         boolean result = false;
-        for (Phone phone : PhoneFactory.getPhones()) {
+        for (Phone phone : mPhoneFactoryProxy.getPhones()) {
             result |= phone.isRadioOn();
         }
         return result;
@@ -731,7 +824,7 @@
 
     private Pair<WeakReference<TelephonyConnection>, List<Phone>> makeCachedConnectionPhonePair(
             TelephonyConnection c) {
-        List<Phone> phones = new ArrayList<>(Arrays.asList(PhoneFactory.getPhones()));
+        List<Phone> phones = new ArrayList<>(Arrays.asList(mPhoneFactoryProxy.getPhones()));
         return new Pair<>(new WeakReference<>(c), phones);
     }
 
@@ -800,6 +893,18 @@
         try {
             if (phone != null) {
                 originalConnection = phone.dial(number, null, videoState, extras);
+
+                if (phone instanceof GsmCdmaPhone) {
+                    GsmCdmaPhone gsmCdmaPhone = (GsmCdmaPhone) phone;
+                    if (gsmCdmaPhone.isNotificationOfWfcCallRequired(number)) {
+                        // Send connection event to InCall UI to inform the user of the fact they
+                        // are potentially placing an international call on WFC.
+                        Log.i(this, "placeOutgoingConnection - sending international call on WFC " +
+                                "confirmation event");
+                        connection.sendConnectionEvent(
+                                TelephonyManager.EVENT_NOTIFY_INTERNATIONAL_CALL_ON_WFC, null);
+                    }
+                }
             }
         } catch (CallStateException e) {
             Log.e(this, e, "placeOutgoingConnection, phone.dial exception: " + e);
@@ -819,10 +924,15 @@
             // On GSM phones, null connection means that we dialed an MMI code
             if (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_GSM) {
                 Log.d(this, "dialed MMI code");
+                int subId = phone.getSubId();
+                Log.d(this, "subId: "+subId);
                 telephonyDisconnectCause = android.telephony.DisconnectCause.DIALED_MMI;
                 final Intent intent = new Intent(this, MMIDialogActivity.class);
                 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
                         Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+                if (SubscriptionManager.isValidSubscriptionId(subId)) {
+                    intent.putExtra(PhoneConstants.SUBSCRIPTION_KEY, subId);
+                }
                 startActivity(intent);
             }
             Log.d(this, "placeOutgoingConnection, phone.dial returned null");
@@ -877,8 +987,8 @@
         Phone chosenPhone = null;
         int subId = PhoneUtils.getSubIdForPhoneAccountHandle(accountHandle);
         if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
-            int phoneId = SubscriptionController.getInstance().getPhoneId(subId);
-            chosenPhone = PhoneFactory.getPhone(phoneId);
+            int phoneId = mSubscriptionManagerProxy.getPhoneId(subId);
+            chosenPhone = mPhoneFactoryProxy.getPhone(phoneId);
         }
         // If this is an emergency call and the phone we originally planned to make this call
         // with is not in service or was invalid, try to find one that is in service, using the
@@ -899,89 +1009,120 @@
      *  list (for multi-SIM devices):
      *  1) The User's SIM preference for Voice calling
      *  2) The First Phone that is currently IN_SERVICE or is available for emergency calling
-     *  3) The Phone with more Capabilities.
-     *  4) The First Phone that has a SIM card in it (Starting from Slot 0...N)
-     *  5) The Default Phone (Currently set as Slot 0)
+     *  3) If there is a PUK locked SIM, compare the SIMs that are not PUK locked. If all the SIMs
+     *     are locked, skip to condition 4).
+     *  4) The Phone with more Capabilities.
+     *  5) The First Phone that has a SIM card in it (Starting from Slot 0...N)
+     *  6) The Default Phone (Currently set as Slot 0)
      */
-    private Phone getFirstPhoneForEmergencyCall() {
+    @VisibleForTesting
+    public Phone getFirstPhoneForEmergencyCall() {
         // 1)
-        int phoneId = SubscriptionManager.getDefaultVoicePhoneId();
+        int phoneId = mSubscriptionManagerProxy.getDefaultVoicePhoneId();
         if (phoneId != SubscriptionManager.INVALID_PHONE_INDEX) {
-            Phone defaultPhone = PhoneFactory.getPhone(phoneId);
+            Phone defaultPhone = mPhoneFactoryProxy.getPhone(phoneId);
             if (defaultPhone != null && isAvailableForEmergencyCalls(defaultPhone)) {
                 return defaultPhone;
             }
         }
 
         Phone firstPhoneWithSim = null;
-        int phoneCount = TelephonyManager.getDefault().getPhoneCount();
-        List<Pair<Integer, Integer>> phoneNetworkType = new ArrayList<>(phoneCount);
+        int phoneCount = mTelephonyManagerProxy.getPhoneCount();
+        List<SlotStatus> phoneSlotStatus = new ArrayList<>(phoneCount);
         for (int i = 0; i < phoneCount; i++) {
-            Phone phone = PhoneFactory.getPhone(i);
-            if (phone == null)
+            Phone phone = mPhoneFactoryProxy.getPhone(i);
+            if (phone == null) {
                 continue;
+            }
             // 2)
             if (isAvailableForEmergencyCalls(phone)) {
                 // the slot has the radio on & state is in service.
                 Log.i(this, "getFirstPhoneForEmergencyCall, radio on & in service, Phone Id:" + i);
                 return phone;
             }
-            // 3)
-            // Store the RAF Capabilities for sorting later only if there are capabilities to sort.
-            int radioAccessFamily = phone.getRadioAccessFamily();
-            if(RadioAccessFamily.getHighestRafCapability(radioAccessFamily) != 0) {
-                phoneNetworkType.add(new Pair<>(i, radioAccessFamily));
-                Log.i(this, "getFirstPhoneForEmergencyCall, RAF:" +
-                        Integer.toHexString(radioAccessFamily) + " saved for Phone Id:" + i);
-            }
             // 4)
-            if (firstPhoneWithSim == null && TelephonyManager.getDefault().hasIccCard(i)) {
+            // Store the RAF Capabilities for sorting later.
+            int radioAccessFamily = phone.getRadioAccessFamily();
+            SlotStatus status = new SlotStatus(i, radioAccessFamily);
+            phoneSlotStatus.add(status);
+            Log.i(this, "getFirstPhoneForEmergencyCall, RAF:" +
+                    Integer.toHexString(radioAccessFamily) + " saved for Phone Id:" + i);
+            // 3)
+            // Report Slot's PIN/PUK lock status for sorting later.
+            int simState = mSubscriptionManagerProxy.getSimStateForSlotIdx(i);
+            if (simState == TelephonyManager.SIM_STATE_PIN_REQUIRED ||
+                    simState == TelephonyManager.SIM_STATE_PUK_REQUIRED) {
+                status.isLocked = true;
+            }
+            // 5)
+            if (firstPhoneWithSim == null && mTelephonyManagerProxy.hasIccCard(i)) {
                 // The slot has a SIM card inserted, but is not in service, so keep track of this
                 // Phone. Do not return because we want to make sure that none of the other Phones
                 // are in service (because that is always faster).
-                Log.i(this, "getFirstPhoneForEmergencyCall, SIM card inserted, Phone Id:" + i);
                 firstPhoneWithSim = phone;
+                Log.i(this, "getFirstPhoneForEmergencyCall, SIM card inserted, Phone Id:" +
+                        firstPhoneWithSim.getPhoneId());
             }
         }
-        // 5)
-        if (firstPhoneWithSim == null && phoneNetworkType.isEmpty()) {
-            // No SIMs inserted, get the default.
+        // 6)
+        if (firstPhoneWithSim == null && phoneSlotStatus.isEmpty()) {
+            // No Phones available, get the default.
             Log.i(this, "getFirstPhoneForEmergencyCall, return default phone");
-            return PhoneFactory.getDefaultPhone();
+            return mPhoneFactoryProxy.getDefaultPhone();
         } else {
-            // 3)
+            // 4)
+            final int defaultPhoneId = mPhoneFactoryProxy.getDefaultPhone().getPhoneId();
             final Phone firstOccupiedSlot = firstPhoneWithSim;
-            if (!phoneNetworkType.isEmpty()) {
+            if (!phoneSlotStatus.isEmpty()) {
                 // Only sort if there are enough elements to do so.
-                if(phoneNetworkType.size() > 1) {
-                    Collections.sort(phoneNetworkType, (o1, o2) -> {
-                        // First start by sorting by number of RadioAccessFamily Capabilities.
-                        int compare = Integer.bitCount(o1.second) - Integer.bitCount(o2.second);
+                if (phoneSlotStatus.size() > 1) {
+                    Collections.sort(phoneSlotStatus, (o1, o2) -> {
+                        // First start by seeing if either of the phone slots are locked. If they
+                        // are, then sort by non-locked SIM first. If they are both locked, sort
+                        // by capability instead.
+                        if (o1.isLocked && !o2.isLocked) {
+                            return -1;
+                        }
+                        if (o2.isLocked && !o1.isLocked) {
+                            return 1;
+                        }
+                        // sort by number of RadioAccessFamily Capabilities.
+                        int compare = Integer.bitCount(o1.capabilities) -
+                                Integer.bitCount(o2.capabilities);
                         if (compare == 0) {
                             // Sort by highest RAF Capability if the number is the same.
-                            compare = RadioAccessFamily.getHighestRafCapability(o1.second) -
-                                    RadioAccessFamily.getHighestRafCapability(o2.second);
-                            if (compare == 0 && firstOccupiedSlot != null) {
-                                // If the RAF capability is the same, choose based on whether or not
-                                // any of the slots are occupied with a SIM card (if both are,
-                                // always choose the first).
-                                if (o1.first == firstOccupiedSlot.getPhoneId()) {
-                                    return 1;
-                                } else if (o2.first == firstOccupiedSlot.getPhoneId()) {
-                                    return -1;
+                            compare = RadioAccessFamily.getHighestRafCapability(o1.capabilities) -
+                                    RadioAccessFamily.getHighestRafCapability(o2.capabilities);
+                            if (compare == 0) {
+                                if (firstOccupiedSlot != null) {
+                                    // If the RAF capability is the same, choose based on whether or
+                                    // not any of the slots are occupied with a SIM card (if both
+                                    // are, always choose the first).
+                                    if (o1.slotId == firstOccupiedSlot.getPhoneId()) {
+                                        return 1;
+                                    } else if (o2.slotId == firstOccupiedSlot.getPhoneId()) {
+                                        return -1;
+                                    }
+                                } else {
+                                    // No slots have SIMs detected in them, so weight the default
+                                    // Phone Id greater than the others.
+                                    if (o1.slotId == defaultPhoneId) {
+                                        return 1;
+                                    } else if (o2.slotId == defaultPhoneId) {
+                                        return -1;
+                                    }
                                 }
-                                // Compare is still 0, return equal.
                             }
                         }
                         return compare;
                     });
                 }
-                int mostCapablePhoneId = phoneNetworkType.get(phoneNetworkType.size()-1).first;
+                int mostCapablePhoneId = phoneSlotStatus.get(phoneSlotStatus.size() - 1).slotId;
                 Log.i(this, "getFirstPhoneForEmergencyCall, Using Phone Id: " + mostCapablePhoneId +
                         "with highest capability");
-                return PhoneFactory.getPhone(mostCapablePhoneId);
+                return mPhoneFactoryProxy.getPhone(mostCapablePhoneId);
             } else {
-                // 4)
+                // 5)
                 return firstPhoneWithSim;
             }
         }
diff --git a/src/com/android/services/telephony/TelephonyConnectionServiceProxy.java b/src/com/android/services/telephony/TelephonyConnectionServiceProxy.java
new file mode 100644
index 0000000..ee77b08
--- /dev/null
+++ b/src/com/android/services/telephony/TelephonyConnectionServiceProxy.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2016 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.services.telephony;
+
+import android.telecom.Connection;
+import android.telecom.PhoneAccountHandle;
+
+import java.util.Collection;
+
+/**
+ * TelephonyConnectionService Interface for testing purpose
+ */
+
+public interface TelephonyConnectionServiceProxy {
+    Collection<Connection> getAllConnections();
+    void addConference(TelephonyConference mTelephonyConference);
+    void addConference(ImsConference mImsConference);
+    void removeConnection(Connection connection);
+    void addExistingConnection(PhoneAccountHandle phoneAccountHandle,
+                               Connection connection);
+    void addConnectionToConferenceController(TelephonyConnection connection);
+}
diff --git a/src/com/android/services/telephony/activation/Activator.java b/src/com/android/services/telephony/activation/Activator.java
deleted file mode 100644
index 7dee5b3..0000000
--- a/src/com/android/services/telephony/activation/Activator.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2015 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.services.telephony.activation;
-
-/**
- * SIM Activation implementation generic interface.
- */
-public interface Activator {
-    void onActivate();
-}
diff --git a/src/com/android/services/telephony/activation/OtaspActivator.java b/src/com/android/services/telephony/activation/OtaspActivator.java
deleted file mode 100644
index 11ba726..0000000
--- a/src/com/android/services/telephony/activation/OtaspActivator.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2015 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.services.telephony.activation;
-
-/**
- * Over-The-Air SIM Provisioning (OTASP) activation implementation.
- *
- * Handles OTASP activation requests and returns status updates as activation progresses.
- */
-public class OtaspActivator implements Activator {
-    @Override
-    public void onActivate() {
-        // TODO: handle otasp activation
-    }
-}
diff --git a/src/com/android/services/telephony/activation/SimActivationActivity.java b/src/com/android/services/telephony/activation/SimActivationActivity.java
deleted file mode 100644
index ae11a3f..0000000
--- a/src/com/android/services/telephony/activation/SimActivationActivity.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2015 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.services.telephony.activation;
-
-import android.app.Activity;
-import android.app.PendingIntent;
-import android.app.PendingIntent.CanceledException;
-import android.content.Intent;
-import android.os.Bundle;
-import android.telephony.TelephonyManager;
-
-import com.android.phone.PhoneGlobals;
-import com.android.services.telephony.Log;
-
-/**
- * Invisible activity that handles the android.intent.action.SIM_ACTIVATION_REQUEST intent.
- * This activity is protected by the android.permission.PERFORM_SIM_ACTIVATION permission.
- */
-public class SimActivationActivity extends Activity {
-    @Override
-    protected void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-        Log.i(this, "onCreate");
-
-        Intent intent = getIntent();
-        if (Intent.ACTION_SIM_ACTIVATION_REQUEST.equals(intent.getAction())) {
-            Log.i(this, "Activation requested " + intent);
-
-            runActivation(intent);
-        }
-        finish();
-    }
-
-    private void runActivation(Intent intent) {
-        final PendingIntent response =
-                intent.getParcelableExtra(Intent.EXTRA_SIM_ACTIVATION_RESPONSE);
-
-        Log.i(this, "Running activation w/ response " + response);
-
-        PhoneGlobals app = PhoneGlobals.getInstance();
-        app.simActivationManager.runActivation(SimActivationManager.Triggers.EXPLICIT_REQUEST,
-                new SimActivationManager.Response() {
-                    @Override
-                    public void onResponse(int status) {
-                        if (response != null) {
-                            try {
-                                response.send();
-                            } catch (CanceledException e) {
-                                Log.w(this, "Could not respond to SIM Activation.");
-                            }
-                        }
-                    }
-                });
-
-        // TODO: Set this status to the return value of runActivation
-        // Return the response as an activity result and the pending intent.
-        setResult(TelephonyManager.SIM_ACTIVATION_RESULT_IN_PROGRESS);
-    }
-}
diff --git a/src/com/android/services/telephony/activation/SimActivationManager.java b/src/com/android/services/telephony/activation/SimActivationManager.java
deleted file mode 100644
index ce9e508..0000000
--- a/src/com/android/services/telephony/activation/SimActivationManager.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2015 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.services.telephony.activation;
-
-import android.app.PendingIntent;
-import android.telephony.TelephonyManager;
-
-/**
- * Handles SIM activation requests and runs the appropriate activation process until it completes
- * or fails. When done, sends back a response if needed.
- */
-public class SimActivationManager {
-    public static final class Triggers {
-        public static final int SYSTEM_START = 1;
-        public static final int EXPLICIT_REQUEST = 2;
-    }
-
-    public interface Response {
-        /**
-         * @param status See {@link android.telephony.TelephonyManager} for SIM_ACTIVATION_RESULT_*
-         *               constants.
-         */
-        void onResponse(int status);
-    }
-
-    public void runActivation(int trigger, Response response) {
-        Activator activator = selectActivator(trigger);
-
-        activator.onActivate();
-
-        // TODO: Specify some way to determine if activation is even necessary.
-
-        // TODO: specify some way to return the result.
-
-        if (response != null) {
-            response.onResponse(TelephonyManager.SIM_ACTIVATION_RESULT_COMPLETE);
-        }
-    }
-
-    private Activator selectActivator(int trigger) {
-        // TODO: Select among all activator types
-
-        // For now, pick a do-nothing activator
-        return new Activator() {
-
-            /** ${inheritDoc} */
-                @Override
-            public void onActivate() {
-                // do something
-            }
-        };
-    }
-}
diff --git a/src/org/apache/commons/io/IOUtils.java b/src/org/apache/commons/io/IOUtils.java
deleted file mode 100644
index b414507..0000000
--- a/src/org/apache/commons/io/IOUtils.java
+++ /dev/null
@@ -1,1202 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.commons.io;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.CharArrayWriter;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.Reader;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * General IO stream manipulation utilities.
- * <p>
- * This class provides static utility methods for input/output operations.
- * <ul>
- * <li>closeQuietly - these methods close a stream ignoring nulls and exceptions
- * <li>toXxx/read - these methods read data from a stream
- * <li>write - these methods write data to a stream
- * <li>copy - these methods copy all the data from one stream to another
- * <li>contentEquals - these methods compare the content of two streams
- * </ul>
- * <p>
- * The byte-to-char methods and char-to-byte methods involve a conversion step.
- * Two methods are provided in each case, one that uses the platform default
- * encoding and the other which allows you to specify an encoding. You are
- * encouraged to always specify an encoding because relying on the platform
- * default can lead to unexpected results, for example when moving from
- * development to production.
- * <p>
- * All the methods in this class that read a stream are buffered internally.
- * This means that there is no cause to use a <code>BufferedInputStream</code>
- * or <code>BufferedReader</code>. The default buffer size of 4K has been shown
- * to be efficient in tests.
- * <p>
- * Wherever possible, the methods in this class do <em>not</em> flush or close
- * the stream. This is to avoid making non-portable assumptions about the
- * streams' origin and further use. Thus the caller is still responsible for
- * closing streams after use.
- * <p>
- * Origin of code: Excalibur.
- *
- * @author Peter Donald
- * @author Jeff Turner
- * @author Matthew Hawthorne
- * @author Stephen Colebourne
- * @author Gareth Davis
- * @author Ian Springer
- * @author Niall Pemberton
- * @author Sandy McArthur
- * @version $Id: IOUtils.java 481854 2006-12-03 18:30:07Z scolebourne $
- */
-public class IOUtils {
-    // NOTE: This class is focussed on InputStream, OutputStream, Reader and
-    // Writer. Each method should take at least one of these as a parameter,
-    // or return one of them.
-
-    /**
-     * The Unix directory separator character.
-     */
-    public static final char DIR_SEPARATOR_UNIX = '/';
-    /**
-     * The Windows directory separator character.
-     */
-    public static final char DIR_SEPARATOR_WINDOWS = '\\';
-    /**
-     * The system directory separator character.
-     */
-    public static final char DIR_SEPARATOR = File.separatorChar;
-    /**
-     * The Unix line separator string.
-     */
-    public static final String LINE_SEPARATOR_UNIX = "\n";
-    /**
-     * The Windows line separator string.
-     */
-    public static final String LINE_SEPARATOR_WINDOWS = "\r\n";
-    /**
-     * The system line separator string.
-     */
-    public static final String LINE_SEPARATOR;
-    static {
-        // avoid security issues
-        StringWriter buf = new StringWriter(4);
-        PrintWriter out = new PrintWriter(buf);
-        out.println();
-        LINE_SEPARATOR = buf.toString();
-    }
-
-    /**
-     * The default buffer size to use.
-     */
-    private static final int DEFAULT_BUFFER_SIZE = 1024 * 4;
-
-    /**
-     * Instances should NOT be constructed in standard programming.
-     */
-    public IOUtils() {
-        super();
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Unconditionally close an <code>Reader</code>.
-     * <p>
-     * Equivalent to {@link Reader#close()}, except any exceptions will be ignored.
-     * This is typically used in finally blocks.
-     *
-     * @param input  the Reader to close, may be null or already closed
-     */
-    public static void closeQuietly(Reader input) {
-        try {
-            if (input != null) {
-                input.close();
-            }
-        } catch (IOException ioe) {
-            // ignore
-        }
-    }
-
-    /**
-     * Unconditionally close a <code>Writer</code>.
-     * <p>
-     * Equivalent to {@link Writer#close()}, except any exceptions will be ignored.
-     * This is typically used in finally blocks.
-     *
-     * @param output  the Writer to close, may be null or already closed
-     */
-    public static void closeQuietly(Writer output) {
-        try {
-            if (output != null) {
-                output.close();
-            }
-        } catch (IOException ioe) {
-            // ignore
-        }
-    }
-
-    /**
-     * Unconditionally close an <code>InputStream</code>.
-     * <p>
-     * Equivalent to {@link InputStream#close()}, except any exceptions will be ignored.
-     * This is typically used in finally blocks.
-     *
-     * @param input  the InputStream to close, may be null or already closed
-     */
-    public static void closeQuietly(InputStream input) {
-        try {
-            if (input != null) {
-                input.close();
-            }
-        } catch (IOException ioe) {
-            // ignore
-        }
-    }
-
-    /**
-     * Unconditionally close an <code>OutputStream</code>.
-     * <p>
-     * Equivalent to {@link OutputStream#close()}, except any exceptions will be ignored.
-     * This is typically used in finally blocks.
-     *
-     * @param output  the OutputStream to close, may be null or already closed
-     */
-    public static void closeQuietly(OutputStream output) {
-        try {
-            if (output != null) {
-                output.close();
-            }
-        } catch (IOException ioe) {
-            // ignore
-        }
-    }
-
-    // read toByteArray
-    //-----------------------------------------------------------------------
-    /**
-     * Get the contents of an <code>InputStream</code> as a <code>byte[]</code>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param input  the <code>InputStream</code> to read from
-     * @return the requested byte array
-     * @throws NullPointerException if the input is null
-     * @throws IOException if an I/O error occurs
-     */
-    public static byte[] toByteArray(InputStream input) throws IOException {
-        ByteArrayOutputStream output = new ByteArrayOutputStream();
-        copy(input, output);
-        return output.toByteArray();
-    }
-
-    /**
-     * Get the contents of a <code>Reader</code> as a <code>byte[]</code>
-     * using the default character encoding of the platform.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     *
-     * @param input  the <code>Reader</code> to read from
-     * @return the requested byte array
-     * @throws NullPointerException if the input is null
-     * @throws IOException if an I/O error occurs
-     */
-    public static byte[] toByteArray(Reader input) throws IOException {
-        ByteArrayOutputStream output = new ByteArrayOutputStream();
-        copy(input, output);
-        return output.toByteArray();
-    }
-
-    /**
-     * Get the contents of a <code>Reader</code> as a <code>byte[]</code>
-     * using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     *
-     * @param input  the <code>Reader</code> to read from
-     * @param encoding  the encoding to use, null means platform default
-     * @return the requested byte array
-     * @throws NullPointerException if the input is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static byte[] toByteArray(Reader input, String encoding)
-            throws IOException {
-        ByteArrayOutputStream output = new ByteArrayOutputStream();
-        copy(input, output, encoding);
-        return output.toByteArray();
-    }
-
-    /**
-     * Get the contents of a <code>String</code> as a <code>byte[]</code>
-     * using the default character encoding of the platform.
-     * <p>
-     * This is the same as {@link String#getBytes()}.
-     *
-     * @param input  the <code>String</code> to convert
-     * @return the requested byte array
-     * @throws NullPointerException if the input is null
-     * @throws IOException if an I/O error occurs (never occurs)
-     * @deprecated Use {@link String#getBytes()}
-     */
-    @Deprecated
-    public static byte[] toByteArray(String input) throws IOException {
-        return input.getBytes();
-    }
-
-    // read char[]
-    //-----------------------------------------------------------------------
-    /**
-     * Get the contents of an <code>InputStream</code> as a character array
-     * using the default character encoding of the platform.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param is  the <code>InputStream</code> to read from
-     * @return the requested character array
-     * @throws NullPointerException if the input is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static char[] toCharArray(InputStream is) throws IOException {
-        CharArrayWriter output = new CharArrayWriter();
-        copy(is, output);
-        return output.toCharArray();
-    }
-
-    /**
-     * Get the contents of an <code>InputStream</code> as a character array
-     * using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param is  the <code>InputStream</code> to read from
-     * @param encoding  the encoding to use, null means platform default
-     * @return the requested character array
-     * @throws NullPointerException if the input is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static char[] toCharArray(InputStream is, String encoding)
-            throws IOException {
-        CharArrayWriter output = new CharArrayWriter();
-        copy(is, output, encoding);
-        return output.toCharArray();
-    }
-
-    /**
-     * Get the contents of a <code>Reader</code> as a character array.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     *
-     * @param input  the <code>Reader</code> to read from
-     * @return the requested character array
-     * @throws NullPointerException if the input is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static char[] toCharArray(Reader input) throws IOException {
-        CharArrayWriter sw = new CharArrayWriter();
-        copy(input, sw);
-        return sw.toCharArray();
-    }
-
-    // read toString
-    //-----------------------------------------------------------------------
-    /**
-     * Get the contents of an <code>InputStream</code> as a String
-     * using the default character encoding of the platform.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param input  the <code>InputStream</code> to read from
-     * @return the requested String
-     * @throws NullPointerException if the input is null
-     * @throws IOException if an I/O error occurs
-     */
-    public static String toString(InputStream input) throws IOException {
-        StringWriter sw = new StringWriter();
-        copy(input, sw);
-        return sw.toString();
-    }
-
-    /**
-     * Get the contents of an <code>InputStream</code> as a String
-     * using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param input  the <code>InputStream</code> to read from
-     * @param encoding  the encoding to use, null means platform default
-     * @return the requested String
-     * @throws NullPointerException if the input is null
-     * @throws IOException if an I/O error occurs
-     */
-    public static String toString(InputStream input, String encoding)
-            throws IOException {
-        StringWriter sw = new StringWriter();
-        copy(input, sw, encoding);
-        return sw.toString();
-    }
-
-    /**
-     * Get the contents of a <code>Reader</code> as a String.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     *
-     * @param input  the <code>Reader</code> to read from
-     * @return the requested String
-     * @throws NullPointerException if the input is null
-     * @throws IOException if an I/O error occurs
-     */
-    public static String toString(Reader input) throws IOException {
-        StringWriter sw = new StringWriter();
-        copy(input, sw);
-        return sw.toString();
-    }
-
-    /**
-     * Get the contents of a <code>byte[]</code> as a String
-     * using the default character encoding of the platform.
-     *
-     * @param input the byte array to read from
-     * @return the requested String
-     * @throws NullPointerException if the input is null
-     * @throws IOException if an I/O error occurs (never occurs)
-     * @deprecated Use {@link String#String(byte[])}
-     */
-    @Deprecated
-    public static String toString(byte[] input) throws IOException {
-        return new String(input);
-    }
-
-    /**
-     * Get the contents of a <code>byte[]</code> as a String
-     * using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     *
-     * @param input the byte array to read from
-     * @param encoding  the encoding to use, null means platform default
-     * @return the requested String
-     * @throws NullPointerException if the input is null
-     * @throws IOException if an I/O error occurs (never occurs)
-     * @deprecated Use {@link String#String(byte[],String)}
-     */
-    @Deprecated
-    public static String toString(byte[] input, String encoding)
-            throws IOException {
-        if (encoding == null) {
-            return new String(input);
-        } else {
-            return new String(input, encoding);
-        }
-    }
-
-    // readLines
-    //-----------------------------------------------------------------------
-    /**
-     * Get the contents of an <code>InputStream</code> as a list of Strings,
-     * one entry per line, using the default character encoding of the platform.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param input  the <code>InputStream</code> to read from, not null
-     * @return the list of Strings, never null
-     * @throws NullPointerException if the input is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static List<String> readLines(InputStream input) throws IOException {
-        InputStreamReader reader = new InputStreamReader(input);
-        return readLines(reader);
-    }
-
-    /**
-     * Get the contents of an <code>InputStream</code> as a list of Strings,
-     * one entry per line, using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param input  the <code>InputStream</code> to read from, not null
-     * @param encoding  the encoding to use, null means platform default
-     * @return the list of Strings, never null
-     * @throws NullPointerException if the input is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static List<String> readLines(InputStream input, String encoding) throws IOException {
-        if (encoding == null) {
-            return readLines(input);
-        } else {
-            InputStreamReader reader = new InputStreamReader(input, encoding);
-            return readLines(reader);
-        }
-    }
-
-    /**
-     * Get the contents of a <code>Reader</code> as a list of Strings,
-     * one entry per line.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     *
-     * @param input  the <code>Reader</code> to read from, not null
-     * @return the list of Strings, never null
-     * @throws NullPointerException if the input is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static List<String> readLines(Reader input) throws IOException {
-        BufferedReader reader = new BufferedReader(input);
-        List<String> list = new ArrayList<String>();
-        String line = reader.readLine();
-        while (line != null) {
-            list.add(line);
-            line = reader.readLine();
-        }
-        return list;
-    }
-
-    //-----------------------------------------------------------------------
-    /**
-     * Convert the specified string to an input stream, encoded as bytes
-     * using the default character encoding of the platform.
-     *
-     * @param input the string to convert
-     * @return an input stream
-     * @since Commons IO 1.1
-     */
-    public static InputStream toInputStream(String input) {
-        byte[] bytes = input.getBytes();
-        return new ByteArrayInputStream(bytes);
-    }
-
-    /**
-     * Convert the specified string to an input stream, encoded as bytes
-     * using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     *
-     * @param input the string to convert
-     * @param encoding the encoding to use, null means platform default
-     * @throws IOException if the encoding is invalid
-     * @return an input stream
-     * @since Commons IO 1.1
-     */
-    public static InputStream toInputStream(String input, String encoding) throws IOException {
-        byte[] bytes = encoding != null ? input.getBytes(encoding) : input.getBytes();
-        return new ByteArrayInputStream(bytes);
-    }
-
-    // write byte[]
-    //-----------------------------------------------------------------------
-    /**
-     * Writes bytes from a <code>byte[]</code> to an <code>OutputStream</code>.
-     *
-     * @param data  the byte array to write, do not modify during output,
-     * null ignored
-     * @param output  the <code>OutputStream</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void write(byte[] data, OutputStream output)
-            throws IOException {
-        if (data != null) {
-            output.write(data);
-        }
-    }
-
-    /**
-     * Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
-     * using the default character encoding of the platform.
-     * <p>
-     * This method uses {@link String#String(byte[])}.
-     *
-     * @param data  the byte array to write, do not modify during output,
-     * null ignored
-     * @param output  the <code>Writer</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void write(byte[] data, Writer output) throws IOException {
-        if (data != null) {
-            output.write(new String(data));
-        }
-    }
-
-    /**
-     * Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
-     * using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method uses {@link String#String(byte[], String)}.
-     *
-     * @param data  the byte array to write, do not modify during output,
-     * null ignored
-     * @param output  the <code>Writer</code> to write to
-     * @param encoding  the encoding to use, null means platform default
-     * @throws NullPointerException if output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void write(byte[] data, Writer output, String encoding)
-            throws IOException {
-        if (data != null) {
-            if (encoding == null) {
-                write(data, output);
-            } else {
-                output.write(new String(data, encoding));
-            }
-        }
-    }
-
-    // write char[]
-    //-----------------------------------------------------------------------
-    /**
-     * Writes chars from a <code>char[]</code> to a <code>Writer</code>
-     * using the default character encoding of the platform.
-     *
-     * @param data  the char array to write, do not modify during output,
-     * null ignored
-     * @param output  the <code>Writer</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void write(char[] data, Writer output) throws IOException {
-        if (data != null) {
-            output.write(data);
-        }
-    }
-
-    /**
-     * Writes chars from a <code>char[]</code> to bytes on an
-     * <code>OutputStream</code>.
-     * <p>
-     * This method uses {@link String#String(char[])} and
-     * {@link String#getBytes()}.
-     *
-     * @param data  the char array to write, do not modify during output,
-     * null ignored
-     * @param output  the <code>OutputStream</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void write(char[] data, OutputStream output)
-            throws IOException {
-        if (data != null) {
-            output.write(new String(data).getBytes());
-        }
-    }
-
-    /**
-     * Writes chars from a <code>char[]</code> to bytes on an
-     * <code>OutputStream</code> using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method uses {@link String#String(char[])} and
-     * {@link String#getBytes(String)}.
-     *
-     * @param data  the char array to write, do not modify during output,
-     * null ignored
-     * @param output  the <code>OutputStream</code> to write to
-     * @param encoding  the encoding to use, null means platform default
-     * @throws NullPointerException if output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void write(char[] data, OutputStream output, String encoding)
-            throws IOException {
-        if (data != null) {
-            if (encoding == null) {
-                write(data, output);
-            } else {
-                output.write(new String(data).getBytes(encoding));
-            }
-        }
-    }
-
-    // write String
-    //-----------------------------------------------------------------------
-    /**
-     * Writes chars from a <code>String</code> to a <code>Writer</code>.
-     *
-     * @param data  the <code>String</code> to write, null ignored
-     * @param output  the <code>Writer</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void write(String data, Writer output) throws IOException {
-        if (data != null) {
-            output.write(data);
-        }
-    }
-
-    /**
-     * Writes chars from a <code>String</code> to bytes on an
-     * <code>OutputStream</code> using the default character encoding of the
-     * platform.
-     * <p>
-     * This method uses {@link String#getBytes()}.
-     *
-     * @param data  the <code>String</code> to write, null ignored
-     * @param output  the <code>OutputStream</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void write(String data, OutputStream output)
-            throws IOException {
-        if (data != null) {
-            output.write(data.getBytes());
-        }
-    }
-
-    /**
-     * Writes chars from a <code>String</code> to bytes on an
-     * <code>OutputStream</code> using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method uses {@link String#getBytes(String)}.
-     *
-     * @param data  the <code>String</code> to write, null ignored
-     * @param output  the <code>OutputStream</code> to write to
-     * @param encoding  the encoding to use, null means platform default
-     * @throws NullPointerException if output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void write(String data, OutputStream output, String encoding)
-            throws IOException {
-        if (data != null) {
-            if (encoding == null) {
-                write(data, output);
-            } else {
-                output.write(data.getBytes(encoding));
-            }
-        }
-    }
-
-    // write StringBuffer
-    //-----------------------------------------------------------------------
-    /**
-     * Writes chars from a <code>StringBuffer</code> to a <code>Writer</code>.
-     *
-     * @param data  the <code>StringBuffer</code> to write, null ignored
-     * @param output  the <code>Writer</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void write(StringBuffer data, Writer output)
-            throws IOException {
-        if (data != null) {
-            output.write(data.toString());
-        }
-    }
-
-    /**
-     * Writes chars from a <code>StringBuffer</code> to bytes on an
-     * <code>OutputStream</code> using the default character encoding of the
-     * platform.
-     * <p>
-     * This method uses {@link String#getBytes()}.
-     *
-     * @param data  the <code>StringBuffer</code> to write, null ignored
-     * @param output  the <code>OutputStream</code> to write to
-     * @throws NullPointerException if output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void write(StringBuffer data, OutputStream output)
-            throws IOException {
-        if (data != null) {
-            output.write(data.toString().getBytes());
-        }
-    }
-
-    /**
-     * Writes chars from a <code>StringBuffer</code> to bytes on an
-     * <code>OutputStream</code> using the specified character encoding.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method uses {@link String#getBytes(String)}.
-     *
-     * @param data  the <code>StringBuffer</code> to write, null ignored
-     * @param output  the <code>OutputStream</code> to write to
-     * @param encoding  the encoding to use, null means platform default
-     * @throws NullPointerException if output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void write(StringBuffer data, OutputStream output,
-            String encoding) throws IOException {
-        if (data != null) {
-            if (encoding == null) {
-                write(data, output);
-            } else {
-                output.write(data.toString().getBytes(encoding));
-            }
-        }
-    }
-
-    // writeLines
-    //-----------------------------------------------------------------------
-    /**
-     * Writes the <code>toString()</code> value of each item in a collection to
-     * an <code>OutputStream</code> line by line, using the default character
-     * encoding of the platform and the specified line ending.
-     *
-     * @param lines  the lines to write, null entries produce blank lines
-     * @param lineEnding  the line separator to use, null is system default
-     * @param output  the <code>OutputStream</code> to write to, not null, not closed
-     * @throws NullPointerException if the output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void writeLines(Collection<Object> lines, String lineEnding,
-            OutputStream output) throws IOException {
-        if (lines == null) {
-            return;
-        }
-        if (lineEnding == null) {
-            lineEnding = LINE_SEPARATOR;
-        }
-        for (Iterator<Object> it = lines.iterator(); it.hasNext(); ) {
-            Object line = it.next();
-            if (line != null) {
-                output.write(line.toString().getBytes());
-            }
-            output.write(lineEnding.getBytes());
-        }
-    }
-
-    /**
-     * Writes the <code>toString()</code> value of each item in a collection to
-     * an <code>OutputStream</code> line by line, using the specified character
-     * encoding and the specified line ending.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     *
-     * @param lines  the lines to write, null entries produce blank lines
-     * @param lineEnding  the line separator to use, null is system default
-     * @param output  the <code>OutputStream</code> to write to, not null, not closed
-     * @param encoding  the encoding to use, null means platform default
-     * @throws NullPointerException if the output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void writeLines(Collection<Object> lines, String lineEnding,
-            OutputStream output, String encoding) throws IOException {
-        if (encoding == null) {
-            writeLines(lines, lineEnding, output);
-        } else {
-            if (lines == null) {
-                return;
-            }
-            if (lineEnding == null) {
-                lineEnding = LINE_SEPARATOR;
-            }
-            for (Iterator<Object> it = lines.iterator(); it.hasNext(); ) {
-                Object line = it.next();
-                if (line != null) {
-                    output.write(line.toString().getBytes(encoding));
-                }
-                output.write(lineEnding.getBytes(encoding));
-            }
-        }
-    }
-
-    /**
-     * Writes the <code>toString()</code> value of each item in a collection to
-     * a <code>Writer</code> line by line, using the specified line ending.
-     *
-     * @param lines  the lines to write, null entries produce blank lines
-     * @param lineEnding  the line separator to use, null is system default
-     * @param writer  the <code>Writer</code> to write to, not null, not closed
-     * @throws NullPointerException if the input is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void writeLines(Collection<Object> lines, String lineEnding,
-            Writer writer) throws IOException {
-        if (lines == null) {
-            return;
-        }
-        if (lineEnding == null) {
-            lineEnding = LINE_SEPARATOR;
-        }
-        for (Iterator<Object> it = lines.iterator(); it.hasNext(); ) {
-            Object line = it.next();
-            if (line != null) {
-                writer.write(line.toString());
-            }
-            writer.write(lineEnding);
-        }
-    }
-
-    // copy from InputStream
-    //-----------------------------------------------------------------------
-    /**
-     * Copy bytes from an <code>InputStream</code> to an
-     * <code>OutputStream</code>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     * <p>
-     * Large streams (over 2GB) will return a bytes copied value of
-     * <code>-1</code> after the copy has completed since the correct
-     * number of bytes cannot be returned as an int. For large streams
-     * use the <code>copyLarge(InputStream, OutputStream)</code> method.
-     *
-     * @param input  the <code>InputStream</code> to read from
-     * @param output  the <code>OutputStream</code> to write to
-     * @return the number of bytes copied
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException if an I/O error occurs
-     * @throws ArithmeticException if the byte count is too large
-     * @since Commons IO 1.1
-     */
-    public static int copy(InputStream input, OutputStream output) throws IOException {
-        long count = copyLarge(input, output);
-        if (count > Integer.MAX_VALUE) {
-            return -1;
-        }
-        return (int) count;
-    }
-
-    /**
-     * Copy bytes from a large (over 2GB) <code>InputStream</code> to an
-     * <code>OutputStream</code>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     *
-     * @param input  the <code>InputStream</code> to read from
-     * @param output  the <code>OutputStream</code> to write to
-     * @return the number of bytes copied
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.3
-     */
-    public static long copyLarge(InputStream input, OutputStream output)
-            throws IOException {
-        byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
-        long count = 0;
-        int n = 0;
-        while (-1 != (n = input.read(buffer))) {
-            output.write(buffer, 0, n);
-            count += n;
-        }
-        return count;
-    }
-
-    /**
-     * Copy bytes from an <code>InputStream</code> to chars on a
-     * <code>Writer</code> using the default character encoding of the platform.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     * <p>
-     * This method uses {@link InputStreamReader}.
-     *
-     * @param input  the <code>InputStream</code> to read from
-     * @param output  the <code>Writer</code> to write to
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void copy(InputStream input, Writer output)
-            throws IOException {
-        InputStreamReader in = new InputStreamReader(input);
-        copy(in, output);
-    }
-
-    /**
-     * Copy bytes from an <code>InputStream</code> to chars on a
-     * <code>Writer</code> using the specified character encoding.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedInputStream</code>.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * This method uses {@link InputStreamReader}.
-     *
-     * @param input  the <code>InputStream</code> to read from
-     * @param output  the <code>Writer</code> to write to
-     * @param encoding  the encoding to use, null means platform default
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void copy(InputStream input, Writer output, String encoding)
-            throws IOException {
-        if (encoding == null) {
-            copy(input, output);
-        } else {
-            InputStreamReader in = new InputStreamReader(input, encoding);
-            copy(in, output);
-        }
-    }
-
-    // copy from Reader
-    //-----------------------------------------------------------------------
-    /**
-     * Copy chars from a <code>Reader</code> to a <code>Writer</code>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     * <p>
-     * Large streams (over 2GB) will return a chars copied value of
-     * <code>-1</code> after the copy has completed since the correct
-     * number of chars cannot be returned as an int. For large streams
-     * use the <code>copyLarge(Reader, Writer)</code> method.
-     *
-     * @param input  the <code>Reader</code> to read from
-     * @param output  the <code>Writer</code> to write to
-     * @return the number of characters copied
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException if an I/O error occurs
-     * @throws ArithmeticException if the character count is too large
-     * @since Commons IO 1.1
-     */
-    public static int copy(Reader input, Writer output) throws IOException {
-        long count = copyLarge(input, output);
-        if (count > Integer.MAX_VALUE) {
-            return -1;
-        }
-        return (int) count;
-    }
-
-    /**
-     * Copy chars from a large (over 2GB) <code>Reader</code> to a <code>Writer</code>.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     *
-     * @param input  the <code>Reader</code> to read from
-     * @param output  the <code>Writer</code> to write to
-     * @return the number of characters copied
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.3
-     */
-    public static long copyLarge(Reader input, Writer output) throws IOException {
-        char[] buffer = new char[DEFAULT_BUFFER_SIZE];
-        long count = 0;
-        int n = 0;
-        while (-1 != (n = input.read(buffer))) {
-            output.write(buffer, 0, n);
-            count += n;
-        }
-        return count;
-    }
-
-    /**
-     * Copy chars from a <code>Reader</code> to bytes on an
-     * <code>OutputStream</code> using the default character encoding of the
-     * platform, and calling flush.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     * <p>
-     * Due to the implementation of OutputStreamWriter, this method performs a
-     * flush.
-     * <p>
-     * This method uses {@link OutputStreamWriter}.
-     *
-     * @param input  the <code>Reader</code> to read from
-     * @param output  the <code>OutputStream</code> to write to
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void copy(Reader input, OutputStream output)
-            throws IOException {
-        OutputStreamWriter out = new OutputStreamWriter(output);
-        copy(input, out);
-        // XXX Unless anyone is planning on rewriting OutputStreamWriter, we
-        // have to flush here.
-        out.flush();
-    }
-
-    /**
-     * Copy chars from a <code>Reader</code> to bytes on an
-     * <code>OutputStream</code> using the specified character encoding, and
-     * calling flush.
-     * <p>
-     * This method buffers the input internally, so there is no need to use a
-     * <code>BufferedReader</code>.
-     * <p>
-     * Character encoding names can be found at
-     * <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
-     * <p>
-     * Due to the implementation of OutputStreamWriter, this method performs a
-     * flush.
-     * <p>
-     * This method uses {@link OutputStreamWriter}.
-     *
-     * @param input  the <code>Reader</code> to read from
-     * @param output  the <code>OutputStream</code> to write to
-     * @param encoding  the encoding to use, null means platform default
-     * @throws NullPointerException if the input or output is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static void copy(Reader input, OutputStream output, String encoding)
-            throws IOException {
-        if (encoding == null) {
-            copy(input, output);
-        } else {
-            OutputStreamWriter out = new OutputStreamWriter(output, encoding);
-            copy(input, out);
-            // XXX Unless anyone is planning on rewriting OutputStreamWriter,
-            // we have to flush here.
-            out.flush();
-        }
-    }
-
-    // content equals
-    //-----------------------------------------------------------------------
-    /**
-     * Compare the contents of two Streams to determine if they are equal or
-     * not.
-     * <p>
-     * This method buffers the input internally using
-     * <code>BufferedInputStream</code> if they are not already buffered.
-     *
-     * @param input1  the first stream
-     * @param input2  the second stream
-     * @return true if the content of the streams are equal or they both don't
-     * exist, false otherwise
-     * @throws NullPointerException if either input is null
-     * @throws IOException if an I/O error occurs
-     */
-    public static boolean contentEquals(InputStream input1, InputStream input2)
-            throws IOException {
-        if (!(input1 instanceof BufferedInputStream)) {
-            input1 = new BufferedInputStream(input1);
-        }
-        if (!(input2 instanceof BufferedInputStream)) {
-            input2 = new BufferedInputStream(input2);
-        }
-
-        int ch = input1.read();
-        while (-1 != ch) {
-            int ch2 = input2.read();
-            if (ch != ch2) {
-                return false;
-            }
-            ch = input1.read();
-        }
-
-        int ch2 = input2.read();
-        return (ch2 == -1);
-    }
-
-    /**
-     * Compare the contents of two Readers to determine if they are equal or
-     * not.
-     * <p>
-     * This method buffers the input internally using
-     * <code>BufferedReader</code> if they are not already buffered.
-     *
-     * @param input1  the first reader
-     * @param input2  the second reader
-     * @return true if the content of the readers are equal or they both don't
-     * exist, false otherwise
-     * @throws NullPointerException if either input is null
-     * @throws IOException if an I/O error occurs
-     * @since Commons IO 1.1
-     */
-    public static boolean contentEquals(Reader input1, Reader input2)
-            throws IOException {
-        if (!(input1 instanceof BufferedReader)) {
-            input1 = new BufferedReader(input1);
-        }
-        if (!(input2 instanceof BufferedReader)) {
-            input2 = new BufferedReader(input2);
-        }
-
-        int ch = input1.read();
-        while (-1 != ch) {
-            int ch2 = input2.read();
-            if (ch != ch2) {
-                return false;
-            }
-            ch = input1.read();
-        }
-
-        int ch2 = input2.read();
-        return (ch2 == -1);
-    }
-
-}
diff --git a/src/org/apache/james/mime4j/BodyDescriptor.java b/src/org/apache/james/mime4j/BodyDescriptor.java
deleted file mode 100644
index 867c43d..0000000
--- a/src/org/apache/james/mime4j/BodyDescriptor.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Encapsulates the values of the MIME-specific header fields
- * (which starts with <code>Content-</code>).
- *
- *
- * @version $Id: BodyDescriptor.java,v 1.4 2005/02/11 10:08:37 ntherning Exp $
- */
-public class BodyDescriptor {
-    private static Log log = LogFactory.getLog(BodyDescriptor.class);
-
-    private String mimeType = "text/plain";
-    private String boundary = null;
-    private String charset = "us-ascii";
-    private String transferEncoding = "7bit";
-    private Map<String, String> parameters = new HashMap<String, String>();
-    private boolean contentTypeSet = false;
-    private boolean contentTransferEncSet = false;
-
-    /**
-     * Creates a new root <code>BodyDescriptor</code> instance.
-     */
-    public BodyDescriptor() {
-        this(null);
-    }
-
-    /**
-     * Creates a new <code>BodyDescriptor</code> instance.
-     *
-     * @param parent the descriptor of the parent or <code>null</code> if this
-     *        is the root descriptor.
-     */
-    public BodyDescriptor(BodyDescriptor parent) {
-        if (parent != null && parent.isMimeType("multipart/digest")) {
-            mimeType = "message/rfc822";
-        } else {
-            mimeType = "text/plain";
-        }
-    }
-
-    /**
-     * Should be called for each <code>Content-</code> header field of
-     * a MIME message or part.
-     *
-     * @param name the field name.
-     * @param value the field value.
-     */
-    public void addField(String name, String value) {
-
-        name = name.trim().toLowerCase();
-
-        if (name.equals("content-transfer-encoding") && !contentTransferEncSet) {
-            contentTransferEncSet = true;
-
-            value = value.trim().toLowerCase();
-            if (value.length() > 0) {
-                transferEncoding = value;
-            }
-
-        } else if (name.equals("content-type") && !contentTypeSet) {
-            contentTypeSet = true;
-
-            value = value.trim();
-
-            /*
-             * Unfold Content-Type value
-             */
-            StringBuffer sb = new StringBuffer();
-            for (int i = 0; i < value.length(); i++) {
-                char c = value.charAt(i);
-                if (c == '\r' || c == '\n') {
-                    continue;
-                }
-                sb.append(c);
-            }
-
-            Map<String, String> params = getHeaderParams(sb.toString());
-
-            String main = params.get("");
-            if (main != null) {
-                main = main.toLowerCase().trim();
-                int index = main.indexOf('/');
-                boolean valid = false;
-                if (index != -1) {
-                    String type = main.substring(0, index).trim();
-                    String subtype = main.substring(index + 1).trim();
-                    if (type.length() > 0 && subtype.length() > 0) {
-                        main = type + "/" + subtype;
-                        valid = true;
-                    }
-                }
-
-                if (!valid) {
-                    main = null;
-                }
-            }
-            String b = params.get("boundary");
-
-            if (main != null
-                    && ((main.startsWith("multipart/") && b != null)
-                            || !main.startsWith("multipart/"))) {
-
-                mimeType = main;
-            }
-
-            if (isMultipart()) {
-                boundary = b;
-            }
-
-            String c = params.get("charset");
-            if (c != null) {
-                c = c.trim();
-                if (c.length() > 0) {
-                    charset = c.toLowerCase();
-                }
-            }
-
-            /*
-             * Add all other parameters to parameters.
-             */
-            parameters.putAll(params);
-            parameters.remove("");
-            parameters.remove("boundary");
-            parameters.remove("charset");
-        }
-    }
-
-    private Map<String, String> getHeaderParams(String headerValue) {
-        Map<String, String> result = new HashMap<String, String>();
-
-        // split main value and parameters
-        String main;
-        String rest;
-        if (headerValue.indexOf(";") == -1) {
-            main = headerValue;
-            rest = null;
-        } else {
-            main = headerValue.substring(0, headerValue.indexOf(";"));
-            rest = headerValue.substring(main.length() + 1);
-        }
-
-        result.put("", main);
-        if (rest != null) {
-            char[] chars = rest.toCharArray();
-            StringBuffer paramName = new StringBuffer();
-            StringBuffer paramValue = new StringBuffer();
-
-            final byte READY_FOR_NAME = 0;
-            final byte IN_NAME = 1;
-            final byte READY_FOR_VALUE = 2;
-            final byte IN_VALUE = 3;
-            final byte IN_QUOTED_VALUE = 4;
-            final byte VALUE_DONE = 5;
-            final byte ERROR = 99;
-
-            byte state = READY_FOR_NAME;
-            boolean escaped = false;
-            for (int i = 0; i < chars.length; i++) {
-                char c = chars[i];
-
-                switch (state) {
-                    case ERROR:
-                        if (c == ';')
-                            state = READY_FOR_NAME;
-                        break;
-
-                    case READY_FOR_NAME:
-                        if (c == '=') {
-                            log.error("Expected header param name, got '='");
-                            state = ERROR;
-                            break;
-                        }
-
-                        paramName = new StringBuffer();
-                        paramValue = new StringBuffer();
-
-                        state = IN_NAME;
-                        // $FALL-THROUGH$
-
-                    case IN_NAME:
-                        if (c == '=') {
-                            if (paramName.length() == 0)
-                                state = ERROR;
-                            else
-                                state = READY_FOR_VALUE;
-                            break;
-                        }
-
-                        // not '='... just add to name
-                        paramName.append(c);
-                        break;
-
-                    case READY_FOR_VALUE:
-                        boolean fallThrough = false;
-                        switch (c) {
-                            case ' ':
-                            case '\t':
-                                break;  // ignore spaces, especially before '"'
-
-                            case '"':
-                                state = IN_QUOTED_VALUE;
-                                break;
-
-                            default:
-                                state = IN_VALUE;
-                                fallThrough = true;
-                                break;
-                        }
-                        if (!fallThrough)
-                            break;
-
-                        // $FALL-THROUGH$
-
-                    case IN_VALUE:
-                        fallThrough = false;
-                        switch (c) {
-                            case ';':
-                            case ' ':
-                            case '\t':
-                                result.put(
-                                   paramName.toString().trim().toLowerCase(),
-                                   paramValue.toString().trim());
-                                state = VALUE_DONE;
-                                fallThrough = true;
-                                break;
-                            default:
-                                paramValue.append(c);
-                                break;
-                        }
-                        if (!fallThrough)
-                            break;
-
-                        // $FALL-THROUGH$
-
-                    case VALUE_DONE:
-                        switch (c) {
-                            case ';':
-                                state = READY_FOR_NAME;
-                                break;
-
-                            case ' ':
-                            case '\t':
-                                break;
-
-                            default:
-                                state = ERROR;
-                                break;
-                        }
-                        break;
-
-                    case IN_QUOTED_VALUE:
-                        switch (c) {
-                            case '"':
-                                if (!escaped) {
-                                    // don't trim quoted strings; the spaces could be intentional.
-                                    result.put(
-                                            paramName.toString().trim().toLowerCase(),
-                                            paramValue.toString());
-                                    state = VALUE_DONE;
-                                } else {
-                                    escaped = false;
-                                    paramValue.append(c);
-                                }
-                                break;
-
-                            case '\\':
-                                if (escaped) {
-                                    paramValue.append('\\');
-                                }
-                                escaped = !escaped;
-                                break;
-
-                            default:
-                                if (escaped) {
-                                    paramValue.append('\\');
-                                }
-                                escaped = false;
-                                paramValue.append(c);
-                                break;
-                        }
-                        break;
-
-                }
-            }
-
-            // done looping.  check if anything is left over.
-            if (state == IN_VALUE) {
-                result.put(
-                        paramName.toString().trim().toLowerCase(),
-                        paramValue.toString().trim());
-            }
-        }
-
-        return result;
-    }
-
-
-    public boolean isMimeType(String mimeType) {
-        return this.mimeType.equals(mimeType.toLowerCase());
-    }
-
-    /**
-     * Return true if the BodyDescriptor belongs to a message
-     */
-    public boolean isMessage() {
-        return mimeType.equals("message/rfc822");
-    }
-
-    /**
-     * Return true if the BodyDescripotro belongs to a multipart
-     */
-    public boolean isMultipart() {
-        return mimeType.startsWith("multipart/");
-    }
-
-    /**
-     * Return the MimeType
-     */
-    public String getMimeType() {
-        return mimeType;
-    }
-
-    /**
-     * Return the boundary
-     */
-    public String getBoundary() {
-        return boundary;
-    }
-
-    /**
-     * Return the charset
-     */
-    public String getCharset() {
-        return charset;
-    }
-
-    /**
-     * Return all parameters for the BodyDescriptor
-     */
-    public Map<String, String> getParameters() {
-        return parameters;
-    }
-
-    /**
-     * Return the TransferEncoding
-     */
-    public String getTransferEncoding() {
-        return transferEncoding;
-    }
-
-    /**
-     * Return true if it's base64 encoded
-     */
-    public boolean isBase64Encoded() {
-        return "base64".equals(transferEncoding);
-    }
-
-    /**
-     * Return true if it's quoted-printable
-     */
-    public boolean isQuotedPrintableEncoded() {
-        return "quoted-printable".equals(transferEncoding);
-    }
-
-    @Override
-    public String toString() {
-        return mimeType;
-    }
-}
\ No newline at end of file
diff --git a/src/org/apache/james/mime4j/CloseShieldInputStream.java b/src/org/apache/james/mime4j/CloseShieldInputStream.java
deleted file mode 100644
index d9f3b07..0000000
--- a/src/org/apache/james/mime4j/CloseShieldInputStream.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j;
-
-import java.io.InputStream;
-import java.io.IOException;
-
-/**
- * InputStream that shields its underlying input stream from
- * being closed.
- *
- *
- * @version $Id: CloseShieldInputStream.java,v 1.2 2004/10/02 12:41:10 ntherning Exp $
- */
-public class CloseShieldInputStream extends InputStream {
-
-    /**
-     * Underlying InputStream
-     */
-    private InputStream is;
-
-    public CloseShieldInputStream(InputStream is) {
-        this.is = is;
-    }
-
-    public InputStream getUnderlyingStream() {
-        return is;
-    }
-
-    /**
-     * @see java.io.InputStream#read()
-     */
-    public int read() throws IOException {
-        checkIfClosed();
-        return is.read();
-    }
-
-    /**
-     * @see java.io.InputStream#available()
-     */
-    public int available() throws IOException {
-        checkIfClosed();
-        return is.available();
-    }
-
-
-    /**
-     * Set the underlying InputStream to null
-     */
-    public void close() throws IOException {
-        is = null;
-    }
-
-    /**
-     * @see java.io.FilterInputStream#reset()
-     */
-    public synchronized void reset() throws IOException {
-        checkIfClosed();
-        is.reset();
-    }
-
-    /**
-     * @see java.io.FilterInputStream#markSupported()
-     */
-    public boolean markSupported() {
-        if (is == null)
-            return false;
-        return is.markSupported();
-    }
-
-    /**
-     * @see java.io.FilterInputStream#mark(int)
-     */
-    public synchronized void mark(int readlimit) {
-        if (is != null)
-            is.mark(readlimit);
-    }
-
-    /**
-     * @see java.io.FilterInputStream#skip(long)
-     */
-    public long skip(long n) throws IOException {
-        checkIfClosed();
-        return is.skip(n);
-    }
-
-    /**
-     * @see java.io.FilterInputStream#read(byte[])
-     */
-    public int read(byte b[]) throws IOException {
-        checkIfClosed();
-        return is.read(b);
-    }
-
-    /**
-     * @see java.io.FilterInputStream#read(byte[], int, int)
-     */
-    public int read(byte b[], int off, int len) throws IOException {
-        checkIfClosed();
-        return is.read(b, off, len);
-    }
-
-    /**
-     * Check if the underlying InputStream is null. If so throw an Exception
-     *
-     * @throws IOException if the underlying InputStream is null
-     */
-    private void checkIfClosed() throws IOException {
-        if (is == null)
-            throw new IOException("Stream is closed");
-    }
-}
\ No newline at end of file
diff --git a/src/org/apache/james/mime4j/ContentHandler.java b/src/org/apache/james/mime4j/ContentHandler.java
deleted file mode 100644
index b437e73..0000000
--- a/src/org/apache/james/mime4j/ContentHandler.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * <p>
- * Receives notifications of the content of a plain RFC822 or MIME message.
- * Implement this interface and register an instance of that implementation
- * with a <code>MimeStreamParser</code> instance using its
- * {@link org.apache.james.mime4j.MimeStreamParser#setContentHandler(ContentHandler)}
- * method. The parser uses the <code>ContentHandler</code> instance to report
- * basic message-related events like the start and end of the body of a
- * part in a multipart MIME entity.
- * </p>
- * <p>
- * Events will be generated in the order the corresponding elements occur in
- * the message stream parsed by the parser. E.g.:
- * <pre>
- *      startMessage()
- *          startHeader()
- *              field(...)
- *              field(...)
- *              ...
- *          endHeader()
- *          startMultipart()
- *              preamble(...)
- *              startBodyPart()
- *                  startHeader()
- *                      field(...)
- *                      field(...)
- *                      ...
- *                  endHeader()
- *                  body()
- *              endBodyPart()
- *              startBodyPart()
- *                  startHeader()
- *                      field(...)
- *                      field(...)
- *                      ...
- *                  endHeader()
- *                  body()
- *              endBodyPart()
- *              epilogue(...)
- *          endMultipart()
- *      endMessage()
- * </pre>
- * The above shows an example of a MIME message consisting of a multipart
- * body containing two body parts.
- * </p>
- * <p>
- * See MIME RFCs 2045-2049 for more information on the structure of MIME
- * messages and RFC 822 and 2822 for the general structure of Internet mail
- * messages.
- * </p>
- *
- *
- * @version $Id: ContentHandler.java,v 1.3 2004/10/02 12:41:10 ntherning Exp $
- */
-public interface ContentHandler {
-    /**
-     * Called when a new message starts (a top level message or an embedded
-     * rfc822 message).
-     */
-    void startMessage();
-
-    /**
-     * Called when a message ends.
-     */
-    void endMessage();
-
-    /**
-     * Called when a new body part starts inside a
-     * <code>multipart/*</code> entity.
-     */
-    void startBodyPart();
-
-    /**
-     * Called when a body part ends.
-     */
-    void endBodyPart();
-
-    /**
-     * Called when a header (of a message or body part) is about to be parsed.
-     */
-    void startHeader();
-
-    /**
-     * Called for each field of a header.
-     *
-     * @param fieldData the raw contents of the field
-     *        (<code>Field-Name: field value</code>). The value will not be
-     *        unfolded.
-     */
-    void field(String fieldData);
-
-    /**
-     * Called when there are no more header fields in a message or body part.
-     */
-    void endHeader();
-
-    /**
-     * Called for the preamble (whatever comes before the first body part)
-     * of a <code>multipart/*</code> entity.
-     *
-     * @param is used to get the contents of the preamble.
-     * @throws IOException should be thrown on I/O errors.
-     */
-    void preamble(InputStream is) throws IOException;
-
-    /**
-     * Called for the epilogue (whatever comes after the final body part)
-     * of a <code>multipart/*</code> entity.
-     *
-     * @param is used to get the contents of the epilogue.
-     * @throws IOException should be thrown on I/O errors.
-     */
-    void epilogue(InputStream is) throws IOException;
-
-    /**
-     * Called when the body of a multipart entity is about to be parsed.
-     *
-     * @param bd encapsulates the values (either read from the
-     *        message stream or, if not present, determined implictly
-     *        as described in the
-     *        MIME rfc:s) of the <code>Content-Type</code> and
-     *        <code>Content-Transfer-Encoding</code> header fields.
-     */
-    void startMultipart(BodyDescriptor bd);
-
-    /**
-     * Called when the body of an entity has been parsed.
-     */
-    void endMultipart();
-
-    /**
-     * Called when the body of a discrete (non-multipart) entity is about to
-     * be parsed.
-     *
-     * @param bd see {@link #startMultipart(BodyDescriptor)}
-     * @param is the contents of the body. NOTE: this is the raw body contents
-     *           - it will not be decoded if encoded. The <code>bd</code>
-     *           parameter should be used to determine how the stream data
-     *           should be decoded.
-     * @throws IOException should be thrown on I/O errors.
-     */
-    void body(BodyDescriptor bd, InputStream is) throws IOException;
-
-    /**
-     * Called when a new entity (message or body part) starts and the
-     * parser is in <code>raw</code> mode.
-     *
-     * @param is the raw contents of the entity.
-     * @throws IOException should be thrown on I/O errors.
-     * @see MimeStreamParser#setRaw(boolean)
-     */
-    void raw(InputStream is) throws IOException;
-}
\ No newline at end of file
diff --git a/src/org/apache/james/mime4j/EOLConvertingInputStream.java b/src/org/apache/james/mime4j/EOLConvertingInputStream.java
deleted file mode 100644
index d6ef706..0000000
--- a/src/org/apache/james/mime4j/EOLConvertingInputStream.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PushbackInputStream;
-
-/**
- * InputStream which converts <code>\r</code>
- * bytes not followed by <code>\n</code> and <code>\n</code> not
- * preceded by <code>\r</code> to <code>\r\n</code>.
- *
- *
- * @version $Id: EOLConvertingInputStream.java,v 1.4 2004/11/29 13:15:42 ntherning Exp $
- */
-public class EOLConvertingInputStream extends InputStream {
-    /** Converts single '\r' to '\r\n' */
-    public static final int CONVERT_CR   = 1;
-    /** Converts single '\n' to '\r\n' */
-    public static final int CONVERT_LF   = 2;
-    /** Converts single '\r' and '\n' to '\r\n' */
-    public static final int CONVERT_BOTH = 3;
-
-    private PushbackInputStream in = null;
-    private int previous = 0;
-    private int flags = CONVERT_BOTH;
-    private int size = 0;
-    private int pos = 0;
-    private int nextTenPctPos;
-    private int tenPctSize;
-    private Callback callback;
-
-    public interface Callback {
-        public void report(int bytesRead);
-    }
-
-    /**
-     * Creates a new <code>EOLConvertingInputStream</code>
-     * instance converting bytes in the given <code>InputStream</code>.
-     * The flag <code>CONVERT_BOTH</code> is the default.
-     *
-     * @param in the <code>InputStream</code> to read from.
-     */
-    public EOLConvertingInputStream(InputStream _in) {
-        super();
-        in = new PushbackInputStream(_in, 2);
-    }
-
-    /**
-     * Creates a new <code>EOLConvertingInputStream</code>
-     * instance converting bytes in the given <code>InputStream</code>.
-     *
-     * @param _in the <code>InputStream</code> to read from.
-     * @param _size the size of the input stream (need not be exact)
-     * @param _callback a callback reporting when each 10% of stream's size is reached
-     */
-    public EOLConvertingInputStream(InputStream _in, int _size, Callback _callback) {
-        this(_in);
-        size = _size;
-        tenPctSize = size / 10;
-        nextTenPctPos = tenPctSize;
-        callback = _callback;
-    }
-
-    /**
-     * Closes the underlying stream.
-     *
-     * @throws IOException on I/O errors.
-     */
-    public void close() throws IOException {
-        in.close();
-    }
-
-    private int readByte() throws IOException {
-        int b = in.read();
-        if (b != -1) {
-            if (callback != null && pos++ == nextTenPctPos) {
-                nextTenPctPos += tenPctSize;
-                if (callback != null) {
-                    callback.report(pos);
-                }
-            }
-        }
-        return b;
-    }
-
-    private void unreadByte(int c) throws IOException {
-        in.unread(c);
-        pos--;
-    }
-
-    /**
-     * @see java.io.InputStream#read()
-     */
-    public int read() throws IOException {
-        int b = readByte();
-
-        if (b == -1) {
-            pos = size;
-            return -1;
-        }
-
-        if ((flags & CONVERT_CR) != 0 && b == '\r') {
-            int c = readByte();
-            if (c != -1) {
-                unreadByte(c);
-            }
-            if (c != '\n') {
-                unreadByte('\n');
-            }
-        } else if ((flags & CONVERT_LF) != 0 && b == '\n' && previous != '\r') {
-            b = '\r';
-            unreadByte('\n');
-        }
-
-        previous = b;
-
-        return b;
-    }
-
-}
\ No newline at end of file
diff --git a/src/org/apache/james/mime4j/Log.java b/src/org/apache/james/mime4j/Log.java
deleted file mode 100644
index 5eeead5..0000000
--- a/src/org/apache/james/mime4j/Log.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (C) 2009 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 org.apache.james.mime4j;
-
-/**
- * Empty stub for the apache logging library.
- */
-public class Log {
-    private static final String LOG_TAG = "Email Log";
-
-    public Log(Class mClazz) {
-    }
-
-    public boolean isDebugEnabled() {
-        return false;
-    }
-
-    public boolean isErrorEnabled() {
-        return true;
-    }
-
-    public boolean isFatalEnabled() {
-        return true;
-    }
-
-    public boolean isInfoEnabled() {
-        return false;
-    }
-
-    public boolean isTraceEnabled() {
-        return false;
-    }
-
-    public boolean isWarnEnabled() {
-        return true;
-    }
-
-    public void trace(Object message) {
-        if (!isTraceEnabled()) return;
-        android.util.Log.v(LOG_TAG, toString(message, null));
-    }
-
-    public void trace(Object message, Throwable t) {
-        if (!isTraceEnabled()) return;
-        android.util.Log.v(LOG_TAG, toString(message, t));
-    }
-
-    public void debug(Object message) {
-        if (!isDebugEnabled()) return;
-        android.util.Log.d(LOG_TAG, toString(message, null));
-    }
-
-    public void debug(Object message, Throwable t) {
-        if (!isDebugEnabled()) return;
-        android.util.Log.d(LOG_TAG, toString(message, t));
-    }
-
-    public void info(Object message) {
-        if (!isInfoEnabled()) return;
-        android.util.Log.i(LOG_TAG, toString(message, null));
-    }
-
-    public void info(Object message, Throwable t) {
-        if (!isInfoEnabled()) return;
-        android.util.Log.i(LOG_TAG, toString(message, t));
-    }
-
-    public void warn(Object message) {
-        android.util.Log.w(LOG_TAG, toString(message, null));
-    }
-
-    public void warn(Object message, Throwable t) {
-        android.util.Log.w(LOG_TAG, toString(message, t));
-    }
-
-    public void error(Object message) {
-        android.util.Log.e(LOG_TAG, toString(message, null));
-    }
-
-    public void error(Object message, Throwable t) {
-        android.util.Log.e(LOG_TAG, toString(message, t));
-    }
-
-    public void fatal(Object message) {
-        android.util.Log.e(LOG_TAG, toString(message, null));
-    }
-
-    public void fatal(Object message, Throwable t) {
-        android.util.Log.e(LOG_TAG, toString(message, t));
-    }
-
-    private static String toString(Object o, Throwable t) {
-        String m = (o == null) ? "(null)" : o.toString();
-        if (t == null) {
-            return m;
-        } else {
-            return m + " " + t.getMessage();
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/org/apache/james/mime4j/LogFactory.java b/src/org/apache/james/mime4j/LogFactory.java
deleted file mode 100644
index ed6e3de..0000000
--- a/src/org/apache/james/mime4j/LogFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2009 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 org.apache.james.mime4j;
-
-/**
- * Empty stub for the apache logging library.
- */
-public final class LogFactory {
-    private LogFactory() {
-    }
-
-    public static Log getLog(Class clazz) {
-        return new Log(clazz);
-    }
-}
\ No newline at end of file
diff --git a/src/org/apache/james/mime4j/MimeBoundaryInputStream.java b/src/org/apache/james/mime4j/MimeBoundaryInputStream.java
deleted file mode 100644
index c6d6f24..0000000
--- a/src/org/apache/james/mime4j/MimeBoundaryInputStream.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PushbackInputStream;
-
-/**
- * Stream that constrains itself to a single MIME body part.
- * After the stream ends (i.e. read() returns -1) {@link #hasMoreParts()}
- * can be used to determine if a final boundary has been seen or not.
- * If {@link #parentEOF()} is <code>true</code> an unexpected end of stream
- * has been detected in the parent stream.
- *
- *
- *
- * @version $Id: MimeBoundaryInputStream.java,v 1.2 2004/11/29 13:15:42 ntherning Exp $
- */
-public class MimeBoundaryInputStream extends InputStream {
-
-    private PushbackInputStream s = null;
-    private byte[] boundary = null;
-    private boolean first = true;
-    private boolean eof = false;
-    private boolean parenteof = false;
-    private boolean moreParts = true;
-
-    /**
-     * Creates a new MimeBoundaryInputStream.
-     * @param s The underlying stream.
-     * @param boundary Boundary string (not including leading hyphens).
-     */
-    public MimeBoundaryInputStream(InputStream s, String boundary)
-            throws IOException {
-
-        this.s = new PushbackInputStream(s, boundary.length() + 4);
-
-        boundary = "--" + boundary;
-        this.boundary = new byte[boundary.length()];
-        for (int i = 0; i < this.boundary.length; i++) {
-            this.boundary[i] = (byte) boundary.charAt(i);
-        }
-
-        /*
-         * By reading one byte we will update moreParts to be as expected
-         * before any bytes have been read.
-         */
-        int b = read();
-        if (b != -1) {
-            this.s.unread(b);
-        }
-    }
-
-    /**
-     * Closes the underlying stream.
-     *
-     * @throws IOException on I/O errors.
-     */
-    public void close() throws IOException {
-        s.close();
-    }
-
-    /**
-     * Determines if the underlying stream has more parts (this stream has
-     * not seen an end boundary).
-     *
-     * @return <code>true</code> if there are more parts in the underlying
-     *         stream, <code>false</code> otherwise.
-     */
-    public boolean hasMoreParts() {
-        return moreParts;
-    }
-
-    /**
-     * Determines if the parent stream has reached EOF
-     *
-     * @return <code>true</code>  if EOF has been reached for the parent stream,
-     *         <code>false</code> otherwise.
-     */
-    public boolean parentEOF() {
-        return parenteof;
-    }
-
-    /**
-     * Consumes all unread bytes of this stream. After a call to this method
-     * this stream will have reached EOF.
-     *
-     * @throws IOException on I/O errors.
-     */
-    public void consume() throws IOException {
-        while (read() != -1) {
-        }
-    }
-
-    /**
-     * @see java.io.InputStream#read()
-     */
-    public int read() throws IOException {
-        if (eof) {
-            return -1;
-        }
-
-        if (first) {
-            first = false;
-            if (matchBoundary()) {
-                return -1;
-            }
-        }
-
-        int b1 = s.read();
-        int b2 = s.read();
-
-        if (b1 == '\r' && b2 == '\n') {
-            if (matchBoundary()) {
-                return -1;
-            }
-        }
-
-        if (b2 != -1) {
-            s.unread(b2);
-        }
-
-        parenteof = b1 == -1;
-        eof = parenteof;
-
-        return b1;
-    }
-
-    private boolean matchBoundary() throws IOException {
-
-        for (int i = 0; i < boundary.length; i++) {
-            int b = s.read();
-            if (b != boundary[i]) {
-                if (b != -1) {
-                    s.unread(b);
-                }
-                for (int j = i - 1; j >= 0; j--) {
-                    s.unread(boundary[j]);
-                }
-                return false;
-            }
-        }
-
-        /*
-         * We have a match. Is it an end boundary?
-         */
-        int prev = s.read();
-        int curr = s.read();
-        moreParts = !(prev == '-' && curr == '-');
-        do {
-            if (curr == '\n' && prev == '\r') {
-                break;
-            }
-            prev = curr;
-        } while ((curr = s.read()) != -1);
-
-        if (curr == -1) {
-            moreParts = false;
-            parenteof = true;
-        }
-
-        eof = true;
-
-        return true;
-    }
-}
\ No newline at end of file
diff --git a/src/org/apache/james/mime4j/MimeStreamParser.java b/src/org/apache/james/mime4j/MimeStreamParser.java
deleted file mode 100644
index a8aad5a..0000000
--- a/src/org/apache/james/mime4j/MimeStreamParser.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j;
-
-import org.apache.james.mime4j.decoder.Base64InputStream;
-import org.apache.james.mime4j.decoder.QuotedPrintableInputStream;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.BitSet;
-import java.util.LinkedList;
-
-/**
- * <p>
- * Parses MIME (or RFC822) message streams of bytes or characters and reports
- * parsing events to a <code>ContentHandler</code> instance.
- * </p>
- * <p>
- * Typical usage:<br/>
- * <pre>
- *      ContentHandler handler = new MyHandler();
- *      MimeStreamParser parser = new MimeStreamParser();
- *      parser.setContentHandler(handler);
- *      parser.parse(new BufferedInputStream(new FileInputStream("mime.msg")));
- * </pre>
- * <strong>NOTE:</strong> All lines must end with CRLF
- * (<code>\r\n</code>). If you are unsure of the line endings in your stream
- * you should wrap it in a {@link org.apache.james.mime4j.EOLConvertingInputStream} instance.
- *
- *
- * @version $Id: MimeStreamParser.java,v 1.8 2005/02/11 10:12:02 ntherning Exp $
- */
-public class MimeStreamParser {
-    private static final Log log = LogFactory.getLog(MimeStreamParser.class);
-
-    private static BitSet fieldChars = null;
-
-    private RootInputStream rootStream = null;
-    private LinkedList<BodyDescriptor> bodyDescriptors = new LinkedList<BodyDescriptor>();
-    private ContentHandler handler = null;
-    private boolean raw = false;
-    private boolean prematureEof = false;
-
-    static {
-        fieldChars = new BitSet();
-        for (int i = 0x21; i <= 0x39; i++) {
-            fieldChars.set(i);
-        }
-        for (int i = 0x3b; i <= 0x7e; i++) {
-            fieldChars.set(i);
-        }
-    }
-
-    /**
-     * Creates a new <code>MimeStreamParser</code> instance.
-     */
-    public MimeStreamParser() {
-    }
-
-    /**
-     * Parses a stream of bytes containing a MIME message.
-     *
-     * @param is the stream to parse.
-     * @throws IOException on I/O errors.
-     */
-    public void parse(InputStream is) throws IOException {
-        rootStream = new RootInputStream(is);
-        parseMessage(rootStream);
-    }
-
-    /**
-     * Determines if this parser is currently in raw mode.
-     *
-     * @return <code>true</code> if in raw mode, <code>false</code>
-     *         otherwise.
-     * @see #setRaw(boolean)
-     */
-    public boolean isRaw() {
-        return raw;
-    }
-
-    /**
-     * Enables or disables raw mode. In raw mode all future entities
-     * (messages or body parts) in the stream will be reported to the
-     * {@link ContentHandler#raw(InputStream)} handler method only.
-     * The stream will contain the entire unparsed entity contents
-     * including header fields and whatever is in the body.
-     *
-     * @param raw <code>true</code> enables raw mode, <code>false</code>
-     *        disables it.
-     */
-    public void setRaw(boolean raw) {
-        this.raw = raw;
-    }
-
-    /**
-     * Finishes the parsing and stops reading lines.
-     * NOTE: No more lines will be parsed but the parser
-     * will still call
-     * {@link ContentHandler#endMultipart()},
-     * {@link ContentHandler#endBodyPart()},
-     * {@link ContentHandler#endMessage()}, etc to match previous calls
-     * to
-     * {@link ContentHandler#startMultipart(BodyDescriptor)},
-     * {@link ContentHandler#startBodyPart()},
-     * {@link ContentHandler#startMessage()}, etc.
-     */
-    public void stop() {
-        rootStream.truncate();
-    }
-
-    /**
-     * Parses an entity which consists of a header followed by a body containing
-     * arbitrary data, body parts or an embedded message.
-     *
-     * @param is the stream to parse.
-     * @throws IOException on I/O errors.
-     */
-    private void parseEntity(InputStream is) throws IOException {
-        BodyDescriptor bd = parseHeader(is);
-
-        if (bd.isMultipart()) {
-            bodyDescriptors.addFirst(bd);
-
-            handler.startMultipart(bd);
-
-            MimeBoundaryInputStream tempIs =
-                new MimeBoundaryInputStream(is, bd.getBoundary());
-            handler.preamble(new CloseShieldInputStream(tempIs));
-            tempIs.consume();
-
-            while (tempIs.hasMoreParts()) {
-                tempIs = new MimeBoundaryInputStream(is, bd.getBoundary());
-                parseBodyPart(tempIs);
-                tempIs.consume();
-                if (tempIs.parentEOF()) {
-                    prematureEof = true;
-//                    if (log.isWarnEnabled()) {
-//                        log.warn("Line " + rootStream.getLineNumber()
-//                                + ": Body part ended prematurely. "
-//                                + "Higher level boundary detected or "
-//                                + "EOF reached.");
-//                    }
-                    break;
-                }
-            }
-
-            handler.epilogue(new CloseShieldInputStream(is));
-
-            handler.endMultipart();
-
-            bodyDescriptors.removeFirst();
-
-        } else if (bd.isMessage()) {
-            if (bd.isBase64Encoded()) {
-                log.warn("base64 encoded message/rfc822 detected");
-                is = new EOLConvertingInputStream(
-                        new Base64InputStream(is));
-            } else if (bd.isQuotedPrintableEncoded()) {
-                log.warn("quoted-printable encoded message/rfc822 detected");
-                is = new EOLConvertingInputStream(
-                        new QuotedPrintableInputStream(is));
-            }
-            bodyDescriptors.addFirst(bd);
-            parseMessage(is);
-            bodyDescriptors.removeFirst();
-        } else {
-            handler.body(bd, new CloseShieldInputStream(is));
-        }
-
-        /*
-         * Make sure the stream has been consumed.
-         */
-        while (is.read() != -1) {
-        }
-    }
-
-    private void parseMessage(InputStream is) throws IOException {
-        if (raw) {
-            handler.raw(new CloseShieldInputStream(is));
-        } else {
-            handler.startMessage();
-            parseEntity(is);
-            handler.endMessage();
-        }
-    }
-
-    public boolean getPrematureEof() {
-        return prematureEof;
-    }
-
-    private void parseBodyPart(InputStream is) throws IOException {
-        if (raw) {
-            handler.raw(new CloseShieldInputStream(is));
-        } else {
-            handler.startBodyPart();
-            parseEntity(is);
-            handler.endBodyPart();
-        }
-    }
-
-    /**
-     * Parses a header.
-     *
-     * @param is the stream to parse.
-     * @return a <code>BodyDescriptor</code> describing the body following
-     *         the header.
-     */
-    private BodyDescriptor parseHeader(InputStream is) throws IOException {
-        BodyDescriptor bd = new BodyDescriptor(bodyDescriptors.isEmpty()
-                        ? null : (BodyDescriptor) bodyDescriptors.getFirst());
-
-        handler.startHeader();
-
-        int lineNumber = rootStream.getLineNumber();
-
-        StringBuffer sb = new StringBuffer();
-        int curr = 0;
-        int prev = 0;
-        while ((curr = is.read()) != -1) {
-            if (curr == '\n' && (prev == '\n' || prev == 0)) {
-                /*
-                 * [\r]\n[\r]\n or an immediate \r\n have been seen.
-                 */
-                sb.deleteCharAt(sb.length() - 1);
-                break;
-            }
-            sb.append((char) curr);
-            prev = curr == '\r' ? prev : curr;
-        }
-
-//        if (curr == -1 && log.isWarnEnabled()) {
-//            log.warn("Line " + rootStream.getLineNumber()
-//                    + ": Unexpected end of headers detected. "
-//                    + "Boundary detected in header or EOF reached.");
-//        }
-
-        int start = 0;
-        int pos = 0;
-        int startLineNumber = lineNumber;
-        while (pos < sb.length()) {
-            while (pos < sb.length() && sb.charAt(pos) != '\r') {
-                pos++;
-            }
-            if (pos < sb.length() - 1 && sb.charAt(pos + 1) != '\n') {
-                pos++;
-                continue;
-            }
-
-            if (pos >= sb.length() - 2 || fieldChars.get(sb.charAt(pos + 2))) {
-
-                /*
-                 * field should be the complete field data excluding the
-                 * trailing \r\n.
-                 */
-                String field = sb.substring(start, pos);
-                start = pos + 2;
-
-                /*
-                 * Check for a valid field.
-                 */
-                int index = field.indexOf(':');
-                boolean valid = false;
-                if (index != -1 && fieldChars.get(field.charAt(0))) {
-                    valid = true;
-                    String fieldName = field.substring(0, index).trim();
-                    for (int i = 0; i < fieldName.length(); i++) {
-                        if (!fieldChars.get(fieldName.charAt(i))) {
-                            valid = false;
-                            break;
-                        }
-                    }
-
-                    if (valid) {
-                        handler.field(field);
-                        bd.addField(fieldName, field.substring(index + 1));
-                    }
-                }
-
-                if (!valid && log.isWarnEnabled()) {
-                    log.warn("Line " + startLineNumber
-                            + ": Ignoring invalid field: '" + field.trim() + "'");
-                }
-
-                startLineNumber = lineNumber;
-            }
-
-            pos += 2;
-            lineNumber++;
-        }
-
-        handler.endHeader();
-
-        return bd;
-    }
-
-    /**
-     * Sets the <code>ContentHandler</code> to use when reporting
-     * parsing events.
-     *
-     * @param h the <code>ContentHandler</code>.
-     */
-    public void setContentHandler(ContentHandler h) {
-        this.handler = h;
-    }
-
-}
\ No newline at end of file
diff --git a/src/org/apache/james/mime4j/RootInputStream.java b/src/org/apache/james/mime4j/RootInputStream.java
deleted file mode 100644
index cc8b241..0000000
--- a/src/org/apache/james/mime4j/RootInputStream.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * <code>InputStream</code> used by the parser to wrap the original user
- * supplied stream. This stream keeps track of the current line number and
- * can also be truncated. When truncated the stream will appear to have
- * reached end of file. This is used by the parser's
- * {@link org.apache.james.mime4j.MimeStreamParser#stop()} method.
- *
- *
- * @version $Id: RootInputStream.java,v 1.2 2004/10/02 12:41:10 ntherning Exp $
- */
-class RootInputStream extends InputStream {
-    private InputStream is = null;
-    private int lineNumber = 1;
-    private int prev = -1;
-    private boolean truncated = false;
-
-    /**
-     * Creates a new <code>RootInputStream</code>.
-     *
-     * @param in the stream to read from.
-     */
-    public RootInputStream(InputStream is) {
-        this.is = is;
-    }
-
-    /**
-     * Gets the current line number starting at 1
-     * (the number of <code>\r\n</code> read so far plus 1).
-     *
-     * @return the current line number.
-     */
-    public int getLineNumber() {
-        return lineNumber;
-    }
-
-    /**
-     * Truncates this <code>InputStream</code>. After this call any
-     * call to {@link #read()}, {@link #read(byte[]) or
-     * {@link #read(byte[], int, int)} will return
-     * -1 as if end-of-file had been reached.
-     */
-    public void truncate() {
-        this.truncated = true;
-    }
-
-    /**
-     * @see java.io.InputStream#read()
-     */
-    public int read() throws IOException {
-        if (truncated) {
-            return -1;
-        }
-
-        int b = is.read();
-        if (prev == '\r' && b == '\n') {
-            lineNumber++;
-        }
-        prev = b;
-        return b;
-    }
-
-    /**
-     *
-     * @see java.io.InputStream#read(byte[], int, int)
-     */
-    public int read(byte[] b, int off, int len) throws IOException {
-        if (truncated) {
-            return -1;
-        }
-
-        int n = is.read(b, off, len);
-        for (int i = off; i < off + n; i++) {
-            if (prev == '\r' && b[i] == '\n') {
-                lineNumber++;
-            }
-            prev = b[i];
-        }
-        return n;
-    }
-
-    /**
-     * @see java.io.InputStream#read(byte[])
-     */
-    public int read(byte[] b) throws IOException {
-        return read(b, 0, b.length);
-    }
-}
\ No newline at end of file
diff --git a/src/org/apache/james/mime4j/codec/EncoderUtil.java b/src/org/apache/james/mime4j/codec/EncoderUtil.java
deleted file mode 100644
index 6841bc9..0000000
--- a/src/org/apache/james/mime4j/codec/EncoderUtil.java
+++ /dev/null
@@ -1,630 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.codec;
-
-import java.nio.ByteBuffer;
-import java.nio.charset.Charset;
-import java.util.BitSet;
-import java.util.Locale;
-
-import org.apache.james.mime4j.util.CharsetUtil;
-
-/**
- * ANDROID:  THIS CLASS IS COPIED FROM A NEWER VERSION OF MIME4J
- */
-
-/**
- * Static methods for encoding header field values. This includes encoded-words
- * as defined in <a href='http://www.faqs.org/rfcs/rfc2047.html'>RFC 2047</a>
- * or display-names of an e-mail address, for example.
- * 
- */
-public class EncoderUtil {
-
-    // This array is a lookup table that translates 6-bit positive integer index
-    // values into their "Base64 Alphabet" equivalents as specified in Table 1
-    // of RFC 2045.
-    // ANDROID:  THIS TABLE IS COPIED FROM BASE64OUTPUTSTREAM
-    static final byte[] BASE64_TABLE = { 'A', 'B', 'C', 'D', 'E', 'F',
-            'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
-            'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
-            'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's',
-            't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5',
-            '6', '7', '8', '9', '+', '/' };
-
-    // Byte used to pad output.
-    private static final byte BASE64_PAD = '=';
-
-    private static final BitSet Q_REGULAR_CHARS = initChars("=_?");
-
-    private static final BitSet Q_RESTRICTED_CHARS = initChars("=_?\"#$%&'(),.:;<>@[\\]^`{|}~");
-
-    private static final int MAX_USED_CHARACTERS = 50;
-
-    private static final String ENC_WORD_PREFIX = "=?";
-    private static final String ENC_WORD_SUFFIX = "?=";
-
-    private static final int ENCODED_WORD_MAX_LENGTH = 75; // RFC 2047
-
-    private static final BitSet TOKEN_CHARS = initChars("()<>@,;:\\\"/[]?=");
-
-    private static final BitSet ATEXT_CHARS = initChars("()<>@.,;:\\\"[]");
-
-    private static BitSet initChars(String specials) {
-        BitSet bs = new BitSet(128);
-        for (char ch = 33; ch < 127; ch++) {
-            if (specials.indexOf(ch) == -1) {
-                bs.set(ch);
-            }
-        }
-        return bs;
-    }
-
-    /**
-     * Selects one of the two encodings specified in RFC 2047.
-     */
-    public enum Encoding {
-        /** The B encoding (identical to base64 defined in RFC 2045). */
-        B,
-        /** The Q encoding (similar to quoted-printable defined in RFC 2045). */
-        Q
-    }
-
-    /**
-     * Indicates the intended usage of an encoded word.
-     */
-    public enum Usage {
-        /**
-         * Encoded word is used to replace a 'text' token in any Subject or
-         * Comments header field.
-         */
-        TEXT_TOKEN,
-        /**
-         * Encoded word is used to replace a 'word' entity within a 'phrase',
-         * for example, one that precedes an address in a From, To, or Cc
-         * header.
-         */
-        WORD_ENTITY
-    }
-
-    private EncoderUtil() {
-    }
-
-    /**
-     * Encodes the display-name portion of an address. See <a
-     * href='http://www.faqs.org/rfcs/rfc5322.html'>RFC 5322</a> section 3.4
-     * and <a href='http://www.faqs.org/rfcs/rfc2047.html'>RFC 2047</a> section
-     * 5.3. The specified string should not be folded.
-     * 
-     * @param displayName
-     *            display-name to encode.
-     * @return encoded display-name.
-     */
-    public static String encodeAddressDisplayName(String displayName) {
-        // display-name = phrase
-        // phrase = 1*( encoded-word / word )
-        // word = atom / quoted-string
-        // atom = [CFWS] 1*atext [CFWS]
-        // CFWS = comment or folding white space
-
-        if (isAtomPhrase(displayName)) {
-            return displayName;
-        } else if (hasToBeEncoded(displayName, 0)) {
-            return encodeEncodedWord(displayName, Usage.WORD_ENTITY);
-        } else {
-            return quote(displayName);
-        }
-    }
-
-    /**
-     * Encodes the local part of an address specification as described in RFC
-     * 5322 section 3.4.1. Leading and trailing CFWS should have been removed
-     * before calling this method. The specified string should not contain any
-     * illegal (control or non-ASCII) characters.
-     * 
-     * @param localPart
-     *            the local part to encode
-     * @return the encoded local part.
-     */
-    public static String encodeAddressLocalPart(String localPart) {
-        // local-part = dot-atom / quoted-string
-        // dot-atom = [CFWS] dot-atom-text [CFWS]
-        // CFWS = comment or folding white space
-
-        if (isDotAtomText(localPart)) {
-            return localPart;
-        } else {
-            return quote(localPart);
-        }
-    }
-
-    /**
-     * Encodes the specified strings into a header parameter as described in RFC
-     * 2045 section 5.1 and RFC 2183 section 2. The specified strings should not
-     * contain any illegal (control or non-ASCII) characters.
-     * 
-     * @param name
-     *            parameter name.
-     * @param value
-     *            parameter value.
-     * @return encoded result.
-     */
-    public static String encodeHeaderParameter(String name, String value) {
-        name = name.toLowerCase(Locale.US);
-
-        // value := token / quoted-string
-        if (isToken(value)) {
-            return name + "=" + value;
-        } else {
-            return name + "=" + quote(value);
-        }
-    }
-
-    /**
-     * Shortcut method that encodes the specified text into an encoded-word if
-     * the text has to be encoded.
-     * 
-     * @param text
-     *            text to encode.
-     * @param usage
-     *            whether the encoded-word is to be used to replace a text token
-     *            or a word entity (see RFC 822).
-     * @param usedCharacters
-     *            number of characters already used up (<code>0 <= usedCharacters <= 50</code>).
-     * @return the specified text if encoding is not necessary or an encoded
-     *         word or a sequence of encoded words otherwise.
-     */
-    public static String encodeIfNecessary(String text, Usage usage,
-            int usedCharacters) {
-        if (hasToBeEncoded(text, usedCharacters))
-            return encodeEncodedWord(text, usage, usedCharacters);
-        else
-            return text;
-    }
-
-    /**
-     * Determines if the specified string has to encoded into an encoded-word.
-     * Returns <code>true</code> if the text contains characters that don't
-     * fall into the printable ASCII character set or if the text contains a
-     * 'word' (sequence of non-whitespace characters) longer than 77 characters
-     * (including characters already used up in the line).
-     * 
-     * @param text
-     *            text to analyze.
-     * @param usedCharacters
-     *            number of characters already used up (<code>0 <= usedCharacters <= 50</code>).
-     * @return <code>true</code> if the specified text has to be encoded into
-     *         an encoded-word, <code>false</code> otherwise.
-     */
-    public static boolean hasToBeEncoded(String text, int usedCharacters) {
-        if (text == null)
-            throw new IllegalArgumentException();
-        if (usedCharacters < 0 || usedCharacters > MAX_USED_CHARACTERS)
-            throw new IllegalArgumentException();
-
-        int nonWhiteSpaceCount = usedCharacters;
-
-        for (int idx = 0; idx < text.length(); idx++) {
-            char ch = text.charAt(idx);
-            if (ch == '\t' || ch == ' ') {
-                nonWhiteSpaceCount = 0;
-            } else {
-                nonWhiteSpaceCount++;
-                if (nonWhiteSpaceCount > 77) {
-                    // Line cannot be folded into multiple lines with no more
-                    // than 78 characters each. Encoding as encoded-words makes
-                    // that possible. One character has to be reserved for
-                    // folding white space; that leaves 77 characters.
-                    return true;
-                }
-
-                if (ch < 32 || ch >= 127) {
-                    // non-printable ascii character has to be encoded
-                    return true;
-                }
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * Encodes the specified text into an encoded word or a sequence of encoded
-     * words separated by space. The text is separated into a sequence of
-     * encoded words if it does not fit in a single one.
-     * <p>
-     * The charset to encode the specified text into a byte array and the
-     * encoding to use for the encoded-word are detected automatically.
-     * <p>
-     * This method assumes that zero characters have already been used up in the
-     * current line.
-     * 
-     * @param text
-     *            text to encode.
-     * @param usage
-     *            whether the encoded-word is to be used to replace a text token
-     *            or a word entity (see RFC 822).
-     * @return the encoded word (or sequence of encoded words if the given text
-     *         does not fit in a single encoded word).
-     * @see #hasToBeEncoded(String, int)
-     */
-    public static String encodeEncodedWord(String text, Usage usage) {
-        return encodeEncodedWord(text, usage, 0, null, null);
-    }
-
-    /**
-     * Encodes the specified text into an encoded word or a sequence of encoded
-     * words separated by space. The text is separated into a sequence of
-     * encoded words if it does not fit in a single one.
-     * <p>
-     * The charset to encode the specified text into a byte array and the
-     * encoding to use for the encoded-word are detected automatically.
-     * 
-     * @param text
-     *            text to encode.
-     * @param usage
-     *            whether the encoded-word is to be used to replace a text token
-     *            or a word entity (see RFC 822).
-     * @param usedCharacters
-     *            number of characters already used up (<code>0 <= usedCharacters <= 50</code>).
-     * @return the encoded word (or sequence of encoded words if the given text
-     *         does not fit in a single encoded word).
-     * @see #hasToBeEncoded(String, int)
-     */
-    public static String encodeEncodedWord(String text, Usage usage,
-            int usedCharacters) {
-        return encodeEncodedWord(text, usage, usedCharacters, null, null);
-    }
-
-    /**
-     * Encodes the specified text into an encoded word or a sequence of encoded
-     * words separated by space. The text is separated into a sequence of
-     * encoded words if it does not fit in a single one.
-     * 
-     * @param text
-     *            text to encode.
-     * @param usage
-     *            whether the encoded-word is to be used to replace a text token
-     *            or a word entity (see RFC 822).
-     * @param usedCharacters
-     *            number of characters already used up (<code>0 <= usedCharacters <= 50</code>).
-     * @param charset
-     *            the Java charset that should be used to encode the specified
-     *            string into a byte array. A suitable charset is detected
-     *            automatically if this parameter is <code>null</code>.
-     * @param encoding
-     *            the encoding to use for the encoded-word (either B or Q). A
-     *            suitable encoding is automatically chosen if this parameter is
-     *            <code>null</code>.
-     * @return the encoded word (or sequence of encoded words if the given text
-     *         does not fit in a single encoded word).
-     * @see #hasToBeEncoded(String, int)
-     */
-    public static String encodeEncodedWord(String text, Usage usage,
-            int usedCharacters, Charset charset, Encoding encoding) {
-        if (text == null)
-            throw new IllegalArgumentException();
-        if (usedCharacters < 0 || usedCharacters > MAX_USED_CHARACTERS)
-            throw new IllegalArgumentException();
-
-        if (charset == null)
-            charset = determineCharset(text);
-
-        String mimeCharset = CharsetUtil.toMimeCharset(charset.name());
-        if (mimeCharset == null) {
-            // cannot happen if charset was originally null
-            throw new IllegalArgumentException("Unsupported charset");
-        }
-
-        byte[] bytes = encode(text, charset);
-
-        if (encoding == null)
-            encoding = determineEncoding(bytes, usage);
-
-        if (encoding == Encoding.B) {
-            String prefix = ENC_WORD_PREFIX + mimeCharset + "?B?";
-            return encodeB(prefix, text, usedCharacters, charset, bytes);
-        } else {
-            String prefix = ENC_WORD_PREFIX + mimeCharset + "?Q?";
-            return encodeQ(prefix, text, usage, usedCharacters, charset, bytes);
-        }
-    }
-
-    /**
-     * Encodes the specified byte array using the B encoding defined in RFC
-     * 2047.
-     * 
-     * @param bytes
-     *            byte array to encode.
-     * @return encoded string.
-     */
-    public static String encodeB(byte[] bytes) {
-        StringBuilder sb = new StringBuilder();
-
-        int idx = 0;
-        final int end = bytes.length;
-        for (; idx < end - 2; idx += 3) {
-            int data = (bytes[idx] & 0xff) << 16 | (bytes[idx + 1] & 0xff) << 8
-                    | bytes[idx + 2] & 0xff;
-            sb.append((char) BASE64_TABLE[data >> 18 & 0x3f]);
-            sb.append((char) BASE64_TABLE[data >> 12 & 0x3f]);
-            sb.append((char) BASE64_TABLE[data >> 6 & 0x3f]);
-            sb.append((char) BASE64_TABLE[data & 0x3f]);
-        }
-
-        if (idx == end - 2) {
-            int data = (bytes[idx] & 0xff) << 16 | (bytes[idx + 1] & 0xff) << 8;
-            sb.append((char) BASE64_TABLE[data >> 18 & 0x3f]);
-            sb.append((char) BASE64_TABLE[data >> 12 & 0x3f]);
-            sb.append((char) BASE64_TABLE[data >> 6 & 0x3f]);
-            sb.append((char) BASE64_PAD);
-
-        } else if (idx == end - 1) {
-            int data = (bytes[idx] & 0xff) << 16;
-            sb.append((char) BASE64_TABLE[data >> 18 & 0x3f]);
-            sb.append((char) BASE64_TABLE[data >> 12 & 0x3f]);
-            sb.append((char) BASE64_PAD);
-            sb.append((char) BASE64_PAD);
-        }
-
-        return sb.toString();
-    }
-
-    /**
-     * Encodes the specified byte array using the Q encoding defined in RFC
-     * 2047.
-     * 
-     * @param bytes
-     *            byte array to encode.
-     * @param usage
-     *            whether the encoded-word is to be used to replace a text token
-     *            or a word entity (see RFC 822).
-     * @return encoded string.
-     */
-    public static String encodeQ(byte[] bytes, Usage usage) {
-        BitSet qChars = usage == Usage.TEXT_TOKEN ? Q_REGULAR_CHARS
-                : Q_RESTRICTED_CHARS;
-
-        StringBuilder sb = new StringBuilder();
-
-        final int end = bytes.length;
-        for (int idx = 0; idx < end; idx++) {
-            int v = bytes[idx] & 0xff;
-            if (v == 32) {
-                sb.append('_');
-            } else if (!qChars.get(v)) {
-                sb.append('=');
-                sb.append(hexDigit(v >>> 4));
-                sb.append(hexDigit(v & 0xf));
-            } else {
-                sb.append((char) v);
-            }
-        }
-
-        return sb.toString();
-    }
-
-    /**
-     * Tests whether the specified string is a token as defined in RFC 2045
-     * section 5.1.
-     * 
-     * @param str
-     *            string to test.
-     * @return <code>true</code> if the specified string is a RFC 2045 token,
-     *         <code>false</code> otherwise.
-     */
-    public static boolean isToken(String str) {
-        // token := 1*<any (US-ASCII) CHAR except SPACE, CTLs, or tspecials>
-        // tspecials := "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" /
-        // <"> / "/" / "[" / "]" / "?" / "="
-        // CTL := 0.- 31., 127.
-
-        final int length = str.length();
-        if (length == 0)
-            return false;
-
-        for (int idx = 0; idx < length; idx++) {
-            char ch = str.charAt(idx);
-            if (!TOKEN_CHARS.get(ch))
-                return false;
-        }
-
-        return true;
-    }
-
-    private static boolean isAtomPhrase(String str) {
-        // atom = [CFWS] 1*atext [CFWS]
-
-        boolean containsAText = false;
-
-        final int length = str.length();
-        for (int idx = 0; idx < length; idx++) {
-            char ch = str.charAt(idx);
-            if (ATEXT_CHARS.get(ch)) {
-                containsAText = true;
-            } else if (!CharsetUtil.isWhitespace(ch)) {
-                return false;
-            }
-        }
-
-        return containsAText;
-    }
-
-    // RFC 5322 section 3.2.3
-    private static boolean isDotAtomText(String str) {
-        // dot-atom-text = 1*atext *("." 1*atext)
-        // atext = ALPHA / DIGIT / "!" / "#" / "$" / "%" / "&" / "'" / "*" /
-        // "+" / "-" / "/" / "=" / "?" / "^" / "_" / "`" / "{" / "|" / "}" / "~"
-
-        char prev = '.';
-
-        final int length = str.length();
-        if (length == 0)
-            return false;
-
-        for (int idx = 0; idx < length; idx++) {
-            char ch = str.charAt(idx);
-
-            if (ch == '.') {
-                if (prev == '.' || idx == length - 1)
-                    return false;
-            } else {
-                if (!ATEXT_CHARS.get(ch))
-                    return false;
-            }
-
-            prev = ch;
-        }
-
-        return true;
-    }
-
-    // RFC 5322 section 3.2.4
-    private static String quote(String str) {
-        // quoted-string = [CFWS] DQUOTE *([FWS] qcontent) [FWS] DQUOTE [CFWS]
-        // qcontent = qtext / quoted-pair
-        // qtext = %d33 / %d35-91 / %d93-126
-        // quoted-pair = ("\" (VCHAR / WSP))
-        // VCHAR = %x21-7E
-        // DQUOTE = %x22
-
-        String escaped = str.replaceAll("[\\\\\"]", "\\\\$0");
-        return "\"" + escaped + "\"";
-    }
-
-    private static String encodeB(String prefix, String text,
-            int usedCharacters, Charset charset, byte[] bytes) {
-        int encodedLength = bEncodedLength(bytes);
-
-        int totalLength = prefix.length() + encodedLength
-                + ENC_WORD_SUFFIX.length();
-        if (totalLength <= ENCODED_WORD_MAX_LENGTH - usedCharacters) {
-            return prefix + encodeB(bytes) + ENC_WORD_SUFFIX;
-        } else {
-            int splitOffset = text.offsetByCodePoints(text.length() / 2, -1);
-                                                         
-            String part1 = text.substring(0, splitOffset);
-            byte[] bytes1 = encode(part1, charset);
-            String word1 = encodeB(prefix, part1, usedCharacters, charset,
-                    bytes1);
-
-            String part2 = text.substring(splitOffset);
-            byte[] bytes2 = encode(part2, charset);
-            String word2 = encodeB(prefix, part2, 0, charset, bytes2);
-
-            return word1 + " " + word2;
-        }
-    }
-
-    private static int bEncodedLength(byte[] bytes) {
-        return (bytes.length + 2) / 3 * 4;
-    }
-
-    private static String encodeQ(String prefix, String text, Usage usage,
-            int usedCharacters, Charset charset, byte[] bytes) {
-        int encodedLength = qEncodedLength(bytes, usage);
-
-        int totalLength = prefix.length() + encodedLength
-                + ENC_WORD_SUFFIX.length();
-        if (totalLength <= ENCODED_WORD_MAX_LENGTH - usedCharacters) {
-            return prefix + encodeQ(bytes, usage) + ENC_WORD_SUFFIX;
-        } else {
-            int splitOffset = text.offsetByCodePoints(text.length() / 2, -1);
-
-            String part1 = text.substring(0, splitOffset);
-            byte[] bytes1 = encode(part1, charset);
-            String word1 = encodeQ(prefix, part1, usage, usedCharacters,
-                    charset, bytes1);
-
-            String part2 = text.substring(splitOffset);
-            byte[] bytes2 = encode(part2, charset);
-            String word2 = encodeQ(prefix, part2, usage, 0, charset, bytes2);
-
-            return word1 + " " + word2;
-        }
-    }
-
-    private static int qEncodedLength(byte[] bytes, Usage usage) {
-        BitSet qChars = usage == Usage.TEXT_TOKEN ? Q_REGULAR_CHARS
-                : Q_RESTRICTED_CHARS;
-
-        int count = 0;
-
-        for (int idx = 0; idx < bytes.length; idx++) {
-            int v = bytes[idx] & 0xff;
-            if (v == 32) {
-                count++;
-            } else if (!qChars.get(v)) {
-                count += 3;
-            } else {
-                count++;
-            }
-        }
-
-        return count;
-    }
-
-    private static byte[] encode(String text, Charset charset) {
-        ByteBuffer buffer = charset.encode(text);
-        byte[] bytes = new byte[buffer.limit()];
-        buffer.get(bytes);
-        return bytes;
-    }
-
-    private static Charset determineCharset(String text) {
-        // it is an important property of iso-8859-1 that it directly maps
-        // unicode code points 0000 to 00ff to byte values 00 to ff.
-        boolean ascii = true;
-        final int len = text.length();
-        for (int index = 0; index < len; index++) {
-            char ch = text.charAt(index);
-            if (ch > 0xff) {
-                return CharsetUtil.UTF_8;
-            }
-            if (ch > 0x7f) {
-                ascii = false;
-            }
-        }
-        return ascii ? CharsetUtil.US_ASCII : CharsetUtil.ISO_8859_1;
-    }
-
-    private static Encoding determineEncoding(byte[] bytes, Usage usage) {
-        if (bytes.length == 0)
-            return Encoding.Q;
-
-        BitSet qChars = usage == Usage.TEXT_TOKEN ? Q_REGULAR_CHARS
-                : Q_RESTRICTED_CHARS;
-
-        int qEncoded = 0;
-        for (int i = 0; i < bytes.length; i++) {
-            int v = bytes[i] & 0xff;
-            if (v != 32 && !qChars.get(v)) {
-                qEncoded++;
-            }
-        }
-
-        int percentage = qEncoded * 100 / bytes.length;
-        return percentage > 30 ? Encoding.B : Encoding.Q;
-    }
-
-    private static char hexDigit(int i) {
-        return i < 10 ? (char) (i + '0') : (char) (i - 10 + 'A');
-    }
-}
diff --git a/src/org/apache/james/mime4j/decoder/Base64InputStream.java b/src/org/apache/james/mime4j/decoder/Base64InputStream.java
deleted file mode 100644
index 77f5d7d..0000000
--- a/src/org/apache/james/mime4j/decoder/Base64InputStream.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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.                                           *
- ****************************************************************/
-
-/**
- * Modified to improve efficiency by Android   21-Aug-2009
- */
-
-package org.apache.james.mime4j.decoder;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Performs Base-64 decoding on an underlying stream.
- * 
- * 
- * @version $Id: Base64InputStream.java,v 1.3 2004/11/29 13:15:47 ntherning Exp $
- */
-public class Base64InputStream extends InputStream {
-    private final InputStream s;
-    private int outCount = 0;
-    private int outIndex = 0;
-    private final int[] outputBuffer = new int[3];
-    private final byte[] inputBuffer = new byte[4];
-    private boolean done = false;
-
-    public Base64InputStream(InputStream s) {
-        this.s = s;
-    }
-
-    /**
-     * Closes the underlying stream.
-     * 
-     * @throws IOException on I/O errors.
-     */
-    @Override
-    public void close() throws IOException {
-        s.close();
-    }
-    
-    @Override
-    public int read() throws IOException {
-        if (outIndex == outCount) {
-            fillBuffer();
-            if (outIndex == outCount) {
-                return -1;
-            }
-        }
-
-        return outputBuffer[outIndex++];
-    }
-
-    /**
-     * Retrieve data from the underlying stream, decode it,
-     * and put the results in the byteq.
-     * @throws IOException
-     */
-    private void fillBuffer() throws IOException {
-        outCount = 0;
-        outIndex = 0;
-        int inCount = 0;
-
-        int i;
-        // "done" is needed for the two successive '=' at the end
-        while (!done) {
-            switch (i = s.read()) {
-                case -1:
-                    // No more input - just return, let outputBuffer drain out, and be done
-                    return;
-                case '=':
-                    // once we meet the first '=', avoid reading the second '='
-                    done = true;
-                    decodeAndEnqueue(inCount);
-                    return;
-                default:
-                    byte sX = TRANSLATION[i];
-                    if (sX < 0) continue;
-                    inputBuffer[inCount++] = sX;
-                    if (inCount == 4) {
-                        decodeAndEnqueue(inCount);
-                        return;
-                    }
-                    break;
-            }
-        }
-    }
-
-    private void decodeAndEnqueue(int len) {
-        int accum = 0;
-        accum |= inputBuffer[0] << 18;
-        accum |= inputBuffer[1] << 12;
-        accum |= inputBuffer[2] << 6;
-        accum |= inputBuffer[3];
-
-        // There's a bit of duplicated code here because we want to have straight-through operation
-        // for the most common case of len==4
-        if (len == 4) {
-            outputBuffer[0] = (accum >> 16) & 0xFF;
-            outputBuffer[1] = (accum >> 8) & 0xFF;
-            outputBuffer[2] = (accum) & 0xFF;
-            outCount = 3;
-            return;
-        } else if (len == 3) {
-            outputBuffer[0] = (accum >> 16) & 0xFF;
-            outputBuffer[1] = (accum >> 8) & 0xFF;
-            outCount = 2;
-            return;
-        } else {    // len == 2
-            outputBuffer[0] = (accum >> 16) & 0xFF;
-            outCount = 1;
-            return;
-        }
-    }
-
-    private static byte[] TRANSLATION = {
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x00 */
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x10 */
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, /* 0x20 */
-        52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, /* 0x30 */
-        -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, /* 0x40 */
-        15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, /* 0x50 */
-        -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, /* 0x60 */
-        41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, /* 0x70 */
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x80 */
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x90 */
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xA0 */
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xB0 */
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xC0 */
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xD0 */
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xE0 */
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1     /* 0xF0 */
-    };
-
-
-}
diff --git a/src/org/apache/james/mime4j/decoder/ByteQueue.java b/src/org/apache/james/mime4j/decoder/ByteQueue.java
deleted file mode 100644
index 6d7ccef..0000000
--- a/src/org/apache/james/mime4j/decoder/ByteQueue.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.decoder;
-
-import java.util.Iterator;
-
-public class ByteQueue {
-
-    private UnboundedFifoByteBuffer buf;
-    private int initialCapacity = -1;
-
-    public ByteQueue() {
-        buf = new UnboundedFifoByteBuffer();
-    }
-
-    public ByteQueue(int initialCapacity) {
-        buf = new UnboundedFifoByteBuffer(initialCapacity);
-        this.initialCapacity = initialCapacity;
-    }
-
-    public void enqueue(byte b) {
-        buf.add(b);
-    }
-
-    public byte dequeue() {
-        return buf.remove();
-    }
-
-    public int count() {
-        return buf.size();
-    }
-
-    public void clear() {
-        if (initialCapacity != -1)
-            buf = new UnboundedFifoByteBuffer(initialCapacity);
-        else
-            buf = new UnboundedFifoByteBuffer();
-    }
-
-    public Iterator iterator() {
-        return buf.iterator();
-    }
-
-
-}
diff --git a/src/org/apache/james/mime4j/decoder/DecoderUtil.java b/src/org/apache/james/mime4j/decoder/DecoderUtil.java
deleted file mode 100644
index 48fe07d..0000000
--- a/src/org/apache/james/mime4j/decoder/DecoderUtil.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.decoder;
-
-//BEGIN android-changed: Stubbing out logging
-import org.apache.james.mime4j.Log;
-import org.apache.james.mime4j.LogFactory;
-//END android-changed
-import org.apache.james.mime4j.util.CharsetUtil;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-
-/**
- * Static methods for decoding strings, byte arrays and encoded words.
- *
- * 
- * @version $Id: DecoderUtil.java,v 1.3 2005/02/07 15:33:59 ntherning Exp $
- */
-public class DecoderUtil {
-    private static Log log = LogFactory.getLog(DecoderUtil.class);
-    
-    /**
-     * Decodes a string containing quoted-printable encoded data. 
-     * 
-     * @param s the string to decode.
-     * @return the decoded bytes.
-     */
-    public static byte[] decodeBaseQuotedPrintable(String s) {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        
-        try {
-            byte[] bytes = s.getBytes("US-ASCII");
-            
-            QuotedPrintableInputStream is = new QuotedPrintableInputStream(
-                                               new ByteArrayInputStream(bytes));
-            
-            int b = 0;
-            while ((b = is.read()) != -1) {
-                baos.write(b);
-            }
-        } catch (IOException e) {
-            /*
-             * This should never happen!
-             */
-            log.error(e);
-        }
-        
-        return baos.toByteArray();
-    }
-    
-    /**
-     * Decodes a string containing base64 encoded data. 
-     * 
-     * @param s the string to decode.
-     * @return the decoded bytes.
-     */
-    public static byte[] decodeBase64(String s) {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        
-        try {
-            byte[] bytes = s.getBytes("US-ASCII");
-            
-            Base64InputStream is = new Base64InputStream(
-                                        new ByteArrayInputStream(bytes));
-            
-            int b = 0;
-            while ((b = is.read()) != -1) {
-                baos.write(b);
-            }
-        } catch (IOException e) {
-            /*
-             * This should never happen!
-             */
-            log.error(e);
-        }
-        
-        return baos.toByteArray();
-    }
-    
-    /**
-     * Decodes an encoded word encoded with the 'B' encoding (described in 
-     * RFC 2047) found in a header field body.
-     * 
-     * @param encodedWord the encoded word to decode.
-     * @param charset the Java charset to use.
-     * @return the decoded string.
-     * @throws UnsupportedEncodingException if the given Java charset isn't 
-     *         supported.
-     */
-    public static String decodeB(String encodedWord, String charset) 
-            throws UnsupportedEncodingException {
-        
-        return new String(decodeBase64(encodedWord), charset);
-    }
-    
-    /**
-     * Decodes an encoded word encoded with the 'Q' encoding (described in 
-     * RFC 2047) found in a header field body.
-     * 
-     * @param encodedWord the encoded word to decode.
-     * @param charset the Java charset to use.
-     * @return the decoded string.
-     * @throws UnsupportedEncodingException if the given Java charset isn't 
-     *         supported.
-     */
-    public static String decodeQ(String encodedWord, String charset)
-            throws UnsupportedEncodingException {
-           
-        /*
-         * Replace _ with =20
-         */
-        StringBuffer sb = new StringBuffer();
-        for (int i = 0; i < encodedWord.length(); i++) {
-            char c = encodedWord.charAt(i);
-            if (c == '_') {
-                sb.append("=20");
-            } else {
-                sb.append(c);
-            }
-        }
-        
-        return new String(decodeBaseQuotedPrintable(sb.toString()), charset);
-    }
-    
-    /**
-     * Decodes a string containing encoded words as defined by RFC 2047.
-     * Encoded words in have the form 
-     * =?charset?enc?Encoded word?= where enc is either 'Q' or 'q' for 
-     * quoted-printable and 'B' or 'b' for Base64.
-     * 
-     * ANDROID:  COPIED FROM A NEWER VERSION OF MIME4J
-     * 
-     * @param body the string to decode.
-     * @return the decoded string.
-     */
-    public static String decodeEncodedWords(String body) {
-        
-        // ANDROID:  Most strings will not include "=?" so a quick test can prevent unneeded
-        // object creation.  This could also be handled via lazy creation of the StringBuilder.
-        if (body.indexOf("=?") == -1) {
-            return body;
-        }
-
-        int previousEnd = 0;
-        boolean previousWasEncoded = false;
-
-        StringBuilder sb = new StringBuilder();
-
-        while (true) {
-            int begin = body.indexOf("=?", previousEnd);
-
-            // ANDROID:  The mime4j original version has an error here.  It gets confused if
-            // the encoded string begins with an '=' (just after "?Q?").  This patch seeks forward
-            // to find the two '?' in the "header", before looking for the final "?=".
-            if (begin == -1) {
-                break;
-            }
-            int qm1 = body.indexOf('?', begin + 2);
-            if (qm1 == -1) {
-                break;
-            }
-            int qm2 = body.indexOf('?', qm1 + 1);
-            if (qm2 == -1) {
-                break;
-            }
-            int end = body.indexOf("?=", qm2 + 1);
-            if (end == -1) {
-                break;
-            }
-            end += 2;
-
-            String sep = body.substring(previousEnd, begin);
-
-            String decoded = decodeEncodedWord(body, begin, end);
-            if (decoded == null) {
-                sb.append(sep);
-                sb.append(body.substring(begin, end));
-            } else {
-                if (!previousWasEncoded || !CharsetUtil.isWhitespace(sep)) {
-                    sb.append(sep);
-                }
-                sb.append(decoded);
-            }
-
-            previousEnd = end;
-            previousWasEncoded = decoded != null;
-        }
-
-        if (previousEnd == 0)
-            return body;
-
-        sb.append(body.substring(previousEnd));
-        return sb.toString();
-    }
-
-    // return null on error. Begin is index of '=?' in body.
-    public static String decodeEncodedWord(String body, int begin, int end) {
-        // Skip the '?=' chars in body and scan forward from there for next '?'
-        int qm1 = body.indexOf('?', begin + 2);
-        if (qm1 == -1 || qm1 == end - 2)
-            return null;
-
-        int qm2 = body.indexOf('?', qm1 + 1);
-        if (qm2 == -1 || qm2 == end - 2)
-            return null;
-
-        String mimeCharset = body.substring(begin + 2, qm1);
-        String encoding = body.substring(qm1 + 1, qm2);
-        String encodedText = body.substring(qm2 + 1, end - 2);
-
-        String charset = CharsetUtil.toJavaCharset(mimeCharset);
-        if (charset == null) {
-            if (log.isWarnEnabled()) {
-                log.warn("MIME charset '" + mimeCharset + "' in encoded word '"
-                        + body.substring(begin, end) + "' doesn't have a "
-                        + "corresponding Java charset");
-            }
-            return null;
-        } else if (!CharsetUtil.isDecodingSupported(charset)) {
-            if (log.isWarnEnabled()) {
-                log.warn("Current JDK doesn't support decoding of charset '"
-                        + charset + "' (MIME charset '" + mimeCharset
-                        + "' in encoded word '" + body.substring(begin, end)
-                        + "')");
-            }
-            return null;
-        }
-
-        if (encodedText.length() == 0) {
-            if (log.isWarnEnabled()) {
-                log.warn("Missing encoded text in encoded word: '"
-                        + body.substring(begin, end) + "'");
-            }
-            return null;
-        }
-
-        try {
-            if (encoding.equalsIgnoreCase("Q")) {
-                return DecoderUtil.decodeQ(encodedText, charset);
-            } else if (encoding.equalsIgnoreCase("B")) {
-                return DecoderUtil.decodeB(encodedText, charset);
-            } else {
-                if (log.isWarnEnabled()) {
-                    log.warn("Warning: Unknown encoding in encoded word '"
-                            + body.substring(begin, end) + "'");
-                }
-                return null;
-            }
-        } catch (UnsupportedEncodingException e) {
-            // should not happen because of isDecodingSupported check above
-            if (log.isWarnEnabled()) {
-                log.warn("Unsupported encoding in encoded word '"
-                        + body.substring(begin, end) + "'", e);
-            }
-            return null;
-        } catch (RuntimeException e) {
-            if (log.isWarnEnabled()) {
-                log.warn("Could not decode encoded word '"
-                        + body.substring(begin, end) + "'", e);
-            }
-            return null;
-        }
-    }
-}
diff --git a/src/org/apache/james/mime4j/decoder/QuotedPrintableInputStream.java b/src/org/apache/james/mime4j/decoder/QuotedPrintableInputStream.java
deleted file mode 100644
index e43f398..0000000
--- a/src/org/apache/james/mime4j/decoder/QuotedPrintableInputStream.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.decoder;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-//BEGIN android-changed: Stubbing out logging
-import org.apache.james.mime4j.Log;
-import org.apache.james.mime4j.LogFactory;
-//END android-changed
-
-/**
- * Performs Quoted-Printable decoding on an underlying stream.
- * 
- * 
- * 
- * @version $Id: QuotedPrintableInputStream.java,v 1.3 2004/11/29 13:15:47 ntherning Exp $
- */
-public class QuotedPrintableInputStream extends InputStream {
-    private static Log log = LogFactory.getLog(QuotedPrintableInputStream.class);
-    
-    private InputStream stream;
-    ByteQueue byteq = new ByteQueue();
-    ByteQueue pushbackq = new ByteQueue();
-    private byte state = 0;
-
-    public QuotedPrintableInputStream(InputStream stream) {
-        this.stream = stream;
-    }
-    
-    /**
-     * Closes the underlying stream.
-     * 
-     * @throws IOException on I/O errors.
-     */
-    public void close() throws IOException {
-        stream.close();
-    }
-
-    public int read() throws IOException {
-        fillBuffer();
-        if (byteq.count() == 0)
-            return -1;
-        else {
-            byte val = byteq.dequeue();
-            if (val >= 0)
-                return val;
-            else
-                return val & 0xFF;
-        }
-    }
-
-    /**
-     * Pulls bytes out of the underlying stream and places them in the
-     * pushback queue.  This is necessary (vs. reading from the
-     * underlying stream directly) to detect and filter out "transport
-     * padding" whitespace, i.e., all whitespace that appears immediately
-     * before a CRLF.
-     *
-     * @throws IOException Underlying stream threw IOException.
-     */
-    private void populatePushbackQueue() throws IOException {
-        //Debug.verify(pushbackq.count() == 0, "PopulatePushbackQueue called when pushback queue was not empty!");
-
-        if (pushbackq.count() != 0)
-            return;
-
-        while (true) {
-            int i = stream.read();
-            switch (i) {
-                case -1:
-                    // stream is done
-                    pushbackq.clear();  // discard any whitespace preceding EOF
-                    return;
-                case ' ':
-                case '\t':
-                    pushbackq.enqueue((byte)i);
-                    break;
-                case '\r':
-                case '\n':
-                    pushbackq.clear();  // discard any whitespace preceding EOL
-                    pushbackq.enqueue((byte)i);
-                    return;
-                default:
-                    pushbackq.enqueue((byte)i);
-                    return;
-            }
-        }
-    }
-
-    /**
-     * Causes the pushback queue to get populated if it is empty, then
-     * consumes and decodes bytes out of it until one or more bytes are
-     * in the byte queue.  This decoding step performs the actual QP
-     * decoding.
-     *
-     * @throws IOException Underlying stream threw IOException.
-     */
-    private void fillBuffer() throws IOException {
-        byte msdChar = 0;  // first digit of escaped num
-        while (byteq.count() == 0) {
-            if (pushbackq.count() == 0) {
-                populatePushbackQueue();
-                if (pushbackq.count() == 0)
-                    return;
-            }
-
-            byte b = (byte)pushbackq.dequeue();
-
-            switch (state) {
-                case 0:  // start state, no bytes pending
-                    if (b != '=') {
-                        byteq.enqueue(b);
-                        break;  // state remains 0
-                    } else {
-                        state = 1;
-                        break;
-                    }
-                case 1:  // encountered "=" so far
-                    if (b == '\r') {
-                        state = 2;
-                        break;
-                    } else if ((b >= '0' && b <= '9') || (b >= 'A' && b <= 'F') || (b >= 'a' && b <= 'f')) {
-                        state = 3;
-                        msdChar = b;  // save until next digit encountered
-                        break;
-                    } else if (b == '=') {
-                        /*
-                         * Special case when == is encountered.
-                         * Emit one = and stay in this state.
-                         */
-                        if (log.isWarnEnabled()) {
-                            log.warn("Malformed MIME; got ==");
-                        }
-                        byteq.enqueue((byte)'=');
-                        break;
-                    } else {
-                        if (log.isWarnEnabled()) {
-                            log.warn("Malformed MIME; expected \\r or "
-                                    + "[0-9A-Z], got " + b);
-                        }
-                        state = 0;
-                        byteq.enqueue((byte)'=');
-                        byteq.enqueue(b);
-                        break;
-                    }
-                case 2:  // encountered "=\r" so far
-                    if (b == '\n') {
-                        state = 0;
-                        break;
-                    } else {
-                        if (log.isWarnEnabled()) {
-                            log.warn("Malformed MIME; expected " 
-                                    + (int)'\n' + ", got " + b);
-                        }
-                        state = 0;
-                        byteq.enqueue((byte)'=');
-                        byteq.enqueue((byte)'\r');
-                        byteq.enqueue(b);
-                        break;
-                    }
-                case 3:  // encountered =<digit> so far; expecting another <digit> to complete the octet
-                    if ((b >= '0' && b <= '9') || (b >= 'A' && b <= 'F') || (b >= 'a' && b <= 'f')) {
-                        byte msd = asciiCharToNumericValue(msdChar);
-                        byte low = asciiCharToNumericValue(b);
-                        state = 0;
-                        byteq.enqueue((byte)((msd << 4) | low));
-                        break;
-                    } else {
-                        if (log.isWarnEnabled()) {
-                            log.warn("Malformed MIME; expected "
-                                     + "[0-9A-Z], got " + b);
-                        }
-                        state = 0;
-                        byteq.enqueue((byte)'=');
-                        byteq.enqueue(msdChar);
-                        byteq.enqueue(b);
-                        break;
-                    }
-                default:  // should never happen
-                    log.error("Illegal state: " + state);
-                    state = 0;
-                    byteq.enqueue(b);
-                    break;
-            }
-        }
-    }
-
-    /**
-     * Converts '0' => 0, 'A' => 10, etc.
-     * @param c ASCII character value.
-     * @return Numeric value of hexadecimal character.
-     */
-    private byte asciiCharToNumericValue(byte c) {
-        if (c >= '0' && c <= '9') {
-            return (byte)(c - '0');
-        } else if (c >= 'A' && c <= 'Z') {
-            return (byte)(0xA + (c - 'A'));
-        } else if (c >= 'a' && c <= 'z') {
-            return (byte)(0xA + (c - 'a'));
-        } else {
-            /*
-             * This should never happen since all calls to this method
-             * are preceded by a check that c is in [0-9A-Za-z]
-             */
-            throw new IllegalArgumentException((char) c 
-                    + " is not a hexadecimal digit");
-        }
-    }
-
-}
diff --git a/src/org/apache/james/mime4j/decoder/UnboundedFifoByteBuffer.java b/src/org/apache/james/mime4j/decoder/UnboundedFifoByteBuffer.java
deleted file mode 100644
index f01194f..0000000
--- a/src/org/apache/james/mime4j/decoder/UnboundedFifoByteBuffer.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.decoder;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-/**
- * UnboundedFifoByteBuffer is a very efficient buffer implementation.
- * According to performance testing, it exhibits a constant access time, but it
- * also outperforms ArrayList when used for the same purpose.
- * <p>
- * The removal order of an <code>UnboundedFifoByteBuffer</code> is based on the insertion
- * order; elements are removed in the same order in which they were added.
- * The iteration order is the same as the removal order.
- * <p>
- * The {@link #remove()} and {@link #get()} operations perform in constant time.
- * The {@link #add(Object)} operation performs in amortized constant time.  All
- * other operations perform in linear time or worse.
- * <p>
- * Note that this implementation is not synchronized.  The following can be
- * used to provide synchronized access to your <code>UnboundedFifoByteBuffer</code>:
- * <pre>
- *   Buffer fifo = BufferUtils.synchronizedBuffer(new UnboundedFifoByteBuffer());
- * </pre>
- * <p>
- * This buffer prevents null objects from being added.
- *
- * @since Commons Collections 3.0 (previously in main package v2.1)
- * @version $Revision: 1.1 $ $Date: 2004/08/24 06:52:02 $
- *
- * 
- * 
- * 
- * 
- * 
- */
-class UnboundedFifoByteBuffer {
-
-    protected byte[] buffer;
-    protected int head;
-    protected int tail;
-
-    /**
-     * Constructs an UnboundedFifoByteBuffer with the default number of elements.
-     * It is exactly the same as performing the following:
-     *
-     * <pre>
-     *   new UnboundedFifoByteBuffer(32);
-     * </pre>
-     */
-    public UnboundedFifoByteBuffer() {
-        this(32);
-    }
-
-    /**
-     * Constructs an UnboundedFifoByteBuffer with the specified number of elements.
-     * The integer must be a positive integer.
-     *
-     * @param initialSize  the initial size of the buffer
-     * @throws IllegalArgumentException  if the size is less than 1
-     */
-    public UnboundedFifoByteBuffer(int initialSize) {
-        if (initialSize <= 0) {
-            throw new IllegalArgumentException("The size must be greater than 0");
-        }
-        buffer = new byte[initialSize + 1];
-        head = 0;
-        tail = 0;
-    }
-
-    /**
-     * Returns the number of elements stored in the buffer.
-     *
-     * @return this buffer's size
-     */
-    public int size() {
-        int size = 0;
-
-        if (tail < head) {
-            size = buffer.length - head + tail;
-        } else {
-            size = tail - head;
-        }
-
-        return size;
-    }
-
-    /**
-     * Returns true if this buffer is empty; false otherwise.
-     *
-     * @return true if this buffer is empty
-     */
-    public boolean isEmpty() {
-        return (size() == 0);
-    }
-
-    /**
-     * Adds the given element to this buffer.
-     *
-     * @param b  the byte to add
-     * @return true, always
-     */
-    public boolean add(final byte b) {
-
-        if (size() + 1 >= buffer.length) {
-            byte[] tmp = new byte[((buffer.length - 1) * 2) + 1];
-
-            int j = 0;
-            for (int i = head; i != tail;) {
-                tmp[j] = buffer[i];
-                buffer[i] = 0;
-
-                j++;
-                i++;
-                if (i == buffer.length) {
-                    i = 0;
-                }
-            }
-
-            buffer = tmp;
-            head = 0;
-            tail = j;
-        }
-
-        buffer[tail] = b;
-        tail++;
-        if (tail >= buffer.length) {
-            tail = 0;
-        }
-        return true;
-    }
-
-    /**
-     * Returns the next object in the buffer.
-     *
-     * @return the next object in the buffer
-     * @throws BufferUnderflowException  if this buffer is empty
-     */
-    public byte get() {
-        if (isEmpty()) {
-            throw new IllegalStateException("The buffer is already empty");
-        }
-
-        return buffer[head];
-    }
-
-    /**
-     * Removes the next object from the buffer
-     *
-     * @return the removed object
-     * @throws BufferUnderflowException  if this buffer is empty
-     */
-    public byte remove() {
-        if (isEmpty()) {
-            throw new IllegalStateException("The buffer is already empty");
-        }
-
-        byte element = buffer[head];
-
-        head++;
-        if (head >= buffer.length) {
-            head = 0;
-        }
-
-        return element;
-    }
-
-    /**
-     * Increments the internal index.
-     *
-     * @param index  the index to increment
-     * @return the updated index
-     */
-    private int increment(int index) {
-        index++;
-        if (index >= buffer.length) {
-            index = 0;
-        }
-        return index;
-    }
-
-    /**
-     * Decrements the internal index.
-     *
-     * @param index  the index to decrement
-     * @return the updated index
-     */
-    private int decrement(int index) {
-        index--;
-        if (index < 0) {
-            index = buffer.length - 1;
-        }
-        return index;
-    }
-
-    /**
-     * Returns an iterator over this buffer's elements.
-     *
-     * @return an iterator over this buffer's elements
-     */
-    public Iterator iterator() {
-        return new Iterator() {
-
-            private int index = head;
-            private int lastReturnedIndex = -1;
-
-            public boolean hasNext() {
-                return index != tail;
-
-            }
-
-            public Object next() {
-                if (!hasNext()) {
-                    throw new NoSuchElementException();
-                }
-                lastReturnedIndex = index;
-                index = increment(index);
-                return new Byte(buffer[lastReturnedIndex]);
-            }
-
-            public void remove() {
-                if (lastReturnedIndex == -1) {
-                    throw new IllegalStateException();
-                }
-
-                // First element can be removed quickly
-                if (lastReturnedIndex == head) {
-                    UnboundedFifoByteBuffer.this.remove();
-                    lastReturnedIndex = -1;
-                    return;
-                }
-
-                // Other elements require us to shift the subsequent elements
-                int i = lastReturnedIndex + 1;
-                while (i != tail) {
-                    if (i >= buffer.length) {
-                        buffer[i - 1] = buffer[0];
-                        i = 0;
-                    } else {
-                        buffer[i - 1] = buffer[i];
-                        i++;
-                    }
-                }
-
-                lastReturnedIndex = -1;
-                tail = decrement(tail);
-                buffer[tail] = 0;
-                index = decrement(index);
-            }
-
-        };
-    }
-
-}
\ No newline at end of file
diff --git a/src/org/apache/james/mime4j/field/AddressListField.java b/src/org/apache/james/mime4j/field/AddressListField.java
deleted file mode 100644
index df9f398..0000000
--- a/src/org/apache/james/mime4j/field/AddressListField.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field;
-
-//BEGIN android-changed: Stubbing out logging
-import org.apache.james.mime4j.Log;
-import org.apache.james.mime4j.LogFactory;
-//END android-changed
-import org.apache.james.mime4j.field.address.AddressList;
-import org.apache.james.mime4j.field.address.parser.ParseException;
-
-public class AddressListField extends Field {
-    private AddressList addressList;
-    private ParseException parseException;
-
-    protected AddressListField(String name, String body, String raw, AddressList addressList, ParseException parseException) {
-        super(name, body, raw);
-        this.addressList = addressList;
-        this.parseException = parseException;
-    }
-
-    public AddressList getAddressList() {
-        return addressList;
-    }
-
-    public ParseException getParseException() {
-        return parseException;
-    }
-
-    public static class Parser implements FieldParser {
-        private static Log log = LogFactory.getLog(Parser.class);
-
-        public Field parse(final String name, final String body, final String raw) {
-            AddressList addressList = null;
-            ParseException parseException = null;
-            try {
-                addressList = AddressList.parse(body);
-            }
-            catch (ParseException e) {
-                if (log.isDebugEnabled()) {
-                    log.debug("Parsing value '" + body + "': "+ e.getMessage());
-                }
-                parseException = e;
-            }
-            return new AddressListField(name, body, raw, addressList, parseException);
-        }
-    }
-}
diff --git a/src/org/apache/james/mime4j/field/ContentTransferEncodingField.java b/src/org/apache/james/mime4j/field/ContentTransferEncodingField.java
deleted file mode 100644
index 73d8d23..0000000
--- a/src/org/apache/james/mime4j/field/ContentTransferEncodingField.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field;
-
-
-
-/**
- * Represents a <code>Content-Transfer-Encoding</code> field.
- *
- * 
- * @version $Id: ContentTransferEncodingField.java,v 1.2 2004/10/02 12:41:11 ntherning Exp $
- */
-public class ContentTransferEncodingField extends Field {
-    /**
-     * The <code>7bit</code> encoding.
-     */
-    public static final String ENC_7BIT = "7bit";
-    /**
-     * The <code>8bit</code> encoding.
-     */
-    public static final String ENC_8BIT = "8bit";
-    /**
-     * The <code>binary</code> encoding.
-     */
-    public static final String ENC_BINARY = "binary";
-    /**
-     * The <code>quoted-printable</code> encoding.
-     */
-    public static final String ENC_QUOTED_PRINTABLE = "quoted-printable";
-    /**
-     * The <code>base64</code> encoding.
-     */
-    public static final String ENC_BASE64 = "base64";
-    
-    private String encoding;
-    
-    protected ContentTransferEncodingField(String name, String body, String raw, String encoding) {
-        super(name, body, raw);
-        this.encoding = encoding;
-    }
-
-    /**
-     * Gets the encoding defined in this field.
-     * 
-     * @return the encoding or an empty string if not set.
-     */
-    public String getEncoding() {
-        return encoding;
-    }
-    
-    /**
-     * Gets the encoding of the given field if. Returns the default 
-     * <code>7bit</code> if not set or if
-     * <code>f</code> is <code>null</code>.
-     * 
-     * @return the encoding.
-     */
-    public static String getEncoding(ContentTransferEncodingField f) {
-        if (f != null && f.getEncoding().length() != 0) {
-            return f.getEncoding();
-        }
-        return ENC_7BIT;
-    }
-    
-    public static class Parser implements FieldParser {
-        public Field parse(final String name, final String body, final String raw) {
-            final String encoding = body.trim().toLowerCase();
-            return new ContentTransferEncodingField(name, body, raw, encoding);
-        }
-    }
-}
diff --git a/src/org/apache/james/mime4j/field/ContentTypeField.java b/src/org/apache/james/mime4j/field/ContentTypeField.java
deleted file mode 100644
index ad9f7f9..0000000
--- a/src/org/apache/james/mime4j/field/ContentTypeField.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field;
-
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-//BEGIN android-changed: Stubbing out logging
-import org.apache.james.mime4j.Log;
-import org.apache.james.mime4j.LogFactory;
-//END android-changed
-import org.apache.james.mime4j.field.contenttype.parser.ContentTypeParser;
-import org.apache.james.mime4j.field.contenttype.parser.ParseException;
-import org.apache.james.mime4j.field.contenttype.parser.TokenMgrError;
-
-/**
- * Represents a <code>Content-Type</code> field.
- *
- * <p>TODO: Remove dependency on Java 1.4 regexps</p>
- *
- *
- * @version $Id: ContentTypeField.java,v 1.6 2005/01/27 14:16:31 ntherning Exp $
- */
-public class ContentTypeField extends Field {
-
-    /**
-     * The prefix of all <code>multipart</code> MIME types.
-     */
-    public static final String TYPE_MULTIPART_PREFIX = "multipart/";
-    /**
-     * The <code>multipart/digest</code> MIME type.
-     */
-    public static final String TYPE_MULTIPART_DIGEST = "multipart/digest";
-    /**
-     * The <code>text/plain</code> MIME type.
-     */
-    public static final String TYPE_TEXT_PLAIN = "text/plain";
-    /**
-     * The <code>message/rfc822</code> MIME type.
-     */
-    public static final String TYPE_MESSAGE_RFC822 = "message/rfc822";
-    /**
-     * The name of the <code>boundary</code> parameter.
-     */
-    public static final String PARAM_BOUNDARY = "boundary";
-    /**
-     * The name of the <code>charset</code> parameter.
-     */
-    public static final String PARAM_CHARSET = "charset";
-
-    private String mimeType = "";
-    private Map<String, String> parameters = null;
-    private ParseException parseException;
-
-    protected ContentTypeField(String name, String body, String raw, String mimeType, Map<String, String> parameters, ParseException parseException) {
-        super(name, body, raw);
-        this.mimeType = mimeType;
-        this.parameters = parameters;
-        this.parseException = parseException;
-    }
-
-    /**
-     * Gets the exception that was raised during parsing of
-     * the field value, if any; otherwise, null.
-     */
-    public ParseException getParseException() {
-        return parseException;
-    }
-
-    /**
-     * Gets the MIME type defined in this Content-Type field.
-     *
-     * @return the MIME type or an empty string if not set.
-     */
-    public String getMimeType() {
-        return mimeType;
-    }
-
-    /**
-     * Gets the MIME type defined in the child's
-     * Content-Type field or derives a MIME type from the parent
-     * if child is <code>null</code> or hasn't got a MIME type value set.
-     * If child's MIME type is multipart but no boundary
-     * has been set the MIME type of child will be derived from
-     * the parent.
-     *
-     * @param child the child.
-     * @param parent the parent.
-     * @return the MIME type.
-     */
-    public static String getMimeType(ContentTypeField child,
-                                     ContentTypeField parent) {
-
-        if (child == null || child.getMimeType().length() == 0
-                || child.isMultipart() && child.getBoundary() == null) {
-
-            if (parent != null && parent.isMimeType(TYPE_MULTIPART_DIGEST)) {
-                return TYPE_MESSAGE_RFC822;
-            } else {
-                return TYPE_TEXT_PLAIN;
-            }
-        }
-
-        return child.getMimeType();
-    }
-
-    /**
-     * Gets the value of a parameter. Parameter names are case-insensitive.
-     *
-     * @param name the name of the parameter to get.
-     * @return the parameter value or <code>null</code> if not set.
-     */
-    public String getParameter(String name) {
-        return parameters != null
-                    ? parameters.get(name.toLowerCase())
-                    : null;
-    }
-
-    /**
-     * Gets all parameters.
-     *
-     * @return the parameters.
-     */
-    public Map<String, String> getParameters() {
-        if (parameters != null) {
-            return Collections.unmodifiableMap(parameters);
-        }
-        return Collections.emptyMap();
-    }
-
-    /**
-     * Gets the value of the <code>boundary</code> parameter if set.
-     *
-     * @return the <code>boundary</code> parameter value or <code>null</code>
-     *             if not set.
-     */
-    public String getBoundary() {
-        return getParameter(PARAM_BOUNDARY);
-    }
-
-    /**
-     * Gets the value of the <code>charset</code> parameter if set.
-     *
-     * @return the <code>charset</code> parameter value or <code>null</code>
-     *         if not set.
-     */
-    public String getCharset() {
-        return getParameter(PARAM_CHARSET);
-    }
-
-    /**
-     * Gets the value of the <code>charset</code> parameter if set for the
-     * given field. Returns the default <code>us-ascii</code> if not set or if
-     * <code>f</code> is <code>null</code>.
-     *
-     * @return the <code>charset</code> parameter value.
-     */
-    public static String getCharset(ContentTypeField f) {
-        if (f != null) {
-            if (f.getCharset() != null && f.getCharset().length() > 0) {
-                return f.getCharset();
-            }
-        }
-        return "us-ascii";
-    }
-
-    /**
-     * Determines if the MIME type of this field matches the given one.
-     *
-     * @param mimeType the MIME type to match against.
-     * @return <code>true</code> if the MIME type of this field matches,
-     *         <code>false</code> otherwise.
-     */
-    public boolean isMimeType(String mimeType) {
-        return this.mimeType.equalsIgnoreCase(mimeType);
-    }
-
-    /**
-     * Determines if the MIME type of this field is <code>multipart/*</code>.
-     *
-     * @return <code>true</code> if this field is has a <code>multipart/*</code>
-     *         MIME type, <code>false</code> otherwise.
-     */
-    public boolean isMultipart() {
-        return mimeType.startsWith(TYPE_MULTIPART_PREFIX);
-    }
-
-    public static class Parser implements FieldParser {
-        private static Log log = LogFactory.getLog(Parser.class);
-
-        public Field parse(final String name, final String body, final String raw) {
-            ParseException parseException = null;
-            String mimeType = "";
-            Map<String, String> parameters = null;
-
-            ContentTypeParser parser = new ContentTypeParser(new StringReader(body));
-            try {
-                parser.parseAll();
-            }
-            catch (ParseException e) {
-                if (log.isDebugEnabled()) {
-                    log.debug("Parsing value '" + body + "': "+ e.getMessage());
-                }
-                parseException = e;
-            }
-            catch (TokenMgrError e) {
-                if (log.isDebugEnabled()) {
-                    log.debug("Parsing value '" + body + "': "+ e.getMessage());
-                }
-                parseException = new ParseException(e.getMessage());
-            }
-
-            try {
-                final String type = parser.getType();
-                final String subType = parser.getSubType();
-
-                if (type != null && subType != null) {
-                    mimeType = (type + "/" + parser.getSubType()).toLowerCase();
-
-                    ArrayList<String> paramNames = parser.getParamNames();
-                    ArrayList<String> paramValues = parser.getParamValues();
-
-                    if (paramNames != null && paramValues != null) {
-                        for (int i = 0; i < paramNames.size() && i < paramValues.size(); i++) {
-                            if (parameters == null)
-                                parameters = new HashMap<String, String>((int)(paramNames.size() * 1.3 + 1));
-                            String paramName = paramNames.get(i).toLowerCase();
-                            String paramValue = paramValues.get(i);
-                            parameters.put(paramName, paramValue);
-                        }
-                    }
-                }
-            }
-            catch (NullPointerException npe) {
-            }
-            return new ContentTypeField(name, body, raw, mimeType, parameters, parseException);
-        }
-    }
-}
diff --git a/src/org/apache/james/mime4j/field/DateTimeField.java b/src/org/apache/james/mime4j/field/DateTimeField.java
deleted file mode 100644
index 5215534..0000000
--- a/src/org/apache/james/mime4j/field/DateTimeField.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field;
-
-//BEGIN android-changed: Stubbing out logging
-
-import com.android.phone.common.mail.utils.LogUtils;
-
-import org.apache.james.mime4j.Log;
-import org.apache.james.mime4j.LogFactory;
-//END
-import org.apache.james.mime4j.field.datetime.DateTime;
-import org.apache.james.mime4j.field.datetime.parser.ParseException;
-
-import java.util.Date;
-
-public class DateTimeField extends Field {
-    private Date date;
-    private ParseException parseException;
-
-    protected DateTimeField(String name, String body, String raw, Date date, ParseException parseException) {
-        super(name, body, raw);
-        this.date = date;
-        this.parseException = parseException;
-    }
-
-    public Date getDate() {
-        return date;
-    }
-
-    public ParseException getParseException() {
-        return parseException;
-    }
-
-    public static class Parser implements FieldParser {
-        private static Log log = LogFactory.getLog(Parser.class);
-
-        public Field parse(final String name, String body, final String raw) {
-            Date date = null;
-            ParseException parseException = null;
-            //BEGIN android-changed
-            body = LogUtils.cleanUpMimeDate(body);
-            //END android-changed
-            try {
-                date = DateTime.parse(body).getDate();
-            }
-            catch (ParseException e) {
-                if (log.isDebugEnabled()) {
-                    log.debug("Parsing value '" + body + "': "+ e.getMessage());
-                }
-                parseException = e;
-            }
-            return new DateTimeField(name, body, raw, date, parseException);
-        }
-    }
-}
diff --git a/src/org/apache/james/mime4j/field/DefaultFieldParser.java b/src/org/apache/james/mime4j/field/DefaultFieldParser.java
deleted file mode 100644
index 3695afe..0000000
--- a/src/org/apache/james/mime4j/field/DefaultFieldParser.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *  Copyright 2006 the mime4j 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 org.apache.james.mime4j.field;
-
-public class DefaultFieldParser extends DelegatingFieldParser {
-    
-    public DefaultFieldParser() {
-        setFieldParser(Field.CONTENT_TRANSFER_ENCODING, new ContentTransferEncodingField.Parser());
-        setFieldParser(Field.CONTENT_TYPE, new ContentTypeField.Parser());
-        
-        final DateTimeField.Parser dateTimeParser = new DateTimeField.Parser();
-        setFieldParser(Field.DATE, dateTimeParser);
-        setFieldParser(Field.RESENT_DATE, dateTimeParser);
-        
-        final MailboxListField.Parser mailboxListParser = new MailboxListField.Parser();
-        setFieldParser(Field.FROM, mailboxListParser);
-        setFieldParser(Field.RESENT_FROM, mailboxListParser);
-        
-        final MailboxField.Parser mailboxParser = new MailboxField.Parser();
-        setFieldParser(Field.SENDER, mailboxParser);
-        setFieldParser(Field.RESENT_SENDER, mailboxParser);
-        
-        final AddressListField.Parser addressListParser = new AddressListField.Parser();
-        setFieldParser(Field.TO, addressListParser);
-        setFieldParser(Field.RESENT_TO, addressListParser);
-        setFieldParser(Field.CC, addressListParser);
-        setFieldParser(Field.RESENT_CC, addressListParser);
-        setFieldParser(Field.BCC, addressListParser);
-        setFieldParser(Field.RESENT_BCC, addressListParser);
-        setFieldParser(Field.REPLY_TO, addressListParser);
-    }
-}
diff --git a/src/org/apache/james/mime4j/field/DelegatingFieldParser.java b/src/org/apache/james/mime4j/field/DelegatingFieldParser.java
deleted file mode 100644
index 32b69ec..0000000
--- a/src/org/apache/james/mime4j/field/DelegatingFieldParser.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *  Copyright 2006 the mime4j 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 org.apache.james.mime4j.field;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class DelegatingFieldParser implements FieldParser {
-
-    private Map<String, FieldParser> parsers = new HashMap<String, FieldParser>();
-    private FieldParser defaultParser = new UnstructuredField.Parser();
-
-    /**
-     * Sets the parser used for the field named <code>name</code>.
-     * @param name the name of the field
-     * @param parser the parser for fields named <code>name</code>
-     */
-    public void setFieldParser(final String name, final FieldParser parser) {
-        parsers.put(name.toLowerCase(), parser);
-    }
-
-    public FieldParser getParser(final String name) {
-        final FieldParser field = parsers.get(name.toLowerCase());
-        if(field==null) {
-            return defaultParser;
-        }
-        return field;
-    }
-
-    public Field parse(final String name, final String body, final String raw) {
-        final FieldParser parser = getParser(name);
-        return parser.parse(name, body, raw);
-    }
-}
diff --git a/src/org/apache/james/mime4j/field/Field.java b/src/org/apache/james/mime4j/field/Field.java
deleted file mode 100644
index 4dea5c5..0000000
--- a/src/org/apache/james/mime4j/field/Field.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * The base class of all field classes.
- *
- * 
- * @version $Id: Field.java,v 1.6 2004/10/25 07:26:46 ntherning Exp $
- */
-public abstract class Field {
-    public static final String SENDER = "Sender";
-    public static final String FROM = "From";
-    public static final String TO = "To";
-    public static final String CC = "Cc";
-    public static final String BCC = "Bcc";
-    public static final String REPLY_TO = "Reply-To";
-    public static final String RESENT_SENDER = "Resent-Sender";
-    public static final String RESENT_FROM = "Resent-From";
-    public static final String RESENT_TO = "Resent-To";
-    public static final String RESENT_CC = "Resent-Cc";
-    public static final String RESENT_BCC = "Resent-Bcc";
-
-    public static final String DATE = "Date";
-    public static final String RESENT_DATE = "Resent-Date";
-
-    public static final String SUBJECT = "Subject";
-    public static final String CONTENT_TYPE = "Content-Type";
-    public static final String CONTENT_TRANSFER_ENCODING = 
-                                        "Content-Transfer-Encoding";
-    
-    private static final String FIELD_NAME_PATTERN = 
-        "^([\\x21-\\x39\\x3b-\\x7e]+)[ \t]*:";
-    private static final Pattern fieldNamePattern = 
-        Pattern.compile(FIELD_NAME_PATTERN);
-        
-    private static final DefaultFieldParser parser = new DefaultFieldParser();
-    
-    private final String name;
-    private final String body;
-    private final String raw;
-    
-    protected Field(final String name, final String body, final String raw) {
-        this.name = name;
-        this.body = body;
-        this.raw = raw;
-    }
-    
-    /**
-     * Parses the given string and returns an instance of the 
-     * <code>Field</code> class. The type of the class returned depends on
-     * the field name:
-     * <table>
-     *      <tr>
-     *          <td><em>Field name</em></td><td><em>Class returned</em></td>
-     *          <td>Content-Type</td><td>org.apache.james.mime4j.field.ContentTypeField</td>
-     *          <td>other</td><td>org.apache.james.mime4j.field.UnstructuredField</td>
-     *      </tr>
-     * </table>
-     * 
-     * @param s the string to parse.
-     * @return a <code>Field</code> instance.
-     * @throws IllegalArgumentException on parse errors.
-     */
-    public static Field parse(final String raw) {
-        
-        /*
-         * Unfold the field.
-         */
-        final String unfolded = raw.replaceAll("\r|\n", "");
-        
-        /*
-         * Split into name and value.
-         */
-        final Matcher fieldMatcher = fieldNamePattern.matcher(unfolded);
-        if (!fieldMatcher.find()) {
-            throw new IllegalArgumentException("Invalid field in string");
-        }
-        final String name = fieldMatcher.group(1);
-        
-        String body = unfolded.substring(fieldMatcher.end());
-        if (body.length() > 0 && body.charAt(0) == ' ') {
-            body = body.substring(1);
-        }
-        
-        return parser.parse(name, body, raw);
-    }
-    
-    /**
-     * Gets the default parser used to parse fields.
-     * @return the default field parser
-     */
-    public static DefaultFieldParser getParser() {
-        return parser;
-    }
-    
-    /**
-     * Gets the name of the field (<code>Subject</code>, 
-     * <code>From</code>, etc).
-     * 
-     * @return the field name.
-     */
-    public String getName() {
-        return name;
-    }
-    
-    /**
-     * Gets the original raw field string.
-     * 
-     * @return the original raw field string.
-     */
-    public String getRaw() {
-        return raw;
-    }
-    
-    /**
-     * Gets the unfolded, unparsed and possibly encoded (see RFC 2047) field 
-     * body string.
-     * 
-     * @return the unfolded unparsed field body string.
-     */
-    public String getBody() {
-        return body;
-    }
-    
-    /**
-     * Determines if this is a <code>Content-Type</code> field.
-     * 
-     * @return <code>true</code> if this is a <code>Content-Type</code> field,
-     *         <code>false</code> otherwise.
-     */
-    public boolean isContentType() {
-        return CONTENT_TYPE.equalsIgnoreCase(name);
-    }
-    
-    /**
-     * Determines if this is a <code>Subject</code> field.
-     * 
-     * @return <code>true</code> if this is a <code>Subject</code> field,
-     *         <code>false</code> otherwise.
-     */
-    public boolean isSubject() {
-        return SUBJECT.equalsIgnoreCase(name);
-    }
-    
-    /**
-     * Determines if this is a <code>From</code> field.
-     * 
-     * @return <code>true</code> if this is a <code>From</code> field,
-     *         <code>false</code> otherwise.
-     */
-    public boolean isFrom() {
-        return FROM.equalsIgnoreCase(name);
-    }
-    
-    /**
-     * Determines if this is a <code>To</code> field.
-     * 
-     * @return <code>true</code> if this is a <code>To</code> field,
-     *         <code>false</code> otherwise.
-     */
-    public boolean isTo() {
-        return TO.equalsIgnoreCase(name);
-    }
-    
-    /**
-     * @see #getRaw()
-     */
-    public String toString() {
-        return raw;
-    }
-}
diff --git a/src/org/apache/james/mime4j/field/FieldParser.java b/src/org/apache/james/mime4j/field/FieldParser.java
deleted file mode 100644
index 78aaf13..0000000
--- a/src/org/apache/james/mime4j/field/FieldParser.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- *  Copyright 2006 the mime4j 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 org.apache.james.mime4j.field;
-
-public interface FieldParser {
-    
-    Field parse(final String name, final String body, final String raw);
-}
diff --git a/src/org/apache/james/mime4j/field/MailboxField.java b/src/org/apache/james/mime4j/field/MailboxField.java
deleted file mode 100644
index f159800..0000000
--- a/src/org/apache/james/mime4j/field/MailboxField.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field;
-
-//BEGIN android-changed: Stubbing out logging
-import org.apache.james.mime4j.Log;
-import org.apache.james.mime4j.LogFactory;
-//END android-changed
-import org.apache.james.mime4j.field.address.AddressList;
-import org.apache.james.mime4j.field.address.Mailbox;
-import org.apache.james.mime4j.field.address.MailboxList;
-import org.apache.james.mime4j.field.address.parser.ParseException;
-
-public class MailboxField extends Field {
-    private final Mailbox mailbox;
-    private final ParseException parseException;
-
-    protected MailboxField(final String name, final String body, final String raw, final Mailbox mailbox, final ParseException parseException) {
-        super(name, body, raw);
-        this.mailbox = mailbox;
-        this.parseException = parseException;
-    }
-
-    public Mailbox getMailbox() {
-        return mailbox;
-    }
-
-    public ParseException getParseException() {
-        return parseException;
-    }
-    
-    public static class Parser implements FieldParser {
-        private static Log log = LogFactory.getLog(Parser.class);
-
-        public Field parse(final String name, final String body, final String raw) {
-            Mailbox mailbox = null;
-            ParseException parseException = null;
-            try {
-                MailboxList mailboxList = AddressList.parse(body).flatten();
-                if (mailboxList.size() > 0) {
-                    mailbox = mailboxList.get(0);
-                }
-            }
-            catch (ParseException e) {
-                if (log.isDebugEnabled()) {
-                    log.debug("Parsing value '" + body + "': "+ e.getMessage());
-                }
-                parseException = e;
-            }
-            return new MailboxField(name, body, raw, mailbox, parseException);
-        }
-    }
-}
diff --git a/src/org/apache/james/mime4j/field/MailboxListField.java b/src/org/apache/james/mime4j/field/MailboxListField.java
deleted file mode 100644
index 23378d4..0000000
--- a/src/org/apache/james/mime4j/field/MailboxListField.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field;
-
-//BEGIN android-changed: Stubbing out logging
-import org.apache.james.mime4j.Log;
-import org.apache.james.mime4j.LogFactory;
-//END android-changed
-import org.apache.james.mime4j.field.address.AddressList;
-import org.apache.james.mime4j.field.address.MailboxList;
-import org.apache.james.mime4j.field.address.parser.ParseException;
-
-public class MailboxListField extends Field {
-    
-    private MailboxList mailboxList;
-    private ParseException parseException;
-
-    protected MailboxListField(final String name, final String body, final String raw, final MailboxList mailboxList, final ParseException parseException) {
-        super(name, body, raw);
-        this.mailboxList = mailboxList;
-        this.parseException = parseException;
-    }
-
-    public MailboxList getMailboxList() {
-        return mailboxList;
-    }
-
-    public ParseException getParseException() {
-        return parseException;
-    }
-    
-    public static class Parser implements FieldParser {
-        private static Log log = LogFactory.getLog(Parser.class);
-
-        public Field parse(final String name, final String body, final String raw) {
-            MailboxList mailboxList = null;
-            ParseException parseException = null;
-            try {
-                mailboxList = AddressList.parse(body).flatten();
-            }
-            catch (ParseException e) {
-                if (log.isDebugEnabled()) {
-                    log.debug("Parsing value '" + body + "': "+ e.getMessage());
-                }
-                parseException = e;
-            }
-            return new MailboxListField(name, body, raw, mailboxList, parseException);
-        }
-    }
-}
diff --git a/src/org/apache/james/mime4j/field/UnstructuredField.java b/src/org/apache/james/mime4j/field/UnstructuredField.java
deleted file mode 100644
index 6084e44..0000000
--- a/src/org/apache/james/mime4j/field/UnstructuredField.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field;
-
-import org.apache.james.mime4j.decoder.DecoderUtil;
-
-
-/**
- * Simple unstructured field such as <code>Subject</code>.
- *
- * 
- * @version $Id: UnstructuredField.java,v 1.3 2004/10/25 07:26:46 ntherning Exp $
- */
-public class UnstructuredField extends Field {
-    private String value;
-    
-    protected UnstructuredField(String name, String body, String raw, String value) {
-        super(name, body, raw);
-        this.value = value;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public static class Parser implements FieldParser {
-        public Field parse(final String name, final String body, final String raw) {
-            final String value = DecoderUtil.decodeEncodedWords(body);
-            return new UnstructuredField(name, body, raw, value);
-        }
-    }
-}
diff --git a/src/org/apache/james/mime4j/field/address/Address.java b/src/org/apache/james/mime4j/field/address/Address.java
deleted file mode 100644
index 3e24e91..0000000
--- a/src/org/apache/james/mime4j/field/address/Address.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field.address;
-
-import java.util.ArrayList;
-
-/**
- * The abstract base for classes that represent RFC2822 addresses.
- * This includes groups and mailboxes.
- *
- * Currently, no public methods are introduced on this class.
- *
- *
- */
-public abstract class Address {
-
-	/**
-	 * Adds any mailboxes represented by this address
-	 * into the given ArrayList. Note that this method
-	 * has default (package) access, so a doAddMailboxesTo
-	 * method is needed to allow the behavior to be
-	 * overridden by subclasses.
-	 */
-	final void addMailboxesTo(ArrayList<Address> results) {
-		doAddMailboxesTo(results);
-	}
-
-	/**
-	 * Adds any mailboxes represented by this address
-	 * into the given ArrayList. Must be overridden by
-	 * concrete subclasses.
-	 */
-	protected abstract void doAddMailboxesTo(ArrayList<Address> results);
-
-}
diff --git a/src/org/apache/james/mime4j/field/address/AddressList.java b/src/org/apache/james/mime4j/field/address/AddressList.java
deleted file mode 100644
index 1829e79..0000000
--- a/src/org/apache/james/mime4j/field/address/AddressList.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field.address;
-
-import org.apache.james.mime4j.field.address.parser.AddressListParser;
-import org.apache.james.mime4j.field.address.parser.ParseException;
-
-import java.io.StringReader;
-import java.util.ArrayList;
-
-/**
- * An immutable, random-access list of Address objects.
- *
- *
- */
-public class AddressList {
-
-	private ArrayList<Address> addresses;
-
-	/**
-	 * @param addresses An ArrayList that contains only Address objects.
-	 * @param dontCopy true iff it is not possible for the addresses ArrayList to be modified by someone else.
-	 */
-	public AddressList(ArrayList<Address> addresses, boolean dontCopy) {
-		if (addresses != null)
-			this.addresses = (dontCopy ? addresses : new ArrayList<Address>(addresses));
-		else
-			this.addresses = new ArrayList<Address>(0);
-	}
-
-	/**
-	 * The number of elements in this list.
-	 */
-	public int size() {
-		return addresses.size();
-	}
-
-	/**
-	 * Gets an address.
-	 */
-	public Address get(int index) {
-		if (0 > index || size() <= index)
-			throw new IndexOutOfBoundsException();
-		return addresses.get(index);
-	}
-
-	/**
-	 * Returns a flat list of all mailboxes represented
-	 * in this address list. Use this if you don't care
-	 * about grouping.
-	 */
-	public MailboxList flatten() {
-		// in the common case, all addresses are mailboxes
-		boolean groupDetected = false;
-		for (int i = 0; i < size(); i++) {
-			if (!(get(i) instanceof Mailbox)) {
-				groupDetected = true;
-				break;
-			}
-		}
-
-		if (!groupDetected)
-			return new MailboxList(addresses, true);
-
-		ArrayList<Address> results = new ArrayList<Address>();
-		for (int i = 0; i < size(); i++) {
-			Address addr = get(i);
-			addr.addMailboxesTo(results);
-		}
-
-		// copy-on-construct this time, because subclasses
-		// could have held onto a reference to the results
-		return new MailboxList(results, false);
-	}
-
-	/**
-	 * Dumps a representation of this address list to
-	 * stdout, for debugging purposes.
-	 */
-	public void print() {
-		for (int i = 0; i < size(); i++) {
-			Address addr = get(i);
-			System.out.println(addr.toString());
-		}
-	}
-
-	/**
-	 * Parse the address list string, such as the value
-	 * of a From, To, Cc, Bcc, Sender, or Reply-To
-	 * header.
-	 *
-	 * The string MUST be unfolded already.
-	 */
-	public static AddressList parse(String rawAddressList) throws ParseException {
-		AddressListParser parser = new AddressListParser(new StringReader(rawAddressList));
-		return Builder.getInstance().buildAddressList(parser.parse());
-	}
-
-	/**
-	 * Test console.
-	 */
-	public static void main(String[] args) throws Exception {
-		java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.InputStreamReader(System.in));
-		while (true) {
-			try {
-				System.out.print("> ");
-				String line = reader.readLine();
-				if (line.length() == 0 || line.toLowerCase().equals("exit") || line.toLowerCase().equals("quit")) {
-					System.out.println("Goodbye.");
-					return;
-				}
-				AddressList list = parse(line);
-				list.print();
-			}
-			catch(Exception e) {
-				e.printStackTrace();
-				Thread.sleep(300);
-			}
-		}
-	}
-}
diff --git a/src/org/apache/james/mime4j/field/address/Builder.java b/src/org/apache/james/mime4j/field/address/Builder.java
deleted file mode 100644
index 3bcd15b..0000000
--- a/src/org/apache/james/mime4j/field/address/Builder.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field.address;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.apache.james.mime4j.decoder.DecoderUtil;
-import org.apache.james.mime4j.field.address.parser.ASTaddr_spec;
-import org.apache.james.mime4j.field.address.parser.ASTaddress;
-import org.apache.james.mime4j.field.address.parser.ASTaddress_list;
-import org.apache.james.mime4j.field.address.parser.ASTangle_addr;
-import org.apache.james.mime4j.field.address.parser.ASTdomain;
-import org.apache.james.mime4j.field.address.parser.ASTgroup_body;
-import org.apache.james.mime4j.field.address.parser.ASTlocal_part;
-import org.apache.james.mime4j.field.address.parser.ASTmailbox;
-import org.apache.james.mime4j.field.address.parser.ASTname_addr;
-import org.apache.james.mime4j.field.address.parser.ASTphrase;
-import org.apache.james.mime4j.field.address.parser.ASTroute;
-import org.apache.james.mime4j.field.address.parser.Node;
-import org.apache.james.mime4j.field.address.parser.SimpleNode;
-import org.apache.james.mime4j.field.address.parser.Token;
-
-/**
- * Transforms the JJTree-generated abstract syntax tree
- * into a graph of org.apache.james.mime4j.field.address objects.
- *
- *
- */
-class Builder {
-
-	private static Builder singleton = new Builder();
-
-	public static Builder getInstance() {
-		return singleton;
-	}
-
-
-
-	public AddressList buildAddressList(ASTaddress_list node) {
-		ArrayList<Address> list = new ArrayList<Address>();
-		for (int i = 0; i < node.jjtGetNumChildren(); i++) {
-			ASTaddress childNode = (ASTaddress) node.jjtGetChild(i);
-			Address address = buildAddress(childNode);
-			list.add(address);
-		}
-		return new AddressList(list, true);
-	}
-
-	private Address buildAddress(ASTaddress node) {
-		ChildNodeIterator it = new ChildNodeIterator(node);
-		Node n = it.nextNode();
-		if (n instanceof ASTaddr_spec) {
-			return buildAddrSpec((ASTaddr_spec)n);
-		}
-		else if (n instanceof ASTangle_addr) {
-			return buildAngleAddr((ASTangle_addr)n);
-		}
-		else if (n instanceof ASTphrase) {
-			String name = buildString((ASTphrase)n, false);
-			Node n2 = it.nextNode();
-			if (n2 instanceof ASTgroup_body) {
-				return new Group(name, buildGroupBody((ASTgroup_body)n2));
-			}
-			else if (n2 instanceof ASTangle_addr) {
-                name = DecoderUtil.decodeEncodedWords(name);
-				return new NamedMailbox(name, buildAngleAddr((ASTangle_addr)n2));
-			}
-			else {
-				throw new IllegalStateException();
-			}
-		}
-		else {
-			throw new IllegalStateException();
-		}
-	}
-
-
-
-	private MailboxList buildGroupBody(ASTgroup_body node) {
-		ArrayList<Address> results = new ArrayList<Address>();
-		ChildNodeIterator it = new ChildNodeIterator(node);
-		while (it.hasNext()) {
-			Node n = it.nextNode();
-			if (n instanceof ASTmailbox)
-				results.add(buildMailbox((ASTmailbox)n));
-			else
-				throw new IllegalStateException();
-		}
-		return new MailboxList(results, true);
-	}
-
-	private Mailbox buildMailbox(ASTmailbox node) {
-		ChildNodeIterator it = new ChildNodeIterator(node);
-		Node n = it.nextNode();
-		if (n instanceof ASTaddr_spec) {
-			return buildAddrSpec((ASTaddr_spec)n);
-		}
-		else if (n instanceof ASTangle_addr) {
-			return buildAngleAddr((ASTangle_addr)n);
-		}
-		else if (n instanceof ASTname_addr) {
-			return buildNameAddr((ASTname_addr)n);
-		}
-		else {
-			throw new IllegalStateException();
-		}
-	}
-
-	private NamedMailbox buildNameAddr(ASTname_addr node) {
-		ChildNodeIterator it = new ChildNodeIterator(node);
-		Node n = it.nextNode();
-		String name;
-		if (n instanceof ASTphrase) {
-			name = buildString((ASTphrase)n, false);
-		}
-		else {
-			throw new IllegalStateException();
-		}
-
-		n = it.nextNode();
-		if (n instanceof ASTangle_addr) {
-            name = DecoderUtil.decodeEncodedWords(name);
-			return new NamedMailbox(name, buildAngleAddr((ASTangle_addr) n));
-		}
-		else {
-			throw new IllegalStateException();
-		}
-	}
-
-	private Mailbox buildAngleAddr(ASTangle_addr node) {
-		ChildNodeIterator it = new ChildNodeIterator(node);
-		DomainList route = null;
-		Node n = it.nextNode();
-		if (n instanceof ASTroute) {
-			route = buildRoute((ASTroute)n);
-			n = it.nextNode();
-		}
-		else if (n instanceof ASTaddr_spec)
-			; // do nothing
-		else
-			throw new IllegalStateException();
-
-		if (n instanceof ASTaddr_spec)
-			return buildAddrSpec(route, (ASTaddr_spec)n);
-		else
-			throw new IllegalStateException();
-	}
-
-	private DomainList buildRoute(ASTroute node) {
-		ArrayList<String> results = new ArrayList<String>(node.jjtGetNumChildren());
-		ChildNodeIterator it = new ChildNodeIterator(node);
-		while (it.hasNext()) {
-			Node n = it.nextNode();
-			if (n instanceof ASTdomain)
-				results.add(buildString((ASTdomain)n, true));
-			else
-				throw new IllegalStateException();
-		}
-		return new DomainList(results, true);
-	}
-
-	private Mailbox buildAddrSpec(ASTaddr_spec node) {
-		return buildAddrSpec(null, node);
-	}
-	private Mailbox buildAddrSpec(DomainList route, ASTaddr_spec node) {
-		ChildNodeIterator it = new ChildNodeIterator(node);
-		String localPart = buildString((ASTlocal_part)it.nextNode(), true);
-		String domain = buildString((ASTdomain)it.nextNode(), true);
-		return new Mailbox(route, localPart, domain);
-	}
-
-
-	private String buildString(SimpleNode node, boolean stripSpaces) {
-		Token head = node.firstToken;
-		Token tail = node.lastToken;
-		StringBuffer out = new StringBuffer();
-
-		while (head != tail) {
-			out.append(head.image);
-			head = head.next;
-			if (!stripSpaces)
-				addSpecials(out, head.specialToken);
-		}
-		out.append(tail.image);
-
-		return out.toString();
-	}
-
-	private void addSpecials(StringBuffer out, Token specialToken) {
-		if (specialToken != null) {
-			addSpecials(out, specialToken.specialToken);
-			out.append(specialToken.image);
-		}
-	}
-
-	private static class ChildNodeIterator implements Iterator<Node> {
-
-		private SimpleNode simpleNode;
-		private int index;
-		private int len;
-
-		public ChildNodeIterator(SimpleNode simpleNode) {
-			this.simpleNode = simpleNode;
-			this.len = simpleNode.jjtGetNumChildren();
-			this.index = 0;
-		}
-
-		public void remove() {
-			throw new UnsupportedOperationException();
-		}
-
-		public boolean hasNext() {
-			return index < len;
-		}
-
-		public Node next() {
-			return nextNode();
-		}
-
-		public Node nextNode() {
-			return simpleNode.jjtGetChild(index++);
-		}
-
-	}
-}
diff --git a/src/org/apache/james/mime4j/field/address/DomainList.java b/src/org/apache/james/mime4j/field/address/DomainList.java
deleted file mode 100644
index 49b0f3b..0000000
--- a/src/org/apache/james/mime4j/field/address/DomainList.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field.address;
-
-import java.util.ArrayList;
-
-/**
- * An immutable, random-access list of Strings (that
- * are supposedly domain names or domain literals).
- *
- *
- */
-public class DomainList {
-	private ArrayList<String> domains;
-
-	/**
-	 * @param domains An ArrayList that contains only String objects.
-	 * @param dontCopy true iff it is not possible for the domains ArrayList to be modified by someone else.
-	 */
-	public DomainList(ArrayList<String> domains, boolean dontCopy) {
-		if (domains != null)
-			this.domains = (dontCopy ? domains : new ArrayList<String>(domains));
-		else
-			this.domains = new ArrayList<String>(0);
-	}
-
-	/**
-	 * The number of elements in this list.
-	 */
-	public int size() {
-		return domains.size();
-	}
-
-	/**
-	 * Gets the domain name or domain literal at the
-	 * specified index.
-	 * @throws IndexOutOfBoundsException If index is &lt; 0 or &gt;= size().
-	 */
-	public String get(int index) {
-		if (0 > index || size() <= index)
-			throw new IndexOutOfBoundsException();
-		return domains.get(index);
-	}
-
-	/**
-	 * Returns the list of domains formatted as a route
-	 * string (not including the trailing ':').
-	 */
-	public String toRouteString() {
-		StringBuffer out = new StringBuffer();
-		for (int i = 0; i < domains.size(); i++) {
-			out.append("@");
-			out.append(get(i));
-			if (i + 1 < domains.size())
-				out.append(",");
-		}
-		return out.toString();
-	}
-}
diff --git a/src/org/apache/james/mime4j/field/address/Group.java b/src/org/apache/james/mime4j/field/address/Group.java
deleted file mode 100644
index c0ab7f7..0000000
--- a/src/org/apache/james/mime4j/field/address/Group.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field.address;
-
-import java.util.ArrayList;
-
-/**
- * A named group of zero or more mailboxes.
- *
- *
- */
-public class Group extends Address {
-	private String name;
-	private MailboxList mailboxList;
-
-	/**
-	 * @param name The group name.
-	 * @param mailboxes The mailboxes in this group.
-	 */
-	public Group(String name, MailboxList mailboxes) {
-		this.name = name;
-		this.mailboxList = mailboxes;
-	}
-
-	/**
-	 * Returns the group name.
-	 */
-	public String getName() {
-		return name;
-	}
-
-	/**
-	 * Returns the mailboxes in this group.
-	 */
-	public MailboxList getMailboxes() {
-		return mailboxList;
-	}
-
-	@Override
-	public String toString() {
-		StringBuffer buf = new StringBuffer();
-		buf.append(name);
-		buf.append(":");
-		for (int i = 0; i < mailboxList.size(); i++) {
-			buf.append(mailboxList.get(i).toString());
-			if (i + 1 < mailboxList.size())
-				buf.append(",");
-		}
-		buf.append(";");
-		return buf.toString();
-	}
-
-	@Override
-	protected void doAddMailboxesTo(ArrayList<Address> results) {
-		for (int i = 0; i < mailboxList.size(); i++)
-			results.add(mailboxList.get(i));
-	}
-}
diff --git a/src/org/apache/james/mime4j/field/address/Mailbox.java b/src/org/apache/james/mime4j/field/address/Mailbox.java
deleted file mode 100644
index 25f2548..0000000
--- a/src/org/apache/james/mime4j/field/address/Mailbox.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field.address;
-
-import java.util.ArrayList;
-
-/**
- * Represents a single e-mail address.
- *
- *
- */
-public class Mailbox extends Address {
-	private DomainList route;
-	private String localPart;
-	private String domain;
-
-	/**
-	 * Creates a mailbox without a route. Routes are obsolete.
-	 * @param localPart The part of the e-mail address to the left of the "@".
-	 * @param domain The part of the e-mail address to the right of the "@".
-	 */
-	public Mailbox(String localPart, String domain) {
-		this(null, localPart, domain);
-	}
-
-	/**
-	 * Creates a mailbox with a route. Routes are obsolete.
-	 * @param route The zero or more domains that make up the route. Can be null.
-	 * @param localPart The part of the e-mail address to the left of the "@".
-	 * @param domain The part of the e-mail address to the right of the "@".
-	 */
-	public Mailbox(DomainList route, String localPart, String domain) {
-		this.route = route;
-		this.localPart = localPart;
-		this.domain = domain;
-	}
-
-	/**
-	 * Returns the route list.
-	 */
-	public DomainList getRoute() {
-		return route;
-	}
-
-	/**
-	 * Returns the left part of the e-mail address
-	 * (before "@").
-	 */
-	public String getLocalPart() {
-		return localPart;
-	}
-
-	/**
-	 * Returns the right part of the e-mail address
-	 * (after "@").
-	 */
-	public String getDomain() {
-		return domain;
-	}
-
-	/**
-	 * Formats the address as a string, not including
-	 * the route.
-	 *
-	 * @see #getAddressString(boolean)
-	 */
-	public String getAddressString() {
-		return getAddressString(false);
-	}
-
-	/**
-	 * Note that this value may not be usable
-	 * for transport purposes, only display purposes.
-	 *
-	 * For example, if the unparsed address was
-	 *
-	 *   <"Joe Cheng"@joecheng.com>
-	 *
-	 * this method would return
-	 *
-	 *   <Joe Cheng@joecheng.com>
-	 *
-	 * which is not valid for transport; the local part
-	 * would need to be re-quoted.
-	 *
-	 * @param includeRoute true if the route should be included if it exists.
-	 */
-	public String getAddressString(boolean includeRoute) {
-		return "<" + (!includeRoute || route == null ? "" : route.toRouteString() + ":")
-			+ localPart
-			+ (domain == null ? "" : "@")
-			+ domain + ">";
-	}
-
-	@Override
-	protected final void doAddMailboxesTo(ArrayList<Address> results) {
-		results.add(this);
-	}
-
-	@Override
-	public String toString() {
-		return getAddressString();
-	}
-}
diff --git a/src/org/apache/james/mime4j/field/address/MailboxList.java b/src/org/apache/james/mime4j/field/address/MailboxList.java
deleted file mode 100644
index 2c9efb3..0000000
--- a/src/org/apache/james/mime4j/field/address/MailboxList.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field.address;
-
-import java.util.ArrayList;
-
-/**
- * An immutable, random-access list of Mailbox objects.
- *
- *
- */
-public class MailboxList {
-
-	private ArrayList<Address> mailboxes;
-
-	/**
-	 * @param mailboxes An ArrayList that contains only Mailbox objects.
-	 * @param dontCopy true iff it is not possible for the mailboxes ArrayList to be modified by someone else.
-	 */
-	public MailboxList(ArrayList<Address> mailboxes, boolean dontCopy) {
-		if (mailboxes != null)
-			this.mailboxes = (dontCopy ? mailboxes : new ArrayList<Address>(mailboxes));
-		else
-			this.mailboxes = new ArrayList<Address>(0);
-	}
-
-	/**
-	 * The number of elements in this list.
-	 */
-	public int size() {
-		return mailboxes.size();
-	}
-
-	/**
-	 * Gets an address.
-	 */
-	public Mailbox get(int index) {
-		if (0 > index || size() <= index)
-			throw new IndexOutOfBoundsException();
-		return (Mailbox)mailboxes.get(index);
-	}
-
-	/**
-	 * Dumps a representation of this mailbox list to
-	 * stdout, for debugging purposes.
-	 */
-	public void print() {
-		for (int i = 0; i < size(); i++) {
-			Mailbox mailbox = get(i);
-			System.out.println(mailbox.toString());
-		}
-	}
-
-}
diff --git a/src/org/apache/james/mime4j/field/address/NamedMailbox.java b/src/org/apache/james/mime4j/field/address/NamedMailbox.java
deleted file mode 100644
index 4b83060..0000000
--- a/src/org/apache/james/mime4j/field/address/NamedMailbox.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field.address;
-
-/**
- * A Mailbox that has a name/description.
- *
- *
- */
-public class NamedMailbox extends Mailbox {
-	private String name;
-
-	/**
-	 * @see Mailbox#Mailbox(String, String)
-	 */
-	public NamedMailbox(String name, String localPart, String domain) {
-		super(localPart, domain);
-		this.name = name;
-	}
-
-	/**
-	 * @see Mailbox#Mailbox(DomainList, String, String)
-	 */
-	public NamedMailbox(String name, DomainList route, String localPart, String domain) {
-		super(route, localPart, domain);
-		this.name = name;
-	}
-
-	/**
-	 * Creates a named mailbox based on an unnamed mailbox.
-	 */
-	public NamedMailbox(String name, Mailbox baseMailbox) {
-		super(baseMailbox.getRoute(), baseMailbox.getLocalPart(), baseMailbox.getDomain());
-		this.name = name;
-	}
-
-	/**
-	 * Returns the name of the mailbox.
-	 */
-	public String getName() {
-		return this.name;
-	}
-
-	/**
-	 * Same features (or problems) as Mailbox.getAddressString(boolean),
-	 * only more so.
-	 *
-	 * @see Mailbox#getAddressString(boolean)
-	 */
-	@Override
-	public String getAddressString(boolean includeRoute) {
-		return (name == null ? "" : name + " ") + super.getAddressString(includeRoute);
-	}
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/ASTaddr_spec.java b/src/org/apache/james/mime4j/field/address/parser/ASTaddr_spec.java
deleted file mode 100644
index 4d56d00..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/ASTaddr_spec.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. ASTaddr_spec.java */
-
-package org.apache.james.mime4j.field.address.parser;
-
-public class ASTaddr_spec extends SimpleNode {
-  public ASTaddr_spec(int id) {
-    super(id);
-  }
-
-  public ASTaddr_spec(AddressListParser p, int id) {
-    super(p, id);
-  }
-
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(AddressListParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/ASTaddress.java b/src/org/apache/james/mime4j/field/address/parser/ASTaddress.java
deleted file mode 100644
index 47bdeda..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/ASTaddress.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. ASTaddress.java */
-
-package org.apache.james.mime4j.field.address.parser;
-
-public class ASTaddress extends SimpleNode {
-  public ASTaddress(int id) {
-    super(id);
-  }
-
-  public ASTaddress(AddressListParser p, int id) {
-    super(p, id);
-  }
-
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(AddressListParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/ASTaddress_list.java b/src/org/apache/james/mime4j/field/address/parser/ASTaddress_list.java
deleted file mode 100644
index 737840e..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/ASTaddress_list.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. ASTaddress_list.java */
-
-package org.apache.james.mime4j.field.address.parser;
-
-public class ASTaddress_list extends SimpleNode {
-  public ASTaddress_list(int id) {
-    super(id);
-  }
-
-  public ASTaddress_list(AddressListParser p, int id) {
-    super(p, id);
-  }
-
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(AddressListParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/ASTangle_addr.java b/src/org/apache/james/mime4j/field/address/parser/ASTangle_addr.java
deleted file mode 100644
index 8cb8f42..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/ASTangle_addr.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. ASTangle_addr.java */
-
-package org.apache.james.mime4j.field.address.parser;
-
-public class ASTangle_addr extends SimpleNode {
-  public ASTangle_addr(int id) {
-    super(id);
-  }
-
-  public ASTangle_addr(AddressListParser p, int id) {
-    super(p, id);
-  }
-
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(AddressListParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/ASTdomain.java b/src/org/apache/james/mime4j/field/address/parser/ASTdomain.java
deleted file mode 100644
index b526643..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/ASTdomain.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. ASTdomain.java */
-
-package org.apache.james.mime4j.field.address.parser;
-
-public class ASTdomain extends SimpleNode {
-  public ASTdomain(int id) {
-    super(id);
-  }
-
-  public ASTdomain(AddressListParser p, int id) {
-    super(p, id);
-  }
-
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(AddressListParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/ASTgroup_body.java b/src/org/apache/james/mime4j/field/address/parser/ASTgroup_body.java
deleted file mode 100644
index f6017b9..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/ASTgroup_body.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. ASTgroup_body.java */
-
-package org.apache.james.mime4j.field.address.parser;
-
-public class ASTgroup_body extends SimpleNode {
-  public ASTgroup_body(int id) {
-    super(id);
-  }
-
-  public ASTgroup_body(AddressListParser p, int id) {
-    super(p, id);
-  }
-
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(AddressListParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/ASTlocal_part.java b/src/org/apache/james/mime4j/field/address/parser/ASTlocal_part.java
deleted file mode 100644
index 5c244fa..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/ASTlocal_part.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. ASTlocal_part.java */
-
-package org.apache.james.mime4j.field.address.parser;
-
-public class ASTlocal_part extends SimpleNode {
-  public ASTlocal_part(int id) {
-    super(id);
-  }
-
-  public ASTlocal_part(AddressListParser p, int id) {
-    super(p, id);
-  }
-
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(AddressListParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/ASTmailbox.java b/src/org/apache/james/mime4j/field/address/parser/ASTmailbox.java
deleted file mode 100644
index aeb469d..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/ASTmailbox.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. ASTmailbox.java */
-
-package org.apache.james.mime4j.field.address.parser;
-
-public class ASTmailbox extends SimpleNode {
-  public ASTmailbox(int id) {
-    super(id);
-  }
-
-  public ASTmailbox(AddressListParser p, int id) {
-    super(p, id);
-  }
-
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(AddressListParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/ASTname_addr.java b/src/org/apache/james/mime4j/field/address/parser/ASTname_addr.java
deleted file mode 100644
index 846c731..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/ASTname_addr.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. ASTname_addr.java */
-
-package org.apache.james.mime4j.field.address.parser;
-
-public class ASTname_addr extends SimpleNode {
-  public ASTname_addr(int id) {
-    super(id);
-  }
-
-  public ASTname_addr(AddressListParser p, int id) {
-    super(p, id);
-  }
-
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(AddressListParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/ASTphrase.java b/src/org/apache/james/mime4j/field/address/parser/ASTphrase.java
deleted file mode 100644
index 7d711c5..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/ASTphrase.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. ASTphrase.java */
-
-package org.apache.james.mime4j.field.address.parser;
-
-public class ASTphrase extends SimpleNode {
-  public ASTphrase(int id) {
-    super(id);
-  }
-
-  public ASTphrase(AddressListParser p, int id) {
-    super(p, id);
-  }
-
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(AddressListParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/ASTroute.java b/src/org/apache/james/mime4j/field/address/parser/ASTroute.java
deleted file mode 100644
index 54ea115..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/ASTroute.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. ASTroute.java */
-
-package org.apache.james.mime4j.field.address.parser;
-
-public class ASTroute extends SimpleNode {
-  public ASTroute(int id) {
-    super(id);
-  }
-
-  public ASTroute(AddressListParser p, int id) {
-    super(p, id);
-  }
-
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(AddressListParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/AddressListParser.java b/src/org/apache/james/mime4j/field/address/parser/AddressListParser.java
deleted file mode 100644
index 8094df0..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/AddressListParser.java
+++ /dev/null
@@ -1,977 +0,0 @@
-/* Generated By:JJTree&JavaCC: Do not edit this line. AddressListParser.java */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.address.parser;
-
-public class AddressListParser/*@bgen(jjtree)*/implements AddressListParserTreeConstants, AddressListParserConstants {/*@bgen(jjtree)*/
-  protected JJTAddressListParserState jjtree = new JJTAddressListParserState();public static void main(String args[]) throws ParseException {
-                while (true) {
-                    try {
-                                AddressListParser parser = new AddressListParser(System.in);
-                        parser.parseLine();
-                        ((SimpleNode)parser.jjtree.rootNode()).dump("> ");
-                    } catch (Exception x) {
-                                x.printStackTrace();
-                                return;
-                    }
-                }
-    }
-
-    private static void log(String msg) {
-        System.out.print(msg);
-    }
-
-    public ASTaddress_list parse() throws ParseException {
-        try {
-            parseAll();
-            return (ASTaddress_list)jjtree.rootNode();
-        } catch (TokenMgrError tme) {
-            throw new ParseException(tme.getMessage());
-        }
-    }
-
-
-    void jjtreeOpenNodeScope(Node n) {
-        ((SimpleNode)n).firstToken = getToken(1);
-    }
-
-    void jjtreeCloseNodeScope(Node n) {
-        ((SimpleNode)n).lastToken = getToken(0);
-    }
-
-  final public void parseLine() throws ParseException {
-    address_list();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case 1:
-      jj_consume_token(1);
-      break;
-    default:
-      jj_la1[0] = jj_gen;
-      ;
-    }
-    jj_consume_token(2);
-  }
-
-  final public void parseAll() throws ParseException {
-    address_list();
-    jj_consume_token(0);
-  }
-
-  final public void address_list() throws ParseException {
- /*@bgen(jjtree) address_list */
-  ASTaddress_list jjtn000 = new ASTaddress_list(JJTADDRESS_LIST);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-    try {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case 6:
-      case DOTATOM:
-      case QUOTEDSTRING:
-        address();
-        break;
-      default:
-        jj_la1[1] = jj_gen;
-        ;
-      }
-      label_1:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case 3:
-          ;
-          break;
-        default:
-          jj_la1[2] = jj_gen;
-          break label_1;
-        }
-        jj_consume_token(3);
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case 6:
-        case DOTATOM:
-        case QUOTEDSTRING:
-          address();
-          break;
-        default:
-          jj_la1[3] = jj_gen;
-          ;
-        }
-      }
-    } catch (Throwable jjte000) {
-          if (jjtc000) {
-            jjtree.clearNodeScope(jjtn000);
-            jjtc000 = false;
-          } else {
-            jjtree.popNode();
-          }
-          if (jjte000 instanceof RuntimeException) {
-            {if (true) throw (RuntimeException)jjte000;}
-          }
-          if (jjte000 instanceof ParseException) {
-            {if (true) throw (ParseException)jjte000;}
-          }
-          {if (true) throw (Error)jjte000;}
-    } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-    }
-  }
-
-  final public void address() throws ParseException {
- /*@bgen(jjtree) address */
-  ASTaddress jjtn000 = new ASTaddress(JJTADDRESS);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-    try {
-      if (jj_2_1(2147483647)) {
-        addr_spec();
-      } else {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case 6:
-          angle_addr();
-          break;
-        case DOTATOM:
-        case QUOTEDSTRING:
-          phrase();
-          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-          case 4:
-            group_body();
-            break;
-          case 6:
-            angle_addr();
-            break;
-          default:
-            jj_la1[4] = jj_gen;
-            jj_consume_token(-1);
-            throw new ParseException();
-          }
-          break;
-        default:
-          jj_la1[5] = jj_gen;
-          jj_consume_token(-1);
-          throw new ParseException();
-        }
-      }
-    } catch (Throwable jjte000) {
-          if (jjtc000) {
-            jjtree.clearNodeScope(jjtn000);
-            jjtc000 = false;
-          } else {
-            jjtree.popNode();
-          }
-          if (jjte000 instanceof RuntimeException) {
-            {if (true) throw (RuntimeException)jjte000;}
-          }
-          if (jjte000 instanceof ParseException) {
-            {if (true) throw (ParseException)jjte000;}
-          }
-          {if (true) throw (Error)jjte000;}
-    } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-    }
-  }
-
-  final public void mailbox() throws ParseException {
- /*@bgen(jjtree) mailbox */
-  ASTmailbox jjtn000 = new ASTmailbox(JJTMAILBOX);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-    try {
-      if (jj_2_2(2147483647)) {
-        addr_spec();
-      } else {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case 6:
-          angle_addr();
-          break;
-        case DOTATOM:
-        case QUOTEDSTRING:
-          name_addr();
-          break;
-        default:
-          jj_la1[6] = jj_gen;
-          jj_consume_token(-1);
-          throw new ParseException();
-        }
-      }
-    } catch (Throwable jjte000) {
-          if (jjtc000) {
-            jjtree.clearNodeScope(jjtn000);
-            jjtc000 = false;
-          } else {
-            jjtree.popNode();
-          }
-          if (jjte000 instanceof RuntimeException) {
-            {if (true) throw (RuntimeException)jjte000;}
-          }
-          if (jjte000 instanceof ParseException) {
-            {if (true) throw (ParseException)jjte000;}
-          }
-          {if (true) throw (Error)jjte000;}
-    } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-    }
-  }
-
-  final public void name_addr() throws ParseException {
- /*@bgen(jjtree) name_addr */
-  ASTname_addr jjtn000 = new ASTname_addr(JJTNAME_ADDR);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-    try {
-      phrase();
-      angle_addr();
-    } catch (Throwable jjte000) {
-          if (jjtc000) {
-            jjtree.clearNodeScope(jjtn000);
-            jjtc000 = false;
-          } else {
-            jjtree.popNode();
-          }
-          if (jjte000 instanceof RuntimeException) {
-            {if (true) throw (RuntimeException)jjte000;}
-          }
-          if (jjte000 instanceof ParseException) {
-            {if (true) throw (ParseException)jjte000;}
-          }
-          {if (true) throw (Error)jjte000;}
-    } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-    }
-  }
-
-  final public void group_body() throws ParseException {
- /*@bgen(jjtree) group_body */
-  ASTgroup_body jjtn000 = new ASTgroup_body(JJTGROUP_BODY);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-    try {
-      jj_consume_token(4);
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case 6:
-      case DOTATOM:
-      case QUOTEDSTRING:
-        mailbox();
-        break;
-      default:
-        jj_la1[7] = jj_gen;
-        ;
-      }
-      label_2:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case 3:
-          ;
-          break;
-        default:
-          jj_la1[8] = jj_gen;
-          break label_2;
-        }
-        jj_consume_token(3);
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case 6:
-        case DOTATOM:
-        case QUOTEDSTRING:
-          mailbox();
-          break;
-        default:
-          jj_la1[9] = jj_gen;
-          ;
-        }
-      }
-      jj_consume_token(5);
-    } catch (Throwable jjte000) {
-          if (jjtc000) {
-            jjtree.clearNodeScope(jjtn000);
-            jjtc000 = false;
-          } else {
-            jjtree.popNode();
-          }
-          if (jjte000 instanceof RuntimeException) {
-            {if (true) throw (RuntimeException)jjte000;}
-          }
-          if (jjte000 instanceof ParseException) {
-            {if (true) throw (ParseException)jjte000;}
-          }
-          {if (true) throw (Error)jjte000;}
-    } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-    }
-  }
-
-  final public void angle_addr() throws ParseException {
- /*@bgen(jjtree) angle_addr */
-  ASTangle_addr jjtn000 = new ASTangle_addr(JJTANGLE_ADDR);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-    try {
-      jj_consume_token(6);
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case 8:
-        route();
-        break;
-      default:
-        jj_la1[10] = jj_gen;
-        ;
-      }
-      addr_spec();
-      jj_consume_token(7);
-    } catch (Throwable jjte000) {
-          if (jjtc000) {
-            jjtree.clearNodeScope(jjtn000);
-            jjtc000 = false;
-          } else {
-            jjtree.popNode();
-          }
-          if (jjte000 instanceof RuntimeException) {
-            {if (true) throw (RuntimeException)jjte000;}
-          }
-          if (jjte000 instanceof ParseException) {
-            {if (true) throw (ParseException)jjte000;}
-          }
-          {if (true) throw (Error)jjte000;}
-    } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-    }
-  }
-
-  final public void route() throws ParseException {
- /*@bgen(jjtree) route */
-  ASTroute jjtn000 = new ASTroute(JJTROUTE);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-    try {
-      jj_consume_token(8);
-      domain();
-      label_3:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case 3:
-        case 8:
-          ;
-          break;
-        default:
-          jj_la1[11] = jj_gen;
-          break label_3;
-        }
-        label_4:
-        while (true) {
-          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-          case 3:
-            ;
-            break;
-          default:
-            jj_la1[12] = jj_gen;
-            break label_4;
-          }
-          jj_consume_token(3);
-        }
-        jj_consume_token(8);
-        domain();
-      }
-      jj_consume_token(4);
-    } catch (Throwable jjte000) {
-          if (jjtc000) {
-            jjtree.clearNodeScope(jjtn000);
-            jjtc000 = false;
-          } else {
-            jjtree.popNode();
-          }
-          if (jjte000 instanceof RuntimeException) {
-            {if (true) throw (RuntimeException)jjte000;}
-          }
-          if (jjte000 instanceof ParseException) {
-            {if (true) throw (ParseException)jjte000;}
-          }
-          {if (true) throw (Error)jjte000;}
-    } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-    }
-  }
-
-  final public void phrase() throws ParseException {
- /*@bgen(jjtree) phrase */
-  ASTphrase jjtn000 = new ASTphrase(JJTPHRASE);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-    try {
-      label_5:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case DOTATOM:
-          jj_consume_token(DOTATOM);
-          break;
-        case QUOTEDSTRING:
-          jj_consume_token(QUOTEDSTRING);
-          break;
-        default:
-          jj_la1[13] = jj_gen;
-          jj_consume_token(-1);
-          throw new ParseException();
-        }
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case DOTATOM:
-        case QUOTEDSTRING:
-          ;
-          break;
-        default:
-          jj_la1[14] = jj_gen;
-          break label_5;
-        }
-      }
-    } finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-    jjtreeCloseNodeScope(jjtn000);
-  }
-    }
-  }
-
-  final public void addr_spec() throws ParseException {
- /*@bgen(jjtree) addr_spec */
-  ASTaddr_spec jjtn000 = new ASTaddr_spec(JJTADDR_SPEC);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-    try {
-      local_part();
-      jj_consume_token(8);
-      domain();
-    } catch (Throwable jjte000) {
-          if (jjtc000) {
-            jjtree.clearNodeScope(jjtn000);
-            jjtc000 = false;
-          } else {
-            jjtree.popNode();
-          }
-          if (jjte000 instanceof RuntimeException) {
-            {if (true) throw (RuntimeException)jjte000;}
-          }
-          if (jjte000 instanceof ParseException) {
-            {if (true) throw (ParseException)jjte000;}
-          }
-          {if (true) throw (Error)jjte000;}
-    } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-    }
-  }
-
-  final public void local_part() throws ParseException {
- /*@bgen(jjtree) local_part */
-  ASTlocal_part jjtn000 = new ASTlocal_part(JJTLOCAL_PART);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);Token t;
-    try {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case DOTATOM:
-        t = jj_consume_token(DOTATOM);
-        break;
-      case QUOTEDSTRING:
-        t = jj_consume_token(QUOTEDSTRING);
-        break;
-      default:
-        jj_la1[15] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-      label_6:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case 9:
-        case DOTATOM:
-        case QUOTEDSTRING:
-          ;
-          break;
-        default:
-          jj_la1[16] = jj_gen;
-          break label_6;
-        }
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case 9:
-          t = jj_consume_token(9);
-          break;
-        default:
-          jj_la1[17] = jj_gen;
-          ;
-        }
-                        if (t.image.charAt(t.image.length() - 1) != '.' || t.kind == AddressListParserConstants.QUOTEDSTRING)
-                                {if (true) throw new ParseException("Words in local part must be separated by '.'");}
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case DOTATOM:
-          t = jj_consume_token(DOTATOM);
-          break;
-        case QUOTEDSTRING:
-          t = jj_consume_token(QUOTEDSTRING);
-          break;
-        default:
-          jj_la1[18] = jj_gen;
-          jj_consume_token(-1);
-          throw new ParseException();
-        }
-      }
-    } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-    }
-  }
-
-  final public void domain() throws ParseException {
- /*@bgen(jjtree) domain */
-  ASTdomain jjtn000 = new ASTdomain(JJTDOMAIN);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);Token t;
-    try {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case DOTATOM:
-        t = jj_consume_token(DOTATOM);
-        label_7:
-        while (true) {
-          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-          case 9:
-          case DOTATOM:
-            ;
-            break;
-          default:
-            jj_la1[19] = jj_gen;
-            break label_7;
-          }
-          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-          case 9:
-            t = jj_consume_token(9);
-            break;
-          default:
-            jj_la1[20] = jj_gen;
-            ;
-          }
-                                if (t.image.charAt(t.image.length() - 1) != '.')
-                                        {if (true) throw new ParseException("Atoms in domain names must be separated by '.'");}
-          t = jj_consume_token(DOTATOM);
-        }
-        break;
-      case DOMAINLITERAL:
-        jj_consume_token(DOMAINLITERAL);
-        break;
-      default:
-        jj_la1[21] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-    } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-    }
-  }
-
-  final private boolean jj_2_1(int xla) {
-    jj_la = xla; jj_lastpos = jj_scanpos = token;
-    try { return !jj_3_1(); }
-    catch(LookaheadSuccess ls) { return true; }
-    finally { jj_save(0, xla); }
-  }
-
-  final private boolean jj_2_2(int xla) {
-    jj_la = xla; jj_lastpos = jj_scanpos = token;
-    try { return !jj_3_2(); }
-    catch(LookaheadSuccess ls) { return true; }
-    finally { jj_save(1, xla); }
-  }
-
-  final private boolean jj_3R_11() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(9)) jj_scanpos = xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(14)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(31)) return true;
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_13() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(9)) jj_scanpos = xsp;
-    if (jj_scan_token(DOTATOM)) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_8() {
-    if (jj_3R_9()) return true;
-    if (jj_scan_token(8)) return true;
-    if (jj_3R_10()) return true;
-    return false;
-  }
-
-  final private boolean jj_3_1() {
-    if (jj_3R_8()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_12() {
-    if (jj_scan_token(DOTATOM)) return true;
-    Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_13()) { jj_scanpos = xsp; break; }
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_10() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_12()) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(18)) return true;
-    }
-    return false;
-  }
-
-  final private boolean jj_3_2() {
-    if (jj_3R_8()) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_9() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(14)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(31)) return true;
-    }
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_11()) { jj_scanpos = xsp; break; }
-    }
-    return false;
-  }
-
-  public AddressListParserTokenManager token_source;
-  SimpleCharStream jj_input_stream;
-  public Token token, jj_nt;
-  private int jj_ntk;
-  private Token jj_scanpos, jj_lastpos;
-  private int jj_la;
-  public boolean lookingAhead = false;
-  private boolean jj_semLA;
-  private int jj_gen;
-  final private int[] jj_la1 = new int[22];
-  static private int[] jj_la1_0;
-  static private int[] jj_la1_1;
-  static {
-      jj_la1_0();
-      jj_la1_1();
-   }
-   private static void jj_la1_0() {
-      jj_la1_0 = new int[] {0x2,0x80004040,0x8,0x80004040,0x50,0x80004040,0x80004040,0x80004040,0x8,0x80004040,0x100,0x108,0x8,0x80004000,0x80004000,0x80004000,0x80004200,0x200,0x80004000,0x4200,0x200,0x44000,};
-   }
-   private static void jj_la1_1() {
-      jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
-   }
-  final private JJCalls[] jj_2_rtns = new JJCalls[2];
-  private boolean jj_rescan = false;
-  private int jj_gc = 0;
-
-  public AddressListParser(java.io.InputStream stream) {
-     this(stream, null);
-  }
-  public AddressListParser(java.io.InputStream stream, String encoding) {
-    try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
-    token_source = new AddressListParserTokenManager(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 22; i++) jj_la1[i] = -1;
-    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
-  }
-
-  public void ReInit(java.io.InputStream stream) {
-     ReInit(stream, null);
-  }
-  public void ReInit(java.io.InputStream stream, String encoding) {
-    try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
-    token_source.ReInit(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jjtree.reset();
-    jj_gen = 0;
-    for (int i = 0; i < 22; i++) jj_la1[i] = -1;
-    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
-  }
-
-  public AddressListParser(java.io.Reader stream) {
-    jj_input_stream = new SimpleCharStream(stream, 1, 1);
-    token_source = new AddressListParserTokenManager(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 22; i++) jj_la1[i] = -1;
-    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
-  }
-
-  public void ReInit(java.io.Reader stream) {
-    jj_input_stream.ReInit(stream, 1, 1);
-    token_source.ReInit(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jjtree.reset();
-    jj_gen = 0;
-    for (int i = 0; i < 22; i++) jj_la1[i] = -1;
-    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
-  }
-
-  public AddressListParser(AddressListParserTokenManager tm) {
-    token_source = tm;
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 22; i++) jj_la1[i] = -1;
-    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
-  }
-
-  public void ReInit(AddressListParserTokenManager tm) {
-    token_source = tm;
-    token = new Token();
-    jj_ntk = -1;
-    jjtree.reset();
-    jj_gen = 0;
-    for (int i = 0; i < 22; i++) jj_la1[i] = -1;
-    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
-  }
-
-  final private Token jj_consume_token(int kind) throws ParseException {
-    Token oldToken;
-    if ((oldToken = token).next != null) token = token.next;
-    else token = token.next = token_source.getNextToken();
-    jj_ntk = -1;
-    if (token.kind == kind) {
-      jj_gen++;
-      if (++jj_gc > 100) {
-        jj_gc = 0;
-        for (int i = 0; i < jj_2_rtns.length; i++) {
-          JJCalls c = jj_2_rtns[i];
-          while (c != null) {
-            if (c.gen < jj_gen) c.first = null;
-            c = c.next;
-          }
-        }
-      }
-      return token;
-    }
-    token = oldToken;
-    jj_kind = kind;
-    throw generateParseException();
-  }
-
-  static private final class LookaheadSuccess extends java.lang.Error { }
-  final private LookaheadSuccess jj_ls = new LookaheadSuccess();
-  final private boolean jj_scan_token(int kind) {
-    if (jj_scanpos == jj_lastpos) {
-      jj_la--;
-      if (jj_scanpos.next == null) {
-        jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
-      } else {
-        jj_lastpos = jj_scanpos = jj_scanpos.next;
-      }
-    } else {
-      jj_scanpos = jj_scanpos.next;
-    }
-    if (jj_rescan) {
-      int i = 0; Token tok = token;
-      while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
-      if (tok != null) jj_add_error_token(kind, i);
-    }
-    if (jj_scanpos.kind != kind) return true;
-    if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
-    return false;
-  }
-
-  final public Token getNextToken() {
-    if (token.next != null) token = token.next;
-    else token = token.next = token_source.getNextToken();
-    jj_ntk = -1;
-    jj_gen++;
-    return token;
-  }
-
-  final public Token getToken(int index) {
-    Token t = lookingAhead ? jj_scanpos : token;
-    for (int i = 0; i < index; i++) {
-      if (t.next != null) t = t.next;
-      else t = t.next = token_source.getNextToken();
-    }
-    return t;
-  }
-
-  final private int jj_ntk() {
-    if ((jj_nt=token.next) == null)
-      return (jj_ntk = (token.next=token_source.getNextToken()).kind);
-    else
-      return (jj_ntk = jj_nt.kind);
-  }
-
-  private java.util.Vector<int[]> jj_expentries = new java.util.Vector<int[]>();
-  private int[] jj_expentry;
-  private int jj_kind = -1;
-  private int[] jj_lasttokens = new int[100];
-  private int jj_endpos;
-
-  private void jj_add_error_token(int kind, int pos) {
-    if (pos >= 100) return;
-    if (pos == jj_endpos + 1) {
-      jj_lasttokens[jj_endpos++] = kind;
-    } else if (jj_endpos != 0) {
-      jj_expentry = new int[jj_endpos];
-      for (int i = 0; i < jj_endpos; i++) {
-        jj_expentry[i] = jj_lasttokens[i];
-      }
-      boolean exists = false;
-      for (java.util.Enumeration<int[]> e = jj_expentries.elements(); e.hasMoreElements();) {
-        int[] oldentry = e.nextElement();
-        if (oldentry.length == jj_expentry.length) {
-          exists = true;
-          for (int i = 0; i < jj_expentry.length; i++) {
-            if (oldentry[i] != jj_expentry[i]) {
-              exists = false;
-              break;
-            }
-          }
-          if (exists) break;
-        }
-      }
-      if (!exists) jj_expentries.addElement(jj_expentry);
-      if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
-    }
-  }
-
-  public ParseException generateParseException() {
-    jj_expentries.removeAllElements();
-    boolean[] la1tokens = new boolean[34];
-    for (int i = 0; i < 34; i++) {
-      la1tokens[i] = false;
-    }
-    if (jj_kind >= 0) {
-      la1tokens[jj_kind] = true;
-      jj_kind = -1;
-    }
-    for (int i = 0; i < 22; i++) {
-      if (jj_la1[i] == jj_gen) {
-        for (int j = 0; j < 32; j++) {
-          if ((jj_la1_0[i] & (1<<j)) != 0) {
-            la1tokens[j] = true;
-          }
-          if ((jj_la1_1[i] & (1<<j)) != 0) {
-            la1tokens[32+j] = true;
-          }
-        }
-      }
-    }
-    for (int i = 0; i < 34; i++) {
-      if (la1tokens[i]) {
-        jj_expentry = new int[1];
-        jj_expentry[0] = i;
-        jj_expentries.addElement(jj_expentry);
-      }
-    }
-    jj_endpos = 0;
-    jj_rescan_token();
-    jj_add_error_token(0, 0);
-    int[][] exptokseq = new int[jj_expentries.size()][];
-    for (int i = 0; i < jj_expentries.size(); i++) {
-      exptokseq[i] = jj_expentries.elementAt(i);
-    }
-    return new ParseException(token, exptokseq, tokenImage);
-  }
-
-  final public void enable_tracing() {
-  }
-
-  final public void disable_tracing() {
-  }
-
-  final private void jj_rescan_token() {
-    jj_rescan = true;
-    for (int i = 0; i < 2; i++) {
-    try {
-      JJCalls p = jj_2_rtns[i];
-      do {
-        if (p.gen > jj_gen) {
-          jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
-          switch (i) {
-            case 0: jj_3_1(); break;
-            case 1: jj_3_2(); break;
-          }
-        }
-        p = p.next;
-      } while (p != null);
-      } catch(LookaheadSuccess ls) { }
-    }
-    jj_rescan = false;
-  }
-
-  final private void jj_save(int index, int xla) {
-    JJCalls p = jj_2_rtns[index];
-    while (p.gen > jj_gen) {
-      if (p.next == null) { p = p.next = new JJCalls(); break; }
-      p = p.next;
-    }
-    p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
-  }
-
-  static final class JJCalls {
-    int gen;
-    Token first;
-    int arg;
-    JJCalls next;
-  }
-
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/AddressListParser.jj b/src/org/apache/james/mime4j/field/address/parser/AddressListParser.jj
deleted file mode 100644
index c14277b..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/AddressListParser.jj
+++ /dev/null
@@ -1,595 +0,0 @@
-/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. /Users/jason/Projects/apache-mime4j-0.3/target/generated-sources/jjtree/org/apache/james/mime4j/field/address/parser/AddressListParser.jj */
-/*@egen*//****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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.                                           *
- ****************************************************************/
-
-
-/**
- * RFC2822 address list parser.
- *
- * Created 9/17/2004
- * by Joe Cheng <code@joecheng.com>
- */
-
-options {
-	STATIC=false;
-	LOOKAHEAD=1;                                                                                                                               
-	//DEBUG_PARSER=true;
-	//DEBUG_TOKEN_MANAGER=true;
-}
-
-PARSER_BEGIN(AddressListParser)
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.address.parser;
-
-public class AddressListParser/*@bgen(jjtree)*/implements AddressListParserTreeConstants/*@egen*/ {/*@bgen(jjtree)*/
-  protected JJTAddressListParserState jjtree = new JJTAddressListParserState();
-
-/*@egen*/
-    public static void main(String args[]) throws ParseException {
-		while (true) {
-		    try {
-				AddressListParser parser = new AddressListParser(System.in);
-		    	parser.parseLine();
-		    	((SimpleNode)parser.jjtree.rootNode()).dump("> ");
-		    } catch (Exception x) {
-				x.printStackTrace();
-				return;
-		    }
-		}
-    }
-    
-    private static void log(String msg) {
-    	System.out.print(msg);
-    }
-    
-    public ASTaddress_list parse() throws ParseException {
-        try {
-    	    parseAll();
-    	    return (ASTaddress_list)jjtree.rootNode();
-    	} catch (TokenMgrError tme) {
-    	    throw new ParseException(tme.getMessage());
-    	}
-    }
-    
-    
-    void jjtreeOpenNodeScope(Node n) {
-    	((SimpleNode)n).firstToken = getToken(1);
-    }
-    
-    void jjtreeCloseNodeScope(Node n) {
-    	((SimpleNode)n).lastToken = getToken(0);
-    }
-}
-
-PARSER_END(AddressListParser)
-
-void parseLine()       :
-{}
-{
-	address_list() ["\r"] "\n"
-}
-
-void parseAll()       :
-{}
-{
-	address_list() <EOF>
-}
-
-void address_list() :
-{/*@bgen(jjtree) address_list */
-  ASTaddress_list jjtn000 = new ASTaddress_list(JJTADDRESS_LIST);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) address_list */
-        try {
-/*@egen*/
-	[ address() ]
-	(
-		","
-		[ address() ]
-	)*/*@bgen(jjtree)*/
-        } catch (Throwable jjte000) {
-          if (jjtc000) {
-            jjtree.clearNodeScope(jjtn000);
-            jjtc000 = false;
-          } else {
-            jjtree.popNode();
-          }
-          if (jjte000 instanceof RuntimeException) {
-            throw (RuntimeException)jjte000;
-          }
-          if (jjte000 instanceof ParseException) {
-            throw (ParseException)jjte000;
-          }
-          throw (Error)jjte000;
-        } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-        }
-/*@egen*/
-}
-
-void address() :
-{/*@bgen(jjtree) address */
-  ASTaddress jjtn000 = new ASTaddress(JJTADDRESS);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) address */
-        try {
-/*@egen*/
-	LOOKAHEAD(2147483647)
-	addr_spec()
-|	angle_addr()
-|	( phrase() (group_body() | angle_addr()) )/*@bgen(jjtree)*/
-        } catch (Throwable jjte000) {
-          if (jjtc000) {
-            jjtree.clearNodeScope(jjtn000);
-            jjtc000 = false;
-          } else {
-            jjtree.popNode();
-          }
-          if (jjte000 instanceof RuntimeException) {
-            throw (RuntimeException)jjte000;
-          }
-          if (jjte000 instanceof ParseException) {
-            throw (ParseException)jjte000;
-          }
-          throw (Error)jjte000;
-        } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-        }
-/*@egen*/
-}
-
-void mailbox() :
-{/*@bgen(jjtree) mailbox */
-  ASTmailbox jjtn000 = new ASTmailbox(JJTMAILBOX);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) mailbox */
-        try {
-/*@egen*/
-	LOOKAHEAD(2147483647)
-	addr_spec()
-|	angle_addr()
-|	name_addr()/*@bgen(jjtree)*/
-        } catch (Throwable jjte000) {
-          if (jjtc000) {
-            jjtree.clearNodeScope(jjtn000);
-            jjtc000 = false;
-          } else {
-            jjtree.popNode();
-          }
-          if (jjte000 instanceof RuntimeException) {
-            throw (RuntimeException)jjte000;
-          }
-          if (jjte000 instanceof ParseException) {
-            throw (ParseException)jjte000;
-          }
-          throw (Error)jjte000;
-        } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-        }
-/*@egen*/
-}
-
-void name_addr() :
-{/*@bgen(jjtree) name_addr */
-  ASTname_addr jjtn000 = new ASTname_addr(JJTNAME_ADDR);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) name_addr */
-        try {
-/*@egen*/
-	phrase() angle_addr()/*@bgen(jjtree)*/
-        } catch (Throwable jjte000) {
-          if (jjtc000) {
-            jjtree.clearNodeScope(jjtn000);
-            jjtc000 = false;
-          } else {
-            jjtree.popNode();
-          }
-          if (jjte000 instanceof RuntimeException) {
-            throw (RuntimeException)jjte000;
-          }
-          if (jjte000 instanceof ParseException) {
-            throw (ParseException)jjte000;
-          }
-          throw (Error)jjte000;
-        } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-        }
-/*@egen*/
-}
-
-void group_body() :
-{/*@bgen(jjtree) group_body */
-  ASTgroup_body jjtn000 = new ASTgroup_body(JJTGROUP_BODY);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) group_body */
-        try {
-/*@egen*/
-	":"
-	[ mailbox() ]
-	(
-		","
-		[ mailbox() ]
-	)*
-	";"/*@bgen(jjtree)*/
-        } catch (Throwable jjte000) {
-          if (jjtc000) {
-            jjtree.clearNodeScope(jjtn000);
-            jjtc000 = false;
-          } else {
-            jjtree.popNode();
-          }
-          if (jjte000 instanceof RuntimeException) {
-            throw (RuntimeException)jjte000;
-          }
-          if (jjte000 instanceof ParseException) {
-            throw (ParseException)jjte000;
-          }
-          throw (Error)jjte000;
-        } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-        }
-/*@egen*/
-}
-
-void angle_addr() :
-{/*@bgen(jjtree) angle_addr */
-  ASTangle_addr jjtn000 = new ASTangle_addr(JJTANGLE_ADDR);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) angle_addr */
-        try {
-/*@egen*/
-	"<" [ route() ] addr_spec() ">"/*@bgen(jjtree)*/
-        } catch (Throwable jjte000) {
-          if (jjtc000) {
-            jjtree.clearNodeScope(jjtn000);
-            jjtc000 = false;
-          } else {
-            jjtree.popNode();
-          }
-          if (jjte000 instanceof RuntimeException) {
-            throw (RuntimeException)jjte000;
-          }
-          if (jjte000 instanceof ParseException) {
-            throw (ParseException)jjte000;
-          }
-          throw (Error)jjte000;
-        } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-        }
-/*@egen*/
-}
-
-void route() :
-{/*@bgen(jjtree) route */
-  ASTroute jjtn000 = new ASTroute(JJTROUTE);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) route */
-        try {
-/*@egen*/
-	"@" domain() ( (",")* "@" domain() )* ":"/*@bgen(jjtree)*/
-        } catch (Throwable jjte000) {
-          if (jjtc000) {
-            jjtree.clearNodeScope(jjtn000);
-            jjtc000 = false;
-          } else {
-            jjtree.popNode();
-          }
-          if (jjte000 instanceof RuntimeException) {
-            throw (RuntimeException)jjte000;
-          }
-          if (jjte000 instanceof ParseException) {
-            throw (ParseException)jjte000;
-          }
-          throw (Error)jjte000;
-        } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-        }
-/*@egen*/
-}
-
-void phrase() :
-{/*@bgen(jjtree) phrase */
-  ASTphrase jjtn000 = new ASTphrase(JJTPHRASE);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) phrase */
-try {
-/*@egen*/
-(	<DOTATOM>
-|	<QUOTEDSTRING>
-)+/*@bgen(jjtree)*/
-} finally {
-  if (jjtc000) {
-    jjtree.closeNodeScope(jjtn000, true);
-    jjtreeCloseNodeScope(jjtn000);
-  }
-}
-/*@egen*/
-}
-
-void addr_spec() :
-{/*@bgen(jjtree) addr_spec */
-  ASTaddr_spec jjtn000 = new ASTaddr_spec(JJTADDR_SPEC);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) addr_spec */
-        try {
-/*@egen*/
-	( local_part() "@" domain() )/*@bgen(jjtree)*/
-        } catch (Throwable jjte000) {
-          if (jjtc000) {
-            jjtree.clearNodeScope(jjtn000);
-            jjtc000 = false;
-          } else {
-            jjtree.popNode();
-          }
-          if (jjte000 instanceof RuntimeException) {
-            throw (RuntimeException)jjte000;
-          }
-          if (jjte000 instanceof ParseException) {
-            throw (ParseException)jjte000;
-          }
-          throw (Error)jjte000;
-        } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-        }
-/*@egen*/
-}
-
-void local_part() :
-{/*@bgen(jjtree) local_part */
-  ASTlocal_part jjtn000 = new ASTlocal_part(JJTLOCAL_PART);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-/*@egen*/ Token t; }
-{/*@bgen(jjtree) local_part */
-        try {
-/*@egen*/
-	( t=<DOTATOM> | t=<QUOTEDSTRING> )
-	(	[t="."]
-		{
-			if (t.image.charAt(t.image.length() - 1) != '.' || t.kind == AddressListParserConstants.QUOTEDSTRING)
-				throw new ParseException("Words in local part must be separated by '.'");
-		}
-		(	t=<DOTATOM> | t=<QUOTEDSTRING> )
-	)*/*@bgen(jjtree)*/
-        } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-        }
-/*@egen*/
-}
-
-void domain() :
-{/*@bgen(jjtree) domain */
-  ASTdomain jjtn000 = new ASTdomain(JJTDOMAIN);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-  jjtreeOpenNodeScope(jjtn000);
-/*@egen*/ Token t; }
-{/*@bgen(jjtree) domain */
-        try {
-/*@egen*/
-	(	t=<DOTATOM>
-		(	[t="."]
-			{
-				if (t.image.charAt(t.image.length() - 1) != '.')
-					throw new ParseException("Atoms in domain names must be separated by '.'");
-			}
-			t=<DOTATOM>
-		)*
-	)
-|	<DOMAINLITERAL>/*@bgen(jjtree)*/
-        } finally {
-          if (jjtc000) {
-            jjtree.closeNodeScope(jjtn000, true);
-            jjtreeCloseNodeScope(jjtn000);
-          }
-        }
-/*@egen*/
-}
-
-SPECIAL_TOKEN :
-{
- 	< WS: ( [" ", "\t"] )+ >
-}
-
-TOKEN :
-{
-	< #ALPHA: ["a" - "z", "A" - "Z"] >
-|	< #DIGIT: ["0" - "9"] >
-|	< #ATEXT: ( <ALPHA> | <DIGIT>
-			  | "!" | "#" | "$" | "%"
-			  | "&" | "'" | "*" | "+"
-			  | "-" | "/" | "=" | "?"
-			  | "^" | "_" | "`" | "{"
-			  | "|" | "}" | "~"
-			  )>
-|	< DOTATOM: <ATEXT> ( <ATEXT> | "." )* >
-}
-
-TOKEN_MGR_DECLS :
-{
-	// Keeps track of how many levels of comment nesting
-	// we've encountered.  This is only used when the 2nd
-	// level is reached, for example ((this)), not (this).
-	// This is because the outermost level must be treated
-	// specially anyway, because the outermost ")" has a 
-	// different token type than inner ")" instances.
-	static int commentNest;
-}
-
-MORE :
-{
-	// domain literal
-	"[" : INDOMAINLITERAL
-}
-
-<INDOMAINLITERAL>
-MORE :
-{
-	< <QUOTEDPAIR>> { image.deleteCharAt(image.length() - 2); }
-|	< ~["[", "]", "\\"] >
-}
-
-<INDOMAINLITERAL>
-TOKEN :
-{
-	< DOMAINLITERAL: "]" > { matchedToken.image = image.toString(); }: DEFAULT
-}
-
-MORE :
-{
-	// starts a comment
-	"(" : INCOMMENT
-}
-
-<INCOMMENT>
-SKIP :
-{
-	// ends a comment
-	< COMMENT: ")" > : DEFAULT
-	// if this is ever changed to not be a SKIP, need
-	// to make sure matchedToken.token = token.toString()
-	// is called.
-}
-
-<INCOMMENT>
-MORE :
-{
-	< <QUOTEDPAIR>> { image.deleteCharAt(image.length() - 2); }
-|	"(" { commentNest = 1; } : NESTED_COMMENT
-|	< <ANY>>
-}
-
-<NESTED_COMMENT>
-MORE :
-{
-	< <QUOTEDPAIR>> { image.deleteCharAt(image.length() - 2); }
-|	"(" { ++commentNest; }
-|	")" { --commentNest; if (commentNest == 0) SwitchTo(INCOMMENT); }
-|	< <ANY>>
-}
-
-
-// QUOTED STRINGS
-
-MORE :
-{
-	"\"" { image.deleteCharAt(image.length() - 1); } : INQUOTEDSTRING
-}
-
-<INQUOTEDSTRING>
-MORE :
-{
-	< <QUOTEDPAIR>> { image.deleteCharAt(image.length() - 2); }
-|	< (~["\"", "\\"])+ >
-}
-
-<INQUOTEDSTRING>
-TOKEN :
-{
-	< QUOTEDSTRING: "\"" > { matchedToken.image = image.substring(0, image.length() - 1); } : DEFAULT
-}
-
-// GLOBALS
-
-<*>
-TOKEN :
-{
-	< #QUOTEDPAIR: "\\" <ANY> >
-|	< #ANY: ~[] >
-}
-
-// ERROR!
-/*
-
-<*>
-TOKEN :
-{
-	< UNEXPECTED_CHAR: <ANY> >
-}
-
-*/
\ No newline at end of file
diff --git a/src/org/apache/james/mime4j/field/address/parser/AddressListParserConstants.java b/src/org/apache/james/mime4j/field/address/parser/AddressListParserConstants.java
deleted file mode 100644
index 006a082..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/AddressListParserConstants.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Generated By:JJTree&JavaCC: Do not edit this line. AddressListParserConstants.java */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.address.parser;
-
-public interface AddressListParserConstants {
-
-  int EOF = 0;
-  int WS = 10;
-  int ALPHA = 11;
-  int DIGIT = 12;
-  int ATEXT = 13;
-  int DOTATOM = 14;
-  int DOMAINLITERAL = 18;
-  int COMMENT = 20;
-  int QUOTEDSTRING = 31;
-  int QUOTEDPAIR = 32;
-  int ANY = 33;
-
-  int DEFAULT = 0;
-  int INDOMAINLITERAL = 1;
-  int INCOMMENT = 2;
-  int NESTED_COMMENT = 3;
-  int INQUOTEDSTRING = 4;
-
-  String[] tokenImage = {
-    "<EOF>",
-    "\"\\r\"",
-    "\"\\n\"",
-    "\",\"",
-    "\":\"",
-    "\";\"",
-    "\"<\"",
-    "\">\"",
-    "\"@\"",
-    "\".\"",
-    "<WS>",
-    "<ALPHA>",
-    "<DIGIT>",
-    "<ATEXT>",
-    "<DOTATOM>",
-    "\"[\"",
-    "<token of kind 16>",
-    "<token of kind 17>",
-    "\"]\"",
-    "\"(\"",
-    "\")\"",
-    "<token of kind 21>",
-    "\"(\"",
-    "<token of kind 23>",
-    "<token of kind 24>",
-    "\"(\"",
-    "\")\"",
-    "<token of kind 27>",
-    "\"\\\"\"",
-    "<token of kind 29>",
-    "<token of kind 30>",
-    "\"\\\"\"",
-    "<QUOTEDPAIR>",
-    "<ANY>",
-  };
-
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/AddressListParserTokenManager.java b/src/org/apache/james/mime4j/field/address/parser/AddressListParserTokenManager.java
deleted file mode 100644
index d2dd88d..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/AddressListParserTokenManager.java
+++ /dev/null
@@ -1,1009 +0,0 @@
-/* Generated By:JJTree&JavaCC: Do not edit this line. AddressListParserTokenManager.java */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.address.parser;
-
-public class AddressListParserTokenManager implements AddressListParserConstants
-{
-        // Keeps track of how many levels of comment nesting
-        // we've encountered.  This is only used when the 2nd
-        // level is reached, for example ((this)), not (this).
-        // This is because the outermost level must be treated
-        // specially anyway, because the outermost ")" has a 
-        // different token type than inner ")" instances.
-        static int commentNest;
-  public  java.io.PrintStream debugStream = System.out;
-  public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private final int jjStopStringLiteralDfa_0(int pos, long active0)
-{
-   switch (pos)
-   {
-      default :
-         return -1;
-   }
-}
-private final int jjStartNfa_0(int pos, long active0)
-{
-   return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
-}
-private final int jjStopAtPos(int pos, int kind)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   return pos + 1;
-}
-private final int jjStartNfaWithStates_0(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_0(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_0()
-{
-   switch(curChar)
-   {
-      case 10:
-         return jjStopAtPos(0, 2);
-      case 13:
-         return jjStopAtPos(0, 1);
-      case 34:
-         return jjStopAtPos(0, 28);
-      case 40:
-         return jjStopAtPos(0, 19);
-      case 44:
-         return jjStopAtPos(0, 3);
-      case 46:
-         return jjStopAtPos(0, 9);
-      case 58:
-         return jjStopAtPos(0, 4);
-      case 59:
-         return jjStopAtPos(0, 5);
-      case 60:
-         return jjStopAtPos(0, 6);
-      case 62:
-         return jjStopAtPos(0, 7);
-      case 64:
-         return jjStopAtPos(0, 8);
-      case 91:
-         return jjStopAtPos(0, 15);
-      default :
-         return jjMoveNfa_0(1, 0);
-   }
-}
-private final void jjCheckNAdd(int state)
-{
-   if (jjrounds[state] != jjround)
-   {
-      jjstateSet[jjnewStateCnt++] = state;
-      jjrounds[state] = jjround;
-   }
-}
-private final void jjAddStates(int start, int end)
-{
-   do {
-      jjstateSet[jjnewStateCnt++] = jjnextStates[start];
-   } while (start++ != end);
-}
-private final void jjCheckNAddTwoStates(int state1, int state2)
-{
-   jjCheckNAdd(state1);
-   jjCheckNAdd(state2);
-}
-private final void jjCheckNAddStates(int start, int end)
-{
-   do {
-      jjCheckNAdd(jjnextStates[start]);
-   } while (start++ != end);
-}
-private final void jjCheckNAddStates(int start)
-{
-   jjCheckNAdd(jjnextStates[start]);
-   jjCheckNAdd(jjnextStates[start + 1]);
-}
-private final int jjMoveNfa_0(int startState, int curPos)
-{
-   int[] nextStates;
-   int startsAt = 0;
-   jjnewStateCnt = 3;
-   int i = 1;
-   jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
-   for (;;)
-   {
-      if (++jjround == 0x7fffffff)
-         ReInitRounds();
-      if (curChar < 64)
-      {
-         long l = 1L << curChar;
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 1:
-                  if ((0xa3ffacfa00000000L & l) != 0L)
-                  {
-                     if (kind > 14)
-                        kind = 14;
-                     jjCheckNAdd(2);
-                  }
-                  else if ((0x100000200L & l) != 0L)
-                  {
-                     if (kind > 10)
-                        kind = 10;
-                     jjCheckNAdd(0);
-                  }
-                  break;
-               case 0:
-                  if ((0x100000200L & l) == 0L)
-                     break;
-                  kind = 10;
-                  jjCheckNAdd(0);
-                  break;
-               case 2:
-                  if ((0xa3ffecfa00000000L & l) == 0L)
-                     break;
-                  if (kind > 14)
-                     kind = 14;
-                  jjCheckNAdd(2);
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else if (curChar < 128)
-      {
-         long l = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 1:
-               case 2:
-                  if ((0x7fffffffc7fffffeL & l) == 0L)
-                     break;
-                  if (kind > 14)
-                     kind = 14;
-                  jjCheckNAdd(2);
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else
-      {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      if (kind != 0x7fffffff)
-      {
-         jjmatchedKind = kind;
-         jjmatchedPos = curPos;
-         kind = 0x7fffffff;
-      }
-      ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
-         return curPos;
-      try { curChar = input_stream.readChar(); }
-      catch(java.io.IOException e) { return curPos; }
-   }
-}
-private final int jjStopStringLiteralDfa_2(int pos, long active0)
-{
-   switch (pos)
-   {
-      default :
-         return -1;
-   }
-}
-private final int jjStartNfa_2(int pos, long active0)
-{
-   return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1);
-}
-private final int jjStartNfaWithStates_2(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_2(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_2()
-{
-   switch(curChar)
-   {
-      case 40:
-         return jjStopAtPos(0, 22);
-      case 41:
-         return jjStopAtPos(0, 20);
-      default :
-         return jjMoveNfa_2(0, 0);
-   }
-}
-static final long[] jjbitVec0 = {
-   0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
-};
-private final int jjMoveNfa_2(int startState, int curPos)
-{
-   int[] nextStates;
-   int startsAt = 0;
-   jjnewStateCnt = 3;
-   int i = 1;
-   jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
-   for (;;)
-   {
-      if (++jjround == 0x7fffffff)
-         ReInitRounds();
-      if (curChar < 64)
-      {
-         long l = 1L << curChar;
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if (kind > 23)
-                     kind = 23;
-                  break;
-               case 1:
-                  if (kind > 21)
-                     kind = 21;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else if (curChar < 128)
-      {
-         long l = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if (kind > 23)
-                     kind = 23;
-                  if (curChar == 92)
-                     jjstateSet[jjnewStateCnt++] = 1;
-                  break;
-               case 1:
-                  if (kind > 21)
-                     kind = 21;
-                  break;
-               case 2:
-                  if (kind > 23)
-                     kind = 23;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else
-      {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if ((jjbitVec0[i2] & l2) != 0L && kind > 23)
-                     kind = 23;
-                  break;
-               case 1:
-                  if ((jjbitVec0[i2] & l2) != 0L && kind > 21)
-                     kind = 21;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      if (kind != 0x7fffffff)
-      {
-         jjmatchedKind = kind;
-         jjmatchedPos = curPos;
-         kind = 0x7fffffff;
-      }
-      ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
-         return curPos;
-      try { curChar = input_stream.readChar(); }
-      catch(java.io.IOException e) { return curPos; }
-   }
-}
-private final int jjStopStringLiteralDfa_4(int pos, long active0)
-{
-   switch (pos)
-   {
-      default :
-         return -1;
-   }
-}
-private final int jjStartNfa_4(int pos, long active0)
-{
-   return jjMoveNfa_4(jjStopStringLiteralDfa_4(pos, active0), pos + 1);
-}
-private final int jjStartNfaWithStates_4(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_4(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_4()
-{
-   switch(curChar)
-   {
-      case 34:
-         return jjStopAtPos(0, 31);
-      default :
-         return jjMoveNfa_4(0, 0);
-   }
-}
-private final int jjMoveNfa_4(int startState, int curPos)
-{
-   int[] nextStates;
-   int startsAt = 0;
-   jjnewStateCnt = 3;
-   int i = 1;
-   jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
-   for (;;)
-   {
-      if (++jjround == 0x7fffffff)
-         ReInitRounds();
-      if (curChar < 64)
-      {
-         long l = 1L << curChar;
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-               case 2:
-                  if ((0xfffffffbffffffffL & l) == 0L)
-                     break;
-                  if (kind > 30)
-                     kind = 30;
-                  jjCheckNAdd(2);
-                  break;
-               case 1:
-                  if (kind > 29)
-                     kind = 29;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else if (curChar < 128)
-      {
-         long l = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if ((0xffffffffefffffffL & l) != 0L)
-                  {
-                     if (kind > 30)
-                        kind = 30;
-                     jjCheckNAdd(2);
-                  }
-                  else if (curChar == 92)
-                     jjstateSet[jjnewStateCnt++] = 1;
-                  break;
-               case 1:
-                  if (kind > 29)
-                     kind = 29;
-                  break;
-               case 2:
-                  if ((0xffffffffefffffffL & l) == 0L)
-                     break;
-                  if (kind > 30)
-                     kind = 30;
-                  jjCheckNAdd(2);
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else
-      {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-               case 2:
-                  if ((jjbitVec0[i2] & l2) == 0L)
-                     break;
-                  if (kind > 30)
-                     kind = 30;
-                  jjCheckNAdd(2);
-                  break;
-               case 1:
-                  if ((jjbitVec0[i2] & l2) != 0L && kind > 29)
-                     kind = 29;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      if (kind != 0x7fffffff)
-      {
-         jjmatchedKind = kind;
-         jjmatchedPos = curPos;
-         kind = 0x7fffffff;
-      }
-      ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
-         return curPos;
-      try { curChar = input_stream.readChar(); }
-      catch(java.io.IOException e) { return curPos; }
-   }
-}
-private final int jjStopStringLiteralDfa_3(int pos, long active0)
-{
-   switch (pos)
-   {
-      default :
-         return -1;
-   }
-}
-private final int jjStartNfa_3(int pos, long active0)
-{
-   return jjMoveNfa_3(jjStopStringLiteralDfa_3(pos, active0), pos + 1);
-}
-private final int jjStartNfaWithStates_3(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_3(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_3()
-{
-   switch(curChar)
-   {
-      case 40:
-         return jjStopAtPos(0, 25);
-      case 41:
-         return jjStopAtPos(0, 26);
-      default :
-         return jjMoveNfa_3(0, 0);
-   }
-}
-private final int jjMoveNfa_3(int startState, int curPos)
-{
-   int[] nextStates;
-   int startsAt = 0;
-   jjnewStateCnt = 3;
-   int i = 1;
-   jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
-   for (;;)
-   {
-      if (++jjround == 0x7fffffff)
-         ReInitRounds();
-      if (curChar < 64)
-      {
-         long l = 1L << curChar;
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if (kind > 27)
-                     kind = 27;
-                  break;
-               case 1:
-                  if (kind > 24)
-                     kind = 24;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else if (curChar < 128)
-      {
-         long l = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if (kind > 27)
-                     kind = 27;
-                  if (curChar == 92)
-                     jjstateSet[jjnewStateCnt++] = 1;
-                  break;
-               case 1:
-                  if (kind > 24)
-                     kind = 24;
-                  break;
-               case 2:
-                  if (kind > 27)
-                     kind = 27;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else
-      {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if ((jjbitVec0[i2] & l2) != 0L && kind > 27)
-                     kind = 27;
-                  break;
-               case 1:
-                  if ((jjbitVec0[i2] & l2) != 0L && kind > 24)
-                     kind = 24;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      if (kind != 0x7fffffff)
-      {
-         jjmatchedKind = kind;
-         jjmatchedPos = curPos;
-         kind = 0x7fffffff;
-      }
-      ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
-         return curPos;
-      try { curChar = input_stream.readChar(); }
-      catch(java.io.IOException e) { return curPos; }
-   }
-}
-private final int jjStopStringLiteralDfa_1(int pos, long active0)
-{
-   switch (pos)
-   {
-      default :
-         return -1;
-   }
-}
-private final int jjStartNfa_1(int pos, long active0)
-{
-   return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0), pos + 1);
-}
-private final int jjStartNfaWithStates_1(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_1(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_1()
-{
-   switch(curChar)
-   {
-      case 93:
-         return jjStopAtPos(0, 18);
-      default :
-         return jjMoveNfa_1(0, 0);
-   }
-}
-private final int jjMoveNfa_1(int startState, int curPos)
-{
-   int[] nextStates;
-   int startsAt = 0;
-   jjnewStateCnt = 3;
-   int i = 1;
-   jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
-   for (;;)
-   {
-      if (++jjround == 0x7fffffff)
-         ReInitRounds();
-      if (curChar < 64)
-      {
-         long l = 1L << curChar;
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if (kind > 17)
-                     kind = 17;
-                  break;
-               case 1:
-                  if (kind > 16)
-                     kind = 16;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else if (curChar < 128)
-      {
-         long l = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if ((0xffffffffc7ffffffL & l) != 0L)
-                  {
-                     if (kind > 17)
-                        kind = 17;
-                  }
-                  else if (curChar == 92)
-                     jjstateSet[jjnewStateCnt++] = 1;
-                  break;
-               case 1:
-                  if (kind > 16)
-                     kind = 16;
-                  break;
-               case 2:
-                  if ((0xffffffffc7ffffffL & l) != 0L && kind > 17)
-                     kind = 17;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else
-      {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if ((jjbitVec0[i2] & l2) != 0L && kind > 17)
-                     kind = 17;
-                  break;
-               case 1:
-                  if ((jjbitVec0[i2] & l2) != 0L && kind > 16)
-                     kind = 16;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      if (kind != 0x7fffffff)
-      {
-         jjmatchedKind = kind;
-         jjmatchedPos = curPos;
-         kind = 0x7fffffff;
-      }
-      ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
-         return curPos;
-      try { curChar = input_stream.readChar(); }
-      catch(java.io.IOException e) { return curPos; }
-   }
-}
-static final int[] jjnextStates = {
-};
-public static final String[] jjstrLiteralImages = {
-"", "\15", "\12", "\54", "\72", "\73", "\74", "\76", "\100", "\56", null, null, 
-null, null, null, null, null, null, null, null, null, null, null, null, null, null, 
-null, null, null, null, null, null, null, null, };
-public static final String[] lexStateNames = {
-   "DEFAULT", 
-   "INDOMAINLITERAL", 
-   "INCOMMENT", 
-   "NESTED_COMMENT", 
-   "INQUOTEDSTRING", 
-};
-public static final int[] jjnewLexState = {
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, 2, 0, -1, 3, -1, -1, 
-   -1, -1, -1, 4, -1, -1, 0, -1, -1, 
-};
-static final long[] jjtoToken = {
-   0x800443ffL, 
-};
-static final long[] jjtoSkip = {
-   0x100400L, 
-};
-static final long[] jjtoSpecial = {
-   0x400L, 
-};
-static final long[] jjtoMore = {
-   0x7feb8000L, 
-};
-protected SimpleCharStream input_stream;
-private final int[] jjrounds = new int[3];
-private final int[] jjstateSet = new int[6];
-StringBuffer image;
-int jjimageLen;
-int lengthOfMatch;
-protected char curChar;
-public AddressListParserTokenManager(SimpleCharStream stream){
-   if (SimpleCharStream.staticFlag)
-      throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
-   input_stream = stream;
-}
-public AddressListParserTokenManager(SimpleCharStream stream, int lexState){
-   this(stream);
-   SwitchTo(lexState);
-}
-public void ReInit(SimpleCharStream stream)
-{
-   jjmatchedPos = jjnewStateCnt = 0;
-   curLexState = defaultLexState;
-   input_stream = stream;
-   ReInitRounds();
-}
-private final void ReInitRounds()
-{
-   int i;
-   jjround = 0x80000001;
-   for (i = 3; i-- > 0;)
-      jjrounds[i] = 0x80000000;
-}
-public void ReInit(SimpleCharStream stream, int lexState)
-{
-   ReInit(stream);
-   SwitchTo(lexState);
-}
-public void SwitchTo(int lexState)
-{
-   if (lexState >= 5 || lexState < 0)
-      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
-   else
-      curLexState = lexState;
-}
-
-protected Token jjFillToken()
-{
-   Token t = Token.newToken(jjmatchedKind);
-   t.kind = jjmatchedKind;
-   String im = jjstrLiteralImages[jjmatchedKind];
-   t.image = (im == null) ? input_stream.GetImage() : im;
-   t.beginLine = input_stream.getBeginLine();
-   t.beginColumn = input_stream.getBeginColumn();
-   t.endLine = input_stream.getEndLine();
-   t.endColumn = input_stream.getEndColumn();
-   return t;
-}
-
-int curLexState = 0;
-int defaultLexState = 0;
-int jjnewStateCnt;
-int jjround;
-int jjmatchedPos;
-int jjmatchedKind;
-
-public Token getNextToken() 
-{
-  int kind;
-  Token specialToken = null;
-  Token matchedToken;
-  int curPos = 0;
-
-  EOFLoop :
-  for (;;)
-  {   
-   try   
-   {     
-      curChar = input_stream.BeginToken();
-   }     
-   catch(java.io.IOException e)
-   {        
-      jjmatchedKind = 0;
-      matchedToken = jjFillToken();
-      matchedToken.specialToken = specialToken;
-      return matchedToken;
-   }
-   image = null;
-   jjimageLen = 0;
-
-   for (;;)
-   {
-     switch(curLexState)
-     {
-       case 0:
-         jjmatchedKind = 0x7fffffff;
-         jjmatchedPos = 0;
-         curPos = jjMoveStringLiteralDfa0_0();
-         break;
-       case 1:
-         jjmatchedKind = 0x7fffffff;
-         jjmatchedPos = 0;
-         curPos = jjMoveStringLiteralDfa0_1();
-         break;
-       case 2:
-         jjmatchedKind = 0x7fffffff;
-         jjmatchedPos = 0;
-         curPos = jjMoveStringLiteralDfa0_2();
-         break;
-       case 3:
-         jjmatchedKind = 0x7fffffff;
-         jjmatchedPos = 0;
-         curPos = jjMoveStringLiteralDfa0_3();
-         break;
-       case 4:
-         jjmatchedKind = 0x7fffffff;
-         jjmatchedPos = 0;
-         curPos = jjMoveStringLiteralDfa0_4();
-         break;
-     }
-     if (jjmatchedKind != 0x7fffffff)
-     {
-        if (jjmatchedPos + 1 < curPos)
-           input_stream.backup(curPos - jjmatchedPos - 1);
-        if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
-        {
-           matchedToken = jjFillToken();
-           matchedToken.specialToken = specialToken;
-           TokenLexicalActions(matchedToken);
-       if (jjnewLexState[jjmatchedKind] != -1)
-         curLexState = jjnewLexState[jjmatchedKind];
-           return matchedToken;
-        }
-        else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
-        {
-           if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
-           {
-              matchedToken = jjFillToken();
-              if (specialToken == null)
-                 specialToken = matchedToken;
-              else
-              {
-                 matchedToken.specialToken = specialToken;
-                 specialToken = (specialToken.next = matchedToken);
-              }
-           }
-         if (jjnewLexState[jjmatchedKind] != -1)
-           curLexState = jjnewLexState[jjmatchedKind];
-           continue EOFLoop;
-        }
-        MoreLexicalActions();
-      if (jjnewLexState[jjmatchedKind] != -1)
-        curLexState = jjnewLexState[jjmatchedKind];
-        curPos = 0;
-        jjmatchedKind = 0x7fffffff;
-        try {
-           curChar = input_stream.readChar();
-           continue;
-        }
-        catch (java.io.IOException e1) { }
-     }
-     int error_line = input_stream.getEndLine();
-     int error_column = input_stream.getEndColumn();
-     String error_after = null;
-     boolean EOFSeen = false;
-     try { input_stream.readChar(); input_stream.backup(1); }
-     catch (java.io.IOException e1) {
-        EOFSeen = true;
-        error_after = curPos <= 1 ? "" : input_stream.GetImage();
-        if (curChar == '\n' || curChar == '\r') {
-           error_line++;
-           error_column = 0;
-        }
-        else
-           error_column++;
-     }
-     if (!EOFSeen) {
-        input_stream.backup(1);
-        error_after = curPos <= 1 ? "" : input_stream.GetImage();
-     }
-     throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
-   }
-  }
-}
-
-void MoreLexicalActions()
-{
-   jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
-   switch(jjmatchedKind)
-   {
-      case 16 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-                          image.deleteCharAt(image.length() - 2);
-         break;
-      case 21 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-                          image.deleteCharAt(image.length() - 2);
-         break;
-      case 22 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-              commentNest = 1;
-         break;
-      case 24 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-                          image.deleteCharAt(image.length() - 2);
-         break;
-      case 25 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-              ++commentNest;
-         break;
-      case 26 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-              --commentNest; if (commentNest == 0) SwitchTo(INCOMMENT);
-         break;
-      case 28 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-               image.deleteCharAt(image.length() - 1);
-         break;
-      case 29 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-                          image.deleteCharAt(image.length() - 2);
-         break;
-      default : 
-         break;
-   }
-}
-void TokenLexicalActions(Token matchedToken)
-{
-   switch(jjmatchedKind)
-   {
-      case 18 :
-        if (image == null)
-            image = new StringBuffer();
-            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
-                                 matchedToken.image = image.toString();
-         break;
-      case 31 :
-        if (image == null)
-            image = new StringBuffer();
-            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
-                                 matchedToken.image = image.substring(0, image.length() - 1);
-         break;
-      default : 
-         break;
-   }
-}
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/AddressListParserTreeConstants.java b/src/org/apache/james/mime4j/field/address/parser/AddressListParserTreeConstants.java
deleted file mode 100644
index 5987f19..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/AddressListParserTreeConstants.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. /Users/jason/Projects/apache-mime4j-0.3/target/generated-sources/jjtree/org/apache/james/mime4j/field/address/parser/AddressListParserTreeConstants.java */
-
-package org.apache.james.mime4j.field.address.parser;
-
-public interface AddressListParserTreeConstants
-{
-  public int JJTVOID = 0;
-  public int JJTADDRESS_LIST = 1;
-  public int JJTADDRESS = 2;
-  public int JJTMAILBOX = 3;
-  public int JJTNAME_ADDR = 4;
-  public int JJTGROUP_BODY = 5;
-  public int JJTANGLE_ADDR = 6;
-  public int JJTROUTE = 7;
-  public int JJTPHRASE = 8;
-  public int JJTADDR_SPEC = 9;
-  public int JJTLOCAL_PART = 10;
-  public int JJTDOMAIN = 11;
-
-
-  public String[] jjtNodeName = {
-    "void",
-    "address_list",
-    "address",
-    "mailbox",
-    "name_addr",
-    "group_body",
-    "angle_addr",
-    "route",
-    "phrase",
-    "addr_spec",
-    "local_part",
-    "domain",
-  };
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/AddressListParserVisitor.java b/src/org/apache/james/mime4j/field/address/parser/AddressListParserVisitor.java
deleted file mode 100644
index 8ec2fe7..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/AddressListParserVisitor.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. /Users/jason/Projects/apache-mime4j-0.3/target/generated-sources/jjtree/org/apache/james/mime4j/field/address/parser/AddressListParserVisitor.java */
-
-package org.apache.james.mime4j.field.address.parser;
-
-public interface AddressListParserVisitor
-{
-  public Object visit(SimpleNode node, Object data);
-  public Object visit(ASTaddress_list node, Object data);
-  public Object visit(ASTaddress node, Object data);
-  public Object visit(ASTmailbox node, Object data);
-  public Object visit(ASTname_addr node, Object data);
-  public Object visit(ASTgroup_body node, Object data);
-  public Object visit(ASTangle_addr node, Object data);
-  public Object visit(ASTroute node, Object data);
-  public Object visit(ASTphrase node, Object data);
-  public Object visit(ASTaddr_spec node, Object data);
-  public Object visit(ASTlocal_part node, Object data);
-  public Object visit(ASTdomain node, Object data);
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/BaseNode.java b/src/org/apache/james/mime4j/field/address/parser/BaseNode.java
deleted file mode 100644
index 7809746..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/BaseNode.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field.address.parser;
-
-import org.apache.james.mime4j.field.address.parser.Node;
-import org.apache.james.mime4j.field.address.parser.Token;
-
-public abstract class BaseNode implements Node {
-  
-  public Token firstToken;
-  public Token lastToken;
-
-}
\ No newline at end of file
diff --git a/src/org/apache/james/mime4j/field/address/parser/JJTAddressListParserState.java b/src/org/apache/james/mime4j/field/address/parser/JJTAddressListParserState.java
deleted file mode 100644
index 08b5c5b..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/JJTAddressListParserState.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. /Users/jason/Projects/apache-mime4j-0.3/target/generated-sources/jjtree/org/apache/james/mime4j/field/address/parser/JJTAddressListParserState.java */
-
-package org.apache.james.mime4j.field.address.parser;
-
-class JJTAddressListParserState {
-  private java.util.Stack<Node> nodes;
-  private java.util.Stack<Integer> marks;
-
-  private int sp;		// number of nodes on stack
-  private int mk;		// current mark
-  private boolean node_created;
-
-  JJTAddressListParserState() {
-    nodes = new java.util.Stack<Node>();
-    marks = new java.util.Stack<Integer>();
-    sp = 0;
-    mk = 0;
-  }
-
-  /* Determines whether the current node was actually closed and
-     pushed.  This should only be called in the final user action of a
-     node scope.  */
-  boolean nodeCreated() {
-    return node_created;
-  }
-
-  /* Call this to reinitialize the node stack.  It is called
-     automatically by the parser's ReInit() method. */
-  void reset() {
-    nodes.removeAllElements();
-    marks.removeAllElements();
-    sp = 0;
-    mk = 0;
-  }
-
-  /* Returns the root node of the AST.  It only makes sense to call
-     this after a successful parse. */
-  Node rootNode() {
-    return nodes.elementAt(0);
-  }
-
-  /* Pushes a node on to the stack. */
-  void pushNode(Node n) {
-    nodes.push(n);
-    ++sp;
-  }
-
-  /* Returns the node on the top of the stack, and remove it from the
-     stack.  */
-  Node popNode() {
-    if (--sp < mk) {
-      mk = marks.pop().intValue();
-    }
-    return nodes.pop();
-  }
-
-  /* Returns the node currently on the top of the stack. */
-  Node peekNode() {
-    return nodes.peek();
-  }
-
-  /* Returns the number of children on the stack in the current node
-     scope. */
-  int nodeArity() {
-    return sp - mk;
-  }
-
-
-  void clearNodeScope(Node n) {
-    while (sp > mk) {
-      popNode();
-    }
-    mk = marks.pop().intValue();
-  }
-
-
-  void openNodeScope(Node n) {
-    marks.push(new Integer(mk));
-    mk = sp;
-    n.jjtOpen();
-  }
-
-
-  /* A definite node is constructed from a specified number of
-     children.  That number of nodes are popped from the stack and
-     made the children of the definite node.  Then the definite node
-     is pushed on to the stack. */
-  void closeNodeScope(Node n, int num) {
-    mk = marks.pop().intValue();
-    while (num-- > 0) {
-      Node c = popNode();
-      c.jjtSetParent(n);
-      n.jjtAddChild(c, num);
-    }
-    n.jjtClose();
-    pushNode(n);
-    node_created = true;
-  }
-
-
-  /* A conditional node is constructed if its condition is true.  All
-     the nodes that have been pushed since the node was opened are
-     made children of the the conditional node, which is then pushed
-     on to the stack.  If the condition is false the node is not
-     constructed and they are left on the stack. */
-  void closeNodeScope(Node n, boolean condition) {
-    if (condition) {
-      int a = nodeArity();
-      mk = marks.pop().intValue();
-      while (a-- > 0) {
-	Node c = popNode();
-	c.jjtSetParent(n);
-	n.jjtAddChild(c, a);
-      }
-      n.jjtClose();
-      pushNode(n);
-      node_created = true;
-    } else {
-      mk = marks.pop().intValue();
-      node_created = false;
-    }
-  }
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/Node.java b/src/org/apache/james/mime4j/field/address/parser/Node.java
deleted file mode 100644
index 1588920..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/Node.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. Node.java */
-
-package org.apache.james.mime4j.field.address.parser;
-
-/* All AST nodes must implement this interface.  It provides basic
-   machinery for constructing the parent and child relationships
-   between nodes. */
-
-public interface Node {
-
-  /** This method is called after the node has been made the current
-    node.  It indicates that child nodes can now be added to it. */
-  public void jjtOpen();
-
-  /** This method is called after all the child nodes have been
-    added. */
-  public void jjtClose();
-
-  /** This pair of methods are used to inform the node of its
-    parent. */
-  public void jjtSetParent(Node n);
-  public Node jjtGetParent();
-
-  /** This method tells the node to add its argument to the node's
-    list of children.  */
-  public void jjtAddChild(Node n, int i);
-
-  /** This method returns a child node.  The children are numbered
-     from zero, left to right. */
-  public Node jjtGetChild(int i);
-
-  /** Return the number of children the node has. */
-  public int jjtGetNumChildren();
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(AddressListParserVisitor visitor, Object data);
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/ParseException.java b/src/org/apache/james/mime4j/field/address/parser/ParseException.java
deleted file mode 100644
index e20146f..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/ParseException.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.address.parser;
-
-/**
- * This exception is thrown when parse errors are encountered.
- * You can explicitly create objects of this exception type by
- * calling the method generateParseException in the generated
- * parser.
- *
- * You can modify this class to customize your error reporting
- * mechanisms so long as you retain the public fields.
- */
-public class ParseException extends Exception {
-
-  /**
-   * This constructor is used by the method "generateParseException"
-   * in the generated parser.  Calling this constructor generates
-   * a new object of this type with the fields "currentToken",
-   * "expectedTokenSequences", and "tokenImage" set.  The boolean
-   * flag "specialConstructor" is also set to true to indicate that
-   * this constructor was used to create this object.
-   * This constructor calls its super class with the empty string
-   * to force the "toString" method of parent class "Throwable" to
-   * print the error message in the form:
-   *     ParseException: <result of getMessage>
-   */
-  public ParseException(Token currentTokenVal,
-                        int[][] expectedTokenSequencesVal,
-                        String[] tokenImageVal
-                       )
-  {
-    super("");
-    specialConstructor = true;
-    currentToken = currentTokenVal;
-    expectedTokenSequences = expectedTokenSequencesVal;
-    tokenImage = tokenImageVal;
-  }
-
-  /**
-   * The following constructors are for use by you for whatever
-   * purpose you can think of.  Constructing the exception in this
-   * manner makes the exception behave in the normal way - i.e., as
-   * documented in the class "Throwable".  The fields "errorToken",
-   * "expectedTokenSequences", and "tokenImage" do not contain
-   * relevant information.  The JavaCC generated code does not use
-   * these constructors.
-   */
-
-  public ParseException() {
-    super();
-    specialConstructor = false;
-  }
-
-  public ParseException(String message) {
-    super(message);
-    specialConstructor = false;
-  }
-
-  /**
-   * This variable determines which constructor was used to create
-   * this object and thereby affects the semantics of the
-   * "getMessage" method (see below).
-   */
-  protected boolean specialConstructor;
-
-  /**
-   * This is the last token that has been consumed successfully.  If
-   * this object has been created due to a parse error, the token
-   * followng this token will (therefore) be the first error token.
-   */
-  public Token currentToken;
-
-  /**
-   * Each entry in this array is an array of integers.  Each array
-   * of integers represents a sequence of tokens (by their ordinal
-   * values) that is expected at this point of the parse.
-   */
-  public int[][] expectedTokenSequences;
-
-  /**
-   * This is a reference to the "tokenImage" array of the generated
-   * parser within which the parse error occurred.  This array is
-   * defined in the generated ...Constants interface.
-   */
-  public String[] tokenImage;
-
-  /**
-   * This method has the standard behavior when this object has been
-   * created using the standard constructors.  Otherwise, it uses
-   * "currentToken" and "expectedTokenSequences" to generate a parse
-   * error message and returns it.  If this object has been created
-   * due to a parse error, and you do not catch it (it gets thrown
-   * from the parser), then this method is called during the printing
-   * of the final stack trace, and hence the correct error message
-   * gets displayed.
-   */
-  public String getMessage() {
-    if (!specialConstructor) {
-      return super.getMessage();
-    }
-    StringBuffer expected = new StringBuffer();
-    int maxSize = 0;
-    for (int i = 0; i < expectedTokenSequences.length; i++) {
-      if (maxSize < expectedTokenSequences[i].length) {
-        maxSize = expectedTokenSequences[i].length;
-      }
-      for (int j = 0; j < expectedTokenSequences[i].length; j++) {
-        expected.append(tokenImage[expectedTokenSequences[i][j]]).append(" ");
-      }
-      if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
-        expected.append("...");
-      }
-      expected.append(eol).append("    ");
-    }
-    String retval = "Encountered \"";
-    Token tok = currentToken.next;
-    for (int i = 0; i < maxSize; i++) {
-      if (i != 0) retval += " ";
-      if (tok.kind == 0) {
-        retval += tokenImage[0];
-        break;
-      }
-      retval += add_escapes(tok.image);
-      tok = tok.next; 
-    }
-    retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
-    retval += "." + eol;
-    if (expectedTokenSequences.length == 1) {
-      retval += "Was expecting:" + eol + "    ";
-    } else {
-      retval += "Was expecting one of:" + eol + "    ";
-    }
-    retval += expected.toString();
-    return retval;
-  }
-
-  /**
-   * The end of line string for this machine.
-   */
-  protected String eol = System.getProperty("line.separator", "\n");
- 
-  /**
-   * Used to convert raw characters to their escaped version
-   * when these raw version cannot be used as part of an ASCII
-   * string literal.
-   */
-  protected String add_escapes(String str) {
-      StringBuffer retval = new StringBuffer();
-      char ch;
-      for (int i = 0; i < str.length(); i++) {
-        switch (str.charAt(i))
-        {
-           case 0 :
-              continue;
-           case '\b':
-              retval.append("\\b");
-              continue;
-           case '\t':
-              retval.append("\\t");
-              continue;
-           case '\n':
-              retval.append("\\n");
-              continue;
-           case '\f':
-              retval.append("\\f");
-              continue;
-           case '\r':
-              retval.append("\\r");
-              continue;
-           case '\"':
-              retval.append("\\\"");
-              continue;
-           case '\'':
-              retval.append("\\\'");
-              continue;
-           case '\\':
-              retval.append("\\\\");
-              continue;
-           default:
-              if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
-                 String s = "0000" + Integer.toString(ch, 16);
-                 retval.append("\\u" + s.substring(s.length() - 4, s.length()));
-              } else {
-                 retval.append(ch);
-              }
-              continue;
-        }
-      }
-      return retval.toString();
-   }
-
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/SimpleCharStream.java b/src/org/apache/james/mime4j/field/address/parser/SimpleCharStream.java
deleted file mode 100644
index c9ba0b4..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/SimpleCharStream.java
+++ /dev/null
@@ -1,454 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 4.0 */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.address.parser;
-
-/**
- * An implementation of interface CharStream, where the stream is assumed to
- * contain only ASCII characters (without unicode processing).
- */
-
-public class SimpleCharStream
-{
-  public static final boolean staticFlag = false;
-  int bufsize;
-  int available;
-  int tokenBegin;
-  public int bufpos = -1;
-  protected int bufline[];
-  protected int bufcolumn[];
-
-  protected int column = 0;
-  protected int line = 1;
-
-  protected boolean prevCharIsCR = false;
-  protected boolean prevCharIsLF = false;
-
-  protected java.io.Reader inputStream;
-
-  protected char[] buffer;
-  protected int maxNextCharInd = 0;
-  protected int inBuf = 0;
-  protected int tabSize = 8;
-
-  protected void setTabSize(int i) { tabSize = i; }
-  protected int getTabSize(int i) { return tabSize; }
-
-
-  protected void ExpandBuff(boolean wrapAround)
-  {
-     char[] newbuffer = new char[bufsize + 2048];
-     int newbufline[] = new int[bufsize + 2048];
-     int newbufcolumn[] = new int[bufsize + 2048];
-
-     try
-     {
-        if (wrapAround)
-        {
-           System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
-           System.arraycopy(buffer, 0, newbuffer,
-                                             bufsize - tokenBegin, bufpos);
-           buffer = newbuffer;
-
-           System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
-           System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
-           bufline = newbufline;
-
-           System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
-           System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
-           bufcolumn = newbufcolumn;
-
-           maxNextCharInd = (bufpos += (bufsize - tokenBegin));
-        }
-        else
-        {
-           System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
-           buffer = newbuffer;
-
-           System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
-           bufline = newbufline;
-
-           System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
-           bufcolumn = newbufcolumn;
-
-           maxNextCharInd = (bufpos -= tokenBegin);
-        }
-     }
-     catch (Throwable t)
-     {
-        throw new Error(t.getMessage());
-     }
-
-
-     bufsize += 2048;
-     available = bufsize;
-     tokenBegin = 0;
-  }
-
-  protected void FillBuff() throws java.io.IOException
-  {
-     if (maxNextCharInd == available)
-     {
-        if (available == bufsize)
-        {
-           if (tokenBegin > 2048)
-           {
-              bufpos = maxNextCharInd = 0;
-              available = tokenBegin;
-           }
-           else if (tokenBegin < 0)
-              bufpos = maxNextCharInd = 0;
-           else
-              ExpandBuff(false);
-        }
-        else if (available > tokenBegin)
-           available = bufsize;
-        else if ((tokenBegin - available) < 2048)
-           ExpandBuff(true);
-        else
-           available = tokenBegin;
-     }
-
-     int i;
-     try {
-        if ((i = inputStream.read(buffer, maxNextCharInd,
-                                    available - maxNextCharInd)) == -1)
-        {
-           inputStream.close();
-           throw new java.io.IOException();
-        }
-        else
-           maxNextCharInd += i;
-        return;
-     }
-     catch(java.io.IOException e) {
-        --bufpos;
-        backup(0);
-        if (tokenBegin == -1)
-           tokenBegin = bufpos;
-        throw e;
-     }
-  }
-
-  public char BeginToken() throws java.io.IOException
-  {
-     tokenBegin = -1;
-     char c = readChar();
-     tokenBegin = bufpos;
-
-     return c;
-  }
-
-  protected void UpdateLineColumn(char c)
-  {
-     column++;
-
-     if (prevCharIsLF)
-     {
-        prevCharIsLF = false;
-        line += (column = 1);
-     }
-     else if (prevCharIsCR)
-     {
-        prevCharIsCR = false;
-        if (c == '\n')
-        {
-           prevCharIsLF = true;
-        }
-        else
-           line += (column = 1);
-     }
-
-     switch (c)
-     {
-        case '\r' :
-           prevCharIsCR = true;
-           break;
-        case '\n' :
-           prevCharIsLF = true;
-           break;
-        case '\t' :
-           column--;
-           column += (tabSize - (column % tabSize));
-           break;
-        default :
-           break;
-     }
-
-     bufline[bufpos] = line;
-     bufcolumn[bufpos] = column;
-  }
-
-  public char readChar() throws java.io.IOException
-  {
-     if (inBuf > 0)
-     {
-        --inBuf;
-
-        if (++bufpos == bufsize)
-           bufpos = 0;
-
-        return buffer[bufpos];
-     }
-
-     if (++bufpos >= maxNextCharInd)
-        FillBuff();
-
-     char c = buffer[bufpos];
-
-     UpdateLineColumn(c);
-     return (c);
-  }
-
-  /**
-   * @deprecated 
-   * @see #getEndColumn
-   */
-  @Deprecated
-  public int getColumn() {
-     return bufcolumn[bufpos];
-  }
-
-  /**
-   * @deprecated 
-   * @see #getEndLine
-   */
-  @Deprecated
-  public int getLine() {
-     return bufline[bufpos];
-  }
-
-  public int getEndColumn() {
-     return bufcolumn[bufpos];
-  }
-
-  public int getEndLine() {
-     return bufline[bufpos];
-  }
-
-  public int getBeginColumn() {
-     return bufcolumn[tokenBegin];
-  }
-
-  public int getBeginLine() {
-     return bufline[tokenBegin];
-  }
-
-  public void backup(int amount) {
-
-    inBuf += amount;
-    if ((bufpos -= amount) < 0)
-       bufpos += bufsize;
-  }
-
-  public SimpleCharStream(java.io.Reader dstream, int startline,
-  int startcolumn, int buffersize)
-  {
-    inputStream = dstream;
-    line = startline;
-    column = startcolumn - 1;
-
-    available = bufsize = buffersize;
-    buffer = new char[buffersize];
-    bufline = new int[buffersize];
-    bufcolumn = new int[buffersize];
-  }
-
-  public SimpleCharStream(java.io.Reader dstream, int startline,
-                          int startcolumn)
-  {
-     this(dstream, startline, startcolumn, 4096);
-  }
-
-  public SimpleCharStream(java.io.Reader dstream)
-  {
-     this(dstream, 1, 1, 4096);
-  }
-  public void ReInit(java.io.Reader dstream, int startline,
-  int startcolumn, int buffersize)
-  {
-    inputStream = dstream;
-    line = startline;
-    column = startcolumn - 1;
-
-    if (buffer == null || buffersize != buffer.length)
-    {
-      available = bufsize = buffersize;
-      buffer = new char[buffersize];
-      bufline = new int[buffersize];
-      bufcolumn = new int[buffersize];
-    }
-    prevCharIsLF = prevCharIsCR = false;
-    tokenBegin = inBuf = maxNextCharInd = 0;
-    bufpos = -1;
-  }
-
-  public void ReInit(java.io.Reader dstream, int startline,
-                     int startcolumn)
-  {
-     ReInit(dstream, startline, startcolumn, 4096);
-  }
-
-  public void ReInit(java.io.Reader dstream)
-  {
-     ReInit(dstream, 1, 1, 4096);
-  }
-  public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
-  int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
-  {
-     this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream, int startline,
-  int startcolumn, int buffersize)
-  {
-     this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
-                          int startcolumn) throws java.io.UnsupportedEncodingException
-  {
-     this(dstream, encoding, startline, startcolumn, 4096);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream, int startline,
-                          int startcolumn)
-  {
-     this(dstream, startline, startcolumn, 4096);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
-  {
-     this(dstream, encoding, 1, 1, 4096);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream)
-  {
-     this(dstream, 1, 1, 4096);
-  }
-
-  public void ReInit(java.io.InputStream dstream, String encoding, int startline,
-                          int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
-  {
-     ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
-  }
-
-  public void ReInit(java.io.InputStream dstream, int startline,
-                          int startcolumn, int buffersize)
-  {
-     ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
-  }
-
-  public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
-  {
-     ReInit(dstream, encoding, 1, 1, 4096);
-  }
-
-  public void ReInit(java.io.InputStream dstream)
-  {
-     ReInit(dstream, 1, 1, 4096);
-  }
-  public void ReInit(java.io.InputStream dstream, String encoding, int startline,
-                     int startcolumn) throws java.io.UnsupportedEncodingException
-  {
-     ReInit(dstream, encoding, startline, startcolumn, 4096);
-  }
-  public void ReInit(java.io.InputStream dstream, int startline,
-                     int startcolumn)
-  {
-     ReInit(dstream, startline, startcolumn, 4096);
-  }
-  public String GetImage()
-  {
-     if (bufpos >= tokenBegin)
-        return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
-     else
-        return new String(buffer, tokenBegin, bufsize - tokenBegin) +
-                              new String(buffer, 0, bufpos + 1);
-  }
-
-  public char[] GetSuffix(int len)
-  {
-     char[] ret = new char[len];
-
-     if ((bufpos + 1) >= len)
-        System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
-     else
-     {
-        System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
-                                                          len - bufpos - 1);
-        System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
-     }
-
-     return ret;
-  }
-
-  public void Done()
-  {
-     buffer = null;
-     bufline = null;
-     bufcolumn = null;
-  }
-
-  /**
-   * Method to adjust line and column numbers for the start of a token.
-   */
-  public void adjustBeginLineColumn(int newLine, int newCol)
-  {
-     int start = tokenBegin;
-     int len;
-
-     if (bufpos >= tokenBegin)
-     {
-        len = bufpos - tokenBegin + inBuf + 1;
-     }
-     else
-     {
-        len = bufsize - tokenBegin + bufpos + 1 + inBuf;
-     }
-
-     int i = 0, j = 0, k = 0;
-     int nextColDiff = 0, columnDiff = 0;
-
-     while (i < len &&
-            bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
-     {
-        bufline[j] = newLine;
-        nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
-        bufcolumn[j] = newCol + columnDiff;
-        columnDiff = nextColDiff;
-        i++;
-     } 
-
-     if (i < len)
-     {
-        bufline[j] = newLine++;
-        bufcolumn[j] = newCol + columnDiff;
-
-        while (i++ < len)
-        {
-           if (bufline[j = start % bufsize] != bufline[++start % bufsize])
-              bufline[j] = newLine++;
-           else
-              bufline[j] = newLine;
-        }
-     }
-
-     line = bufline[j];
-     column = bufcolumn[j];
-  }
-
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/SimpleNode.java b/src/org/apache/james/mime4j/field/address/parser/SimpleNode.java
deleted file mode 100644
index 9bf537e..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/SimpleNode.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. SimpleNode.java */
-
-package org.apache.james.mime4j.field.address.parser;
-
-public class SimpleNode extends org.apache.james.mime4j.field.address.parser.BaseNode implements Node {
-  protected Node parent;
-  protected Node[] children;
-  protected int id;
-  protected AddressListParser parser;
-
-  public SimpleNode(int i) {
-    id = i;
-  }
-
-  public SimpleNode(AddressListParser p, int i) {
-    this(i);
-    parser = p;
-  }
-
-  public void jjtOpen() {
-  }
-
-  public void jjtClose() {
-  }
-  
-  public void jjtSetParent(Node n) { parent = n; }
-  public Node jjtGetParent() { return parent; }
-
-  public void jjtAddChild(Node n, int i) {
-    if (children == null) {
-      children = new Node[i + 1];
-    } else if (i >= children.length) {
-      Node c[] = new Node[i + 1];
-      System.arraycopy(children, 0, c, 0, children.length);
-      children = c;
-    }
-    children[i] = n;
-  }
-
-  public Node jjtGetChild(int i) {
-    return children[i];
-  }
-
-  public int jjtGetNumChildren() {
-    return (children == null) ? 0 : children.length;
-  }
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(AddressListParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-
-  /** Accept the visitor. **/
-  public Object childrenAccept(AddressListParserVisitor visitor, Object data) {
-    if (children != null) {
-      for (int i = 0; i < children.length; ++i) {
-        children[i].jjtAccept(visitor, data);
-      }
-    }
-    return data;
-  }
-
-  /* You can override these two methods in subclasses of SimpleNode to
-     customize the way the node appears when the tree is dumped.  If
-     your output uses more than one line you should override
-     toString(String), otherwise overriding toString() is probably all
-     you need to do. */
-
-  public String toString() { return AddressListParserTreeConstants.jjtNodeName[id]; }
-  public String toString(String prefix) { return prefix + toString(); }
-
-  /* Override this method if you want to customize how the node dumps
-     out its children. */
-
-  public void dump(String prefix) {
-    System.out.println(toString(prefix));
-    if (children != null) {
-      for (int i = 0; i < children.length; ++i) {
-	SimpleNode n = (SimpleNode)children[i];
-	if (n != null) {
-	  n.dump(prefix + " ");
-	}
-      }
-    }
-  }
-}
-
diff --git a/src/org/apache/james/mime4j/field/address/parser/Token.java b/src/org/apache/james/mime4j/field/address/parser/Token.java
deleted file mode 100644
index 2382e8e..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/Token.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.address.parser;
-
-/**
- * Describes the input token stream.
- */
-
-public class Token {
-
-  /**
-   * An integer that describes the kind of this token.  This numbering
-   * system is determined by JavaCCParser, and a table of these numbers is
-   * stored in the file ...Constants.java.
-   */
-  public int kind;
-
-  /**
-   * beginLine and beginColumn describe the position of the first character
-   * of this token; endLine and endColumn describe the position of the
-   * last character of this token.
-   */
-  public int beginLine, beginColumn, endLine, endColumn;
-
-  /**
-   * The string image of the token.
-   */
-  public String image;
-
-  /**
-   * A reference to the next regular (non-special) token from the input
-   * stream.  If this is the last token from the input stream, or if the
-   * token manager has not read tokens beyond this one, this field is
-   * set to null.  This is true only if this token is also a regular
-   * token.  Otherwise, see below for a description of the contents of
-   * this field.
-   */
-  public Token next;
-
-  /**
-   * This field is used to access special tokens that occur prior to this
-   * token, but after the immediately preceding regular (non-special) token.
-   * If there are no such special tokens, this field is set to null.
-   * When there are more than one such special token, this field refers
-   * to the last of these special tokens, which in turn refers to the next
-   * previous special token through its specialToken field, and so on
-   * until the first special token (whose specialToken field is null).
-   * The next fields of special tokens refer to other special tokens that
-   * immediately follow it (without an intervening regular token).  If there
-   * is no such token, this field is null.
-   */
-  public Token specialToken;
-
-  /**
-   * Returns the image.
-   */
-  public String toString()
-  {
-     return image;
-  }
-
-  /**
-   * Returns a new Token object, by default. However, if you want, you
-   * can create and return subclass objects based on the value of ofKind.
-   * Simply add the cases to the switch for all those special cases.
-   * For example, if you have a subclass of Token called IDToken that
-   * you want to create if ofKind is ID, simlpy add something like :
-   *
-   *    case MyParserConstants.ID : return new IDToken();
-   *
-   * to the following switch statement. Then you can cast matchedToken
-   * variable to the appropriate type and use it in your lexical actions.
-   */
-  public static final Token newToken(int ofKind)
-  {
-     switch(ofKind)
-     {
-       default : return new Token();
-     }
-  }
-
-}
diff --git a/src/org/apache/james/mime4j/field/address/parser/TokenMgrError.java b/src/org/apache/james/mime4j/field/address/parser/TokenMgrError.java
deleted file mode 100644
index 0299c85..0000000
--- a/src/org/apache/james/mime4j/field/address/parser/TokenMgrError.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.address.parser;
-
-public class TokenMgrError extends Error
-{
-   /*
-    * Ordinals for various reasons why an Error of this type can be thrown.
-    */
-
-   /**
-    * Lexical error occured.
-    */
-   static final int LEXICAL_ERROR = 0;
-
-   /**
-    * An attempt wass made to create a second instance of a static token manager.
-    */
-   static final int STATIC_LEXER_ERROR = 1;
-
-   /**
-    * Tried to change to an invalid lexical state.
-    */
-   static final int INVALID_LEXICAL_STATE = 2;
-
-   /**
-    * Detected (and bailed out of) an infinite loop in the token manager.
-    */
-   static final int LOOP_DETECTED = 3;
-
-   /**
-    * Indicates the reason why the exception is thrown. It will have
-    * one of the above 4 values.
-    */
-   int errorCode;
-
-   /**
-    * Replaces unprintable characters by their espaced (or unicode escaped)
-    * equivalents in the given string
-    */
-   protected static final String addEscapes(String str) {
-      StringBuffer retval = new StringBuffer();
-      char ch;
-      for (int i = 0; i < str.length(); i++) {
-        switch (str.charAt(i))
-        {
-           case 0 :
-              continue;
-           case '\b':
-              retval.append("\\b");
-              continue;
-           case '\t':
-              retval.append("\\t");
-              continue;
-           case '\n':
-              retval.append("\\n");
-              continue;
-           case '\f':
-              retval.append("\\f");
-              continue;
-           case '\r':
-              retval.append("\\r");
-              continue;
-           case '\"':
-              retval.append("\\\"");
-              continue;
-           case '\'':
-              retval.append("\\\'");
-              continue;
-           case '\\':
-              retval.append("\\\\");
-              continue;
-           default:
-              if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
-                 String s = "0000" + Integer.toString(ch, 16);
-                 retval.append("\\u" + s.substring(s.length() - 4, s.length()));
-              } else {
-                 retval.append(ch);
-              }
-              continue;
-        }
-      }
-      return retval.toString();
-   }
-
-   /**
-    * Returns a detailed message for the Error when it is thrown by the
-    * token manager to indicate a lexical error.
-    * Parameters : 
-    *    EOFSeen     : indicates if EOF caused the lexicl error
-    *    curLexState : lexical state in which this error occured
-    *    errorLine   : line number when the error occured
-    *    errorColumn : column number when the error occured
-    *    errorAfter  : prefix that was seen before this error occured
-    *    curchar     : the offending character
-    * Note: You can customize the lexical error message by modifying this method.
-    */
-   protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
-      return("Lexical error at line " +
-           errorLine + ", column " +
-           errorColumn + ".  Encountered: " +
-           (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
-           "after : \"" + addEscapes(errorAfter) + "\"");
-   }
-
-   /**
-    * You can also modify the body of this method to customize your error messages.
-    * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
-    * of end-users concern, so you can return something like : 
-    *
-    *     "Internal Error : Please file a bug report .... "
-    *
-    * from this method for such cases in the release version of your parser.
-    */
-   public String getMessage() {
-      return super.getMessage();
-   }
-
-   /*
-    * Constructors of various flavors follow.
-    */
-
-   public TokenMgrError() {
-   }
-
-   public TokenMgrError(String message, int reason) {
-      super(message);
-      errorCode = reason;
-   }
-
-   public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
-      this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
-   }
-}
diff --git a/src/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParser.java b/src/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParser.java
deleted file mode 100644
index cacf3af..0000000
--- a/src/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParser.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. ContentTypeParser.java */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.contenttype.parser;
-
-import java.util.ArrayList;
-import java.util.Vector;
-
-public class ContentTypeParser implements ContentTypeParserConstants {
-
-        private String type;
-        private String subtype;
-        private ArrayList<String> paramNames = new ArrayList<String>();
-        private ArrayList<String> paramValues = new ArrayList<String>();
-
-        public String getType() { return type; }
-        public String getSubType() { return subtype; }
-        public ArrayList<String> getParamNames() { return paramNames; }
-        public ArrayList<String> getParamValues() { return paramValues; }
-
-    public static void main(String args[]) throws ParseException {
-        while (true) {
-            try {
-                ContentTypeParser parser = new ContentTypeParser(System.in);
-                parser.parseLine();
-            } catch (Exception x) {
-                x.printStackTrace();
-                return;
-            }
-        }
-    }
-
-  final public void parseLine() throws ParseException {
-    parse();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case 1:
-      jj_consume_token(1);
-      break;
-    default:
-      jj_la1[0] = jj_gen;
-      ;
-    }
-    jj_consume_token(2);
-  }
-
-  final public void parseAll() throws ParseException {
-    parse();
-    jj_consume_token(0);
-  }
-
-  final public void parse() throws ParseException {
-        Token type;
-        Token subtype;
-    type = jj_consume_token(ATOKEN);
-    jj_consume_token(3);
-    subtype = jj_consume_token(ATOKEN);
-                this.type = type.image;
-                this.subtype = subtype.image;
-    label_1:
-    while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case 4:
-        ;
-        break;
-      default:
-        jj_la1[1] = jj_gen;
-        break label_1;
-      }
-      jj_consume_token(4);
-      parameter();
-    }
-  }
-
-  final public void parameter() throws ParseException {
-        Token attrib;
-        String val;
-    attrib = jj_consume_token(ATOKEN);
-    jj_consume_token(5);
-    val = value();
-                paramNames.add(attrib.image);
-                paramValues.add(val);
-  }
-
-  final public String value() throws ParseException {
- Token t;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case ATOKEN:
-      t = jj_consume_token(ATOKEN);
-      break;
-    case QUOTEDSTRING:
-      t = jj_consume_token(QUOTEDSTRING);
-      break;
-    default:
-      jj_la1[2] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-          {if (true) return t.image;}
-    throw new Error("Missing return statement in function");
-  }
-
-  public ContentTypeParserTokenManager token_source;
-  SimpleCharStream jj_input_stream;
-  public Token token, jj_nt;
-  private int jj_ntk;
-  private int jj_gen;
-  final private int[] jj_la1 = new int[3];
-  static private int[] jj_la1_0;
-  static {
-      jj_la1_0();
-   }
-   private static void jj_la1_0() {
-      jj_la1_0 = new int[] {0x2,0x10,0x280000,};
-   }
-
-  public ContentTypeParser(java.io.InputStream stream) {
-     this(stream, null);
-  }
-  public ContentTypeParser(java.io.InputStream stream, String encoding) {
-    try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
-    token_source = new ContentTypeParserTokenManager(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 3; i++) jj_la1[i] = -1;
-  }
-
-  public void ReInit(java.io.InputStream stream) {
-     ReInit(stream, null);
-  }
-  public void ReInit(java.io.InputStream stream, String encoding) {
-    try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
-    token_source.ReInit(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 3; i++) jj_la1[i] = -1;
-  }
-
-  public ContentTypeParser(java.io.Reader stream) {
-    jj_input_stream = new SimpleCharStream(stream, 1, 1);
-    token_source = new ContentTypeParserTokenManager(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 3; i++) jj_la1[i] = -1;
-  }
-
-  public void ReInit(java.io.Reader stream) {
-    jj_input_stream.ReInit(stream, 1, 1);
-    token_source.ReInit(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 3; i++) jj_la1[i] = -1;
-  }
-
-  public ContentTypeParser(ContentTypeParserTokenManager tm) {
-    token_source = tm;
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 3; i++) jj_la1[i] = -1;
-  }
-
-  public void ReInit(ContentTypeParserTokenManager tm) {
-    token_source = tm;
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 3; i++) jj_la1[i] = -1;
-  }
-
-  final private Token jj_consume_token(int kind) throws ParseException {
-    Token oldToken;
-    if ((oldToken = token).next != null) token = token.next;
-    else token = token.next = token_source.getNextToken();
-    jj_ntk = -1;
-    if (token.kind == kind) {
-      jj_gen++;
-      return token;
-    }
-    token = oldToken;
-    jj_kind = kind;
-    throw generateParseException();
-  }
-
-  final public Token getNextToken() {
-    if (token.next != null) token = token.next;
-    else token = token.next = token_source.getNextToken();
-    jj_ntk = -1;
-    jj_gen++;
-    return token;
-  }
-
-  final public Token getToken(int index) {
-    Token t = token;
-    for (int i = 0; i < index; i++) {
-      if (t.next != null) t = t.next;
-      else t = t.next = token_source.getNextToken();
-    }
-    return t;
-  }
-
-  final private int jj_ntk() {
-    if ((jj_nt=token.next) == null)
-      return (jj_ntk = (token.next=token_source.getNextToken()).kind);
-    else
-      return (jj_ntk = jj_nt.kind);
-  }
-
-  private Vector<int[]> jj_expentries = new Vector<int[]>();
-  private int[] jj_expentry;
-  private int jj_kind = -1;
-
-  public ParseException generateParseException() {
-    jj_expentries.removeAllElements();
-    boolean[] la1tokens = new boolean[24];
-    for (int i = 0; i < 24; i++) {
-      la1tokens[i] = false;
-    }
-    if (jj_kind >= 0) {
-      la1tokens[jj_kind] = true;
-      jj_kind = -1;
-    }
-    for (int i = 0; i < 3; i++) {
-      if (jj_la1[i] == jj_gen) {
-        for (int j = 0; j < 32; j++) {
-          if ((jj_la1_0[i] & (1<<j)) != 0) {
-            la1tokens[j] = true;
-          }
-        }
-      }
-    }
-    for (int i = 0; i < 24; i++) {
-      if (la1tokens[i]) {
-        jj_expentry = new int[1];
-        jj_expentry[0] = i;
-        jj_expentries.addElement(jj_expentry);
-      }
-    }
-    int[][] exptokseq = new int[jj_expentries.size()][];
-    for (int i = 0; i < jj_expentries.size(); i++) {
-      exptokseq[i] = jj_expentries.elementAt(i);
-    }
-    return new ParseException(token, exptokseq, tokenImage);
-  }
-
-  final public void enable_tracing() {
-  }
-
-  final public void disable_tracing() {
-  }
-
-}
diff --git a/src/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParserConstants.java b/src/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParserConstants.java
deleted file mode 100644
index d933d80..0000000
--- a/src/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParserConstants.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. ContentTypeParserConstants.java */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.contenttype.parser;
-
-public interface ContentTypeParserConstants {
-
-  int EOF = 0;
-  int WS = 6;
-  int COMMENT = 8;
-  int QUOTEDSTRING = 19;
-  int DIGITS = 20;
-  int ATOKEN = 21;
-  int QUOTEDPAIR = 22;
-  int ANY = 23;
-
-  int DEFAULT = 0;
-  int INCOMMENT = 1;
-  int NESTED_COMMENT = 2;
-  int INQUOTEDSTRING = 3;
-
-  String[] tokenImage = {
-    "<EOF>",
-    "\"\\r\"",
-    "\"\\n\"",
-    "\"/\"",
-    "\";\"",
-    "\"=\"",
-    "<WS>",
-    "\"(\"",
-    "\")\"",
-    "<token of kind 9>",
-    "\"(\"",
-    "<token of kind 11>",
-    "<token of kind 12>",
-    "\"(\"",
-    "\")\"",
-    "<token of kind 15>",
-    "\"\\\"\"",
-    "<token of kind 17>",
-    "<token of kind 18>",
-    "\"\\\"\"",
-    "<DIGITS>",
-    "<ATOKEN>",
-    "<QUOTEDPAIR>",
-    "<ANY>",
-  };
-
-}
diff --git a/src/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParserTokenManager.java b/src/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParserTokenManager.java
deleted file mode 100644
index 25b7aba..0000000
--- a/src/org/apache/james/mime4j/field/contenttype/parser/ContentTypeParserTokenManager.java
+++ /dev/null
@@ -1,877 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. ContentTypeParserTokenManager.java */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.contenttype.parser;
-import java.util.ArrayList;
-
-public class ContentTypeParserTokenManager implements ContentTypeParserConstants
-{
-        // Keeps track of how many levels of comment nesting
-        // we've encountered.  This is only used when the 2nd
-        // level is reached, for example ((this)), not (this).
-        // This is because the outermost level must be treated
-        // specially anyway, because the outermost ")" has a
-        // different token type than inner ")" instances.
-        static int commentNest;
-  public  java.io.PrintStream debugStream = System.out;
-  public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private final int jjStopStringLiteralDfa_0(int pos, long active0)
-{
-   switch (pos)
-   {
-      default :
-         return -1;
-   }
-}
-private final int jjStartNfa_0(int pos, long active0)
-{
-   return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
-}
-private final int jjStopAtPos(int pos, int kind)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   return pos + 1;
-}
-private final int jjStartNfaWithStates_0(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_0(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_0()
-{
-   switch(curChar)
-   {
-      case 10:
-         return jjStartNfaWithStates_0(0, 2, 2);
-      case 13:
-         return jjStartNfaWithStates_0(0, 1, 2);
-      case 34:
-         return jjStopAtPos(0, 16);
-      case 40:
-         return jjStopAtPos(0, 7);
-      case 47:
-         return jjStopAtPos(0, 3);
-      case 59:
-         return jjStopAtPos(0, 4);
-      case 61:
-         return jjStopAtPos(0, 5);
-      default :
-         return jjMoveNfa_0(3, 0);
-   }
-}
-private final void jjCheckNAdd(int state)
-{
-   if (jjrounds[state] != jjround)
-   {
-      jjstateSet[jjnewStateCnt++] = state;
-      jjrounds[state] = jjround;
-   }
-}
-private final void jjAddStates(int start, int end)
-{
-   do {
-      jjstateSet[jjnewStateCnt++] = jjnextStates[start];
-   } while (start++ != end);
-}
-private final void jjCheckNAddTwoStates(int state1, int state2)
-{
-   jjCheckNAdd(state1);
-   jjCheckNAdd(state2);
-}
-private final void jjCheckNAddStates(int start, int end)
-{
-   do {
-      jjCheckNAdd(jjnextStates[start]);
-   } while (start++ != end);
-}
-private final void jjCheckNAddStates(int start)
-{
-   jjCheckNAdd(jjnextStates[start]);
-   jjCheckNAdd(jjnextStates[start + 1]);
-}
-static final long[] jjbitVec0 = {
-   0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
-};
-private final int jjMoveNfa_0(int startState, int curPos)
-{
-   int[] nextStates;
-   int startsAt = 0;
-   jjnewStateCnt = 3;
-   int i = 1;
-   jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
-   for (;;)
-   {
-      if (++jjround == 0x7fffffff)
-         ReInitRounds();
-      if (curChar < 64)
-      {
-         long l = 1L << curChar;
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 3:
-                  if ((0x3ff6cfafffffdffL & l) != 0L)
-                  {
-                     if (kind > 21)
-                        kind = 21;
-                     jjCheckNAdd(2);
-                  }
-                  else if ((0x100000200L & l) != 0L)
-                  {
-                     if (kind > 6)
-                        kind = 6;
-                     jjCheckNAdd(0);
-                  }
-                  if ((0x3ff000000000000L & l) != 0L)
-                  {
-                     if (kind > 20)
-                        kind = 20;
-                     jjCheckNAdd(1);
-                  }
-                  break;
-               case 0:
-                  if ((0x100000200L & l) == 0L)
-                     break;
-                  kind = 6;
-                  jjCheckNAdd(0);
-                  break;
-               case 1:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 20)
-                     kind = 20;
-                  jjCheckNAdd(1);
-                  break;
-               case 2:
-                  if ((0x3ff6cfafffffdffL & l) == 0L)
-                     break;
-                  if (kind > 21)
-                     kind = 21;
-                  jjCheckNAdd(2);
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else if (curChar < 128)
-      {
-         long l = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 3:
-               case 2:
-                  if ((0xffffffffc7fffffeL & l) == 0L)
-                     break;
-                  kind = 21;
-                  jjCheckNAdd(2);
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else
-      {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 3:
-               case 2:
-                  if ((jjbitVec0[i2] & l2) == 0L)
-                     break;
-                  if (kind > 21)
-                     kind = 21;
-                  jjCheckNAdd(2);
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      if (kind != 0x7fffffff)
-      {
-         jjmatchedKind = kind;
-         jjmatchedPos = curPos;
-         kind = 0x7fffffff;
-      }
-      ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
-         return curPos;
-      try { curChar = input_stream.readChar(); }
-      catch(java.io.IOException e) { return curPos; }
-   }
-}
-private final int jjStopStringLiteralDfa_1(int pos, long active0)
-{
-   switch (pos)
-   {
-      default :
-         return -1;
-   }
-}
-private final int jjStartNfa_1(int pos, long active0)
-{
-   return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0), pos + 1);
-}
-private final int jjStartNfaWithStates_1(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_1(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_1()
-{
-   switch(curChar)
-   {
-      case 40:
-         return jjStopAtPos(0, 10);
-      case 41:
-         return jjStopAtPos(0, 8);
-      default :
-         return jjMoveNfa_1(0, 0);
-   }
-}
-private final int jjMoveNfa_1(int startState, int curPos)
-{
-   int[] nextStates;
-   int startsAt = 0;
-   jjnewStateCnt = 3;
-   int i = 1;
-   jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
-   for (;;)
-   {
-      if (++jjround == 0x7fffffff)
-         ReInitRounds();
-      if (curChar < 64)
-      {
-         long l = 1L << curChar;
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if (kind > 11)
-                     kind = 11;
-                  break;
-               case 1:
-                  if (kind > 9)
-                     kind = 9;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else if (curChar < 128)
-      {
-         long l = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if (kind > 11)
-                     kind = 11;
-                  if (curChar == 92)
-                     jjstateSet[jjnewStateCnt++] = 1;
-                  break;
-               case 1:
-                  if (kind > 9)
-                     kind = 9;
-                  break;
-               case 2:
-                  if (kind > 11)
-                     kind = 11;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else
-      {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if ((jjbitVec0[i2] & l2) != 0L && kind > 11)
-                     kind = 11;
-                  break;
-               case 1:
-                  if ((jjbitVec0[i2] & l2) != 0L && kind > 9)
-                     kind = 9;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      if (kind != 0x7fffffff)
-      {
-         jjmatchedKind = kind;
-         jjmatchedPos = curPos;
-         kind = 0x7fffffff;
-      }
-      ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
-         return curPos;
-      try { curChar = input_stream.readChar(); }
-      catch(java.io.IOException e) { return curPos; }
-   }
-}
-private final int jjStopStringLiteralDfa_3(int pos, long active0)
-{
-   switch (pos)
-   {
-      default :
-         return -1;
-   }
-}
-private final int jjStartNfa_3(int pos, long active0)
-{
-   return jjMoveNfa_3(jjStopStringLiteralDfa_3(pos, active0), pos + 1);
-}
-private final int jjStartNfaWithStates_3(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_3(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_3()
-{
-   switch(curChar)
-   {
-      case 34:
-         return jjStopAtPos(0, 19);
-      default :
-         return jjMoveNfa_3(0, 0);
-   }
-}
-private final int jjMoveNfa_3(int startState, int curPos)
-{
-   int[] nextStates;
-   int startsAt = 0;
-   jjnewStateCnt = 3;
-   int i = 1;
-   jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
-   for (;;)
-   {
-      if (++jjround == 0x7fffffff)
-         ReInitRounds();
-      if (curChar < 64)
-      {
-         long l = 1L << curChar;
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-               case 2:
-                  if ((0xfffffffbffffffffL & l) == 0L)
-                     break;
-                  if (kind > 18)
-                     kind = 18;
-                  jjCheckNAdd(2);
-                  break;
-               case 1:
-                  if (kind > 17)
-                     kind = 17;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else if (curChar < 128)
-      {
-         long l = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if ((0xffffffffefffffffL & l) != 0L)
-                  {
-                     if (kind > 18)
-                        kind = 18;
-                     jjCheckNAdd(2);
-                  }
-                  else if (curChar == 92)
-                     jjstateSet[jjnewStateCnt++] = 1;
-                  break;
-               case 1:
-                  if (kind > 17)
-                     kind = 17;
-                  break;
-               case 2:
-                  if ((0xffffffffefffffffL & l) == 0L)
-                     break;
-                  if (kind > 18)
-                     kind = 18;
-                  jjCheckNAdd(2);
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else
-      {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-               case 2:
-                  if ((jjbitVec0[i2] & l2) == 0L)
-                     break;
-                  if (kind > 18)
-                     kind = 18;
-                  jjCheckNAdd(2);
-                  break;
-               case 1:
-                  if ((jjbitVec0[i2] & l2) != 0L && kind > 17)
-                     kind = 17;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      if (kind != 0x7fffffff)
-      {
-         jjmatchedKind = kind;
-         jjmatchedPos = curPos;
-         kind = 0x7fffffff;
-      }
-      ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
-         return curPos;
-      try { curChar = input_stream.readChar(); }
-      catch(java.io.IOException e) { return curPos; }
-   }
-}
-private final int jjStopStringLiteralDfa_2(int pos, long active0)
-{
-   switch (pos)
-   {
-      default :
-         return -1;
-   }
-}
-private final int jjStartNfa_2(int pos, long active0)
-{
-   return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1);
-}
-private final int jjStartNfaWithStates_2(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_2(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_2()
-{
-   switch(curChar)
-   {
-      case 40:
-         return jjStopAtPos(0, 13);
-      case 41:
-         return jjStopAtPos(0, 14);
-      default :
-         return jjMoveNfa_2(0, 0);
-   }
-}
-private final int jjMoveNfa_2(int startState, int curPos)
-{
-   int[] nextStates;
-   int startsAt = 0;
-   jjnewStateCnt = 3;
-   int i = 1;
-   jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
-   for (;;)
-   {
-      if (++jjround == 0x7fffffff)
-         ReInitRounds();
-      if (curChar < 64)
-      {
-         long l = 1L << curChar;
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if (kind > 15)
-                     kind = 15;
-                  break;
-               case 1:
-                  if (kind > 12)
-                     kind = 12;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else if (curChar < 128)
-      {
-         long l = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if (kind > 15)
-                     kind = 15;
-                  if (curChar == 92)
-                     jjstateSet[jjnewStateCnt++] = 1;
-                  break;
-               case 1:
-                  if (kind > 12)
-                     kind = 12;
-                  break;
-               case 2:
-                  if (kind > 15)
-                     kind = 15;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else
-      {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if ((jjbitVec0[i2] & l2) != 0L && kind > 15)
-                     kind = 15;
-                  break;
-               case 1:
-                  if ((jjbitVec0[i2] & l2) != 0L && kind > 12)
-                     kind = 12;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      if (kind != 0x7fffffff)
-      {
-         jjmatchedKind = kind;
-         jjmatchedPos = curPos;
-         kind = 0x7fffffff;
-      }
-      ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
-         return curPos;
-      try { curChar = input_stream.readChar(); }
-      catch(java.io.IOException e) { return curPos; }
-   }
-}
-static final int[] jjnextStates = {
-};
-public static final String[] jjstrLiteralImages = {
-"", "\15", "\12", "\57", "\73", "\75", null, null, null, null, null, null, 
-null, null, null, null, null, null, null, null, null, null, null, null, };
-public static final String[] lexStateNames = {
-   "DEFAULT", 
-   "INCOMMENT", 
-   "NESTED_COMMENT", 
-   "INQUOTEDSTRING", 
-};
-public static final int[] jjnewLexState = {
-   -1, -1, -1, -1, -1, -1, -1, 1, 0, -1, 2, -1, -1, -1, -1, -1, 3, -1, -1, 0, -1, -1, -1, -1, 
-};
-static final long[] jjtoToken = {
-   0x38003fL, 
-};
-static final long[] jjtoSkip = {
-   0x140L, 
-};
-static final long[] jjtoSpecial = {
-   0x40L, 
-};
-static final long[] jjtoMore = {
-   0x7fe80L, 
-};
-protected SimpleCharStream input_stream;
-private final int[] jjrounds = new int[3];
-private final int[] jjstateSet = new int[6];
-StringBuffer image;
-int jjimageLen;
-int lengthOfMatch;
-protected char curChar;
-public ContentTypeParserTokenManager(SimpleCharStream stream){
-   if (SimpleCharStream.staticFlag)
-      throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
-   input_stream = stream;
-}
-public ContentTypeParserTokenManager(SimpleCharStream stream, int lexState){
-   this(stream);
-   SwitchTo(lexState);
-}
-public void ReInit(SimpleCharStream stream)
-{
-   jjmatchedPos = jjnewStateCnt = 0;
-   curLexState = defaultLexState;
-   input_stream = stream;
-   ReInitRounds();
-}
-private final void ReInitRounds()
-{
-   int i;
-   jjround = 0x80000001;
-   for (i = 3; i-- > 0;)
-      jjrounds[i] = 0x80000000;
-}
-public void ReInit(SimpleCharStream stream, int lexState)
-{
-   ReInit(stream);
-   SwitchTo(lexState);
-}
-public void SwitchTo(int lexState)
-{
-   if (lexState >= 4 || lexState < 0)
-      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
-   else
-      curLexState = lexState;
-}
-
-protected Token jjFillToken()
-{
-   Token t = Token.newToken(jjmatchedKind);
-   t.kind = jjmatchedKind;
-   String im = jjstrLiteralImages[jjmatchedKind];
-   t.image = (im == null) ? input_stream.GetImage() : im;
-   t.beginLine = input_stream.getBeginLine();
-   t.beginColumn = input_stream.getBeginColumn();
-   t.endLine = input_stream.getEndLine();
-   t.endColumn = input_stream.getEndColumn();
-   return t;
-}
-
-int curLexState = 0;
-int defaultLexState = 0;
-int jjnewStateCnt;
-int jjround;
-int jjmatchedPos;
-int jjmatchedKind;
-
-public Token getNextToken() 
-{
-  int kind;
-  Token specialToken = null;
-  Token matchedToken;
-  int curPos = 0;
-
-  EOFLoop :
-  for (;;)
-  {   
-   try   
-   {     
-      curChar = input_stream.BeginToken();
-   }     
-   catch(java.io.IOException e)
-   {        
-      jjmatchedKind = 0;
-      matchedToken = jjFillToken();
-      matchedToken.specialToken = specialToken;
-      return matchedToken;
-   }
-   image = null;
-   jjimageLen = 0;
-
-   for (;;)
-   {
-     switch(curLexState)
-     {
-       case 0:
-         jjmatchedKind = 0x7fffffff;
-         jjmatchedPos = 0;
-         curPos = jjMoveStringLiteralDfa0_0();
-         break;
-       case 1:
-         jjmatchedKind = 0x7fffffff;
-         jjmatchedPos = 0;
-         curPos = jjMoveStringLiteralDfa0_1();
-         break;
-       case 2:
-         jjmatchedKind = 0x7fffffff;
-         jjmatchedPos = 0;
-         curPos = jjMoveStringLiteralDfa0_2();
-         break;
-       case 3:
-         jjmatchedKind = 0x7fffffff;
-         jjmatchedPos = 0;
-         curPos = jjMoveStringLiteralDfa0_3();
-         break;
-     }
-     if (jjmatchedKind != 0x7fffffff)
-     {
-        if (jjmatchedPos + 1 < curPos)
-           input_stream.backup(curPos - jjmatchedPos - 1);
-        if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
-        {
-           matchedToken = jjFillToken();
-           matchedToken.specialToken = specialToken;
-           TokenLexicalActions(matchedToken);
-       if (jjnewLexState[jjmatchedKind] != -1)
-         curLexState = jjnewLexState[jjmatchedKind];
-           return matchedToken;
-        }
-        else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
-        {
-           if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
-           {
-              matchedToken = jjFillToken();
-              if (specialToken == null)
-                 specialToken = matchedToken;
-              else
-              {
-                 matchedToken.specialToken = specialToken;
-                 specialToken = (specialToken.next = matchedToken);
-              }
-           }
-         if (jjnewLexState[jjmatchedKind] != -1)
-           curLexState = jjnewLexState[jjmatchedKind];
-           continue EOFLoop;
-        }
-        MoreLexicalActions();
-      if (jjnewLexState[jjmatchedKind] != -1)
-        curLexState = jjnewLexState[jjmatchedKind];
-        curPos = 0;
-        jjmatchedKind = 0x7fffffff;
-        try {
-           curChar = input_stream.readChar();
-           continue;
-        }
-        catch (java.io.IOException e1) { }
-     }
-     int error_line = input_stream.getEndLine();
-     int error_column = input_stream.getEndColumn();
-     String error_after = null;
-     boolean EOFSeen = false;
-     try { input_stream.readChar(); input_stream.backup(1); }
-     catch (java.io.IOException e1) {
-        EOFSeen = true;
-        error_after = curPos <= 1 ? "" : input_stream.GetImage();
-        if (curChar == '\n' || curChar == '\r') {
-           error_line++;
-           error_column = 0;
-        }
-        else
-           error_column++;
-     }
-     if (!EOFSeen) {
-        input_stream.backup(1);
-        error_after = curPos <= 1 ? "" : input_stream.GetImage();
-     }
-     throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
-   }
-  }
-}
-
-void MoreLexicalActions()
-{
-   jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
-   switch(jjmatchedKind)
-   {
-      case 9 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-                          image.deleteCharAt(image.length() - 2);
-         break;
-      case 10 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-              commentNest = 1;
-         break;
-      case 12 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-                          image.deleteCharAt(image.length() - 2);
-         break;
-      case 13 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-              ++commentNest;
-         break;
-      case 14 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-              --commentNest; if (commentNest == 0) SwitchTo(INCOMMENT);
-         break;
-      case 16 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-               image.deleteCharAt(image.length() - 1);
-         break;
-      case 17 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-                          image.deleteCharAt(image.length() - 2);
-         break;
-      default : 
-         break;
-   }
-}
-void TokenLexicalActions(Token matchedToken)
-{
-   switch(jjmatchedKind)
-   {
-      case 19 :
-        if (image == null)
-            image = new StringBuffer();
-            image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
-                                 matchedToken.image = image.substring(0, image.length() - 1);
-         break;
-      default : 
-         break;
-   }
-}
-}
diff --git a/src/org/apache/james/mime4j/field/contenttype/parser/ParseException.java b/src/org/apache/james/mime4j/field/contenttype/parser/ParseException.java
deleted file mode 100644
index d9b69b2..0000000
--- a/src/org/apache/james/mime4j/field/contenttype/parser/ParseException.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.contenttype.parser;
-
-/**
- * This exception is thrown when parse errors are encountered.
- * You can explicitly create objects of this exception type by
- * calling the method generateParseException in the generated
- * parser.
- *
- * You can modify this class to customize your error reporting
- * mechanisms so long as you retain the public fields.
- */
-public class ParseException extends Exception {
-
-  /**
-   * This constructor is used by the method "generateParseException"
-   * in the generated parser.  Calling this constructor generates
-   * a new object of this type with the fields "currentToken",
-   * "expectedTokenSequences", and "tokenImage" set.  The boolean
-   * flag "specialConstructor" is also set to true to indicate that
-   * this constructor was used to create this object.
-   * This constructor calls its super class with the empty string
-   * to force the "toString" method of parent class "Throwable" to
-   * print the error message in the form:
-   *     ParseException: <result of getMessage>
-   */
-  public ParseException(Token currentTokenVal,
-                        int[][] expectedTokenSequencesVal,
-                        String[] tokenImageVal
-                       )
-  {
-    super("");
-    specialConstructor = true;
-    currentToken = currentTokenVal;
-    expectedTokenSequences = expectedTokenSequencesVal;
-    tokenImage = tokenImageVal;
-  }
-
-  /**
-   * The following constructors are for use by you for whatever
-   * purpose you can think of.  Constructing the exception in this
-   * manner makes the exception behave in the normal way - i.e., as
-   * documented in the class "Throwable".  The fields "errorToken",
-   * "expectedTokenSequences", and "tokenImage" do not contain
-   * relevant information.  The JavaCC generated code does not use
-   * these constructors.
-   */
-
-  public ParseException() {
-    super();
-    specialConstructor = false;
-  }
-
-  public ParseException(String message) {
-    super(message);
-    specialConstructor = false;
-  }
-
-  /**
-   * This variable determines which constructor was used to create
-   * this object and thereby affects the semantics of the
-   * "getMessage" method (see below).
-   */
-  protected boolean specialConstructor;
-
-  /**
-   * This is the last token that has been consumed successfully.  If
-   * this object has been created due to a parse error, the token
-   * followng this token will (therefore) be the first error token.
-   */
-  public Token currentToken;
-
-  /**
-   * Each entry in this array is an array of integers.  Each array
-   * of integers represents a sequence of tokens (by their ordinal
-   * values) that is expected at this point of the parse.
-   */
-  public int[][] expectedTokenSequences;
-
-  /**
-   * This is a reference to the "tokenImage" array of the generated
-   * parser within which the parse error occurred.  This array is
-   * defined in the generated ...Constants interface.
-   */
-  public String[] tokenImage;
-
-  /**
-   * This method has the standard behavior when this object has been
-   * created using the standard constructors.  Otherwise, it uses
-   * "currentToken" and "expectedTokenSequences" to generate a parse
-   * error message and returns it.  If this object has been created
-   * due to a parse error, and you do not catch it (it gets thrown
-   * from the parser), then this method is called during the printing
-   * of the final stack trace, and hence the correct error message
-   * gets displayed.
-   */
-  public String getMessage() {
-    if (!specialConstructor) {
-      return super.getMessage();
-    }
-    StringBuffer expected = new StringBuffer();
-    int maxSize = 0;
-    for (int i = 0; i < expectedTokenSequences.length; i++) {
-      if (maxSize < expectedTokenSequences[i].length) {
-        maxSize = expectedTokenSequences[i].length;
-      }
-      for (int j = 0; j < expectedTokenSequences[i].length; j++) {
-        expected.append(tokenImage[expectedTokenSequences[i][j]]).append(" ");
-      }
-      if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
-        expected.append("...");
-      }
-      expected.append(eol).append("    ");
-    }
-    String retval = "Encountered \"";
-    Token tok = currentToken.next;
-    for (int i = 0; i < maxSize; i++) {
-      if (i != 0) retval += " ";
-      if (tok.kind == 0) {
-        retval += tokenImage[0];
-        break;
-      }
-      retval += add_escapes(tok.image);
-      tok = tok.next; 
-    }
-    retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
-    retval += "." + eol;
-    if (expectedTokenSequences.length == 1) {
-      retval += "Was expecting:" + eol + "    ";
-    } else {
-      retval += "Was expecting one of:" + eol + "    ";
-    }
-    retval += expected.toString();
-    return retval;
-  }
-
-  /**
-   * The end of line string for this machine.
-   */
-  protected String eol = System.getProperty("line.separator", "\n");
- 
-  /**
-   * Used to convert raw characters to their escaped version
-   * when these raw version cannot be used as part of an ASCII
-   * string literal.
-   */
-  protected String add_escapes(String str) {
-      StringBuffer retval = new StringBuffer();
-      char ch;
-      for (int i = 0; i < str.length(); i++) {
-        switch (str.charAt(i))
-        {
-           case 0 :
-              continue;
-           case '\b':
-              retval.append("\\b");
-              continue;
-           case '\t':
-              retval.append("\\t");
-              continue;
-           case '\n':
-              retval.append("\\n");
-              continue;
-           case '\f':
-              retval.append("\\f");
-              continue;
-           case '\r':
-              retval.append("\\r");
-              continue;
-           case '\"':
-              retval.append("\\\"");
-              continue;
-           case '\'':
-              retval.append("\\\'");
-              continue;
-           case '\\':
-              retval.append("\\\\");
-              continue;
-           default:
-              if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
-                 String s = "0000" + Integer.toString(ch, 16);
-                 retval.append("\\u" + s.substring(s.length() - 4, s.length()));
-              } else {
-                 retval.append(ch);
-              }
-              continue;
-        }
-      }
-      return retval.toString();
-   }
-
-}
diff --git a/src/org/apache/james/mime4j/field/contenttype/parser/SimpleCharStream.java b/src/org/apache/james/mime4j/field/contenttype/parser/SimpleCharStream.java
deleted file mode 100644
index ae035b7..0000000
--- a/src/org/apache/james/mime4j/field/contenttype/parser/SimpleCharStream.java
+++ /dev/null
@@ -1,454 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 4.0 */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.contenttype.parser;
-
-/**
- * An implementation of interface CharStream, where the stream is assumed to
- * contain only ASCII characters (without unicode processing).
- */
-
-public class SimpleCharStream
-{
-  public static final boolean staticFlag = false;
-  int bufsize;
-  int available;
-  int tokenBegin;
-  public int bufpos = -1;
-  protected int bufline[];
-  protected int bufcolumn[];
-
-  protected int column = 0;
-  protected int line = 1;
-
-  protected boolean prevCharIsCR = false;
-  protected boolean prevCharIsLF = false;
-
-  protected java.io.Reader inputStream;
-
-  protected char[] buffer;
-  protected int maxNextCharInd = 0;
-  protected int inBuf = 0;
-  protected int tabSize = 8;
-
-  protected void setTabSize(int i) { tabSize = i; }
-  protected int getTabSize(int i) { return tabSize; }
-
-
-  protected void ExpandBuff(boolean wrapAround)
-  {
-     char[] newbuffer = new char[bufsize + 2048];
-     int newbufline[] = new int[bufsize + 2048];
-     int newbufcolumn[] = new int[bufsize + 2048];
-
-     try
-     {
-        if (wrapAround)
-        {
-           System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
-           System.arraycopy(buffer, 0, newbuffer,
-                                             bufsize - tokenBegin, bufpos);
-           buffer = newbuffer;
-
-           System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
-           System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
-           bufline = newbufline;
-
-           System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
-           System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
-           bufcolumn = newbufcolumn;
-
-           maxNextCharInd = (bufpos += (bufsize - tokenBegin));
-        }
-        else
-        {
-           System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
-           buffer = newbuffer;
-
-           System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
-           bufline = newbufline;
-
-           System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
-           bufcolumn = newbufcolumn;
-
-           maxNextCharInd = (bufpos -= tokenBegin);
-        }
-     }
-     catch (Throwable t)
-     {
-        throw new Error(t.getMessage());
-     }
-
-
-     bufsize += 2048;
-     available = bufsize;
-     tokenBegin = 0;
-  }
-
-  protected void FillBuff() throws java.io.IOException
-  {
-     if (maxNextCharInd == available)
-     {
-        if (available == bufsize)
-        {
-           if (tokenBegin > 2048)
-           {
-              bufpos = maxNextCharInd = 0;
-              available = tokenBegin;
-           }
-           else if (tokenBegin < 0)
-              bufpos = maxNextCharInd = 0;
-           else
-              ExpandBuff(false);
-        }
-        else if (available > tokenBegin)
-           available = bufsize;
-        else if ((tokenBegin - available) < 2048)
-           ExpandBuff(true);
-        else
-           available = tokenBegin;
-     }
-
-     int i;
-     try {
-        if ((i = inputStream.read(buffer, maxNextCharInd,
-                                    available - maxNextCharInd)) == -1)
-        {
-           inputStream.close();
-           throw new java.io.IOException();
-        }
-        else
-           maxNextCharInd += i;
-        return;
-     }
-     catch(java.io.IOException e) {
-        --bufpos;
-        backup(0);
-        if (tokenBegin == -1)
-           tokenBegin = bufpos;
-        throw e;
-     }
-  }
-
-  public char BeginToken() throws java.io.IOException
-  {
-     tokenBegin = -1;
-     char c = readChar();
-     tokenBegin = bufpos;
-
-     return c;
-  }
-
-  protected void UpdateLineColumn(char c)
-  {
-     column++;
-
-     if (prevCharIsLF)
-     {
-        prevCharIsLF = false;
-        line += (column = 1);
-     }
-     else if (prevCharIsCR)
-     {
-        prevCharIsCR = false;
-        if (c == '\n')
-        {
-           prevCharIsLF = true;
-        }
-        else
-           line += (column = 1);
-     }
-
-     switch (c)
-     {
-        case '\r' :
-           prevCharIsCR = true;
-           break;
-        case '\n' :
-           prevCharIsLF = true;
-           break;
-        case '\t' :
-           column--;
-           column += (tabSize - (column % tabSize));
-           break;
-        default :
-           break;
-     }
-
-     bufline[bufpos] = line;
-     bufcolumn[bufpos] = column;
-  }
-
-  public char readChar() throws java.io.IOException
-  {
-     if (inBuf > 0)
-     {
-        --inBuf;
-
-        if (++bufpos == bufsize)
-           bufpos = 0;
-
-        return buffer[bufpos];
-     }
-
-     if (++bufpos >= maxNextCharInd)
-        FillBuff();
-
-     char c = buffer[bufpos];
-
-     UpdateLineColumn(c);
-     return (c);
-  }
-
-  /**
-   * @deprecated 
-   * @see #getEndColumn
-   */
-  @Deprecated
-  public int getColumn() {
-     return bufcolumn[bufpos];
-  }
-
-  /**
-   * @deprecated 
-   * @see #getEndLine
-   */
-  @Deprecated
-  public int getLine() {
-     return bufline[bufpos];
-  }
-
-  public int getEndColumn() {
-     return bufcolumn[bufpos];
-  }
-
-  public int getEndLine() {
-     return bufline[bufpos];
-  }
-
-  public int getBeginColumn() {
-     return bufcolumn[tokenBegin];
-  }
-
-  public int getBeginLine() {
-     return bufline[tokenBegin];
-  }
-
-  public void backup(int amount) {
-
-    inBuf += amount;
-    if ((bufpos -= amount) < 0)
-       bufpos += bufsize;
-  }
-
-  public SimpleCharStream(java.io.Reader dstream, int startline,
-  int startcolumn, int buffersize)
-  {
-    inputStream = dstream;
-    line = startline;
-    column = startcolumn - 1;
-
-    available = bufsize = buffersize;
-    buffer = new char[buffersize];
-    bufline = new int[buffersize];
-    bufcolumn = new int[buffersize];
-  }
-
-  public SimpleCharStream(java.io.Reader dstream, int startline,
-                          int startcolumn)
-  {
-     this(dstream, startline, startcolumn, 4096);
-  }
-
-  public SimpleCharStream(java.io.Reader dstream)
-  {
-     this(dstream, 1, 1, 4096);
-  }
-  public void ReInit(java.io.Reader dstream, int startline,
-  int startcolumn, int buffersize)
-  {
-    inputStream = dstream;
-    line = startline;
-    column = startcolumn - 1;
-
-    if (buffer == null || buffersize != buffer.length)
-    {
-      available = bufsize = buffersize;
-      buffer = new char[buffersize];
-      bufline = new int[buffersize];
-      bufcolumn = new int[buffersize];
-    }
-    prevCharIsLF = prevCharIsCR = false;
-    tokenBegin = inBuf = maxNextCharInd = 0;
-    bufpos = -1;
-  }
-
-  public void ReInit(java.io.Reader dstream, int startline,
-                     int startcolumn)
-  {
-     ReInit(dstream, startline, startcolumn, 4096);
-  }
-
-  public void ReInit(java.io.Reader dstream)
-  {
-     ReInit(dstream, 1, 1, 4096);
-  }
-  public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
-  int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
-  {
-     this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream, int startline,
-  int startcolumn, int buffersize)
-  {
-     this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
-                          int startcolumn) throws java.io.UnsupportedEncodingException
-  {
-     this(dstream, encoding, startline, startcolumn, 4096);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream, int startline,
-                          int startcolumn)
-  {
-     this(dstream, startline, startcolumn, 4096);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
-  {
-     this(dstream, encoding, 1, 1, 4096);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream)
-  {
-     this(dstream, 1, 1, 4096);
-  }
-
-  public void ReInit(java.io.InputStream dstream, String encoding, int startline,
-                          int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
-  {
-     ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
-  }
-
-  public void ReInit(java.io.InputStream dstream, int startline,
-                          int startcolumn, int buffersize)
-  {
-     ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
-  }
-
-  public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
-  {
-     ReInit(dstream, encoding, 1, 1, 4096);
-  }
-
-  public void ReInit(java.io.InputStream dstream)
-  {
-     ReInit(dstream, 1, 1, 4096);
-  }
-  public void ReInit(java.io.InputStream dstream, String encoding, int startline,
-                     int startcolumn) throws java.io.UnsupportedEncodingException
-  {
-     ReInit(dstream, encoding, startline, startcolumn, 4096);
-  }
-  public void ReInit(java.io.InputStream dstream, int startline,
-                     int startcolumn)
-  {
-     ReInit(dstream, startline, startcolumn, 4096);
-  }
-  public String GetImage()
-  {
-     if (bufpos >= tokenBegin)
-        return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
-     else
-        return new String(buffer, tokenBegin, bufsize - tokenBegin) +
-                              new String(buffer, 0, bufpos + 1);
-  }
-
-  public char[] GetSuffix(int len)
-  {
-     char[] ret = new char[len];
-
-     if ((bufpos + 1) >= len)
-        System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
-     else
-     {
-        System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
-                                                          len - bufpos - 1);
-        System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
-     }
-
-     return ret;
-  }
-
-  public void Done()
-  {
-     buffer = null;
-     bufline = null;
-     bufcolumn = null;
-  }
-
-  /**
-   * Method to adjust line and column numbers for the start of a token.
-   */
-  public void adjustBeginLineColumn(int newLine, int newCol)
-  {
-     int start = tokenBegin;
-     int len;
-
-     if (bufpos >= tokenBegin)
-     {
-        len = bufpos - tokenBegin + inBuf + 1;
-     }
-     else
-     {
-        len = bufsize - tokenBegin + bufpos + 1 + inBuf;
-     }
-
-     int i = 0, j = 0, k = 0;
-     int nextColDiff = 0, columnDiff = 0;
-
-     while (i < len &&
-            bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
-     {
-        bufline[j] = newLine;
-        nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
-        bufcolumn[j] = newCol + columnDiff;
-        columnDiff = nextColDiff;
-        i++;
-     } 
-
-     if (i < len)
-     {
-        bufline[j] = newLine++;
-        bufcolumn[j] = newCol + columnDiff;
-
-        while (i++ < len)
-        {
-           if (bufline[j = start % bufsize] != bufline[++start % bufsize])
-              bufline[j] = newLine++;
-           else
-              bufline[j] = newLine;
-        }
-     }
-
-     line = bufline[j];
-     column = bufcolumn[j];
-  }
-
-}
diff --git a/src/org/apache/james/mime4j/field/contenttype/parser/Token.java b/src/org/apache/james/mime4j/field/contenttype/parser/Token.java
deleted file mode 100644
index 34e65ee..0000000
--- a/src/org/apache/james/mime4j/field/contenttype/parser/Token.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.contenttype.parser;
-
-/**
- * Describes the input token stream.
- */
-
-public class Token {
-
-  /**
-   * An integer that describes the kind of this token.  This numbering
-   * system is determined by JavaCCParser, and a table of these numbers is
-   * stored in the file ...Constants.java.
-   */
-  public int kind;
-
-  /**
-   * beginLine and beginColumn describe the position of the first character
-   * of this token; endLine and endColumn describe the position of the
-   * last character of this token.
-   */
-  public int beginLine, beginColumn, endLine, endColumn;
-
-  /**
-   * The string image of the token.
-   */
-  public String image;
-
-  /**
-   * A reference to the next regular (non-special) token from the input
-   * stream.  If this is the last token from the input stream, or if the
-   * token manager has not read tokens beyond this one, this field is
-   * set to null.  This is true only if this token is also a regular
-   * token.  Otherwise, see below for a description of the contents of
-   * this field.
-   */
-  public Token next;
-
-  /**
-   * This field is used to access special tokens that occur prior to this
-   * token, but after the immediately preceding regular (non-special) token.
-   * If there are no such special tokens, this field is set to null.
-   * When there are more than one such special token, this field refers
-   * to the last of these special tokens, which in turn refers to the next
-   * previous special token through its specialToken field, and so on
-   * until the first special token (whose specialToken field is null).
-   * The next fields of special tokens refer to other special tokens that
-   * immediately follow it (without an intervening regular token).  If there
-   * is no such token, this field is null.
-   */
-  public Token specialToken;
-
-  /**
-   * Returns the image.
-   */
-  public String toString()
-  {
-     return image;
-  }
-
-  /**
-   * Returns a new Token object, by default. However, if you want, you
-   * can create and return subclass objects based on the value of ofKind.
-   * Simply add the cases to the switch for all those special cases.
-   * For example, if you have a subclass of Token called IDToken that
-   * you want to create if ofKind is ID, simlpy add something like :
-   *
-   *    case MyParserConstants.ID : return new IDToken();
-   *
-   * to the following switch statement. Then you can cast matchedToken
-   * variable to the appropriate type and use it in your lexical actions.
-   */
-  public static final Token newToken(int ofKind)
-  {
-     switch(ofKind)
-     {
-       default : return new Token();
-     }
-  }
-
-}
diff --git a/src/org/apache/james/mime4j/field/contenttype/parser/TokenMgrError.java b/src/org/apache/james/mime4j/field/contenttype/parser/TokenMgrError.java
deleted file mode 100644
index ea5a782..0000000
--- a/src/org/apache/james/mime4j/field/contenttype/parser/TokenMgrError.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.contenttype.parser;
-
-public class TokenMgrError extends Error
-{
-   /*
-    * Ordinals for various reasons why an Error of this type can be thrown.
-    */
-
-   /**
-    * Lexical error occured.
-    */
-   static final int LEXICAL_ERROR = 0;
-
-   /**
-    * An attempt wass made to create a second instance of a static token manager.
-    */
-   static final int STATIC_LEXER_ERROR = 1;
-
-   /**
-    * Tried to change to an invalid lexical state.
-    */
-   static final int INVALID_LEXICAL_STATE = 2;
-
-   /**
-    * Detected (and bailed out of) an infinite loop in the token manager.
-    */
-   static final int LOOP_DETECTED = 3;
-
-   /**
-    * Indicates the reason why the exception is thrown. It will have
-    * one of the above 4 values.
-    */
-   int errorCode;
-
-   /**
-    * Replaces unprintable characters by their espaced (or unicode escaped)
-    * equivalents in the given string
-    */
-   protected static final String addEscapes(String str) {
-      StringBuffer retval = new StringBuffer();
-      char ch;
-      for (int i = 0; i < str.length(); i++) {
-        switch (str.charAt(i))
-        {
-           case 0 :
-              continue;
-           case '\b':
-              retval.append("\\b");
-              continue;
-           case '\t':
-              retval.append("\\t");
-              continue;
-           case '\n':
-              retval.append("\\n");
-              continue;
-           case '\f':
-              retval.append("\\f");
-              continue;
-           case '\r':
-              retval.append("\\r");
-              continue;
-           case '\"':
-              retval.append("\\\"");
-              continue;
-           case '\'':
-              retval.append("\\\'");
-              continue;
-           case '\\':
-              retval.append("\\\\");
-              continue;
-           default:
-              if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
-                 String s = "0000" + Integer.toString(ch, 16);
-                 retval.append("\\u" + s.substring(s.length() - 4, s.length()));
-              } else {
-                 retval.append(ch);
-              }
-              continue;
-        }
-      }
-      return retval.toString();
-   }
-
-   /**
-    * Returns a detailed message for the Error when it is thrown by the
-    * token manager to indicate a lexical error.
-    * Parameters : 
-    *    EOFSeen     : indicates if EOF caused the lexicl error
-    *    curLexState : lexical state in which this error occured
-    *    errorLine   : line number when the error occured
-    *    errorColumn : column number when the error occured
-    *    errorAfter  : prefix that was seen before this error occured
-    *    curchar     : the offending character
-    * Note: You can customize the lexical error message by modifying this method.
-    */
-   protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
-      return("Lexical error at line " +
-           errorLine + ", column " +
-           errorColumn + ".  Encountered: " +
-           (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
-           "after : \"" + addEscapes(errorAfter) + "\"");
-   }
-
-   /**
-    * You can also modify the body of this method to customize your error messages.
-    * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
-    * of end-users concern, so you can return something like : 
-    *
-    *     "Internal Error : Please file a bug report .... "
-    *
-    * from this method for such cases in the release version of your parser.
-    */
-   public String getMessage() {
-      return super.getMessage();
-   }
-
-   /*
-    * Constructors of various flavors follow.
-    */
-
-   public TokenMgrError() {
-   }
-
-   public TokenMgrError(String message, int reason) {
-      super(message);
-      errorCode = reason;
-   }
-
-   public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
-      this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
-   }
-}
diff --git a/src/org/apache/james/mime4j/field/datetime/DateTime.java b/src/org/apache/james/mime4j/field/datetime/DateTime.java
deleted file mode 100644
index 506ff54..0000000
--- a/src/org/apache/james/mime4j/field/datetime/DateTime.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.field.datetime;
-
-import org.apache.james.mime4j.field.datetime.parser.DateTimeParser;
-import org.apache.james.mime4j.field.datetime.parser.ParseException;
-import org.apache.james.mime4j.field.datetime.parser.TokenMgrError;
-
-import java.util.Date;
-import java.util.Calendar;
-import java.util.TimeZone;
-import java.util.GregorianCalendar;
-import java.io.StringReader;
-
-public class DateTime {
-    private final Date date;
-    private final int year;
-    private final int month;
-    private final int day;
-    private final int hour;
-    private final int minute;
-    private final int second;
-    private final int timeZone;
-
-    public DateTime(String yearString, int month, int day, int hour, int minute, int second, int timeZone) {
-        this.year = convertToYear(yearString);
-        this.date = convertToDate(year, month, day, hour, minute, second, timeZone);
-        this.month = month;
-        this.day = day;
-        this.hour = hour;
-        this.minute = minute;
-        this.second = second;
-        this.timeZone = timeZone;
-    }
-
-    private int convertToYear(String yearString) {
-        int year = Integer.parseInt(yearString);
-        switch (yearString.length()) {
-            case 1:
-            case 2:
-                if (year >= 0 && year < 50)
-                    return 2000 + year;
-                else
-                    return 1900 + year;
-            case 3:
-                return 1900 + year;
-            default:
-                return year;
-        }
-    }
-
-    public static Date convertToDate(int year, int month, int day, int hour, int minute, int second, int timeZone) {
-        Calendar c = new GregorianCalendar(TimeZone.getTimeZone("GMT+0"));
-        c.set(year, month - 1, day, hour, minute, second);
-        c.set(Calendar.MILLISECOND, 0);
-
-        if (timeZone != Integer.MIN_VALUE) {
-            int minutes = ((timeZone / 100) * 60) + timeZone % 100;
-            c.add(Calendar.MINUTE, -1 * minutes);
-        }
-
-        return c.getTime();
-    }
-
-    public Date getDate() {
-        return date;
-    }
-
-    public int getYear() {
-        return year;
-    }
-
-    public int getMonth() {
-        return month;
-    }
-
-    public int getDay() {
-        return day;
-    }
-
-    public int getHour() {
-        return hour;
-    }
-
-    public int getMinute() {
-        return minute;
-    }
-
-    public int getSecond() {
-        return second;
-    }
-
-    public int getTimeZone() {
-        return timeZone;
-    }
-
-    public void print() {
-        System.out.println(getYear() + " " + getMonth() + " " + getDay() + "; " + getHour() + " " + getMinute() + " " + getSecond() + " " + getTimeZone());
-    }
-
-
-    public static DateTime parse(String dateString) throws ParseException {
-        try {
-            return new DateTimeParser(new StringReader(dateString)).parseAll();
-        }
-        catch (TokenMgrError err) {
-            throw new ParseException(err.getMessage());
-        }
-    }
-}
diff --git a/src/org/apache/james/mime4j/field/datetime/parser/DateTimeParser.java b/src/org/apache/james/mime4j/field/datetime/parser/DateTimeParser.java
deleted file mode 100644
index 43edebb..0000000
--- a/src/org/apache/james/mime4j/field/datetime/parser/DateTimeParser.java
+++ /dev/null
@@ -1,570 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. DateTimeParser.java */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.datetime.parser;
-
-import org.apache.james.mime4j.field.datetime.DateTime;
-
-import java.util.Vector;
-
-public class DateTimeParser implements DateTimeParserConstants {
-    private static final boolean ignoreMilitaryZoneOffset = true;
-
-    public static void main(String args[]) throws ParseException {
-                while (true) {
-                    try {
-                                DateTimeParser parser = new DateTimeParser(System.in);
-                        parser.parseLine();
-                    } catch (Exception x) {
-                                x.printStackTrace();
-                                return;
-                    }
-                }
-    }
-
-    private static int parseDigits(Token token) {
-        return Integer.parseInt(token.image, 10);
-    }
-
-    private static int getMilitaryZoneOffset(char c) {
-        if (ignoreMilitaryZoneOffset)
-            return 0;
-
-        c = Character.toUpperCase(c);
-
-        switch (c) {
-            case 'A': return 1;
-            case 'B': return 2;
-            case 'C': return 3;
-            case 'D': return 4;
-            case 'E': return 5;
-            case 'F': return 6;
-            case 'G': return 7;
-            case 'H': return 8;
-            case 'I': return 9;
-            case 'K': return 10;
-            case 'L': return 11;
-            case 'M': return 12;
-
-            case 'N': return -1;
-            case 'O': return -2;
-            case 'P': return -3;
-            case 'Q': return -4;
-            case 'R': return -5;
-            case 'S': return -6;
-            case 'T': return -7;
-            case 'U': return -8;
-            case 'V': return -9;
-            case 'W': return -10;
-            case 'X': return -11;
-            case 'Y': return -12;
-
-            case 'Z': return 0;
-            default: return 0;
-        }
-    }
-
-    private static class Time {
-        private int hour;
-        private int minute;
-        private int second;
-        private int zone;
-
-        public Time(int hour, int minute, int second, int zone) {
-            this.hour = hour;
-            this.minute = minute;
-            this.second = second;
-            this.zone = zone;
-        }
-
-        public int getHour() { return hour; }
-        public int getMinute() { return minute; }
-        public int getSecond() { return second; }
-        public int getZone() { return zone; }
-    }
-
-    private static class Date {
-        private String year;
-        private int month;
-        private int day;
-
-        public Date(String year, int month, int day) {
-            this.year = year;
-            this.month = month;
-            this.day = day;
-        }
-
-        public String getYear() { return year; }
-        public int getMonth() { return month; }
-        public int getDay() { return day; }
-    }
-
-  final public DateTime parseLine() throws ParseException {
- DateTime dt;
-    dt = date_time();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case 1:
-      jj_consume_token(1);
-      break;
-    default:
-      jj_la1[0] = jj_gen;
-      ;
-    }
-    jj_consume_token(2);
-          {if (true) return dt;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DateTime parseAll() throws ParseException {
- DateTime dt;
-    dt = date_time();
-    jj_consume_token(0);
-          {if (true) return dt;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DateTime date_time() throws ParseException {
- Date d; Time t;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case 4:
-    case 5:
-    case 6:
-    case 7:
-    case 8:
-    case 9:
-    case 10:
-      day_of_week();
-      jj_consume_token(3);
-      break;
-    default:
-      jj_la1[1] = jj_gen;
-      ;
-    }
-    d = date();
-    t = time();
-            {if (true) return new DateTime(
-                    d.getYear(),
-                    d.getMonth(),
-                    d.getDay(),
-                    t.getHour(),
-                    t.getMinute(),
-                    t.getSecond(),
-                    t.getZone());}    // time zone offset
-
-    throw new Error("Missing return statement in function");
-  }
-
-  final public String day_of_week() throws ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case 4:
-      jj_consume_token(4);
-      break;
-    case 5:
-      jj_consume_token(5);
-      break;
-    case 6:
-      jj_consume_token(6);
-      break;
-    case 7:
-      jj_consume_token(7);
-      break;
-    case 8:
-      jj_consume_token(8);
-      break;
-    case 9:
-      jj_consume_token(9);
-      break;
-    case 10:
-      jj_consume_token(10);
-      break;
-    default:
-      jj_la1[2] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-      {if (true) return token.image;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Date date() throws ParseException {
- int d, m; String y;
-    d = day();
-    m = month();
-    y = year();
-      {if (true) return new Date(y, m, d);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public int day() throws ParseException {
- Token t;
-    t = jj_consume_token(DIGITS);
-                 {if (true) return parseDigits(t);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public int month() throws ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case 11:
-      jj_consume_token(11);
-            {if (true) return 1;}
-      break;
-    case 12:
-      jj_consume_token(12);
-            {if (true) return 2;}
-      break;
-    case 13:
-      jj_consume_token(13);
-            {if (true) return 3;}
-      break;
-    case 14:
-      jj_consume_token(14);
-            {if (true) return 4;}
-      break;
-    case 15:
-      jj_consume_token(15);
-            {if (true) return 5;}
-      break;
-    case 16:
-      jj_consume_token(16);
-            {if (true) return 6;}
-      break;
-    case 17:
-      jj_consume_token(17);
-            {if (true) return 7;}
-      break;
-    case 18:
-      jj_consume_token(18);
-            {if (true) return 8;}
-      break;
-    case 19:
-      jj_consume_token(19);
-            {if (true) return 9;}
-      break;
-    case 20:
-      jj_consume_token(20);
-            {if (true) return 10;}
-      break;
-    case 21:
-      jj_consume_token(21);
-            {if (true) return 11;}
-      break;
-    case 22:
-      jj_consume_token(22);
-            {if (true) return 12;}
-      break;
-    default:
-      jj_la1[3] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public String year() throws ParseException {
- Token t;
-    t = jj_consume_token(DIGITS);
-                 {if (true) return t.image;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Time time() throws ParseException {
- int h, m, s=0, z;
-    h = hour();
-    jj_consume_token(23);
-    m = minute();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case 23:
-      jj_consume_token(23);
-      s = second();
-      break;
-    default:
-      jj_la1[4] = jj_gen;
-      ;
-    }
-    z = zone();
-      {if (true) return new Time(h, m, s, z);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public int hour() throws ParseException {
- Token t;
-    t = jj_consume_token(DIGITS);
-                 {if (true) return parseDigits(t);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public int minute() throws ParseException {
- Token t;
-    t = jj_consume_token(DIGITS);
-                 {if (true) return parseDigits(t);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public int second() throws ParseException {
- Token t;
-    t = jj_consume_token(DIGITS);
-                 {if (true) return parseDigits(t);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public int zone() throws ParseException {
-  Token t, u; int z;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case OFFSETDIR:
-      t = jj_consume_token(OFFSETDIR);
-      u = jj_consume_token(DIGITS);
-                                              z=parseDigits(u)*(t.image.equals("-") ? -1 : 1);
-      break;
-    case 25:
-    case 26:
-    case 27:
-    case 28:
-    case 29:
-    case 30:
-    case 31:
-    case 32:
-    case 33:
-    case 34:
-    case MILITARY_ZONE:
-      z = obs_zone();
-      break;
-    default:
-      jj_la1[5] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-      {if (true) return z;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public int obs_zone() throws ParseException {
- Token t; int z;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case 25:
-      jj_consume_token(25);
-            z=0;
-      break;
-    case 26:
-      jj_consume_token(26);
-            z=0;
-      break;
-    case 27:
-      jj_consume_token(27);
-            z=-5;
-      break;
-    case 28:
-      jj_consume_token(28);
-            z=-4;
-      break;
-    case 29:
-      jj_consume_token(29);
-            z=-6;
-      break;
-    case 30:
-      jj_consume_token(30);
-            z=-5;
-      break;
-    case 31:
-      jj_consume_token(31);
-            z=-7;
-      break;
-    case 32:
-      jj_consume_token(32);
-            z=-6;
-      break;
-    case 33:
-      jj_consume_token(33);
-            z=-8;
-      break;
-    case 34:
-      jj_consume_token(34);
-            z=-7;
-      break;
-    case MILITARY_ZONE:
-      t = jj_consume_token(MILITARY_ZONE);
-                                                             z=getMilitaryZoneOffset(t.image.charAt(0));
-      break;
-    default:
-      jj_la1[6] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-      {if (true) return z * 100;}
-    throw new Error("Missing return statement in function");
-  }
-
-  public DateTimeParserTokenManager token_source;
-  SimpleCharStream jj_input_stream;
-  public Token token, jj_nt;
-  private int jj_ntk;
-  private int jj_gen;
-  final private int[] jj_la1 = new int[7];
-  static private int[] jj_la1_0;
-  static private int[] jj_la1_1;
-  static {
-      jj_la1_0();
-      jj_la1_1();
-   }
-   private static void jj_la1_0() {
-      jj_la1_0 = new int[] {0x2,0x7f0,0x7f0,0x7ff800,0x800000,0xff000000,0xfe000000,};
-   }
-   private static void jj_la1_1() {
-      jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0xf,0xf,};
-   }
-
-  public DateTimeParser(java.io.InputStream stream) {
-     this(stream, null);
-  }
-  public DateTimeParser(java.io.InputStream stream, String encoding) {
-    try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
-    token_source = new DateTimeParserTokenManager(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 7; i++) jj_la1[i] = -1;
-  }
-
-  public void ReInit(java.io.InputStream stream) {
-     ReInit(stream, null);
-  }
-  public void ReInit(java.io.InputStream stream, String encoding) {
-    try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
-    token_source.ReInit(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 7; i++) jj_la1[i] = -1;
-  }
-
-  public DateTimeParser(java.io.Reader stream) {
-    jj_input_stream = new SimpleCharStream(stream, 1, 1);
-    token_source = new DateTimeParserTokenManager(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 7; i++) jj_la1[i] = -1;
-  }
-
-  public void ReInit(java.io.Reader stream) {
-    jj_input_stream.ReInit(stream, 1, 1);
-    token_source.ReInit(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 7; i++) jj_la1[i] = -1;
-  }
-
-  public DateTimeParser(DateTimeParserTokenManager tm) {
-    token_source = tm;
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 7; i++) jj_la1[i] = -1;
-  }
-
-  public void ReInit(DateTimeParserTokenManager tm) {
-    token_source = tm;
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 7; i++) jj_la1[i] = -1;
-  }
-
-  final private Token jj_consume_token(int kind) throws ParseException {
-    Token oldToken;
-    if ((oldToken = token).next != null) token = token.next;
-    else token = token.next = token_source.getNextToken();
-    jj_ntk = -1;
-    if (token.kind == kind) {
-      jj_gen++;
-      return token;
-    }
-    token = oldToken;
-    jj_kind = kind;
-    throw generateParseException();
-  }
-
-  final public Token getNextToken() {
-    if (token.next != null) token = token.next;
-    else token = token.next = token_source.getNextToken();
-    jj_ntk = -1;
-    jj_gen++;
-    return token;
-  }
-
-  final public Token getToken(int index) {
-    Token t = token;
-    for (int i = 0; i < index; i++) {
-      if (t.next != null) t = t.next;
-      else t = t.next = token_source.getNextToken();
-    }
-    return t;
-  }
-
-  final private int jj_ntk() {
-    if ((jj_nt=token.next) == null)
-      return (jj_ntk = (token.next=token_source.getNextToken()).kind);
-    else
-      return (jj_ntk = jj_nt.kind);
-  }
-
-  private Vector<int[]> jj_expentries = new Vector<int[]>();
-  private int[] jj_expentry;
-  private int jj_kind = -1;
-
-  public ParseException generateParseException() {
-    jj_expentries.removeAllElements();
-    boolean[] la1tokens = new boolean[49];
-    for (int i = 0; i < 49; i++) {
-      la1tokens[i] = false;
-    }
-    if (jj_kind >= 0) {
-      la1tokens[jj_kind] = true;
-      jj_kind = -1;
-    }
-    for (int i = 0; i < 7; i++) {
-      if (jj_la1[i] == jj_gen) {
-        for (int j = 0; j < 32; j++) {
-          if ((jj_la1_0[i] & (1<<j)) != 0) {
-            la1tokens[j] = true;
-          }
-          if ((jj_la1_1[i] & (1<<j)) != 0) {
-            la1tokens[32+j] = true;
-          }
-        }
-      }
-    }
-    for (int i = 0; i < 49; i++) {
-      if (la1tokens[i]) {
-        jj_expentry = new int[1];
-        jj_expentry[0] = i;
-        jj_expentries.addElement(jj_expentry);
-      }
-    }
-    int[][] exptokseq = new int[jj_expentries.size()][];
-    for (int i = 0; i < jj_expentries.size(); i++) {
-      exptokseq[i] = jj_expentries.elementAt(i);
-    }
-    return new ParseException(token, exptokseq, tokenImage);
-  }
-
-  final public void enable_tracing() {
-  }
-
-  final public void disable_tracing() {
-  }
-
-}
diff --git a/src/org/apache/james/mime4j/field/datetime/parser/DateTimeParserConstants.java b/src/org/apache/james/mime4j/field/datetime/parser/DateTimeParserConstants.java
deleted file mode 100644
index 2c203db..0000000
--- a/src/org/apache/james/mime4j/field/datetime/parser/DateTimeParserConstants.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. DateTimeParserConstants.java */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.datetime.parser;
-
-public interface DateTimeParserConstants {
-
-  int EOF = 0;
-  int OFFSETDIR = 24;
-  int MILITARY_ZONE = 35;
-  int WS = 36;
-  int COMMENT = 38;
-  int DIGITS = 46;
-  int QUOTEDPAIR = 47;
-  int ANY = 48;
-
-  int DEFAULT = 0;
-  int INCOMMENT = 1;
-  int NESTED_COMMENT = 2;
-
-  String[] tokenImage = {
-    "<EOF>",
-    "\"\\r\"",
-    "\"\\n\"",
-    "\",\"",
-    "\"Mon\"",
-    "\"Tue\"",
-    "\"Wed\"",
-    "\"Thu\"",
-    "\"Fri\"",
-    "\"Sat\"",
-    "\"Sun\"",
-    "\"Jan\"",
-    "\"Feb\"",
-    "\"Mar\"",
-    "\"Apr\"",
-    "\"May\"",
-    "\"Jun\"",
-    "\"Jul\"",
-    "\"Aug\"",
-    "\"Sep\"",
-    "\"Oct\"",
-    "\"Nov\"",
-    "\"Dec\"",
-    "\":\"",
-    "<OFFSETDIR>",
-    "\"UT\"",
-    "\"GMT\"",
-    "\"EST\"",
-    "\"EDT\"",
-    "\"CST\"",
-    "\"CDT\"",
-    "\"MST\"",
-    "\"MDT\"",
-    "\"PST\"",
-    "\"PDT\"",
-    "<MILITARY_ZONE>",
-    "<WS>",
-    "\"(\"",
-    "\")\"",
-    "<token of kind 39>",
-    "\"(\"",
-    "<token of kind 41>",
-    "<token of kind 42>",
-    "\"(\"",
-    "\")\"",
-    "<token of kind 45>",
-    "<DIGITS>",
-    "<QUOTEDPAIR>",
-    "<ANY>",
-  };
-
-}
diff --git a/src/org/apache/james/mime4j/field/datetime/parser/DateTimeParserTokenManager.java b/src/org/apache/james/mime4j/field/datetime/parser/DateTimeParserTokenManager.java
deleted file mode 100644
index 4b2d2fd..0000000
--- a/src/org/apache/james/mime4j/field/datetime/parser/DateTimeParserTokenManager.java
+++ /dev/null
@@ -1,882 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. DateTimeParserTokenManager.java */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.datetime.parser;
-import org.apache.james.mime4j.field.datetime.DateTime;
-import java.util.Calendar;
-
-public class DateTimeParserTokenManager implements DateTimeParserConstants
-{
-        // Keeps track of how many levels of comment nesting
-        // we've encountered.  This is only used when the 2nd
-        // level is reached, for example ((this)), not (this).
-        // This is because the outermost level must be treated
-        // specially anyway, because the outermost ")" has a
-        // different token type than inner ")" instances.
-        static int commentNest;
-  public  java.io.PrintStream debugStream = System.out;
-  public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private final int jjStopStringLiteralDfa_0(int pos, long active0)
-{
-   switch (pos)
-   {
-      case 0:
-         if ((active0 & 0x7fe7cf7f0L) != 0L)
-         {
-            jjmatchedKind = 35;
-            return -1;
-         }
-         return -1;
-      case 1:
-         if ((active0 & 0x7fe7cf7f0L) != 0L)
-         {
-            if (jjmatchedPos == 0)
-            {
-               jjmatchedKind = 35;
-               jjmatchedPos = 0;
-            }
-            return -1;
-         }
-         return -1;
-      default :
-         return -1;
-   }
-}
-private final int jjStartNfa_0(int pos, long active0)
-{
-   return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
-}
-private final int jjStopAtPos(int pos, int kind)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   return pos + 1;
-}
-private final int jjStartNfaWithStates_0(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_0(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_0()
-{
-   switch(curChar)
-   {
-      case 10:
-         return jjStopAtPos(0, 2);
-      case 13:
-         return jjStopAtPos(0, 1);
-      case 40:
-         return jjStopAtPos(0, 37);
-      case 44:
-         return jjStopAtPos(0, 3);
-      case 58:
-         return jjStopAtPos(0, 23);
-      case 65:
-         return jjMoveStringLiteralDfa1_0(0x44000L);
-      case 67:
-         return jjMoveStringLiteralDfa1_0(0x60000000L);
-      case 68:
-         return jjMoveStringLiteralDfa1_0(0x400000L);
-      case 69:
-         return jjMoveStringLiteralDfa1_0(0x18000000L);
-      case 70:
-         return jjMoveStringLiteralDfa1_0(0x1100L);
-      case 71:
-         return jjMoveStringLiteralDfa1_0(0x4000000L);
-      case 74:
-         return jjMoveStringLiteralDfa1_0(0x30800L);
-      case 77:
-         return jjMoveStringLiteralDfa1_0(0x18000a010L);
-      case 78:
-         return jjMoveStringLiteralDfa1_0(0x200000L);
-      case 79:
-         return jjMoveStringLiteralDfa1_0(0x100000L);
-      case 80:
-         return jjMoveStringLiteralDfa1_0(0x600000000L);
-      case 83:
-         return jjMoveStringLiteralDfa1_0(0x80600L);
-      case 84:
-         return jjMoveStringLiteralDfa1_0(0xa0L);
-      case 85:
-         return jjMoveStringLiteralDfa1_0(0x2000000L);
-      case 87:
-         return jjMoveStringLiteralDfa1_0(0x40L);
-      default :
-         return jjMoveNfa_0(0, 0);
-   }
-}
-private final int jjMoveStringLiteralDfa1_0(long active0)
-{
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(0, active0);
-      return 1;
-   }
-   switch(curChar)
-   {
-      case 68:
-         return jjMoveStringLiteralDfa2_0(active0, 0x550000000L);
-      case 77:
-         return jjMoveStringLiteralDfa2_0(active0, 0x4000000L);
-      case 83:
-         return jjMoveStringLiteralDfa2_0(active0, 0x2a8000000L);
-      case 84:
-         if ((active0 & 0x2000000L) != 0L)
-            return jjStopAtPos(1, 25);
-         break;
-      case 97:
-         return jjMoveStringLiteralDfa2_0(active0, 0xaa00L);
-      case 99:
-         return jjMoveStringLiteralDfa2_0(active0, 0x100000L);
-      case 101:
-         return jjMoveStringLiteralDfa2_0(active0, 0x481040L);
-      case 104:
-         return jjMoveStringLiteralDfa2_0(active0, 0x80L);
-      case 111:
-         return jjMoveStringLiteralDfa2_0(active0, 0x200010L);
-      case 112:
-         return jjMoveStringLiteralDfa2_0(active0, 0x4000L);
-      case 114:
-         return jjMoveStringLiteralDfa2_0(active0, 0x100L);
-      case 117:
-         return jjMoveStringLiteralDfa2_0(active0, 0x70420L);
-      default :
-         break;
-   }
-   return jjStartNfa_0(0, active0);
-}
-private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(0, old0); 
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-      jjStopStringLiteralDfa_0(1, active0);
-      return 2;
-   }
-   switch(curChar)
-   {
-      case 84:
-         if ((active0 & 0x4000000L) != 0L)
-            return jjStopAtPos(2, 26);
-         else if ((active0 & 0x8000000L) != 0L)
-            return jjStopAtPos(2, 27);
-         else if ((active0 & 0x10000000L) != 0L)
-            return jjStopAtPos(2, 28);
-         else if ((active0 & 0x20000000L) != 0L)
-            return jjStopAtPos(2, 29);
-         else if ((active0 & 0x40000000L) != 0L)
-            return jjStopAtPos(2, 30);
-         else if ((active0 & 0x80000000L) != 0L)
-            return jjStopAtPos(2, 31);
-         else if ((active0 & 0x100000000L) != 0L)
-            return jjStopAtPos(2, 32);
-         else if ((active0 & 0x200000000L) != 0L)
-            return jjStopAtPos(2, 33);
-         else if ((active0 & 0x400000000L) != 0L)
-            return jjStopAtPos(2, 34);
-         break;
-      case 98:
-         if ((active0 & 0x1000L) != 0L)
-            return jjStopAtPos(2, 12);
-         break;
-      case 99:
-         if ((active0 & 0x400000L) != 0L)
-            return jjStopAtPos(2, 22);
-         break;
-      case 100:
-         if ((active0 & 0x40L) != 0L)
-            return jjStopAtPos(2, 6);
-         break;
-      case 101:
-         if ((active0 & 0x20L) != 0L)
-            return jjStopAtPos(2, 5);
-         break;
-      case 103:
-         if ((active0 & 0x40000L) != 0L)
-            return jjStopAtPos(2, 18);
-         break;
-      case 105:
-         if ((active0 & 0x100L) != 0L)
-            return jjStopAtPos(2, 8);
-         break;
-      case 108:
-         if ((active0 & 0x20000L) != 0L)
-            return jjStopAtPos(2, 17);
-         break;
-      case 110:
-         if ((active0 & 0x10L) != 0L)
-            return jjStopAtPos(2, 4);
-         else if ((active0 & 0x400L) != 0L)
-            return jjStopAtPos(2, 10);
-         else if ((active0 & 0x800L) != 0L)
-            return jjStopAtPos(2, 11);
-         else if ((active0 & 0x10000L) != 0L)
-            return jjStopAtPos(2, 16);
-         break;
-      case 112:
-         if ((active0 & 0x80000L) != 0L)
-            return jjStopAtPos(2, 19);
-         break;
-      case 114:
-         if ((active0 & 0x2000L) != 0L)
-            return jjStopAtPos(2, 13);
-         else if ((active0 & 0x4000L) != 0L)
-            return jjStopAtPos(2, 14);
-         break;
-      case 116:
-         if ((active0 & 0x200L) != 0L)
-            return jjStopAtPos(2, 9);
-         else if ((active0 & 0x100000L) != 0L)
-            return jjStopAtPos(2, 20);
-         break;
-      case 117:
-         if ((active0 & 0x80L) != 0L)
-            return jjStopAtPos(2, 7);
-         break;
-      case 118:
-         if ((active0 & 0x200000L) != 0L)
-            return jjStopAtPos(2, 21);
-         break;
-      case 121:
-         if ((active0 & 0x8000L) != 0L)
-            return jjStopAtPos(2, 15);
-         break;
-      default :
-         break;
-   }
-   return jjStartNfa_0(1, active0);
-}
-private final void jjCheckNAdd(int state)
-{
-   if (jjrounds[state] != jjround)
-   {
-      jjstateSet[jjnewStateCnt++] = state;
-      jjrounds[state] = jjround;
-   }
-}
-private final void jjAddStates(int start, int end)
-{
-   do {
-      jjstateSet[jjnewStateCnt++] = jjnextStates[start];
-   } while (start++ != end);
-}
-private final void jjCheckNAddTwoStates(int state1, int state2)
-{
-   jjCheckNAdd(state1);
-   jjCheckNAdd(state2);
-}
-private final void jjCheckNAddStates(int start, int end)
-{
-   do {
-      jjCheckNAdd(jjnextStates[start]);
-   } while (start++ != end);
-}
-private final void jjCheckNAddStates(int start)
-{
-   jjCheckNAdd(jjnextStates[start]);
-   jjCheckNAdd(jjnextStates[start + 1]);
-}
-private final int jjMoveNfa_0(int startState, int curPos)
-{
-   int[] nextStates;
-   int startsAt = 0;
-   jjnewStateCnt = 4;
-   int i = 1;
-   jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
-   for (;;)
-   {
-      if (++jjround == 0x7fffffff)
-         ReInitRounds();
-      if (curChar < 64)
-      {
-         long l = 1L << curChar;
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if ((0x3ff000000000000L & l) != 0L)
-                  {
-                     if (kind > 46)
-                        kind = 46;
-                     jjCheckNAdd(3);
-                  }
-                  else if ((0x100000200L & l) != 0L)
-                  {
-                     if (kind > 36)
-                        kind = 36;
-                     jjCheckNAdd(2);
-                  }
-                  else if ((0x280000000000L & l) != 0L)
-                  {
-                     if (kind > 24)
-                        kind = 24;
-                  }
-                  break;
-               case 2:
-                  if ((0x100000200L & l) == 0L)
-                     break;
-                  kind = 36;
-                  jjCheckNAdd(2);
-                  break;
-               case 3:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  kind = 46;
-                  jjCheckNAdd(3);
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else if (curChar < 128)
-      {
-         long l = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if ((0x7fffbfe07fffbfeL & l) != 0L)
-                     kind = 35;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else
-      {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      if (kind != 0x7fffffff)
-      {
-         jjmatchedKind = kind;
-         jjmatchedPos = curPos;
-         kind = 0x7fffffff;
-      }
-      ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 4 - (jjnewStateCnt = startsAt)))
-         return curPos;
-      try { curChar = input_stream.readChar(); }
-      catch(java.io.IOException e) { return curPos; }
-   }
-}
-private final int jjStopStringLiteralDfa_1(int pos, long active0)
-{
-   switch (pos)
-   {
-      default :
-         return -1;
-   }
-}
-private final int jjStartNfa_1(int pos, long active0)
-{
-   return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0), pos + 1);
-}
-private final int jjStartNfaWithStates_1(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_1(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_1()
-{
-   switch(curChar)
-   {
-      case 40:
-         return jjStopAtPos(0, 40);
-      case 41:
-         return jjStopAtPos(0, 38);
-      default :
-         return jjMoveNfa_1(0, 0);
-   }
-}
-static final long[] jjbitVec0 = {
-   0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
-};
-private final int jjMoveNfa_1(int startState, int curPos)
-{
-   int[] nextStates;
-   int startsAt = 0;
-   jjnewStateCnt = 3;
-   int i = 1;
-   jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
-   for (;;)
-   {
-      if (++jjround == 0x7fffffff)
-         ReInitRounds();
-      if (curChar < 64)
-      {
-         long l = 1L << curChar;
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if (kind > 41)
-                     kind = 41;
-                  break;
-               case 1:
-                  if (kind > 39)
-                     kind = 39;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else if (curChar < 128)
-      {
-         long l = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if (kind > 41)
-                     kind = 41;
-                  if (curChar == 92)
-                     jjstateSet[jjnewStateCnt++] = 1;
-                  break;
-               case 1:
-                  if (kind > 39)
-                     kind = 39;
-                  break;
-               case 2:
-                  if (kind > 41)
-                     kind = 41;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else
-      {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if ((jjbitVec0[i2] & l2) != 0L && kind > 41)
-                     kind = 41;
-                  break;
-               case 1:
-                  if ((jjbitVec0[i2] & l2) != 0L && kind > 39)
-                     kind = 39;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      if (kind != 0x7fffffff)
-      {
-         jjmatchedKind = kind;
-         jjmatchedPos = curPos;
-         kind = 0x7fffffff;
-      }
-      ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
-         return curPos;
-      try { curChar = input_stream.readChar(); }
-      catch(java.io.IOException e) { return curPos; }
-   }
-}
-private final int jjStopStringLiteralDfa_2(int pos, long active0)
-{
-   switch (pos)
-   {
-      default :
-         return -1;
-   }
-}
-private final int jjStartNfa_2(int pos, long active0)
-{
-   return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1);
-}
-private final int jjStartNfaWithStates_2(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_2(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_2()
-{
-   switch(curChar)
-   {
-      case 40:
-         return jjStopAtPos(0, 43);
-      case 41:
-         return jjStopAtPos(0, 44);
-      default :
-         return jjMoveNfa_2(0, 0);
-   }
-}
-private final int jjMoveNfa_2(int startState, int curPos)
-{
-   int[] nextStates;
-   int startsAt = 0;
-   jjnewStateCnt = 3;
-   int i = 1;
-   jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
-   for (;;)
-   {
-      if (++jjround == 0x7fffffff)
-         ReInitRounds();
-      if (curChar < 64)
-      {
-         long l = 1L << curChar;
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if (kind > 45)
-                     kind = 45;
-                  break;
-               case 1:
-                  if (kind > 42)
-                     kind = 42;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else if (curChar < 128)
-      {
-         long l = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if (kind > 45)
-                     kind = 45;
-                  if (curChar == 92)
-                     jjstateSet[jjnewStateCnt++] = 1;
-                  break;
-               case 1:
-                  if (kind > 42)
-                     kind = 42;
-                  break;
-               case 2:
-                  if (kind > 45)
-                     kind = 45;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else
-      {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
-         MatchLoop: do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if ((jjbitVec0[i2] & l2) != 0L && kind > 45)
-                     kind = 45;
-                  break;
-               case 1:
-                  if ((jjbitVec0[i2] & l2) != 0L && kind > 42)
-                     kind = 42;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      if (kind != 0x7fffffff)
-      {
-         jjmatchedKind = kind;
-         jjmatchedPos = curPos;
-         kind = 0x7fffffff;
-      }
-      ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
-         return curPos;
-      try { curChar = input_stream.readChar(); }
-      catch(java.io.IOException e) { return curPos; }
-   }
-}
-static final int[] jjnextStates = {
-};
-public static final String[] jjstrLiteralImages = {
-"", "\15", "\12", "\54", "\115\157\156", "\124\165\145", "\127\145\144", 
-"\124\150\165", "\106\162\151", "\123\141\164", "\123\165\156", "\112\141\156", 
-"\106\145\142", "\115\141\162", "\101\160\162", "\115\141\171", "\112\165\156", 
-"\112\165\154", "\101\165\147", "\123\145\160", "\117\143\164", "\116\157\166", 
-"\104\145\143", "\72", null, "\125\124", "\107\115\124", "\105\123\124", "\105\104\124", 
-"\103\123\124", "\103\104\124", "\115\123\124", "\115\104\124", "\120\123\124", 
-"\120\104\124", null, null, null, null, null, null, null, null, null, null, null, null, null, 
-null, };
-public static final String[] lexStateNames = {
-   "DEFAULT", 
-   "INCOMMENT", 
-   "NESTED_COMMENT", 
-};
-public static final int[] jjnewLexState = {
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 0, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, 
-};
-static final long[] jjtoToken = {
-   0x400fffffffffL, 
-};
-static final long[] jjtoSkip = {
-   0x5000000000L, 
-};
-static final long[] jjtoSpecial = {
-   0x1000000000L, 
-};
-static final long[] jjtoMore = {
-   0x3fa000000000L, 
-};
-protected SimpleCharStream input_stream;
-private final int[] jjrounds = new int[4];
-private final int[] jjstateSet = new int[8];
-StringBuffer image;
-int jjimageLen;
-int lengthOfMatch;
-protected char curChar;
-public DateTimeParserTokenManager(SimpleCharStream stream){
-   if (SimpleCharStream.staticFlag)
-      throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
-   input_stream = stream;
-}
-public DateTimeParserTokenManager(SimpleCharStream stream, int lexState){
-   this(stream);
-   SwitchTo(lexState);
-}
-public void ReInit(SimpleCharStream stream)
-{
-   jjmatchedPos = jjnewStateCnt = 0;
-   curLexState = defaultLexState;
-   input_stream = stream;
-   ReInitRounds();
-}
-private final void ReInitRounds()
-{
-   int i;
-   jjround = 0x80000001;
-   for (i = 4; i-- > 0;)
-      jjrounds[i] = 0x80000000;
-}
-public void ReInit(SimpleCharStream stream, int lexState)
-{
-   ReInit(stream);
-   SwitchTo(lexState);
-}
-public void SwitchTo(int lexState)
-{
-   if (lexState >= 3 || lexState < 0)
-      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
-   else
-      curLexState = lexState;
-}
-
-protected Token jjFillToken()
-{
-   Token t = Token.newToken(jjmatchedKind);
-   t.kind = jjmatchedKind;
-   String im = jjstrLiteralImages[jjmatchedKind];
-   t.image = (im == null) ? input_stream.GetImage() : im;
-   t.beginLine = input_stream.getBeginLine();
-   t.beginColumn = input_stream.getBeginColumn();
-   t.endLine = input_stream.getEndLine();
-   t.endColumn = input_stream.getEndColumn();
-   return t;
-}
-
-int curLexState = 0;
-int defaultLexState = 0;
-int jjnewStateCnt;
-int jjround;
-int jjmatchedPos;
-int jjmatchedKind;
-
-public Token getNextToken() 
-{
-  int kind;
-  Token specialToken = null;
-  Token matchedToken;
-  int curPos = 0;
-
-  EOFLoop :
-  for (;;)
-  {   
-   try   
-   {     
-      curChar = input_stream.BeginToken();
-   }     
-   catch(java.io.IOException e)
-   {        
-      jjmatchedKind = 0;
-      matchedToken = jjFillToken();
-      matchedToken.specialToken = specialToken;
-      return matchedToken;
-   }
-   image = null;
-   jjimageLen = 0;
-
-   for (;;)
-   {
-     switch(curLexState)
-     {
-       case 0:
-         jjmatchedKind = 0x7fffffff;
-         jjmatchedPos = 0;
-         curPos = jjMoveStringLiteralDfa0_0();
-         break;
-       case 1:
-         jjmatchedKind = 0x7fffffff;
-         jjmatchedPos = 0;
-         curPos = jjMoveStringLiteralDfa0_1();
-         break;
-       case 2:
-         jjmatchedKind = 0x7fffffff;
-         jjmatchedPos = 0;
-         curPos = jjMoveStringLiteralDfa0_2();
-         break;
-     }
-     if (jjmatchedKind != 0x7fffffff)
-     {
-        if (jjmatchedPos + 1 < curPos)
-           input_stream.backup(curPos - jjmatchedPos - 1);
-        if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
-        {
-           matchedToken = jjFillToken();
-           matchedToken.specialToken = specialToken;
-       if (jjnewLexState[jjmatchedKind] != -1)
-         curLexState = jjnewLexState[jjmatchedKind];
-           return matchedToken;
-        }
-        else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
-        {
-           if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
-           {
-              matchedToken = jjFillToken();
-              if (specialToken == null)
-                 specialToken = matchedToken;
-              else
-              {
-                 matchedToken.specialToken = specialToken;
-                 specialToken = (specialToken.next = matchedToken);
-              }
-           }
-         if (jjnewLexState[jjmatchedKind] != -1)
-           curLexState = jjnewLexState[jjmatchedKind];
-           continue EOFLoop;
-        }
-        MoreLexicalActions();
-      if (jjnewLexState[jjmatchedKind] != -1)
-        curLexState = jjnewLexState[jjmatchedKind];
-        curPos = 0;
-        jjmatchedKind = 0x7fffffff;
-        try {
-           curChar = input_stream.readChar();
-           continue;
-        }
-        catch (java.io.IOException e1) { }
-     }
-     int error_line = input_stream.getEndLine();
-     int error_column = input_stream.getEndColumn();
-     String error_after = null;
-     boolean EOFSeen = false;
-     try { input_stream.readChar(); input_stream.backup(1); }
-     catch (java.io.IOException e1) {
-        EOFSeen = true;
-        error_after = curPos <= 1 ? "" : input_stream.GetImage();
-        if (curChar == '\n' || curChar == '\r') {
-           error_line++;
-           error_column = 0;
-        }
-        else
-           error_column++;
-     }
-     if (!EOFSeen) {
-        input_stream.backup(1);
-        error_after = curPos <= 1 ? "" : input_stream.GetImage();
-     }
-     throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
-   }
-  }
-}
-
-void MoreLexicalActions()
-{
-   jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
-   switch(jjmatchedKind)
-   {
-      case 39 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-                          image.deleteCharAt(image.length() - 2);
-         break;
-      case 40 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-              commentNest = 1;
-         break;
-      case 42 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-                          image.deleteCharAt(image.length() - 2);
-         break;
-      case 43 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-              ++commentNest;
-         break;
-      case 44 :
-         if (image == null)
-            image = new StringBuffer();
-         image.append(input_stream.GetSuffix(jjimageLen));
-         jjimageLen = 0;
-              --commentNest; if (commentNest == 0) SwitchTo(INCOMMENT);
-         break;
-      default : 
-         break;
-   }
-}
-}
diff --git a/src/org/apache/james/mime4j/field/datetime/parser/ParseException.java b/src/org/apache/james/mime4j/field/datetime/parser/ParseException.java
deleted file mode 100644
index 13b3ff0..0000000
--- a/src/org/apache/james/mime4j/field/datetime/parser/ParseException.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.datetime.parser;
-
-/**
- * This exception is thrown when parse errors are encountered.
- * You can explicitly create objects of this exception type by
- * calling the method generateParseException in the generated
- * parser.
- *
- * You can modify this class to customize your error reporting
- * mechanisms so long as you retain the public fields.
- */
-public class ParseException extends Exception {
-
-  /**
-   * This constructor is used by the method "generateParseException"
-   * in the generated parser.  Calling this constructor generates
-   * a new object of this type with the fields "currentToken",
-   * "expectedTokenSequences", and "tokenImage" set.  The boolean
-   * flag "specialConstructor" is also set to true to indicate that
-   * this constructor was used to create this object.
-   * This constructor calls its super class with the empty string
-   * to force the "toString" method of parent class "Throwable" to
-   * print the error message in the form:
-   *     ParseException: <result of getMessage>
-   */
-  public ParseException(Token currentTokenVal,
-                        int[][] expectedTokenSequencesVal,
-                        String[] tokenImageVal
-                       )
-  {
-    super("");
-    specialConstructor = true;
-    currentToken = currentTokenVal;
-    expectedTokenSequences = expectedTokenSequencesVal;
-    tokenImage = tokenImageVal;
-  }
-
-  /**
-   * The following constructors are for use by you for whatever
-   * purpose you can think of.  Constructing the exception in this
-   * manner makes the exception behave in the normal way - i.e., as
-   * documented in the class "Throwable".  The fields "errorToken",
-   * "expectedTokenSequences", and "tokenImage" do not contain
-   * relevant information.  The JavaCC generated code does not use
-   * these constructors.
-   */
-
-  public ParseException() {
-    super();
-    specialConstructor = false;
-  }
-
-  public ParseException(String message) {
-    super(message);
-    specialConstructor = false;
-  }
-
-  /**
-   * This variable determines which constructor was used to create
-   * this object and thereby affects the semantics of the
-   * "getMessage" method (see below).
-   */
-  protected boolean specialConstructor;
-
-  /**
-   * This is the last token that has been consumed successfully.  If
-   * this object has been created due to a parse error, the token
-   * followng this token will (therefore) be the first error token.
-   */
-  public Token currentToken;
-
-  /**
-   * Each entry in this array is an array of integers.  Each array
-   * of integers represents a sequence of tokens (by their ordinal
-   * values) that is expected at this point of the parse.
-   */
-  public int[][] expectedTokenSequences;
-
-  /**
-   * This is a reference to the "tokenImage" array of the generated
-   * parser within which the parse error occurred.  This array is
-   * defined in the generated ...Constants interface.
-   */
-  public String[] tokenImage;
-
-  /**
-   * This method has the standard behavior when this object has been
-   * created using the standard constructors.  Otherwise, it uses
-   * "currentToken" and "expectedTokenSequences" to generate a parse
-   * error message and returns it.  If this object has been created
-   * due to a parse error, and you do not catch it (it gets thrown
-   * from the parser), then this method is called during the printing
-   * of the final stack trace, and hence the correct error message
-   * gets displayed.
-   */
-  public String getMessage() {
-    if (!specialConstructor) {
-      return super.getMessage();
-    }
-    StringBuffer expected = new StringBuffer();
-    int maxSize = 0;
-    for (int i = 0; i < expectedTokenSequences.length; i++) {
-      if (maxSize < expectedTokenSequences[i].length) {
-        maxSize = expectedTokenSequences[i].length;
-      }
-      for (int j = 0; j < expectedTokenSequences[i].length; j++) {
-        expected.append(tokenImage[expectedTokenSequences[i][j]]).append(" ");
-      }
-      if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
-        expected.append("...");
-      }
-      expected.append(eol).append("    ");
-    }
-    String retval = "Encountered \"";
-    Token tok = currentToken.next;
-    for (int i = 0; i < maxSize; i++) {
-      if (i != 0) retval += " ";
-      if (tok.kind == 0) {
-        retval += tokenImage[0];
-        break;
-      }
-      retval += add_escapes(tok.image);
-      tok = tok.next; 
-    }
-    retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
-    retval += "." + eol;
-    if (expectedTokenSequences.length == 1) {
-      retval += "Was expecting:" + eol + "    ";
-    } else {
-      retval += "Was expecting one of:" + eol + "    ";
-    }
-    retval += expected.toString();
-    return retval;
-  }
-
-  /**
-   * The end of line string for this machine.
-   */
-  protected String eol = System.getProperty("line.separator", "\n");
- 
-  /**
-   * Used to convert raw characters to their escaped version
-   * when these raw version cannot be used as part of an ASCII
-   * string literal.
-   */
-  protected String add_escapes(String str) {
-      StringBuffer retval = new StringBuffer();
-      char ch;
-      for (int i = 0; i < str.length(); i++) {
-        switch (str.charAt(i))
-        {
-           case 0 :
-              continue;
-           case '\b':
-              retval.append("\\b");
-              continue;
-           case '\t':
-              retval.append("\\t");
-              continue;
-           case '\n':
-              retval.append("\\n");
-              continue;
-           case '\f':
-              retval.append("\\f");
-              continue;
-           case '\r':
-              retval.append("\\r");
-              continue;
-           case '\"':
-              retval.append("\\\"");
-              continue;
-           case '\'':
-              retval.append("\\\'");
-              continue;
-           case '\\':
-              retval.append("\\\\");
-              continue;
-           default:
-              if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
-                 String s = "0000" + Integer.toString(ch, 16);
-                 retval.append("\\u" + s.substring(s.length() - 4, s.length()));
-              } else {
-                 retval.append(ch);
-              }
-              continue;
-        }
-      }
-      return retval.toString();
-   }
-
-}
diff --git a/src/org/apache/james/mime4j/field/datetime/parser/SimpleCharStream.java b/src/org/apache/james/mime4j/field/datetime/parser/SimpleCharStream.java
deleted file mode 100644
index 2724529..0000000
--- a/src/org/apache/james/mime4j/field/datetime/parser/SimpleCharStream.java
+++ /dev/null
@@ -1,454 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 4.0 */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.datetime.parser;
-
-/**
- * An implementation of interface CharStream, where the stream is assumed to
- * contain only ASCII characters (without unicode processing).
- */
-
-public class SimpleCharStream
-{
-  public static final boolean staticFlag = false;
-  int bufsize;
-  int available;
-  int tokenBegin;
-  public int bufpos = -1;
-  protected int bufline[];
-  protected int bufcolumn[];
-
-  protected int column = 0;
-  protected int line = 1;
-
-  protected boolean prevCharIsCR = false;
-  protected boolean prevCharIsLF = false;
-
-  protected java.io.Reader inputStream;
-
-  protected char[] buffer;
-  protected int maxNextCharInd = 0;
-  protected int inBuf = 0;
-  protected int tabSize = 8;
-
-  protected void setTabSize(int i) { tabSize = i; }
-  protected int getTabSize(int i) { return tabSize; }
-
-
-  protected void ExpandBuff(boolean wrapAround)
-  {
-     char[] newbuffer = new char[bufsize + 2048];
-     int newbufline[] = new int[bufsize + 2048];
-     int newbufcolumn[] = new int[bufsize + 2048];
-
-     try
-     {
-        if (wrapAround)
-        {
-           System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
-           System.arraycopy(buffer, 0, newbuffer,
-                                             bufsize - tokenBegin, bufpos);
-           buffer = newbuffer;
-
-           System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
-           System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
-           bufline = newbufline;
-
-           System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
-           System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
-           bufcolumn = newbufcolumn;
-
-           maxNextCharInd = (bufpos += (bufsize - tokenBegin));
-        }
-        else
-        {
-           System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
-           buffer = newbuffer;
-
-           System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
-           bufline = newbufline;
-
-           System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
-           bufcolumn = newbufcolumn;
-
-           maxNextCharInd = (bufpos -= tokenBegin);
-        }
-     }
-     catch (Throwable t)
-     {
-        throw new Error(t.getMessage());
-     }
-
-
-     bufsize += 2048;
-     available = bufsize;
-     tokenBegin = 0;
-  }
-
-  protected void FillBuff() throws java.io.IOException
-  {
-     if (maxNextCharInd == available)
-     {
-        if (available == bufsize)
-        {
-           if (tokenBegin > 2048)
-           {
-              bufpos = maxNextCharInd = 0;
-              available = tokenBegin;
-           }
-           else if (tokenBegin < 0)
-              bufpos = maxNextCharInd = 0;
-           else
-              ExpandBuff(false);
-        }
-        else if (available > tokenBegin)
-           available = bufsize;
-        else if ((tokenBegin - available) < 2048)
-           ExpandBuff(true);
-        else
-           available = tokenBegin;
-     }
-
-     int i;
-     try {
-        if ((i = inputStream.read(buffer, maxNextCharInd,
-                                    available - maxNextCharInd)) == -1)
-        {
-           inputStream.close();
-           throw new java.io.IOException();
-        }
-        else
-           maxNextCharInd += i;
-        return;
-     }
-     catch(java.io.IOException e) {
-        --bufpos;
-        backup(0);
-        if (tokenBegin == -1)
-           tokenBegin = bufpos;
-        throw e;
-     }
-  }
-
-  public char BeginToken() throws java.io.IOException
-  {
-     tokenBegin = -1;
-     char c = readChar();
-     tokenBegin = bufpos;
-
-     return c;
-  }
-
-  protected void UpdateLineColumn(char c)
-  {
-     column++;
-
-     if (prevCharIsLF)
-     {
-        prevCharIsLF = false;
-        line += (column = 1);
-     }
-     else if (prevCharIsCR)
-     {
-        prevCharIsCR = false;
-        if (c == '\n')
-        {
-           prevCharIsLF = true;
-        }
-        else
-           line += (column = 1);
-     }
-
-     switch (c)
-     {
-        case '\r' :
-           prevCharIsCR = true;
-           break;
-        case '\n' :
-           prevCharIsLF = true;
-           break;
-        case '\t' :
-           column--;
-           column += (tabSize - (column % tabSize));
-           break;
-        default :
-           break;
-     }
-
-     bufline[bufpos] = line;
-     bufcolumn[bufpos] = column;
-  }
-
-  public char readChar() throws java.io.IOException
-  {
-     if (inBuf > 0)
-     {
-        --inBuf;
-
-        if (++bufpos == bufsize)
-           bufpos = 0;
-
-        return buffer[bufpos];
-     }
-
-     if (++bufpos >= maxNextCharInd)
-        FillBuff();
-
-     char c = buffer[bufpos];
-
-     UpdateLineColumn(c);
-     return (c);
-  }
-
-  /**
-   * @deprecated 
-   * @see #getEndColumn
-   */
-  @Deprecated
-  public int getColumn() {
-     return bufcolumn[bufpos];
-  }
-
-  /**
-   * @deprecated 
-   * @see #getEndLine
-   */
-  @Deprecated
-  public int getLine() {
-     return bufline[bufpos];
-  }
-
-  public int getEndColumn() {
-     return bufcolumn[bufpos];
-  }
-
-  public int getEndLine() {
-     return bufline[bufpos];
-  }
-
-  public int getBeginColumn() {
-     return bufcolumn[tokenBegin];
-  }
-
-  public int getBeginLine() {
-     return bufline[tokenBegin];
-  }
-
-  public void backup(int amount) {
-
-    inBuf += amount;
-    if ((bufpos -= amount) < 0)
-       bufpos += bufsize;
-  }
-
-  public SimpleCharStream(java.io.Reader dstream, int startline,
-  int startcolumn, int buffersize)
-  {
-    inputStream = dstream;
-    line = startline;
-    column = startcolumn - 1;
-
-    available = bufsize = buffersize;
-    buffer = new char[buffersize];
-    bufline = new int[buffersize];
-    bufcolumn = new int[buffersize];
-  }
-
-  public SimpleCharStream(java.io.Reader dstream, int startline,
-                          int startcolumn)
-  {
-     this(dstream, startline, startcolumn, 4096);
-  }
-
-  public SimpleCharStream(java.io.Reader dstream)
-  {
-     this(dstream, 1, 1, 4096);
-  }
-  public void ReInit(java.io.Reader dstream, int startline,
-  int startcolumn, int buffersize)
-  {
-    inputStream = dstream;
-    line = startline;
-    column = startcolumn - 1;
-
-    if (buffer == null || buffersize != buffer.length)
-    {
-      available = bufsize = buffersize;
-      buffer = new char[buffersize];
-      bufline = new int[buffersize];
-      bufcolumn = new int[buffersize];
-    }
-    prevCharIsLF = prevCharIsCR = false;
-    tokenBegin = inBuf = maxNextCharInd = 0;
-    bufpos = -1;
-  }
-
-  public void ReInit(java.io.Reader dstream, int startline,
-                     int startcolumn)
-  {
-     ReInit(dstream, startline, startcolumn, 4096);
-  }
-
-  public void ReInit(java.io.Reader dstream)
-  {
-     ReInit(dstream, 1, 1, 4096);
-  }
-  public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
-  int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
-  {
-     this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream, int startline,
-  int startcolumn, int buffersize)
-  {
-     this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
-                          int startcolumn) throws java.io.UnsupportedEncodingException
-  {
-     this(dstream, encoding, startline, startcolumn, 4096);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream, int startline,
-                          int startcolumn)
-  {
-     this(dstream, startline, startcolumn, 4096);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
-  {
-     this(dstream, encoding, 1, 1, 4096);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream)
-  {
-     this(dstream, 1, 1, 4096);
-  }
-
-  public void ReInit(java.io.InputStream dstream, String encoding, int startline,
-                          int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
-  {
-     ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
-  }
-
-  public void ReInit(java.io.InputStream dstream, int startline,
-                          int startcolumn, int buffersize)
-  {
-     ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
-  }
-
-  public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
-  {
-     ReInit(dstream, encoding, 1, 1, 4096);
-  }
-
-  public void ReInit(java.io.InputStream dstream)
-  {
-     ReInit(dstream, 1, 1, 4096);
-  }
-  public void ReInit(java.io.InputStream dstream, String encoding, int startline,
-                     int startcolumn) throws java.io.UnsupportedEncodingException
-  {
-     ReInit(dstream, encoding, startline, startcolumn, 4096);
-  }
-  public void ReInit(java.io.InputStream dstream, int startline,
-                     int startcolumn)
-  {
-     ReInit(dstream, startline, startcolumn, 4096);
-  }
-  public String GetImage()
-  {
-     if (bufpos >= tokenBegin)
-        return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
-     else
-        return new String(buffer, tokenBegin, bufsize - tokenBegin) +
-                              new String(buffer, 0, bufpos + 1);
-  }
-
-  public char[] GetSuffix(int len)
-  {
-     char[] ret = new char[len];
-
-     if ((bufpos + 1) >= len)
-        System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
-     else
-     {
-        System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
-                                                          len - bufpos - 1);
-        System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
-     }
-
-     return ret;
-  }
-
-  public void Done()
-  {
-     buffer = null;
-     bufline = null;
-     bufcolumn = null;
-  }
-
-  /**
-   * Method to adjust line and column numbers for the start of a token.
-   */
-  public void adjustBeginLineColumn(int newLine, int newCol)
-  {
-     int start = tokenBegin;
-     int len;
-
-     if (bufpos >= tokenBegin)
-     {
-        len = bufpos - tokenBegin + inBuf + 1;
-     }
-     else
-     {
-        len = bufsize - tokenBegin + bufpos + 1 + inBuf;
-     }
-
-     int i = 0, j = 0, k = 0;
-     int nextColDiff = 0, columnDiff = 0;
-
-     while (i < len &&
-            bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
-     {
-        bufline[j] = newLine;
-        nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
-        bufcolumn[j] = newCol + columnDiff;
-        columnDiff = nextColDiff;
-        i++;
-     } 
-
-     if (i < len)
-     {
-        bufline[j] = newLine++;
-        bufcolumn[j] = newCol + columnDiff;
-
-        while (i++ < len)
-        {
-           if (bufline[j = start % bufsize] != bufline[++start % bufsize])
-              bufline[j] = newLine++;
-           else
-              bufline[j] = newLine;
-        }
-     }
-
-     line = bufline[j];
-     column = bufcolumn[j];
-  }
-
-}
diff --git a/src/org/apache/james/mime4j/field/datetime/parser/Token.java b/src/org/apache/james/mime4j/field/datetime/parser/Token.java
deleted file mode 100644
index 0927a09..0000000
--- a/src/org/apache/james/mime4j/field/datetime/parser/Token.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.datetime.parser;
-
-/**
- * Describes the input token stream.
- */
-
-public class Token {
-
-  /**
-   * An integer that describes the kind of this token.  This numbering
-   * system is determined by JavaCCParser, and a table of these numbers is
-   * stored in the file ...Constants.java.
-   */
-  public int kind;
-
-  /**
-   * beginLine and beginColumn describe the position of the first character
-   * of this token; endLine and endColumn describe the position of the
-   * last character of this token.
-   */
-  public int beginLine, beginColumn, endLine, endColumn;
-
-  /**
-   * The string image of the token.
-   */
-  public String image;
-
-  /**
-   * A reference to the next regular (non-special) token from the input
-   * stream.  If this is the last token from the input stream, or if the
-   * token manager has not read tokens beyond this one, this field is
-   * set to null.  This is true only if this token is also a regular
-   * token.  Otherwise, see below for a description of the contents of
-   * this field.
-   */
-  public Token next;
-
-  /**
-   * This field is used to access special tokens that occur prior to this
-   * token, but after the immediately preceding regular (non-special) token.
-   * If there are no such special tokens, this field is set to null.
-   * When there are more than one such special token, this field refers
-   * to the last of these special tokens, which in turn refers to the next
-   * previous special token through its specialToken field, and so on
-   * until the first special token (whose specialToken field is null).
-   * The next fields of special tokens refer to other special tokens that
-   * immediately follow it (without an intervening regular token).  If there
-   * is no such token, this field is null.
-   */
-  public Token specialToken;
-
-  /**
-   * Returns the image.
-   */
-  public String toString()
-  {
-     return image;
-  }
-
-  /**
-   * Returns a new Token object, by default. However, if you want, you
-   * can create and return subclass objects based on the value of ofKind.
-   * Simply add the cases to the switch for all those special cases.
-   * For example, if you have a subclass of Token called IDToken that
-   * you want to create if ofKind is ID, simlpy add something like :
-   *
-   *    case MyParserConstants.ID : return new IDToken();
-   *
-   * to the following switch statement. Then you can cast matchedToken
-   * variable to the appropriate type and use it in your lexical actions.
-   */
-  public static final Token newToken(int ofKind)
-  {
-     switch(ofKind)
-     {
-       default : return new Token();
-     }
-  }
-
-}
diff --git a/src/org/apache/james/mime4j/field/datetime/parser/TokenMgrError.java b/src/org/apache/james/mime4j/field/datetime/parser/TokenMgrError.java
deleted file mode 100644
index e7043c1..0000000
--- a/src/org/apache/james/mime4j/field/datetime/parser/TokenMgrError.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */
-/*
- *  Copyright 2004 the mime4j 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 org.apache.james.mime4j.field.datetime.parser;
-
-public class TokenMgrError extends Error
-{
-   /*
-    * Ordinals for various reasons why an Error of this type can be thrown.
-    */
-
-   /**
-    * Lexical error occured.
-    */
-   static final int LEXICAL_ERROR = 0;
-
-   /**
-    * An attempt wass made to create a second instance of a static token manager.
-    */
-   static final int STATIC_LEXER_ERROR = 1;
-
-   /**
-    * Tried to change to an invalid lexical state.
-    */
-   static final int INVALID_LEXICAL_STATE = 2;
-
-   /**
-    * Detected (and bailed out of) an infinite loop in the token manager.
-    */
-   static final int LOOP_DETECTED = 3;
-
-   /**
-    * Indicates the reason why the exception is thrown. It will have
-    * one of the above 4 values.
-    */
-   int errorCode;
-
-   /**
-    * Replaces unprintable characters by their espaced (or unicode escaped)
-    * equivalents in the given string
-    */
-   protected static final String addEscapes(String str) {
-      StringBuffer retval = new StringBuffer();
-      char ch;
-      for (int i = 0; i < str.length(); i++) {
-        switch (str.charAt(i))
-        {
-           case 0 :
-              continue;
-           case '\b':
-              retval.append("\\b");
-              continue;
-           case '\t':
-              retval.append("\\t");
-              continue;
-           case '\n':
-              retval.append("\\n");
-              continue;
-           case '\f':
-              retval.append("\\f");
-              continue;
-           case '\r':
-              retval.append("\\r");
-              continue;
-           case '\"':
-              retval.append("\\\"");
-              continue;
-           case '\'':
-              retval.append("\\\'");
-              continue;
-           case '\\':
-              retval.append("\\\\");
-              continue;
-           default:
-              if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
-                 String s = "0000" + Integer.toString(ch, 16);
-                 retval.append("\\u" + s.substring(s.length() - 4, s.length()));
-              } else {
-                 retval.append(ch);
-              }
-              continue;
-        }
-      }
-      return retval.toString();
-   }
-
-   /**
-    * Returns a detailed message for the Error when it is thrown by the
-    * token manager to indicate a lexical error.
-    * Parameters : 
-    *    EOFSeen     : indicates if EOF caused the lexicl error
-    *    curLexState : lexical state in which this error occured
-    *    errorLine   : line number when the error occured
-    *    errorColumn : column number when the error occured
-    *    errorAfter  : prefix that was seen before this error occured
-    *    curchar     : the offending character
-    * Note: You can customize the lexical error message by modifying this method.
-    */
-   protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
-      return("Lexical error at line " +
-           errorLine + ", column " +
-           errorColumn + ".  Encountered: " +
-           (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
-           "after : \"" + addEscapes(errorAfter) + "\"");
-   }
-
-   /**
-    * You can also modify the body of this method to customize your error messages.
-    * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
-    * of end-users concern, so you can return something like : 
-    *
-    *     "Internal Error : Please file a bug report .... "
-    *
-    * from this method for such cases in the release version of your parser.
-    */
-   public String getMessage() {
-      return super.getMessage();
-   }
-
-   /*
-    * Constructors of various flavors follow.
-    */
-
-   public TokenMgrError() {
-   }
-
-   public TokenMgrError(String message, int reason) {
-      super(message);
-      errorCode = reason;
-   }
-
-   public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
-      this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
-   }
-}
diff --git a/src/org/apache/james/mime4j/util/CharsetUtil.java b/src/org/apache/james/mime4j/util/CharsetUtil.java
deleted file mode 100644
index 4e712fc..0000000
--- a/src/org/apache/james/mime4j/util/CharsetUtil.java
+++ /dev/null
@@ -1,1249 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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 org.apache.james.mime4j.util;
-
-import java.io.UnsupportedEncodingException;
-import java.nio.charset.IllegalCharsetNameException;
-import java.nio.charset.UnsupportedCharsetException;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.TreeSet;
-
-//BEGIN android-changed: Stubbing out logging
-import org.apache.james.mime4j.Log;
-import org.apache.james.mime4j.LogFactory;
-//END android-changed
-
-/**
- * Utility class for working with character sets. It is somewhat similar to
- * the Java 1.4 <code>java.nio.charset.Charset</code> class but knows many
- * more aliases and is compatible with Java 1.3. It will use a simple detection
- * mechanism to detect what character sets the current VM supports. This will
- * be a sub-set of the character sets listed in the
- * <a href="http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html">
- * Java 1.5 (J2SE5.0) Supported Encodings</a> document.
- * <p>
- * The <a href="http://www.iana.org/assignments/character-sets">
- * IANA Character Sets</a> document has been used to determine the preferred
- * MIME character set names and to get a list of known aliases.
- * <p>
- * This is a complete list of the character sets known to this class:
- * <table>
- *     <tr>
- *         <td>Canonical (Java) name</td>
- *         <td>MIME preferred</td>
- *         <td>Aliases</td>
- *     </tr>
- *     <tr>
- *         <td>ASCII</td>
- *         <td>US-ASCII</td>
- *         <td>ANSI_X3.4-1968 iso-ir-6 ANSI_X3.4-1986 ISO_646.irv:1991 ISO646-US us IBM367 cp367 csASCII ascii7 646 iso_646.irv:1983 </td>
- *     </tr>
- *     <tr>
- *         <td>Big5</td>
- *         <td>Big5</td>
- *         <td>csBig5 CN-Big5 BIG-FIVE BIGFIVE </td>
- *     </tr>
- *     <tr>
- *         <td>Big5_HKSCS</td>
- *         <td>Big5-HKSCS</td>
- *         <td>big5hkscs </td>
- *     </tr>
- *     <tr>
- *         <td>Big5_Solaris</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp037</td>
- *         <td>IBM037</td>
- *         <td>ebcdic-cp-us ebcdic-cp-ca ebcdic-cp-wt ebcdic-cp-nl csIBM037 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp1006</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1025</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1026</td>
- *         <td>IBM1026</td>
- *         <td>csIBM1026 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp1046</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1047</td>
- *         <td>IBM1047</td>
- *         <td>IBM-1047 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp1097</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1098</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1112</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1122</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1123</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1124</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1140</td>
- *         <td>IBM01140</td>
- *         <td>CCSID01140 CP01140 ebcdic-us-37+euro </td>
- *     </tr>
- *     <tr>
- *         <td>Cp1141</td>
- *         <td>IBM01141</td>
- *         <td>CCSID01141 CP01141 ebcdic-de-273+euro </td>
- *     </tr>
- *     <tr>
- *         <td>Cp1142</td>
- *         <td>IBM01142</td>
- *         <td>CCSID01142 CP01142 ebcdic-dk-277+euro ebcdic-no-277+euro </td>
- *     </tr>
- *     <tr>
- *         <td>Cp1143</td>
- *         <td>IBM01143</td>
- *         <td>CCSID01143 CP01143 ebcdic-fi-278+euro ebcdic-se-278+euro </td>
- *     </tr>
- *     <tr>
- *         <td>Cp1144</td>
- *         <td>IBM01144</td>
- *         <td>CCSID01144 CP01144 ebcdic-it-280+euro </td>
- *     </tr>
- *     <tr>
- *         <td>Cp1145</td>
- *         <td>IBM01145</td>
- *         <td>CCSID01145 CP01145 ebcdic-es-284+euro </td>
- *     </tr>
- *     <tr>
- *         <td>Cp1146</td>
- *         <td>IBM01146</td>
- *         <td>CCSID01146 CP01146 ebcdic-gb-285+euro </td>
- *     </tr>
- *     <tr>
- *         <td>Cp1147</td>
- *         <td>IBM01147</td>
- *         <td>CCSID01147 CP01147 ebcdic-fr-297+euro </td>
- *     </tr>
- *     <tr>
- *         <td>Cp1148</td>
- *         <td>IBM01148</td>
- *         <td>CCSID01148 CP01148 ebcdic-international-500+euro </td>
- *     </tr>
- *     <tr>
- *         <td>Cp1149</td>
- *         <td>IBM01149</td>
- *         <td>CCSID01149 CP01149 ebcdic-is-871+euro </td>
- *     </tr>
- *     <tr>
- *         <td>Cp1250</td>
- *         <td>windows-1250</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1251</td>
- *         <td>windows-1251</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1252</td>
- *         <td>windows-1252</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1253</td>
- *         <td>windows-1253</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1254</td>
- *         <td>windows-1254</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1255</td>
- *         <td>windows-1255</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1256</td>
- *         <td>windows-1256</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1257</td>
- *         <td>windows-1257</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1258</td>
- *         <td>windows-1258</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1381</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp1383</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp273</td>
- *         <td>IBM273</td>
- *         <td>csIBM273 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp277</td>
- *         <td>IBM277</td>
- *         <td>EBCDIC-CP-DK EBCDIC-CP-NO csIBM277 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp278</td>
- *         <td>IBM278</td>
- *         <td>CP278 ebcdic-cp-fi ebcdic-cp-se csIBM278 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp280</td>
- *         <td>IBM280</td>
- *         <td>ebcdic-cp-it csIBM280 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp284</td>
- *         <td>IBM284</td>
- *         <td>ebcdic-cp-es csIBM284 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp285</td>
- *         <td>IBM285</td>
- *         <td>ebcdic-cp-gb csIBM285 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp297</td>
- *         <td>IBM297</td>
- *         <td>ebcdic-cp-fr csIBM297 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp33722</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp420</td>
- *         <td>IBM420</td>
- *         <td>ebcdic-cp-ar1 csIBM420 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp424</td>
- *         <td>IBM424</td>
- *         <td>ebcdic-cp-he csIBM424 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp437</td>
- *         <td>IBM437</td>
- *         <td>437 csPC8CodePage437 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp500</td>
- *         <td>IBM500</td>
- *         <td>ebcdic-cp-be ebcdic-cp-ch csIBM500 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp737</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp775</td>
- *         <td>IBM775</td>
- *         <td>csPC775Baltic </td>
- *     </tr>
- *     <tr>
- *         <td>Cp838</td>
- *         <td>IBM-Thai</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp850</td>
- *         <td>IBM850</td>
- *         <td>850 csPC850Multilingual </td>
- *     </tr>
- *     <tr>
- *         <td>Cp852</td>
- *         <td>IBM852</td>
- *         <td>852 csPCp852 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp855</td>
- *         <td>IBM855</td>
- *         <td>855 csIBM855 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp856</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp857</td>
- *         <td>IBM857</td>
- *         <td>857 csIBM857 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp858</td>
- *         <td>IBM00858</td>
- *         <td>CCSID00858 CP00858 PC-Multilingual-850+euro </td>
- *     </tr>
- *     <tr>
- *         <td>Cp860</td>
- *         <td>IBM860</td>
- *         <td>860 csIBM860 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp861</td>
- *         <td>IBM861</td>
- *         <td>861 cp-is csIBM861 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp862</td>
- *         <td>IBM862</td>
- *         <td>862 csPC862LatinHebrew </td>
- *     </tr>
- *     <tr>
- *         <td>Cp863</td>
- *         <td>IBM863</td>
- *         <td>863 csIBM863 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp864</td>
- *         <td>IBM864</td>
- *         <td>cp864 csIBM864 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp865</td>
- *         <td>IBM865</td>
- *         <td>865 csIBM865 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp866</td>
- *         <td>IBM866</td>
- *         <td>866 csIBM866 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp868</td>
- *         <td>IBM868</td>
- *         <td>cp-ar csIBM868 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp869</td>
- *         <td>IBM869</td>
- *         <td>cp-gr csIBM869 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp870</td>
- *         <td>IBM870</td>
- *         <td>ebcdic-cp-roece ebcdic-cp-yu csIBM870 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp871</td>
- *         <td>IBM871</td>
- *         <td>ebcdic-cp-is csIBM871 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp875</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp918</td>
- *         <td>IBM918</td>
- *         <td>ebcdic-cp-ar2 csIBM918 </td>
- *     </tr>
- *     <tr>
- *         <td>Cp921</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp922</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp930</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp933</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp935</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp937</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp939</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp942</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp942C</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp943</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp943C</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp948</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp949</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp949C</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp950</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp964</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>Cp970</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>EUC_CN</td>
- *         <td>GB2312</td>
- *         <td>x-EUC-CN csGB2312 euccn euc-cn gb2312-80 gb2312-1980 CN-GB CN-GB-ISOIR165 </td>
- *     </tr>
- *     <tr>
- *         <td>EUC_JP</td>
- *         <td>EUC-JP</td>
- *         <td>csEUCPkdFmtJapanese Extended_UNIX_Code_Packed_Format_for_Japanese eucjis x-eucjp eucjp x-euc-jp </td>
- *     </tr>
- *     <tr>
- *         <td>EUC_JP_LINUX</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>EUC_JP_Solaris</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>EUC_KR</td>
- *         <td>EUC-KR</td>
- *         <td>csEUCKR ksc5601 5601 ksc5601_1987 ksc_5601 ksc5601-1987 ks_c_5601-1987 euckr </td>
- *     </tr>
- *     <tr>
- *         <td>EUC_TW</td>
- *         <td>EUC-TW</td>
- *         <td>x-EUC-TW cns11643 euctw </td>
- *     </tr>
- *     <tr>
- *         <td>GB18030</td>
- *         <td>GB18030</td>
- *         <td>gb18030-2000 </td>
- *     </tr>
- *     <tr>
- *         <td>GBK</td>
- *         <td>windows-936</td>
- *         <td>CP936 MS936 ms_936 x-mswin-936 </td>
- *     </tr>
- *     <tr>
- *         <td>ISCII91</td>
- *         <td>?</td>
- *         <td>x-ISCII91 iscii </td>
- *     </tr>
- *     <tr>
- *         <td>ISO2022CN</td>
- *         <td>ISO-2022-CN</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>ISO2022JP</td>
- *         <td>ISO-2022-JP</td>
- *         <td>csISO2022JP JIS jis_encoding csjisencoding </td>
- *     </tr>
- *     <tr>
- *         <td>ISO2022KR</td>
- *         <td>ISO-2022-KR</td>
- *         <td>csISO2022KR </td>
- *     </tr>
- *     <tr>
- *         <td>ISO2022_CN_CNS</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>ISO2022_CN_GB</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>ISO8859_1</td>
- *         <td>ISO-8859-1</td>
- *         <td>ISO_8859-1:1987 iso-ir-100 ISO_8859-1 latin1 l1 IBM819 CP819 csISOLatin1 8859_1 819 IBM-819 ISO8859-1 ISO_8859_1 </td>
- *     </tr>
- *     <tr>
- *         <td>ISO8859_13</td>
- *         <td>ISO-8859-13</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>ISO8859_15</td>
- *         <td>ISO-8859-15</td>
- *         <td>ISO_8859-15 Latin-9 8859_15 csISOlatin9 IBM923 cp923 923 L9 IBM-923 ISO8859-15 LATIN9 LATIN0 csISOlatin0 ISO8859_15_FDIS </td>
- *     </tr>
- *     <tr>
- *         <td>ISO8859_2</td>
- *         <td>ISO-8859-2</td>
- *         <td>ISO_8859-2:1987 iso-ir-101 ISO_8859-2 latin2 l2 csISOLatin2 8859_2 iso8859_2 </td>
- *     </tr>
- *     <tr>
- *         <td>ISO8859_3</td>
- *         <td>ISO-8859-3</td>
- *         <td>ISO_8859-3:1988 iso-ir-109 ISO_8859-3 latin3 l3 csISOLatin3 8859_3 </td>
- *     </tr>
- *     <tr>
- *         <td>ISO8859_4</td>
- *         <td>ISO-8859-4</td>
- *         <td>ISO_8859-4:1988 iso-ir-110 ISO_8859-4 latin4 l4 csISOLatin4 8859_4 </td>
- *     </tr>
- *     <tr>
- *         <td>ISO8859_5</td>
- *         <td>ISO-8859-5</td>
- *         <td>ISO_8859-5:1988 iso-ir-144 ISO_8859-5 cyrillic csISOLatinCyrillic 8859_5 </td>
- *     </tr>
- *     <tr>
- *         <td>ISO8859_6</td>
- *         <td>ISO-8859-6</td>
- *         <td>ISO_8859-6:1987 iso-ir-127 ISO_8859-6 ECMA-114 ASMO-708 arabic csISOLatinArabic 8859_6 </td>
- *     </tr>
- *     <tr>
- *         <td>ISO8859_7</td>
- *         <td>ISO-8859-7</td>
- *         <td>ISO_8859-7:1987 iso-ir-126 ISO_8859-7 ELOT_928 ECMA-118 greek greek8 csISOLatinGreek 8859_7 sun_eu_greek </td>
- *     </tr>
- *     <tr>
- *         <td>ISO8859_8</td>
- *         <td>ISO-8859-8</td>
- *         <td>ISO_8859-8:1988 iso-ir-138 ISO_8859-8 hebrew csISOLatinHebrew 8859_8 </td>
- *     </tr>
- *     <tr>
- *         <td>ISO8859_9</td>
- *         <td>ISO-8859-9</td>
- *         <td>ISO_8859-9:1989 iso-ir-148 ISO_8859-9 latin5 l5 csISOLatin5 8859_9 </td>
- *     </tr>
- *     <tr>
- *         <td>JISAutoDetect</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>JIS_C6626-1983</td>
- *         <td>JIS_C6626-1983</td>
- *         <td>x-JIS0208 JIS0208 csISO87JISX0208 x0208 JIS_X0208-1983 iso-ir-87 </td>
- *     </tr>
- *     <tr>
- *         <td>JIS_X0201</td>
- *         <td>JIS_X0201</td>
- *         <td>X0201 JIS0201 csHalfWidthKatakana </td>
- *     </tr>
- *     <tr>
- *         <td>JIS_X0212-1990</td>
- *         <td>JIS_X0212-1990</td>
- *         <td>iso-ir-159 x0212 JIS0212 csISO159JISX02121990 </td>
- *     </tr>
- *     <tr>
- *         <td>KOI8_R</td>
- *         <td>KOI8-R</td>
- *         <td>csKOI8R koi8 </td>
- *     </tr>
- *     <tr>
- *         <td>MS874</td>
- *         <td>windows-874</td>
- *         <td>cp874 </td>
- *     </tr>
- *     <tr>
- *         <td>MS932</td>
- *         <td>Windows-31J</td>
- *         <td>windows-932 csWindows31J x-ms-cp932 </td>
- *     </tr>
- *     <tr>
- *         <td>MS949</td>
- *         <td>windows-949</td>
- *         <td>windows949 ms_949 x-windows-949 </td>
- *     </tr>
- *     <tr>
- *         <td>MS950</td>
- *         <td>windows-950</td>
- *         <td>x-windows-950 </td>
- *     </tr>
- *     <tr>
- *         <td>MS950_HKSCS</td>
- *         <td></td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>MacArabic</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>MacCentralEurope</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>MacCroatian</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>MacCyrillic</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>MacDingbat</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>MacGreek</td>
- *         <td>MacGreek</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>MacHebrew</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>MacIceland</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>MacRoman</td>
- *         <td>MacRoman</td>
- *         <td>Macintosh MAC csMacintosh </td>
- *     </tr>
- *     <tr>
- *         <td>MacRomania</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>MacSymbol</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>MacThai</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>MacTurkish</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>MacUkraine</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>SJIS</td>
- *         <td>Shift_JIS</td>
- *         <td>MS_Kanji csShiftJIS shift-jis x-sjis pck </td>
- *     </tr>
- *     <tr>
- *         <td>TIS620</td>
- *         <td>TIS-620</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>UTF-16</td>
- *         <td>UTF-16</td>
- *         <td>UTF_16 </td>
- *     </tr>
- *     <tr>
- *         <td>UTF8</td>
- *         <td>UTF-8</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>UnicodeBig</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>UnicodeBigUnmarked</td>
- *         <td>UTF-16BE</td>
- *         <td>X-UTF-16BE UTF_16BE ISO-10646-UCS-2 </td>
- *     </tr>
- *     <tr>
- *         <td>UnicodeLittle</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- *     <tr>
- *         <td>UnicodeLittleUnmarked</td>
- *         <td>UTF-16LE</td>
- *         <td>UTF_16LE X-UTF-16LE </td>
- *     </tr>
- *     <tr>
- *         <td>x-Johab</td>
- *         <td>johab</td>
- *         <td>johab cp1361 ms1361 ksc5601-1992 ksc5601_1992 </td>
- *     </tr>
- *     <tr>
- *         <td>x-iso-8859-11</td>
- *         <td>?</td>
- *         <td></td>
- *     </tr>
- * </table>
- *
- *
- * @version $Id: CharsetUtil.java,v 1.1 2004/10/25 07:26:46 ntherning Exp $
- */
-public class CharsetUtil {
-    private static Log log = LogFactory.getLog(CharsetUtil.class);
-
-    private static class Charset implements Comparable<Charset> {
-        private String canonical = null;
-        private String mime = null;
-        private String[] aliases = null;
-
-        private Charset(String canonical, String mime, String[] aliases) {
-            this.canonical = canonical;
-            this.mime = mime;
-            this.aliases = aliases;
-        }
-
-        public int compareTo(Charset c) {
-            return this.canonical.compareTo(c.canonical);
-        }
-    }
-
-    private static Charset[] JAVA_CHARSETS = {
-        new Charset("ISO8859_1", "ISO-8859-1",
-                    new String[] {"ISO_8859-1:1987", "iso-ir-100", "ISO_8859-1",
-                                  "latin1", "l1", "IBM819", "CP819",
-                                  "csISOLatin1", "8859_1", "819", "IBM-819",
-                                  "ISO8859-1", "ISO_8859_1"}),
-        new Charset("ISO8859_2", "ISO-8859-2",
-                    new String[] {"ISO_8859-2:1987", "iso-ir-101", "ISO_8859-2",
-                                  "latin2", "l2", "csISOLatin2", "8859_2",
-                                  "iso8859_2"}),
-        new Charset("ISO8859_3", "ISO-8859-3", new String[] {"ISO_8859-3:1988", "iso-ir-109", "ISO_8859-3", "latin3", "l3", "csISOLatin3", "8859_3"}),
-        new Charset("ISO8859_4", "ISO-8859-4",
-                    new String[] {"ISO_8859-4:1988", "iso-ir-110", "ISO_8859-4",
-                                  "latin4", "l4", "csISOLatin4", "8859_4"}),
-        new Charset("ISO8859_5", "ISO-8859-5",
-                    new String[] {"ISO_8859-5:1988", "iso-ir-144", "ISO_8859-5",
-                                  "cyrillic", "csISOLatinCyrillic", "8859_5"}),
-        new Charset("ISO8859_6", "ISO-8859-6", new String[] {"ISO_8859-6:1987", "iso-ir-127", "ISO_8859-6", "ECMA-114", "ASMO-708", "arabic", "csISOLatinArabic", "8859_6"}),
-        new Charset("ISO8859_7", "ISO-8859-7",
-                    new String[] {"ISO_8859-7:1987", "iso-ir-126", "ISO_8859-7",
-                                  "ELOT_928", "ECMA-118", "greek", "greek8",
-                                  "csISOLatinGreek", "8859_7", "sun_eu_greek"}),
-        new Charset("ISO8859_8", "ISO-8859-8", new String[] {"ISO_8859-8:1988", "iso-ir-138", "ISO_8859-8", "hebrew", "csISOLatinHebrew", "8859_8"}),
-        new Charset("ISO8859_9", "ISO-8859-9",
-                    new String[] {"ISO_8859-9:1989", "iso-ir-148", "ISO_8859-9",
-                                  "latin5", "l5", "csISOLatin5", "8859_9"}),
-
-        new Charset("ISO8859_13", "ISO-8859-13", new String[] {}),
-        new Charset("ISO8859_15", "ISO-8859-15",
-                    new String[] {"ISO_8859-15", "Latin-9", "8859_15",
-                                  "csISOlatin9", "IBM923", "cp923", "923", "L9",
-                                  "IBM-923", "ISO8859-15", "LATIN9", "LATIN0",
-                                  "csISOlatin0", "ISO8859_15_FDIS"}),
-        new Charset("KOI8_R", "KOI8-R", new String[] {"csKOI8R", "koi8"}),
-        new Charset("ASCII", "US-ASCII",
-                    new String[] {"ANSI_X3.4-1968", "iso-ir-6",
-                                  "ANSI_X3.4-1986", "ISO_646.irv:1991",
-                                  "ISO646-US", "us", "IBM367", "cp367",
-                                  "csASCII", "ascii7", "646", "iso_646.irv:1983"}),
-        new Charset("UTF8", "UTF-8", new String[] {}),
-        new Charset("UTF-16", "UTF-16", new String[] {"UTF_16"}),
-        new Charset("UnicodeBigUnmarked", "UTF-16BE", new String[] {"X-UTF-16BE", "UTF_16BE", "ISO-10646-UCS-2"}),
-        new Charset("UnicodeLittleUnmarked", "UTF-16LE", new String[] {"UTF_16LE", "X-UTF-16LE"}),
-        new Charset("Big5", "Big5", new String[] {"csBig5", "CN-Big5", "BIG-FIVE", "BIGFIVE"}),
-        new Charset("Big5_HKSCS", "Big5-HKSCS", new String[] {"big5hkscs"}),
-        new Charset("EUC_JP", "EUC-JP",
-                    new String[] {"csEUCPkdFmtJapanese",
-                              "Extended_UNIX_Code_Packed_Format_for_Japanese",
-                              "eucjis", "x-eucjp", "eucjp", "x-euc-jp"}),
-        new Charset("EUC_KR", "EUC-KR",
-                    new String[] {"csEUCKR", "ksc5601", "5601", "ksc5601_1987",
-                                  "ksc_5601", "ksc5601-1987", "ks_c_5601-1987",
-                                  "euckr"}),
-        new Charset("GB18030", "GB18030", new String[] {"gb18030-2000"}),
-        new Charset("EUC_CN", "GB2312", new String[] {"x-EUC-CN", "csGB2312", "euccn", "euc-cn", "gb2312-80", "gb2312-1980", "CN-GB", "CN-GB-ISOIR165"}),
-        new Charset("GBK", "windows-936", new String[] {"CP936", "MS936", "ms_936", "x-mswin-936"}),
-
-        new Charset("Cp037", "IBM037", new String[] {"ebcdic-cp-us", "ebcdic-cp-ca", "ebcdic-cp-wt", "ebcdic-cp-nl", "csIBM037"}),
-        new Charset("Cp273", "IBM273", new String[] {"csIBM273"}),
-        new Charset("Cp277", "IBM277", new String[] {"EBCDIC-CP-DK", "EBCDIC-CP-NO", "csIBM277"}),
-        new Charset("Cp278", "IBM278", new String[] {"CP278", "ebcdic-cp-fi", "ebcdic-cp-se", "csIBM278"}),
-        new Charset("Cp280", "IBM280", new String[] {"ebcdic-cp-it", "csIBM280"}),
-        new Charset("Cp284", "IBM284", new String[] {"ebcdic-cp-es", "csIBM284"}),
-        new Charset("Cp285", "IBM285", new String[] {"ebcdic-cp-gb", "csIBM285"}),
-        new Charset("Cp297", "IBM297", new String[] {"ebcdic-cp-fr", "csIBM297"}),
-        new Charset("Cp420", "IBM420", new String[] {"ebcdic-cp-ar1", "csIBM420"}),
-        new Charset("Cp424", "IBM424", new String[] {"ebcdic-cp-he", "csIBM424"}),
-        new Charset("Cp437", "IBM437", new String[] {"437", "csPC8CodePage437"}),
-        new Charset("Cp500", "IBM500", new String[] {"ebcdic-cp-be", "ebcdic-cp-ch", "csIBM500"}),
-        new Charset("Cp775", "IBM775", new String[] {"csPC775Baltic"}),
-        new Charset("Cp838", "IBM-Thai", new String[] {}),
-        new Charset("Cp850", "IBM850", new String[] {"850", "csPC850Multilingual"}),
-        new Charset("Cp852", "IBM852", new String[] {"852", "csPCp852"}),
-        new Charset("Cp855", "IBM855", new String[] {"855", "csIBM855"}),
-        new Charset("Cp857", "IBM857", new String[] {"857", "csIBM857"}),
-        new Charset("Cp858", "IBM00858",
-                new String[] {"CCSID00858", "CP00858",
-                              "PC-Multilingual-850+euro"}),
-        new Charset("Cp860", "IBM860", new String[] {"860", "csIBM860"}),
-        new Charset("Cp861", "IBM861", new String[] {"861", "cp-is", "csIBM861"}),
-        new Charset("Cp862", "IBM862", new String[] {"862", "csPC862LatinHebrew"}),
-        new Charset("Cp863", "IBM863", new String[] {"863", "csIBM863"}),
-        new Charset("Cp864", "IBM864", new String[] {"cp864", "csIBM864"}),
-        new Charset("Cp865", "IBM865", new String[] {"865", "csIBM865"}),
-        new Charset("Cp866", "IBM866", new String[] {"866", "csIBM866"}),
-        new Charset("Cp868", "IBM868", new String[] {"cp-ar", "csIBM868"}),
-        new Charset("Cp869", "IBM869", new String[] {"cp-gr", "csIBM869"}),
-        new Charset("Cp870", "IBM870", new String[] {"ebcdic-cp-roece", "ebcdic-cp-yu", "csIBM870"}),
-        new Charset("Cp871", "IBM871", new String[] {"ebcdic-cp-is", "csIBM871"}),
-        new Charset("Cp918", "IBM918", new String[] {"ebcdic-cp-ar2", "csIBM918"}),
-        new Charset("Cp1026", "IBM1026", new String[] {"csIBM1026"}),
-        new Charset("Cp1047", "IBM1047", new String[] {"IBM-1047"}),
-        new Charset("Cp1140", "IBM01140",
-                    new String[] {"CCSID01140", "CP01140",
-                                  "ebcdic-us-37+euro"}),
-        new Charset("Cp1141", "IBM01141",
-                    new String[] {"CCSID01141", "CP01141",
-                                  "ebcdic-de-273+euro"}),
-        new Charset("Cp1142", "IBM01142", new String[] {"CCSID01142", "CP01142", "ebcdic-dk-277+euro", "ebcdic-no-277+euro"}),
-        new Charset("Cp1143", "IBM01143", new String[] {"CCSID01143", "CP01143", "ebcdic-fi-278+euro", "ebcdic-se-278+euro"}),
-        new Charset("Cp1144", "IBM01144", new String[] {"CCSID01144", "CP01144", "ebcdic-it-280+euro"}),
-        new Charset("Cp1145", "IBM01145", new String[] {"CCSID01145", "CP01145", "ebcdic-es-284+euro"}),
-        new Charset("Cp1146", "IBM01146", new String[] {"CCSID01146", "CP01146", "ebcdic-gb-285+euro"}),
-        new Charset("Cp1147", "IBM01147", new String[] {"CCSID01147", "CP01147", "ebcdic-fr-297+euro"}),
-        new Charset("Cp1148", "IBM01148", new String[] {"CCSID01148", "CP01148", "ebcdic-international-500+euro"}),
-        new Charset("Cp1149", "IBM01149", new String[] {"CCSID01149", "CP01149", "ebcdic-is-871+euro"}),
-        new Charset("Cp1250", "windows-1250", new String[] {}),
-        new Charset("Cp1251", "windows-1251", new String[] {}),
-        new Charset("Cp1252", "windows-1252", new String[] {}),
-        new Charset("Cp1253", "windows-1253", new String[] {}),
-        new Charset("Cp1254", "windows-1254", new String[] {}),
-        new Charset("Cp1255", "windows-1255", new String[] {}),
-        new Charset("Cp1256", "windows-1256", new String[] {}),
-        new Charset("Cp1257", "windows-1257", new String[] {}),
-        new Charset("Cp1258", "windows-1258", new String[] {}),
-        new Charset("ISO2022CN", "ISO-2022-CN", new String[] {}),
-        new Charset("ISO2022JP", "ISO-2022-JP", new String[] {"csISO2022JP", "JIS", "jis_encoding", "csjisencoding"}),
-        new Charset("ISO2022KR", "ISO-2022-KR", new String[] {"csISO2022KR"}),
-        new Charset("JIS_X0201", "JIS_X0201", new String[] {"X0201", "JIS0201", "csHalfWidthKatakana"}),
-        new Charset("JIS_X0212-1990", "JIS_X0212-1990", new String[] {"iso-ir-159", "x0212", "JIS0212", "csISO159JISX02121990"}),
-        new Charset("JIS_C6626-1983", "JIS_C6626-1983", new String[] {"x-JIS0208", "JIS0208", "csISO87JISX0208", "x0208", "JIS_X0208-1983", "iso-ir-87"}),
-        new Charset("SJIS", "Shift_JIS", new String[] {"MS_Kanji", "csShiftJIS", "shift-jis", "x-sjis", "pck"}),
-        new Charset("TIS620", "TIS-620", new String[] {}),
-        new Charset("MS932", "Windows-31J", new String[] {"windows-932", "csWindows31J", "x-ms-cp932"}),
-        new Charset("EUC_TW", "EUC-TW", new String[] {"x-EUC-TW", "cns11643", "euctw"}),
-        new Charset("x-Johab", "johab", new String[] {"johab", "cp1361", "ms1361", "ksc5601-1992", "ksc5601_1992"}),
-        new Charset("MS950_HKSCS", "", new String[] {}),
-        new Charset("MS874", "windows-874", new String[] {"cp874"}),
-        new Charset("MS949", "windows-949", new String[] {"windows949", "ms_949", "x-windows-949"}),
-        new Charset("MS950", "windows-950", new String[] {"x-windows-950"}),
-
-        new Charset("Cp737", null, new String[] {}),
-        new Charset("Cp856", null, new String[] {}),
-        new Charset("Cp875", null, new String[] {}),
-        new Charset("Cp921", null, new String[] {}),
-        new Charset("Cp922", null, new String[] {}),
-        new Charset("Cp930", null, new String[] {}),
-        new Charset("Cp933", null, new String[] {}),
-        new Charset("Cp935", null, new String[] {}),
-        new Charset("Cp937", null, new String[] {}),
-        new Charset("Cp939", null, new String[] {}),
-        new Charset("Cp942", null, new String[] {}),
-        new Charset("Cp942C", null, new String[] {}),
-        new Charset("Cp943", null, new String[] {}),
-        new Charset("Cp943C", null, new String[] {}),
-        new Charset("Cp948", null, new String[] {}),
-        new Charset("Cp949", null, new String[] {}),
-        new Charset("Cp949C", null, new String[] {}),
-        new Charset("Cp950", null, new String[] {}),
-        new Charset("Cp964", null, new String[] {}),
-        new Charset("Cp970", null, new String[] {}),
-        new Charset("Cp1006", null, new String[] {}),
-        new Charset("Cp1025", null, new String[] {}),
-        new Charset("Cp1046", null, new String[] {}),
-        new Charset("Cp1097", null, new String[] {}),
-        new Charset("Cp1098", null, new String[] {}),
-        new Charset("Cp1112", null, new String[] {}),
-        new Charset("Cp1122", null, new String[] {}),
-        new Charset("Cp1123", null, new String[] {}),
-        new Charset("Cp1124", null, new String[] {}),
-        new Charset("Cp1381", null, new String[] {}),
-        new Charset("Cp1383", null, new String[] {}),
-        new Charset("Cp33722", null, new String[] {}),
-        new Charset("Big5_Solaris", null, new String[] {}),
-        new Charset("EUC_JP_LINUX", null, new String[] {}),
-        new Charset("EUC_JP_Solaris", null, new String[] {}),
-        new Charset("ISCII91", null, new String[] {"x-ISCII91", "iscii"}),
-        new Charset("ISO2022_CN_CNS", null, new String[] {}),
-        new Charset("ISO2022_CN_GB", null, new String[] {}),
-        new Charset("x-iso-8859-11", null, new String[] {}),
-        new Charset("JISAutoDetect", null, new String[] {}),
-        new Charset("MacArabic", null, new String[] {}),
-        new Charset("MacCentralEurope", null, new String[] {}),
-        new Charset("MacCroatian", null, new String[] {}),
-        new Charset("MacCyrillic", null, new String[] {}),
-        new Charset("MacDingbat", null, new String[] {}),
-        new Charset("MacGreek", "MacGreek", new String[] {}),
-        new Charset("MacHebrew", null, new String[] {}),
-        new Charset("MacIceland", null, new String[] {}),
-        new Charset("MacRoman", "MacRoman", new String[] {"Macintosh", "MAC", "csMacintosh"}),
-        new Charset("MacRomania", null, new String[] {}),
-        new Charset("MacSymbol", null, new String[] {}),
-        new Charset("MacThai", null, new String[] {}),
-        new Charset("MacTurkish", null, new String[] {}),
-        new Charset("MacUkraine", null, new String[] {}),
-        new Charset("UnicodeBig", null, new String[] {}),
-        new Charset("UnicodeLittle", null, new String[] {})
-    };
-
-    /**
-     * Contains the canonical names of character sets which can be used to
-     * decode bytes into Java chars.
-     */
-    private static TreeSet<String> decodingSupported = null;
-
-    /**
-     * Contains the canonical names of character sets which can be used to
-     * encode Java chars into bytes.
-     */
-    private static TreeSet<String> encodingSupported = null;
-
-    /**
-     * Maps character set names to Charset objects. All possible names of
-     * a charset will be mapped to the Charset.
-     */
-    private static HashMap<String, Charset> charsetMap = null;
-
-    static {
-        decodingSupported = new TreeSet<String>();
-        encodingSupported = new TreeSet<String>();
-        byte[] dummy = new byte[] {'d', 'u', 'm', 'm', 'y'};
-        for (int i = 0; i < JAVA_CHARSETS.length; i++) {
-            try {
-                String s = new String(dummy, JAVA_CHARSETS[i].canonical);
-                decodingSupported.add(JAVA_CHARSETS[i].canonical.toLowerCase(Locale.US));
-            } catch (UnsupportedOperationException e) {
-            } catch (UnsupportedEncodingException e) {
-            }
-            try {
-                "dummy".getBytes(JAVA_CHARSETS[i].canonical);
-                encodingSupported.add(JAVA_CHARSETS[i].canonical.toLowerCase(Locale.US));
-            } catch (UnsupportedOperationException e) {
-            } catch (UnsupportedEncodingException e) {
-            }
-        }
-
-        charsetMap = new HashMap<String, Charset>();
-        for (int i = 0; i < JAVA_CHARSETS.length; i++) {
-            Charset c = JAVA_CHARSETS[i];
-            charsetMap.put(c.canonical.toLowerCase(Locale.US), c);
-            if (c.mime != null) {
-                charsetMap.put(c.mime.toLowerCase(Locale.US), c);
-            }
-            if (c.aliases != null) {
-                for (int j = 0; j < c.aliases.length; j++) {
-                    charsetMap.put(c.aliases[j].toLowerCase(Locale.US), c);
-                }
-            }
-        }
-
-        if (log.isDebugEnabled()) {
-            log.debug("Character sets which support decoding: "
-                        + decodingSupported);
-            log.debug("Character sets which support encoding: "
-                        + encodingSupported);
-        }
-    }
-
-    /**
-     * ANDROID:  THE FOLLOWING SET OF STATIC STRINGS ARE COPIED FROM A NEWER VERSION OF MIME4J
-     */
-
-    /** carriage return - line feed sequence */
-    public static final String CRLF = "\r\n";
-
-    /** US-ASCII CR, carriage return (13) */
-    public static final int CR = '\r';
-
-    /** US-ASCII LF, line feed (10) */
-    public static final int LF = '\n';
-
-    /** US-ASCII SP, space (32) */
-    public static final int SP = ' ';
-
-    /** US-ASCII HT, horizontal-tab (9)*/
-    public static final int HT = '\t';
-
-    public static final java.nio.charset.Charset US_ASCII = java.nio.charset.Charset
-            .forName("US-ASCII");
-
-    public static final java.nio.charset.Charset ISO_8859_1 = java.nio.charset.Charset
-            .forName("ISO-8859-1");
-
-    public static final java.nio.charset.Charset UTF_8 = java.nio.charset.Charset
-            .forName("UTF-8");
-
-    /**
-     * Returns <code>true</code> if the specified character is a whitespace
-     * character (CR, LF, SP or HT).
-     *
-     * ANDROID:  COPIED FROM A NEWER VERSION OF MIME4J
-     *
-     * @param ch
-     *            character to test.
-     * @return <code>true</code> if the specified character is a whitespace
-     *         character, <code>false</code> otherwise.
-     */
-    public static boolean isWhitespace(char ch) {
-        return ch == SP || ch == HT || ch == CR || ch == LF;
-    }
-
-    /**
-     * Returns <code>true</code> if the specified string consists entirely of
-     * whitespace characters.
-     *
-     * ANDROID:  COPIED FROM A NEWER VERSION OF MIME4J
-     *
-     * @param s
-     *            string to test.
-     * @return <code>true</code> if the specified string consists entirely of
-     *         whitespace characters, <code>false</code> otherwise.
-     */
-    public static boolean isWhitespace(final String s) {
-        if (s == null) {
-            throw new IllegalArgumentException("String may not be null");
-        }
-        final int len = s.length();
-        for (int i = 0; i < len; i++) {
-            if (!isWhitespace(s.charAt(i))) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Determines if the VM supports encoding (chars to bytes) the
-     * specified character set. NOTE: the given character set name may
-     * not be known to the VM even if this method returns <code>true</code>.
-     * Use {@link #toJavaCharset(String)} to get the canonical Java character
-     * set name.
-     *
-     * @param charsetName the characters set name.
-     * @return <code>true</code> if encoding is supported, <code>false</code>
-     *         otherwise.
-     */
-    public static boolean isEncodingSupported(String charsetName) {
-        return encodingSupported.contains(charsetName.toLowerCase(Locale.US));
-    }
-
-    /**
-     * Determines if the VM supports decoding (bytes to chars) the
-     * specified character set. NOTE: the given character set name may
-     * not be known to the VM even if this method returns <code>true</code>.
-     * Use {@link #toJavaCharset(String)} to get the canonical Java character
-     * set name.
-     *
-     * @param charsetName the characters set name.
-     * @return <code>true</code> if decoding is supported, <code>false</code>
-     *         otherwise.
-     */
-    public static boolean isDecodingSupported(String charsetName) {
-        return decodingSupported.contains(charsetName.toLowerCase(Locale.US));
-    }
-
-    /**
-     * Gets the preferred MIME character set name for the specified
-     * character set or <code>null</code> if not known.
-     *
-     * @param charsetName the character set name to look for.
-     * @return the MIME preferred name or <code>null</code> if not known.
-     */
-    public static String toMimeCharset(String charsetName) {
-        Charset c = charsetMap.get(charsetName.toLowerCase(Locale.US));
-        if (c != null) {
-            return c.mime;
-        }
-        return null;
-    }
-
-    /**
-     * Gets the canonical Java character set name for the specified
-     * character set or <code>null</code> if not known. This should be
-     * called before doing any conversions using the Java API. NOTE:
-     * you must use {@link #isEncodingSupported(String)} or
-     * {@link #isDecodingSupported(String)} to make sure the returned
-     * Java character set is supported by the current VM.
-     *
-     * @param charsetName the character set name to look for.
-     * @return the canonical Java name or <code>null</code> if not known.
-     */
-    public static String toJavaCharset(String charsetName) {
-        Charset c = charsetMap.get(charsetName.toLowerCase(Locale.US));
-        if (c != null) {
-            return c.canonical;
-        }
-        return null;
-    }
-
-    public static java.nio.charset.Charset getCharset(String charsetName) {
-        String defaultCharset = "ISO-8859-1";
-
-        // Use the default chareset if given charset is null
-        if(charsetName == null) charsetName = defaultCharset;
-
-        try {
-            return java.nio.charset.Charset.forName(charsetName);
-        } catch (IllegalCharsetNameException e) {
-            log.info("Illegal charset " + charsetName + ", fallback to " +
-                    defaultCharset + ": " + e);
-            // Use default charset on exception
-            return java.nio.charset.Charset.forName(defaultCharset);
-        } catch (UnsupportedCharsetException ex) {
-            log.info("Unsupported charset " + charsetName + ", fallback to " +
-                    defaultCharset + ": " + ex);
-            // Use default charset on exception
-            return java.nio.charset.Charset.forName(defaultCharset);
-        }
-
-    }
-    /*
-     * Uncomment the code below and run the main method to regenerate the
-     * Javadoc table above when the known charsets change.
-     */
-
-    /*
-    private static String dumpHtmlTable() {
-        LinkedList l = new LinkedList(Arrays.asList(JAVA_CHARSETS));
-        Collections.sort(l);
-        StringBuffer sb = new StringBuffer();
-        sb.append(" * <table>\n");
-        sb.append(" *     <tr>\n");
-        sb.append(" *         <td>Canonical (Java) name</td>\n");
-        sb.append(" *         <td>MIME preferred</td>\n");
-        sb.append(" *         <td>Aliases</td>\n");
-        sb.append(" *     </tr>\n");
-
-        for (Iterator it = l.iterator(); it.hasNext();) {
-            Charset c = (Charset) it.next();
-            sb.append(" *     <tr>\n");
-            sb.append(" *         <td>" + c.canonical + "</td>\n");
-            sb.append(" *         <td>" + (c.mime == null ? "?" : c.mime)+ "</td>\n");
-            sb.append(" *         <td>");
-            for (int i = 0; c.aliases != null && i < c.aliases.length; i++) {
-                sb.append(c.aliases[i] + " ");
-            }
-            sb.append("</td>\n");
-            sb.append(" *     </tr>\n");
-        }
-        sb.append(" * </table>\n");
-        return sb.toString();
-    }
-
-    public static void main(String[] args) {
-        System.out.println(dumpHtmlTable());
-    }*/
-}
\ No newline at end of file
diff --git a/tests/Android.mk b/tests/Android.mk
index 59cba42..850aca3 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -31,6 +31,9 @@
 
 LOCAL_STATIC_JAVA_LIBRARIES := \
         android-support-test \
-        mockito-target
+        mockito-target-minus-junit4 \
+        espresso-core \
+        truth-prebuilt \
+        legacy-android-test
 
 include $(BUILD_PACKAGE)
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index cae4c1b..0aa5be2 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -19,7 +19,6 @@
 
     <uses-permission android:name="android.permission.CALL_PHONE" />
     <uses-permission android:name="android.permission.PERFORM_CDMA_PROVISIONING" />
-    <uses-permission android:name="android.permission.PERFORM_SIM_ACTIVATION" />
 
     <application android:label="@string/app_name">
         <uses-library android:name="android.test.runner" />
@@ -39,16 +38,6 @@
             </intent-filter>
         </activity>
 
-        <!-- Test activity mimicking the PERFORM_CDMA_PROVISIONING behavior of
-             SetupWizard, useful for testing "non-interactive" OTASP. -->
-        <activity android:name="OtaspTestActivity"
-                  android:label="OtaspTest">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
-        </activity>
-
         <service android:name="SendInstantTextTestService"
                  android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE" >
             <intent-filter>
diff --git a/tests/src/com/android/TelephonyTestBase.java b/tests/src/com/android/TelephonyTestBase.java
index 6dee12b..044f26b 100644
--- a/tests/src/com/android/TelephonyTestBase.java
+++ b/tests/src/com/android/TelephonyTestBase.java
@@ -18,10 +18,9 @@
 
 import android.content.Context;
 import android.os.Handler;
+import android.os.Looper;
 import android.support.test.InstrumentationRegistry;
 
-import com.android.phone.MockitoHelper;
-
 import org.mockito.MockitoAnnotations;
 
 import java.util.concurrent.CountDownLatch;
@@ -33,16 +32,17 @@
 public class TelephonyTestBase {
 
     protected Context mContext;
-    MockitoHelper mMockitoHelper = new MockitoHelper();
 
     public void setUp() throws Exception {
         mContext = InstrumentationRegistry.getTargetContext();
-        mMockitoHelper.setUp(mContext, getClass());
         MockitoAnnotations.initMocks(this);
+        // Set up the looper if it does not exist on the test thread.
+        if (Looper.myLooper() == null) {
+            Looper.prepare();
+        }
     }
 
     public void tearDown() throws Exception {
-        mMockitoHelper.tearDown();
     }
 
     protected final void waitForHandlerAction(Handler h, long timeoutMillis) {
diff --git a/tests/src/com/android/phone/MockitoHelper.java b/tests/src/com/android/phone/MockitoHelper.java
deleted file mode 100644
index 7998030..0000000
--- a/tests/src/com/android/phone/MockitoHelper.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone;
-
-import android.content.Context;
-
-import com.android.services.telephony.Log;
-
-/**
- * Helper for Mockito-based test cases.
- */
-public final class MockitoHelper {
-
-    private static final String TAG = "MockitoHelper";
-    private static final String DEXCACHE = "dexmaker.dexcache";
-
-    private ClassLoader mOriginalClassLoader;
-    private Thread mContextThread;
-
-    /**
-     * Creates a new helper, which in turn will set the context classloader so it can load Mockito
-     * resources.
-     *
-     * @param packageClass test case class
-     */
-    public void setUp(Context context, Class<?> packageClass) throws Exception {
-        // makes a copy of the context classloader
-        mContextThread = Thread.currentThread();
-        mOriginalClassLoader = mContextThread.getContextClassLoader();
-        ClassLoader newClassLoader = packageClass.getClassLoader();
-        Log.v(TAG, "Changing context classloader from " + mOriginalClassLoader
-                + " to " + newClassLoader);
-        mContextThread.setContextClassLoader(newClassLoader);
-        String dexCache = context.getCacheDir().toString();
-        Log.v(this, "Setting property %s to %s", DEXCACHE, dexCache);
-        System.setProperty(DEXCACHE, dexCache);
-    }
-
-    /**
-     * Restores the context classloader to the previous value.
-     */
-    public void tearDown() throws Exception {
-        Log.v(TAG, "Restoring context classloader to " + mOriginalClassLoader);
-        mContextThread.setContextClassLoader(mOriginalClassLoader);
-        System.clearProperty(DEXCACHE);
-    }
-}
\ No newline at end of file
diff --git a/tests/src/com/android/phone/RoamingDialogFragmentTest.java b/tests/src/com/android/phone/RoamingDialogFragmentTest.java
new file mode 100644
index 0000000..62633e0
--- /dev/null
+++ b/tests/src/com/android/phone/RoamingDialogFragmentTest.java
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) 2016 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.phone;
+
+import android.app.Activity;
+import android.content.pm.ActivityInfo;
+import android.provider.Settings.Global;
+import android.provider.Settings.SettingNotFoundException;
+import android.support.test.espresso.matcher.PreferenceMatchers;
+import android.support.test.rule.ActivityTestRule;
+import android.support.test.filters.FlakyTest;
+import com.google.common.truth.Truth;
+import junit.framework.AssertionFailedError;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import static android.support.test.espresso.Espresso.onData;
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.action.ViewActions.click;
+import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist;
+import static android.support.test.espresso.assertion.ViewAssertions.matches;
+import static android.support.test.espresso.matcher.ViewMatchers.hasDescendant;
+import static android.support.test.espresso.matcher.ViewMatchers.isChecked;
+import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static android.support.test.espresso.matcher.ViewMatchers.withId;
+import static android.support.test.espresso.matcher.ViewMatchers.withText;
+import static com.google.common.truth.Truth.assertThat;
+
+/**
+ * Espresso tests to check some properties of the dialog that appears when a user
+ * tries to turn on data roaming.
+ */
+public class RoamingDialogFragmentTest {
+
+    @Rule
+    public ActivityTestRule<MobileNetworkSettings> mRule =
+            new ActivityTestRule<>(MobileNetworkSettings.class);
+    private Activity mActivity;
+
+    /**
+     * Make sure roaming is off before we start a test since this checks the dialog that only
+     * shows up when we try to turn it on.
+     */
+    @Before
+    public void disableRoaming() {
+        mActivity = mRule.getActivity();
+
+        // turn off data roaming if it is on
+        try {
+            onData(PreferenceMatchers.withTitle(R.string.roaming))
+                    .check(matches(hasDescendant(isChecked())))
+                    .perform(click());
+        } catch (AssertionFailedError e) {
+            // don't click the switch if it is already off.
+        }
+    }
+
+    @FlakyTest
+    @Test
+    public void dataRoamingDialogPersistsOnRotation() {
+        // click on the data roaming preference to trigger warning dialog
+        onData(PreferenceMatchers.withTitle(R.string.roaming)).perform(click());
+
+        // request both orientations to ensure at least one rotation occurs
+        mActivity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
+        mActivity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+
+        // verify the title of the dialog is visible
+        onView(withText(R.string.roaming_alert_title)).check(matches(isDisplayed()));
+
+    }
+
+    @FlakyTest
+    @Test
+    public void dataRoamingEnabledWhenPositiveButtonClicked() throws SettingNotFoundException {
+        // click on the data roaming preference to trigger warning dialog
+        onData(PreferenceMatchers.withTitle(R.string.roaming)).perform(click());
+
+        // click to confirm we want to turn on data roaming
+        onView(withId(android.R.id.button1)).perform(click());
+
+        // verify that the the setting has actually been changed
+        assertThat(Global.getInt(mActivity.getApplicationContext().getContentResolver(),
+                Global.DATA_ROAMING)).isEqualTo(1);
+    }
+
+    @FlakyTest
+    @Test
+    public void dialogDismissedOnNegativeButtonClicked() {
+        // click on the data roaming preference to trigger warning dialog
+        onData(PreferenceMatchers.withTitle(R.string.roaming)).perform(click());
+
+        // click to cancel turning on data roaming
+        onView(withId(android.R.id.button2)).perform(click());
+
+        // verify the title of the dialog is gone
+        onView(withText(R.string.roaming_alert_title)).check(doesNotExist());
+    }
+
+    @FlakyTest
+    @Test
+    public void dataRoamingStaysDisabledWhenDialogCanceled() throws SettingNotFoundException {
+        // click on the data roaming preference to trigger warning dialog
+        onData(PreferenceMatchers.withTitle(R.string.roaming)).perform(click());
+
+        // click to cancel turning on data roaming
+        onView(withId(android.R.id.button2)).perform(click());
+
+        // verify that the the setting has not been changed
+        assertThat(Global.getInt(mActivity.getApplicationContext().getContentResolver(),
+                Global.DATA_ROAMING)).isEqualTo(0);
+
+    }
+}
diff --git a/tests/src/com/android/phone/common/mail/MailTransportTest.java b/tests/src/com/android/phone/common/mail/MailTransportTest.java
deleted file mode 100644
index 9eaef6b..0000000
--- a/tests/src/com/android/phone/common/mail/MailTransportTest.java
+++ /dev/null
@@ -1,413 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.common.mail;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.net.Network;
-import android.test.AndroidTestCase;
-
-import com.android.phone.MockitoHelper;
-import com.android.phone.common.mail.MailTransport.SocketCreator;
-import com.android.phone.common.mail.store.ImapStore;
-import com.android.phone.vvm.omtp.imap.ImapHelper;
-
-import junit.framework.AssertionFailedError;
-
-import org.mockito.MockitoAnnotations;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.net.SocketAddress;
-import java.net.SocketException;
-import java.net.UnknownHostException;
-
-import javax.net.SocketFactory;
-
-public class MailTransportTest extends AndroidTestCase {
-
-    private static final String HOST_ADDRESS = "127.0.0.1";
-    private static final String INVALID_HOST_ADDRESS = "255.255.255.255";
-    private static final int HOST_PORT = 80;
-    private static final int HOST_FLAGS = 0;
-    // bypass verifyHostname() in open() by setting ImapStore.FLAG_TRUST_ALL
-    private static final int HOST_FLAGS_SSL = ImapStore.FLAG_SSL & ImapStore.FLAG_TRUST_ALL;
-    private static final InetAddress VALID_INET_ADDRESS = createInetAddress(HOST_ADDRESS);
-    private static final InetAddress INVALID_INET_ADDRESS = createInetAddress(INVALID_HOST_ADDRESS);
-
-    // ClassLoader need to be replaced for mockito to work.
-    private MockitoHelper mMokitoHelper = new MockitoHelper();
-
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
-        mMokitoHelper.setUp(getContext(), getClass());
-        MockitoAnnotations.initMocks(this);
-    }
-
-    @Override
-    public void tearDown() throws Exception {
-        mMokitoHelper.tearDown();
-        super.tearDown();
-    }
-
-    public void testCreateSocket_anyNetwork() throws MessagingException {
-        // With no network, Socket#Socket() should be called.
-        MailTransport transport =
-                new MailTransport(getContext(), createMockImapHelper(), null, HOST_ADDRESS,
-                        HOST_PORT, HOST_FLAGS);
-        Socket socket = transport.createSocket();
-        assertTrue(socket != null);
-    }
-
-    public void testCreateSocket_networkSpecified() throws MessagingException, IOException {
-        // Network#getSocketFactory should be used to create socket.
-        Network mockNetwork = createMockNetwork();
-        MailTransport transport =
-                new MailTransport(getContext(), createMockImapHelper(), mockNetwork, HOST_ADDRESS,
-                        HOST_PORT, HOST_FLAGS);
-        Socket socket = transport.createSocket();
-        assertTrue(socket != null);
-        verify(mockNetwork).getSocketFactory();
-    }
-
-    public void testCreateSocket_socketCreator() throws MessagingException, IOException {
-        // For testing purposes, how sockets are created can be overridden.
-        SocketCreator socketCreator = new SocketCreator() {
-
-            private final Socket mSocket = new Socket();
-
-            @Override
-            public Socket createSocket() {
-                return mSocket;
-            }
-        };
-
-        MailTransport transport = new
-                MailTransport(getContext(), createMockImapHelper(), null, HOST_ADDRESS, HOST_PORT,
-                HOST_FLAGS);
-
-        transport.setSocketCreator(socketCreator);
-
-        Socket socket = transport.createSocket();
-        assertTrue(socket == socketCreator.createSocket());
-    }
-
-    public void testOpen() throws MessagingException {
-        MailTransport transport = new MailTransport(getContext(), createMockImapHelper(), null,
-                HOST_ADDRESS,
-                HOST_PORT, HOST_FLAGS);
-        transport.setSocketCreator(new TestSocketCreator());
-        transport.open();
-        assertTrue(transport.isOpen());
-
-    }
-
-    public void testOpen_Ssl() throws MessagingException {
-        //opening with ssl support.
-        MailTransport transport = new MailTransport(getContext(), createMockImapHelper(), null,
-                HOST_ADDRESS, HOST_PORT, HOST_FLAGS_SSL);
-        transport.setSocketCreator(new TestSocketCreator());
-        transport.open();
-        assertTrue(transport.isOpen());
-
-    }
-
-    public void testOpen_MultiIp() throws MessagingException {
-        //In case of round robin DNS, try all resolved address until one succeeded.
-        Network network = createMultiIpMockNetwork();
-        MailTransport transport = new MailTransport(getContext(), createMockImapHelper(), network,
-                HOST_ADDRESS,
-                HOST_PORT, HOST_FLAGS);
-        transport.setSocketCreator(new TestSocketCreator());
-        transport.open();
-        assertTrue(transport.isOpen());
-    }
-
-    public void testOpen_MultiIp_SSL() throws MessagingException {
-        Network network = createMultiIpMockNetwork();
-
-        MailTransport transport = new MailTransport(getContext(), createMockImapHelper(), network,
-                HOST_ADDRESS,
-                HOST_PORT, HOST_FLAGS_SSL);
-        transport.setSocketCreator(new TestSocketCreator());
-        transport.open();
-        assertTrue(transport.isOpen());
-    }
-
-    public void testOpen_network_hostResolutionFailed() {
-        // Couldn't resolve host on the network. Open() should fail.
-        Network network = createMockNetwork();
-        try {
-            when(network.getAllByName(HOST_ADDRESS))
-                    .thenThrow(new UnknownHostException("host resolution failed"));
-        } catch (IOException e) {
-            //ignored
-        }
-
-        MailTransport transport = new MailTransport(getContext(), createMockImapHelper(), network,
-                HOST_ADDRESS,
-                HOST_PORT, HOST_FLAGS);
-        try {
-            transport.open();
-            throw new AssertionFailedError("Should throw MessagingException");
-        } catch (MessagingException e) {
-            //expected
-        }
-        assertFalse(transport.isOpen());
-    }
-
-    public void testOpen_createSocketFailed() {
-        // Unable to create socket. Open() should fail.
-        MailTransport transport = new MailTransport(getContext(), createMockImapHelper(), null,
-                HOST_ADDRESS,
-                HOST_PORT, HOST_FLAGS);
-        transport.setSocketCreator(new SocketCreator() {
-            @Override
-            public Socket createSocket() throws MessagingException {
-                throw new MessagingException("createSocket failed");
-            }
-        });
-        try {
-            transport.open();
-            throw new AssertionFailedError("Should throw MessagingException");
-        } catch (MessagingException e) {
-            //expected
-        }
-        assertFalse(transport.isOpen());
-    }
-
-    public void testOpen_network_createSocketFailed() {
-        // Unable to create socket. Open() should fail.
-
-        Network network = createOneIpMockNetwork();
-        SocketFactory mockSocketFactory = mock(SocketFactory.class);
-        try {
-            when(mockSocketFactory.createSocket())
-                    .thenThrow(new IOException("unable to create socket"));
-        } catch (IOException e) {
-            //ignored
-        }
-        when(network.getSocketFactory()).thenReturn(mockSocketFactory);
-
-        MailTransport transport = new MailTransport(getContext(), createMockImapHelper(), network,
-                HOST_ADDRESS, HOST_PORT, HOST_FLAGS);
-
-        try {
-            transport.open();
-            throw new AssertionFailedError("Should throw MessagingException");
-        } catch (MessagingException e) {
-            //expected
-        }
-        assertFalse(transport.isOpen());
-    }
-
-    public void testOpen_connectFailed_one() {
-        // There is only one IP for this host, and we failed to connect to it. Open() should fail.
-
-        MailTransport transport = new MailTransport(getContext(), createMockImapHelper(), null,
-                HOST_ADDRESS, HOST_PORT, HOST_FLAGS);
-        transport.setSocketCreator(new SocketCreator() {
-            @Override
-            public Socket createSocket() throws MessagingException {
-                return new Socket() {
-                    @Override
-                    public void connect(SocketAddress address, int timeout) throws IOException {
-                        throw new IOException("connect failed");
-                    }
-                };
-            }
-        });
-        try {
-            transport.open();
-            throw new AssertionFailedError("Should throw MessagingException");
-        } catch (MessagingException e) {
-            //expected
-        }
-        assertFalse(transport.isOpen());
-    }
-
-    public void testOpen_connectFailed_multi() {
-        // There are multiple IP for this host, and we failed to connect to any of it.
-        // Open() should fail.
-        MailTransport transport = new MailTransport(getContext(), createMockImapHelper(),
-                createMultiIpMockNetwork(), HOST_ADDRESS, HOST_PORT, HOST_FLAGS);
-        transport.setSocketCreator(new SocketCreator() {
-            @Override
-            public Socket createSocket() throws MessagingException {
-                return new Socket() {
-                    @Override
-                    public void connect(SocketAddress address, int timeout) throws IOException {
-                        throw new IOException("connect failed");
-                    }
-                };
-            }
-        });
-        try {
-            transport.open();
-            throw new AssertionFailedError("Should throw MessagingException");
-        } catch (MessagingException e) {
-            //expected
-        }
-        assertFalse(transport.isOpen());
-    }
-
-    private class TestSocket extends Socket {
-
-        boolean mConnected = false;
-
-
-        /**
-         * A make a mock connection to the address.
-         *
-         * @param address Only address equivalent to VALID_INET_ADDRESS or INVALID_INET_ADDRESS is
-         * accepted
-         * @param timeout Ignored but should >= 0.
-         */
-        @Override
-        public void connect(SocketAddress address, int timeout) throws IOException {
-            // copied from Socket#connect
-            if (isClosed()) {
-                throw new SocketException("Socket is closed");
-            }
-            if (timeout < 0) {
-                throw new IllegalArgumentException("timeout < 0");
-            }
-            if (isConnected()) {
-                throw new SocketException("Already connected");
-            }
-            if (address == null) {
-                throw new IllegalArgumentException("remoteAddr == null");
-            }
-
-            if (!(address instanceof InetSocketAddress)) {
-                throw new AssertionError("address should be InetSocketAddress");
-            }
-
-            InetSocketAddress inetSocketAddress = (InetSocketAddress) address;
-            if (inetSocketAddress.getAddress().equals(INVALID_INET_ADDRESS)) {
-                throw new IOException("invalid address");
-            } else if (inetSocketAddress.getAddress().equals(VALID_INET_ADDRESS)) {
-                mConnected = true;
-            } else {
-                throw new AssertionError("Only INVALID_ADDRESS or VALID_ADDRESS are allowed");
-            }
-        }
-
-        @Override
-        public InputStream getInputStream() {
-            return null;
-        }
-
-        @Override
-        public OutputStream getOutputStream() {
-            return null;
-        }
-
-        @Override
-        public boolean isConnected() {
-            return mConnected;
-        }
-
-    }
-
-
-    private class TestSocketCreator implements MailTransport.SocketCreator {
-
-        @Override
-        public Socket createSocket() throws MessagingException {
-            Socket socket = new TestSocket();
-            return socket;
-        }
-
-    }
-
-    private ImapHelper createMockImapHelper() {
-        return mock(ImapHelper.class);
-    }
-
-    /**
-     * @return a mock Network that can create a TestSocket with {@code getSocketFactory()
-     * .createSocket()}
-     */
-    private Network createMockNetwork() {
-        Network network = mock(Network.class);
-        SocketFactory mockSocketFactory = mock(SocketFactory.class);
-        try {
-            when(mockSocketFactory.createSocket()).thenReturn(new TestSocket());
-        } catch (IOException e) {
-            //ignored
-        }
-        when(network.getSocketFactory()).thenReturn(mockSocketFactory);
-        return network;
-    }
-
-    /**
-     * @return a mock Network like {@link MailTransportTest#createMockNetwork()}, but also supports
-     * {@link Network#getAllByName(String)} with one valid result.
-     */
-    private Network createOneIpMockNetwork() {
-        Network network = createMockNetwork();
-        try {
-            when(network.getAllByName(HOST_ADDRESS))
-                    .thenReturn(new InetAddress[] {VALID_INET_ADDRESS});
-        } catch (UnknownHostException e) {
-            //ignored
-        }
-
-        return network;
-    }
-
-    /**
-     * @return a mock Network like {@link MailTransportTest#createMockNetwork()}, but also supports
-     * {@link Network#getAllByName(String)}, which will return 2 address with the first one
-     * invalid.
-     */
-    private Network createMultiIpMockNetwork() {
-        Network network = createMockNetwork();
-        try {
-            when(network.getAllByName(HOST_ADDRESS))
-                    .thenReturn(new InetAddress[] {INVALID_INET_ADDRESS, VALID_INET_ADDRESS});
-        } catch (UnknownHostException e) {
-            //ignored
-        }
-
-        return network;
-    }
-
-    /**
-     * helper method to translate{@code host} into a InetAddress.
-     *
-     * @param host IP address of the host. Domain name should not be used as this method should not
-     * access the internet.
-     */
-    private static InetAddress createInetAddress(String host) {
-        try {
-            return InetAddress.getByName(host);
-        } catch (UnknownHostException e) {
-            return null;
-        }
-    }
-
-
-}
diff --git a/tests/src/com/android/phone/common/mail/store/imap/DigestMd5UtilsTest.java b/tests/src/com/android/phone/common/mail/store/imap/DigestMd5UtilsTest.java
deleted file mode 100644
index 81717a1..0000000
--- a/tests/src/com/android/phone/common/mail/store/imap/DigestMd5UtilsTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.common.mail.store.imap;
-
-import junit.framework.TestCase;
-
-public class DigestMd5UtilsTest extends TestCase {
-
-    public void testGetResponse() {
-        // Example data from RFC 2831.4
-        DigestMd5Utils.Data data = new DigestMd5Utils.Data();
-        data.username = "chris";
-        data.password = "secret";
-        data.realm = "elwood.innosoft.com";
-        data.nonce = "OA6MG9tEQGm2hh";
-        data.cnonce = "OA6MHXh6VqTrRk";
-        data.nc = "00000001";
-        data.qop = "auth";
-        data.digestUri = "imap/elwood.innosoft.com";
-        String response = DigestMd5Utils.getResponse(data, false);
-        assertEquals("d388dad90d4bbd760a152321f2143af7", response);
-    }
-
-    public void testGetResponse_ResponseAuth() {
-        // Example data from RFC 2831.4
-        DigestMd5Utils.Data data = new DigestMd5Utils.Data();
-        data.username = "chris";
-        data.password = "secret";
-        data.realm = "elwood.innosoft.com";
-        data.nonce = "OA6MG9tEQGm2hh";
-        data.cnonce = "OA6MHXh6VqTrRk";
-        data.nc = "00000001";
-        data.qop = "auth";
-        data.digestUri = "imap/elwood.innosoft.com";
-        String response = DigestMd5Utils.getResponse(data, true);
-        assertEquals("ea40f60335c427b5527b84dbabcdfffd", response);
-    }
-
-    public void testData_createResponse() {
-        DigestMd5Utils.Data data = new DigestMd5Utils.Data();
-        data.username = "chris";
-        data.password = "secret";
-        data.realm = "elwood.innosoft.com";
-        data.nonce = "OA6MG9tEQGm2hh";
-        data.cnonce = "OA6MHXh6VqTrRk";
-        data.nc = "00000001";
-        data.qop = "auth";
-        data.digestUri = "imap/elwood.innosoft.com";
-        assertEquals(data.createResponse(), "CHARSET=utf-8,"
-                + "username=\"chris\","
-                + "realm=\"elwood.innosoft.com\","
-                + "nonce=\"OA6MG9tEQGm2hh\","
-                + "nc=00000001,"
-                + "cnonce=\"OA6MHXh6VqTrRk\","
-                + "digest-uri=\"imap/elwood.innosoft.com\","
-                + "response=d388dad90d4bbd760a152321f2143af7,"
-                + "qop=auth");
-    }
-}
diff --git a/tests/src/com/android/phone/tests/OtaspTestActivity.java b/tests/src/com/android/phone/tests/OtaspTestActivity.java
deleted file mode 100644
index ead86c3..0000000
--- a/tests/src/com/android/phone/tests/OtaspTestActivity.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * Copyright (C) 2010 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.phone.tests;
-
-import android.app.Activity;
-import android.app.PendingIntent;
-import android.content.ActivityNotFoundException;
-import android.content.Intent;
-import android.os.Bundle;
-import android.util.Log;
-import android.view.View;
-import android.widget.Button;
-import android.widget.ProgressBar;
-import android.widget.TextView;
-
-import com.android.phone.OtaUtils;
-
-/**
- * Test activity that mimics the PERFORM_CDMA_PROVISIONING behavior of
- * SetupWizard, useful for testing "non-interactive" OTASP.
- * @see OtaUtils.startNonInteractiveOtasp
- *
- */
-public class OtaspTestActivity extends Activity implements View.OnClickListener {
-    private static final String LOG_TAG = "OtaspTestActivity";
-
-    // Request code used with startActivityForResult()
-    private static final int PERFORM_CDMA_PROVISIONING_REQUEST_CODE = 1;
-
-    // UI elements
-    private TextView mLabel;
-    private ProgressBar mProgressBar;
-    private TextView mResult;
-    private Button mButton;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        Intent intent = getIntent();
-        Log.i(LOG_TAG, "##### onCreate: intent = " + intent);
-        Bundle extras = intent.getExtras();
-        if (extras != null) {
-            Log.i(LOG_TAG, "      - has extras: size = " + extras.size()); // forces an unparcel()
-            Log.i(LOG_TAG, "      - extras = " + extras);
-        }
-
-        // Construct our basic UI:
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.otasp_test_activity);
-
-        mLabel = (TextView) findViewById(R.id.label1);
-        mLabel.setText("OTA Test Activity");
-
-        mProgressBar = (ProgressBar) findViewById(R.id.progress_bar);
-        mResult = (TextView) findViewById(R.id.result1);
-
-        mButton = (Button) findViewById(R.id.button1);
-        mButton.setText("Make test call");
-        mButton.setOnClickListener(this);
-
-
-        // We can be launched either:
-        //
-        // (1) Directly from the launcher, in which case the current intent
-        //     will simply be an ACTION_MAIN intent
-        //
-        // (2) Via the PendingIntent that we sent along (when we originally
-        //     fired off the ACTION_PERFORM_CDMA_PROVISIONING intent) that
-        //     allows the phone app to send us back a result code.
-        //     We can identify this case by the presence of the
-        //     EXTRA_OTASP_RESULT_CODE extra.
-
-        if (intent.hasExtra(OtaUtils.EXTRA_OTASP_RESULT_CODE)) {
-            // Got a result from the OTASP call!
-            Log.i(LOG_TAG, "==> onCreate: got a result from the OTASP call!");
-
-            int resultCode = intent.getIntExtra(OtaUtils.EXTRA_OTASP_RESULT_CODE,
-                                                OtaUtils.OTASP_UNKNOWN);
-            Log.i(LOG_TAG, "    - resultCode = " + resultCode);
-
-            String resultString;
-            switch (resultCode) {
-                case OtaUtils.OTASP_USER_SKIPPED:
-                    resultString = "User skipped!";
-                    break;
-                case OtaUtils.OTASP_SUCCESS:
-                    resultString = "Success!";
-                    break;
-                case OtaUtils.OTASP_FAILURE:
-                    resultString = "FAILURE";
-                    break;
-                default:
-                    resultString = "Unexpected code: " + resultCode;
-                    break;
-            }
-            Log.i(LOG_TAG, "    - result: " + resultString);
-            mResult.setText(resultString);
-            mResult.setVisibility(View.VISIBLE);
-            mProgressBar.setVisibility(View.INVISIBLE);
-
-        } else {
-            // We must have gotten here directly from the launcher.
-            // Leave the UI in its initial state.
-            Log.i(LOG_TAG, "==> onCreate: entered from the launcher.");
-        }
-    }
-
-    @Override
-    protected void onNewIntent(Intent intent) {
-        Log.i(LOG_TAG, "onNewIntent: intent=" + intent);
-        Bundle extras = intent.getExtras();
-        if (extras != null) Log.i(LOG_TAG, "      - intent extras = " + extras);
-
-        // This method isn't actually used since this test activity is not
-        // launched in "singleTop" mode.
-
-        // Activities that *are* launched in singleTop mode, like the SetupWizard,
-        // would have to handle the various PendingIntents here just like
-        // we do above in onCreate().
-    }
-
-    @Override
-    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        Log.i(LOG_TAG, "onActivityResult: request " + requestCode
-              + " result " + resultCode + " data " + data);
-
-        // Note we receive this call immediately before onResume(), when
-        // we get re-started after launching the PERFORM_CDMA_PROVISIONING
-        // intent.
-
-        if (requestCode == PERFORM_CDMA_PROVISIONING_REQUEST_CODE) {
-            // The InCallScreenShowActivation activity can set the following
-            // result codes:
-            //
-            //   RESULT_INTERACTIVE_OTASP_STARTED
-            //   RESULT_NONINTERACTIVE_OTASP_STARTED
-            //   RESULT_NONINTERACTIVE_OTASP_FAILED
-            //
-            // but note that in practice we won't ever *get* the
-            // RESULT_INTERACTIVE_OTASP_STARTED result code, since the
-            // "interactive" OTASP sequence never actually finish()es;
-            // it ends by directly launching the Home activity.
-            //
-            // However, in non-interactive OTASP, the
-            // InCallScreenShowActivation activity will set one of the
-            // RESULT_NONINTERACTIVE_* codes and immediately
-            // finish(), so we *will* see that result here.
-            //
-            // Also, resultCode will be RESULT_CANCELED (= 0) if the
-            // InCallScreenShowActivation activity didn't return any
-            // result, or crashed.
-
-            switch (resultCode) {
-                case OtaUtils.RESULT_INTERACTIVE_OTASP_STARTED:
-                    Log.i(LOG_TAG, "==> onActivityResult: INTERACTIVE_OTASP_STARTED");
-                    break;
-                case OtaUtils.RESULT_NONINTERACTIVE_OTASP_STARTED:
-                    Log.i(LOG_TAG, "==> onActivityResult: NONINTERACTIVE_OTASP_STARTED");
-                    break;
-                case OtaUtils.RESULT_NONINTERACTIVE_OTASP_FAILED:
-                    Log.w(LOG_TAG, "==> onActivityResult: NONINTERACTIVE_OTASP_FAILED");
-                    // This means we couldn't even *initiate* an outgoing call
-                    // to start the OTASP process.  Not sure what could cause this.
-                    // TODO: Update UI to indicate the error.
-                    break;
-                case RESULT_CANCELED:
-                    Log.i(LOG_TAG, "==> onActivityResult: CANCELED");
-                    break;
-                default:
-                    Log.i(LOG_TAG, "==> onActivityResult: unknown result: " + resultCode);
-                    break;
-            }
-        }
-    }
-
-    @Override
-    protected void onResume() {
-        Log.i(LOG_TAG, "onResume()...");
-        super.onResume();
-    }
-
-    @Override
-    protected void onPause() {
-        Log.i(LOG_TAG, "onPause()...");
-        super.onPause();
-    }
-
-    // View.OnClickListener implementation
-    @Override
-    public void onClick(View view) {
-        int id = view.getId();
-        Log.i(LOG_TAG, "onClick(View " + view + ", id " + id + ")...");
-
-        switch (id) {
-            case R.id.button1:
-                Log.i(LOG_TAG, "onClick: button1...");
-                makeTestCall();
-                break;
-            default:
-                Log.w(LOG_TAG, "onClick: unexpected View: " + view);
-                break;
-        }
-    }
-
-    private void makeTestCall() {
-        Log.i(LOG_TAG, "##### makeTestCall()...");
-
-        mProgressBar.setVisibility(View.VISIBLE);
-        mResult.setVisibility(View.INVISIBLE);
-
-        try {
-            Intent performProvisioningIntent =
-                    new Intent(OtaUtils.ACTION_PERFORM_CDMA_PROVISIONING);
-
-            // Set the magic extra to force "non-interactive mode" for the
-            // OTASP call.
-            performProvisioningIntent.putExtra(OtaUtils.EXTRA_OVERRIDE_INTERACTIVE_MODE, false);
-
-            // Pass a PendingIntent along with the
-            // ACTION_PERFORM_CDMA_PROVISIONING intent, which allows
-            // results to be sent back to us.
-            Intent resultIntent = new Intent(this, this.getClass());
-            PendingIntent pendingResultIntent =
-                    PendingIntent.getActivity(this, 0,
-                                              resultIntent, 0);
-            performProvisioningIntent.putExtra(OtaUtils.EXTRA_OTASP_RESULT_CODE_PENDING_INTENT,
-                                               pendingResultIntent);
-
-            Log.i(LOG_TAG, "- Firing off PERFORM_CDMA_PROVISIONING intent: "
-                  + performProvisioningIntent);
-            Bundle extras = performProvisioningIntent.getExtras();
-            if (extras != null) Log.i(LOG_TAG, "      - intent extras = " + extras);
-
-            // Originally, we would simply call
-            //     startActivity(performProvisioningIntent);
-            // to launch the InCallScreenShowActivation activity and *not* expect
-            // a result.  (Note that calling the plain startActivity()
-            // method *guarantees* that your onActivityResult() method
-            // will NOT be called at all.)
-
-            // Now, we ask for a result:
-            startActivityForResult(performProvisioningIntent,
-                                   PERFORM_CDMA_PROVISIONING_REQUEST_CODE);
-
-            // On a non-voice-capable device, the InCallScreenShowActivation activity
-            // will kick off the OTASP call and immediately return, passing
-            // the code RESULT_STARTED_NONINTERACTIVE_OTASP to our
-            // onActivityResult method.
-
-        } catch (ActivityNotFoundException e) {
-            Log.w(LOG_TAG, "Couldn't show activiation UI; ActivityNotFoundException: " + e);
-        }
-    }
-}
diff --git a/tests/src/com/android/phone/vvm/omtp/OmtpVvmCarrierConfigHelperTest.java b/tests/src/com/android/phone/vvm/omtp/OmtpVvmCarrierConfigHelperTest.java
deleted file mode 100644
index bc0192c..0000000
--- a/tests/src/com/android/phone/vvm/omtp/OmtpVvmCarrierConfigHelperTest.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp;
-
-import static com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper.KEY_CARRIER_VVM_PACKAGE_NAME_STRING;
-import static com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper.KEY_CARRIER_VVM_PACKAGE_NAME_STRING_ARRAY;
-import static com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper.KEY_VVM_CELLULAR_DATA_REQUIRED_BOOL;
-import static com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper.KEY_VVM_DESTINATION_NUMBER_STRING;
-import static com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper.KEY_VVM_DISABLED_CAPABILITIES_STRING_ARRAY;
-import static com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper.KEY_VVM_PORT_NUMBER_INT;
-import static com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper.KEY_VVM_PREFETCH_BOOL;
-import static com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper.KEY_VVM_SSL_PORT_NUMBER_INT;
-import static com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper.KEY_VVM_TYPE_STRING;
-
-import android.os.PersistableBundle;
-import android.test.AndroidTestCase;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-public class OmtpVvmCarrierConfigHelperTest extends AndroidTestCase {
-
-    private static final String CARRIER_TYPE = "omtp.carrier";
-    private static final String CARRIER_PACKAGE_NAME = "omtp.carrier.package";
-    private static final boolean CARRIER_CELLULAR_REQUIRED = false;
-    private static final boolean CARRIER_PREFETCH = true;
-    private static final String CARRIER_DESTINATION_NUMBER = "123";
-    private static final int CARRIER_APPLICATION_PORT = 456;
-    private static final int DEFAULT_SSL_PORT = 0;
-    private static final Set<String> DEFAULT_DISABLED_CAPABILITIES = null;
-
-    private static final String TELEPHONY_TYPE = "omtp.telephony";
-    private static final String[] TELEPHONY_PACKAGE_NAMES = {"omtp.telephony.package"};
-    private static final boolean TELEPHONY_CELLULAR_REQUIRED = true;
-    private static final boolean TELEPHONY_PREFETCH = false;
-    private static final String TELEPHONY_DESTINATION_NUMBER = "321";
-    private static final int TELEPHONY_APPLICATION_PORT = 654;
-    private static final int TELEPHONY_SSL_PORT = 997;
-    private static final String[] TELEPHONY_DISABLED_CAPABILITIES = {"foo"};
-
-    private OmtpVvmCarrierConfigHelper mHelper;
-
-    public void testCarrierConfig() {
-        mHelper = new OmtpVvmCarrierConfigHelper(getContext(), createCarrierConfig(), null);
-        verifyCarrierConfig();
-        verifyDefaultExtraConfig();
-    }
-
-    public void testTelephonyConfig() {
-        mHelper = new OmtpVvmCarrierConfigHelper(getContext(), null, createTelephonyConfig());
-        verifyTelephonyConfig();
-        verifyTelephonyExtraConfig();
-    }
-
-    public void testMixedConfig() {
-        mHelper = new OmtpVvmCarrierConfigHelper(getContext(), createCarrierConfig(),
-                createTelephonyConfig());
-        verifyCarrierConfig();
-        verifyTelephonyExtraConfig();
-    }
-
-    private PersistableBundle createCarrierConfig() {
-        PersistableBundle bundle = new PersistableBundle();
-        bundle.putString(KEY_VVM_TYPE_STRING, CARRIER_TYPE);
-        bundle.putString(KEY_CARRIER_VVM_PACKAGE_NAME_STRING,
-                CARRIER_PACKAGE_NAME);
-        bundle.putBoolean(KEY_VVM_CELLULAR_DATA_REQUIRED_BOOL,
-                CARRIER_CELLULAR_REQUIRED);
-        bundle.putBoolean(KEY_VVM_PREFETCH_BOOL,
-                CARRIER_PREFETCH);
-        bundle.putString(KEY_VVM_DESTINATION_NUMBER_STRING,
-                CARRIER_DESTINATION_NUMBER);
-        bundle.putInt(KEY_VVM_PORT_NUMBER_INT, CARRIER_APPLICATION_PORT);
-        return bundle;
-    }
-
-    private void verifyCarrierConfig() {
-        assertEquals(CARRIER_TYPE, mHelper.getVvmType());
-        assertEquals(new HashSet<>(Arrays.asList(CARRIER_PACKAGE_NAME)),
-                mHelper.getCarrierVvmPackageNames());
-        assertEquals(CARRIER_CELLULAR_REQUIRED, mHelper.isCellularDataRequired());
-        assertEquals(CARRIER_PREFETCH, mHelper.isPrefetchEnabled());
-        assertEquals(CARRIER_APPLICATION_PORT, mHelper.getApplicationPort());
-        assertEquals(CARRIER_DESTINATION_NUMBER, mHelper.getDestinationNumber());
-    }
-
-
-    private void verifyDefaultExtraConfig() {
-        assertEquals(DEFAULT_SSL_PORT, mHelper.getSslPort());
-        assertEquals(DEFAULT_DISABLED_CAPABILITIES, mHelper.getDisabledCapabilities());
-    }
-
-
-    private PersistableBundle createTelephonyConfig() {
-        PersistableBundle bundle = new PersistableBundle();
-        bundle.putString(KEY_VVM_TYPE_STRING, TELEPHONY_TYPE);
-        bundle.putStringArray(KEY_CARRIER_VVM_PACKAGE_NAME_STRING_ARRAY,
-                TELEPHONY_PACKAGE_NAMES);
-        bundle.putBoolean(KEY_VVM_CELLULAR_DATA_REQUIRED_BOOL,
-                TELEPHONY_CELLULAR_REQUIRED);
-        bundle.putBoolean(KEY_VVM_PREFETCH_BOOL,
-                TELEPHONY_PREFETCH);
-        bundle.putString(KEY_VVM_DESTINATION_NUMBER_STRING,
-                TELEPHONY_DESTINATION_NUMBER);
-        bundle.putInt(KEY_VVM_PORT_NUMBER_INT, TELEPHONY_APPLICATION_PORT);
-        bundle.putInt(KEY_VVM_SSL_PORT_NUMBER_INT, TELEPHONY_SSL_PORT);
-        bundle.putStringArray(KEY_VVM_DISABLED_CAPABILITIES_STRING_ARRAY,
-                TELEPHONY_DISABLED_CAPABILITIES);
-        return bundle;
-    }
-
-    private void verifyTelephonyConfig() {
-        assertEquals(TELEPHONY_TYPE, mHelper.getVvmType());
-        assertEquals(new HashSet<>(Arrays.asList(TELEPHONY_PACKAGE_NAMES)),
-                mHelper.getCarrierVvmPackageNames());
-        assertEquals(TELEPHONY_CELLULAR_REQUIRED, mHelper.isCellularDataRequired());
-        assertEquals(TELEPHONY_PREFETCH, mHelper.isPrefetchEnabled());
-        assertEquals(TELEPHONY_APPLICATION_PORT, mHelper.getApplicationPort());
-        assertEquals(TELEPHONY_DESTINATION_NUMBER, mHelper.getDestinationNumber());
-    }
-
-    private void verifyTelephonyExtraConfig() {
-        assertEquals(TELEPHONY_SSL_PORT, mHelper.getSslPort());
-        assertEquals(new HashSet<>(Arrays.asList(TELEPHONY_DISABLED_CAPABILITIES)),
-                mHelper.getDisabledCapabilities());
-    }
-}
diff --git a/tests/src/com/android/phone/vvm/omtp/StatusMessageTest.java b/tests/src/com/android/phone/vvm/omtp/StatusMessageTest.java
deleted file mode 100644
index 707463a..0000000
--- a/tests/src/com/android/phone/vvm/omtp/StatusMessageTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp;
-
-import android.os.Bundle;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.phone.vvm.omtp.sms.StatusMessage;
-
-import junit.framework.TestCase;
-
-@VisibleForTesting
-public class StatusMessageTest extends TestCase {
-
-    public void testStatusMessage() {
-        Bundle bundle = new Bundle();
-        bundle.putString(OmtpConstants.PROVISIONING_STATUS, "status");
-        bundle.putString(OmtpConstants.RETURN_CODE, "code");
-        bundle.putString(OmtpConstants.SUBSCRIPTION_URL, "url");
-        bundle.putString(OmtpConstants.SERVER_ADDRESS, "address");
-        bundle.putString(OmtpConstants.TUI_ACCESS_NUMBER, "tui");
-        bundle.putString(OmtpConstants.CLIENT_SMS_DESTINATION_NUMBER, "sms");
-        bundle.putString(OmtpConstants.IMAP_PORT, "1234");
-        bundle.putString(OmtpConstants.IMAP_USER_NAME, "username");
-        bundle.putString(OmtpConstants.IMAP_PASSWORD, "password");
-        bundle.putString(OmtpConstants.SMTP_PORT, "s1234");
-        bundle.putString(OmtpConstants.SMTP_USER_NAME, "susername");
-        bundle.putString(OmtpConstants.SMTP_PASSWORD, "spassword");
-        bundle.putString(OmtpConstants.TUI_PASSWORD_LENGTH, "4-7");
-
-        StatusMessage message = new StatusMessage(bundle);
-        assertEquals("status", message.getProvisioningStatus());
-        assertEquals("code", message.getReturnCode());
-        assertEquals("url", message.getSubscriptionUrl());
-        assertEquals("address", message.getServerAddress());
-        assertEquals("tui", message.getTuiAccessNumber());
-        assertEquals("sms", message.getClientSmsDestinationNumber());
-        assertEquals("1234", message.getImapPort());
-        assertEquals("username", message.getImapUserName());
-        assertEquals("password", message.getImapPassword());
-        assertEquals("s1234", message.getSmtpPort());
-        assertEquals("susername", message.getSmtpUserName());
-        assertEquals("spassword", message.getSmtpPassword());
-        assertEquals("4-7", message.getTuiPasswordLength());
-    }
-
-    public void testSyncMessage_EmptyBundle() {
-        StatusMessage message = new StatusMessage(new Bundle());
-        assertEquals("", message.getProvisioningStatus());
-        assertEquals("", message.getReturnCode());
-        assertEquals("", message.getSubscriptionUrl());
-        assertEquals("", message.getServerAddress());
-        assertEquals("", message.getTuiAccessNumber());
-        assertEquals("", message.getClientSmsDestinationNumber());
-        assertEquals("", message.getImapPort());
-        assertEquals("", message.getImapUserName());
-        assertEquals("", message.getImapPassword());
-        assertEquals("", message.getSmtpPort());
-        assertEquals("", message.getSmtpUserName());
-        assertEquals("", message.getSmtpPassword());
-        assertEquals("", message.getTuiPasswordLength());
-    }
-}
diff --git a/tests/src/com/android/phone/vvm/omtp/SyncMessageTest.java b/tests/src/com/android/phone/vvm/omtp/SyncMessageTest.java
deleted file mode 100644
index 61ae400..0000000
--- a/tests/src/com/android/phone/vvm/omtp/SyncMessageTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp;
-
-import android.os.Bundle;
-
-import com.android.phone.vvm.omtp.sms.SyncMessage;
-
-import junit.framework.TestCase;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Locale;
-
-public class SyncMessageTest extends TestCase {
-
-    public void testSyncMessage() {
-        Bundle bundle = new Bundle();
-        bundle.putString(OmtpConstants.SYNC_TRIGGER_EVENT, "event");
-        bundle.putString(OmtpConstants.MESSAGE_UID, "uid");
-        bundle.putString(OmtpConstants.MESSAGE_LENGTH, "1");
-        bundle.putString(OmtpConstants.CONTENT_TYPE, "type");
-        bundle.putString(OmtpConstants.SENDER, "sender");
-        bundle.putString(OmtpConstants.NUM_MESSAGE_COUNT, "2");
-        bundle.putString(OmtpConstants.TIME, "29/08/1997 02:14 -0400");
-
-        SyncMessage message = new SyncMessage(bundle);
-        assertEquals("event", message.getSyncTriggerEvent());
-        assertEquals("uid", message.getId());
-        assertEquals(1, message.getLength());
-        assertEquals("type", message.getContentType());
-        assertEquals("sender", message.getSender());
-        assertEquals(2, message.getNewMessageCount());
-        try {
-            assertEquals(new SimpleDateFormat(
-                    OmtpConstants.DATE_TIME_FORMAT, Locale.US)
-                    .parse("29/08/1997 02:14 -0400").getTime(), message.getTimestampMillis());
-        } catch (ParseException e) {
-            throw new AssertionError(e.toString());
-        }
-    }
-
-    public void testSyncMessage_EmptyBundle() {
-        SyncMessage message = new SyncMessage(new Bundle());
-        assertEquals("", message.getSyncTriggerEvent());
-        assertEquals("", message.getId());
-        assertEquals(0, message.getLength());
-        assertEquals("", message.getContentType());
-        assertEquals("", message.getSender());
-        assertEquals(0, message.getNewMessageCount());
-        assertEquals(0, message.getTimestampMillis());
-    }
-}
diff --git a/tests/src/com/android/phone/vvm/omtp/TelephonyVvmConfigManagerTest.java b/tests/src/com/android/phone/vvm/omtp/TelephonyVvmConfigManagerTest.java
deleted file mode 100644
index 8e7a0da..0000000
--- a/tests/src/com/android/phone/vvm/omtp/TelephonyVvmConfigManagerTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp;
-
-import static com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper.KEY_CARRIER_VVM_PACKAGE_NAME_STRING_ARRAY;
-import static com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper.KEY_VVM_CELLULAR_DATA_REQUIRED_BOOL;
-import static com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper.KEY_VVM_DESTINATION_NUMBER_STRING;
-import static com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper.KEY_VVM_DISABLED_CAPABILITIES_STRING_ARRAY;
-import static com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper.KEY_VVM_PORT_NUMBER_INT;
-import static com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper.KEY_VVM_PREFETCH_BOOL;
-import static com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper.KEY_VVM_SSL_PORT_NUMBER_INT;
-import static com.android.phone.vvm.omtp.OmtpVvmCarrierConfigHelper.KEY_VVM_TYPE_STRING;
-
-import android.os.PersistableBundle;
-
-import junit.framework.TestCase;
-
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-import org.xmlpull.v1.XmlPullParserFactory;
-
-import java.io.StringReader;
-import java.util.Arrays;
-
-public class TelephonyVvmConfigManagerTest extends TestCase {
-
-    private static final String XML_HEADER = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
-            + "<list name=\"carrier_config_list\">\n";
-    private static final String XML_FOOTER = "</list>";
-
-    private static final String CARRIER = "  <pbundle_as_map>\n"
-            + "    <string-array name=\"mccmnc\">\n"
-            + "      <item value=\"12345\"/>\n"
-            + "      <item value=\"67890\"/>\n"
-            + "    </string-array>\n"
-            + "    <int name=\"vvm_port_number_int\" value=\"54321\"/>\n"
-            + "    <string name=\"vvm_destination_number_string\">11111</string>\n"
-            + "    <string-array name=\"carrier_vvm_package_name_string_array\">\n"
-            + "      <item value=\"com.android.phone\"/>\n"
-            + "    </string-array>\n"
-            + "    <string name=\"vvm_type_string\">vvm_type_omtp</string>\n"
-            + "    <boolean name=\"vvm_cellular_data_required\" value=\"true\"/>\n"
-            + "    <boolean name=\"vvm_prefetch\" value=\"true\"/>\n"
-            + "    <int name=\"vvm_ssl_port_number_int\" value=\"997\"/>\n"
-            + "    <string-array name=\"vvm_disabled_capabilities_string_array\">\n"
-            + "      <item value =\"foo\"/>\n"
-            + "      <item value =\"bar\"/>\n"
-            + "    </string-array>\n"
-            + "  </pbundle_as_map>\n";
-
-    private static final String CARRIER_EMPTY = "<pbundle_as_map></pbundle_as_map>\n";
-
-
-    public void testLoadConfigFromXml() {
-        TelephonyVvmConfigManager manager = createManager(XML_HEADER + CARRIER + XML_FOOTER);
-        verifyCarrier(manager.getConfig("12345"));
-        verifyCarrier(manager.getConfig("67890"));
-    }
-
-    public void testLoadConfigFromXml_Multiple() {
-        TelephonyVvmConfigManager manager =
-                createManager(XML_HEADER + CARRIER + CARRIER + XML_FOOTER);
-        verifyCarrier(manager.getConfig("12345"));
-        verifyCarrier(manager.getConfig("67890"));
-    }
-
-    public void testLoadConfigFromXml_Empty() {
-        createManager(XML_HEADER + CARRIER_EMPTY + XML_FOOTER);
-    }
-
-
-    private void verifyCarrier(PersistableBundle config) {
-        assertTrue(Arrays.equals(new String[]{"12345", "67890"},
-                config.getStringArray(TelephonyVvmConfigManager.KEY_MCCMNC)));
-        assertEquals(54321, config.getInt(KEY_VVM_PORT_NUMBER_INT));
-        assertEquals("11111", config.getString(KEY_VVM_DESTINATION_NUMBER_STRING));
-        assertTrue(Arrays.equals(new String[]{"com.android.phone"},
-                config.getStringArray(KEY_CARRIER_VVM_PACKAGE_NAME_STRING_ARRAY)));
-        assertEquals("vvm_type_omtp", config.getString(KEY_VVM_TYPE_STRING));
-        assertEquals(true, config.getBoolean(KEY_VVM_PREFETCH_BOOL));
-        assertEquals(true, config.getBoolean(KEY_VVM_CELLULAR_DATA_REQUIRED_BOOL));
-        assertEquals(997, config.getInt(KEY_VVM_SSL_PORT_NUMBER_INT));
-        assertTrue(Arrays.equals(new String[]{"foo", "bar"},
-                config.getStringArray(KEY_VVM_DISABLED_CAPABILITIES_STRING_ARRAY)));
-    }
-
-    private TelephonyVvmConfigManager createManager(String xml) {
-        try {
-            XmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser();
-            parser.setInput(new StringReader(xml));
-            return new TelephonyVvmConfigManager(parser);
-        } catch (XmlPullParserException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-}
diff --git a/tests/src/com/android/phone/vvm/omtp/VisualVoicemailPreferencesTest.java b/tests/src/com/android/phone/vvm/omtp/VisualVoicemailPreferencesTest.java
deleted file mode 100644
index 1ae7899..0000000
--- a/tests/src/com/android/phone/vvm/omtp/VisualVoicemailPreferencesTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package com.android.phone.vvm.omtp;
-
-import android.content.ComponentName;
-import android.telecom.PhoneAccountHandle;
-import android.test.AndroidTestCase;
-import android.util.ArraySet;
-
-import java.util.Arrays;
-
-public class VisualVoicemailPreferencesTest extends AndroidTestCase {
-
-    public void testWriteRead() {
-        VisualVoicemailPreferences preferences = new VisualVoicemailPreferences(getContext(),
-                createFakeHandle("testWriteRead"));
-        preferences.edit()
-                .putBoolean("boolean", true)
-                .putFloat("float", 0.5f)
-                .putInt("int", 123)
-                .putLong("long", 456)
-                .putString("string", "foo")
-                .putStringSet("stringset", new ArraySet<>(Arrays.asList("bar", "baz")))
-                .apply();
-
-        assertTrue(preferences.contains("boolean"));
-        assertTrue(preferences.contains("float"));
-        assertTrue(preferences.contains("int"));
-        assertTrue(preferences.contains("long"));
-        assertTrue(preferences.contains("string"));
-        assertTrue(preferences.contains("stringset"));
-
-        assertEquals(true, preferences.getBoolean("boolean", false));
-        assertEquals(0.5f, preferences.getFloat("float", 0));
-        assertEquals(123, preferences.getInt("int", 0));
-        assertEquals(456, preferences.getLong("long", 0));
-        assertEquals("foo", preferences.getString("string", null));
-        assertEquals(new ArraySet<>(Arrays.asList("bar", "baz")),
-                preferences.getStringSet("stringset", null));
-    }
-
-    public void testReadDefault() {
-        VisualVoicemailPreferences preferences = new VisualVoicemailPreferences(getContext(),
-                createFakeHandle("testReadDefault"));
-
-        assertFalse(preferences.contains("boolean"));
-        assertFalse(preferences.contains("float"));
-        assertFalse(preferences.contains("int"));
-        assertFalse(preferences.contains("long"));
-        assertFalse(preferences.contains("string"));
-        assertFalse(preferences.contains("stringset"));
-
-        assertEquals(true, preferences.getBoolean("boolean", true));
-        assertEquals(2.5f, preferences.getFloat("float", 2.5f));
-        assertEquals(321, preferences.getInt("int", 321));
-        assertEquals(654, preferences.getLong("long", 654));
-        assertEquals("foo2", preferences.getString("string", "foo2"));
-        assertEquals(new ArraySet<>(Arrays.asList("bar2", "baz2")),
-                preferences.getStringSet(
-                        "stringset", new ArraySet<>(Arrays.asList("bar2", "baz2"))));
-    }
-
-    public void testReadDefaultNull() {
-        VisualVoicemailPreferences preferences = new VisualVoicemailPreferences(getContext(),
-                createFakeHandle("testReadDefaultNull"));
-        assertNull(preferences.getString("string", null));
-        assertNull(preferences.getStringSet("stringset", null));
-    }
-
-    public void testDifferentHandle() {
-        VisualVoicemailPreferences preferences1 = new VisualVoicemailPreferences(getContext(),
-                createFakeHandle("testDifferentHandle1"));
-        VisualVoicemailPreferences preferences2 = new VisualVoicemailPreferences(getContext(),
-                createFakeHandle("testDifferentHandle1"));
-
-        preferences1.edit().putString("string", "foo");
-        assertFalse(preferences2.contains("string"));
-    }
-
-    private PhoneAccountHandle createFakeHandle(String id) {
-        return new PhoneAccountHandle(new ComponentName(getContext(), this.getClass()), id);
-    }
-}
diff --git a/tests/src/com/android/phone/vvm/omtp/scheduling/BaseTaskTest.java b/tests/src/com/android/phone/vvm/omtp/scheduling/BaseTaskTest.java
deleted file mode 100644
index 27dd87e..0000000
--- a/tests/src/com/android/phone/vvm/omtp/scheduling/BaseTaskTest.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.scheduling;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.verify;
-
-import android.support.test.runner.AndroidJUnit4;
-
-import com.android.phone.vvm.omtp.scheduling.Task.TaskId;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@RunWith(AndroidJUnit4.class)
-public class BaseTaskTest extends BaseTaskTestBase {
-
-
-    @Test
-    public void testBaseTask() {
-        DummyBaseTask task = (DummyBaseTask) submitTask(
-                BaseTask.createIntent(mTestContext, DummyBaseTask.class, 123));
-        assertTrue(task.getId().equals(new TaskId(1, 123)));
-        assertTrue(!task.hasStarted());
-        assertTrue(!task.hasRun);
-        mService.runNextTask();
-        assertTrue(task.hasStarted());
-        assertTrue(task.hasRun);
-        verify(task.policy).onBeforeExecute();
-        verify(task.policy).onCompleted();
-    }
-
-    @Test
-    public void testFail() {
-        FailingBaseTask task = (FailingBaseTask) submitTask(
-                BaseTask.createIntent(mTestContext, FailingBaseTask.class, 0));
-        mService.runNextTask();
-        verify(task.policy).onFail();
-    }
-
-    @Test
-    public void testDuplicated() {
-        DummyBaseTask task1 = (DummyBaseTask) submitTask(
-                BaseTask.createIntent(mTestContext, DummyBaseTask.class, 123));
-        verify(task1.policy, never()).onDuplicatedTaskAdded();
-
-        DummyBaseTask task2 = (DummyBaseTask) submitTask(
-                BaseTask.createIntent(mTestContext, DummyBaseTask.class, 123));
-        verify(task1.policy).onDuplicatedTaskAdded();
-
-        mService.runNextTask();
-        assertTrue(task1.hasRun);
-        assertTrue(!task2.hasRun);
-    }
-
-    @Test
-    public void testDuplicated_DifferentSubId() {
-        DummyBaseTask task1 = (DummyBaseTask) submitTask(
-                BaseTask.createIntent(mTestContext, DummyBaseTask.class, 123));
-        verify(task1.policy, never()).onDuplicatedTaskAdded();
-
-        DummyBaseTask task2 = (DummyBaseTask) submitTask(
-                BaseTask.createIntent(mTestContext, DummyBaseTask.class, 456));
-        verify(task1.policy, never()).onDuplicatedTaskAdded();
-        mService.runNextTask();
-        assertTrue(task1.hasRun);
-        assertTrue(!task2.hasRun);
-
-        mService.runNextTask();
-        assertTrue(task2.hasRun);
-    }
-
-    @Test
-    public void testReadyTime() {
-        BaseTask task = spy(new DummyBaseTask());
-        assertTrue(task.getReadyInMilliSeconds() == 0);
-        mTime = 500;
-        assertTrue(task.getReadyInMilliSeconds() == -500);
-        task.setExecutionTime(1000);
-        assertTrue(task.getReadyInMilliSeconds() == 500);
-    }
-
-    public static class DummyBaseTask extends BaseTask {
-
-        public Policy policy;
-        public boolean hasRun = false;
-
-        public DummyBaseTask() {
-            super(1);
-            policy = mock(Policy.class);
-            addPolicy(policy);
-        }
-
-        @Override
-        public void onExecuteInBackgroundThread() {
-            hasRun = true;
-        }
-    }
-
-    public static class FailingBaseTask extends BaseTask {
-
-        public Policy policy;
-        public FailingBaseTask() {
-            super(1);
-            policy = mock(Policy.class);
-            addPolicy(policy);
-        }
-
-        @Override
-        public void onExecuteInBackgroundThread() {
-            fail();
-        }
-    }
-}
diff --git a/tests/src/com/android/phone/vvm/omtp/scheduling/BaseTaskTestBase.java b/tests/src/com/android/phone/vvm/omtp/scheduling/BaseTaskTestBase.java
deleted file mode 100644
index 1ffd3c4..0000000
--- a/tests/src/com/android/phone/vvm/omtp/scheduling/BaseTaskTestBase.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.scheduling;
-
-import com.android.phone.vvm.omtp.scheduling.BaseTask.Clock;
-
-import org.junit.After;
-import org.junit.Before;
-
-public class BaseTaskTestBase extends TaskSchedulerServiceTestBase {
-
-    /**
-     * "current time" of the deterministic clock.
-     */
-    public long mTime;
-
-    @Before
-    public void setUpBaseTaskTest() {
-        mTime = 0;
-        BaseTask.setClockForTesting(new TestClock());
-    }
-
-    @After
-    public void tearDownBaseTaskTest() {
-        BaseTask.setClockForTesting(new Clock());
-    }
-
-
-    private class TestClock extends Clock {
-
-        @Override
-        public long getTimeMillis() {
-            return mTime;
-        }
-    }
-}
diff --git a/tests/src/com/android/phone/vvm/omtp/scheduling/PolicyTest.java b/tests/src/com/android/phone/vvm/omtp/scheduling/PolicyTest.java
deleted file mode 100644
index 9761d01..0000000
--- a/tests/src/com/android/phone/vvm/omtp/scheduling/PolicyTest.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.scheduling;
-
-import android.support.test.runner.AndroidJUnit4;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@RunWith(AndroidJUnit4.class)
-public class PolicyTest extends BaseTaskTestBase {
-
-    private static int sExecuteCounter;
-
-    @Before
-    public void setUpPolicyTest() {
-        sExecuteCounter = 0;
-    }
-
-    @Test
-    public void testPostponePolicy() {
-        Task task = submitTask(BaseTask.createIntent(mTestContext, PostponeTask.class, 0));
-        mService.runNextTask();
-        assertTrue(task.getReadyInMilliSeconds() == 1000);
-        submitTask(BaseTask.createIntent(mTestContext, PostponeTask.class, 0));
-        assertTrue(task.getReadyInMilliSeconds() == 1000);
-        mTime = 500;
-        submitTask(BaseTask.createIntent(mTestContext, PostponeTask.class, 0));
-        assertTrue(task.getReadyInMilliSeconds() == 1000);
-        mTime = 2500;
-        mService.runNextTask();
-        assertTrue(sExecuteCounter == 1);
-    }
-
-    @Test
-    public void testRetryPolicy() {
-        Task task = submitTask(BaseTask.createIntent(mTestContext, FailingRetryTask.class, 0));
-        mService.runNextTask();
-        // Should queue retry at 1000
-        assertTrue(sExecuteCounter == 1);
-        mService.runNextTask();
-        assertTrue(sExecuteCounter == 1);
-        mTime = 1500;
-        mService.runNextTask();
-        // Should queue retry at 2500
-        assertTrue(sExecuteCounter == 2);
-        mService.runNextTask();
-        assertTrue(sExecuteCounter == 2);
-        mTime = 2000;
-        mService.runNextTask();
-        assertTrue(sExecuteCounter == 2);
-        mTime = 3000;
-        mService.runNextTask();
-        // No more retries are queued.
-        assertTrue(sExecuteCounter == 3);
-        mService.runNextTask();
-        assertTrue(sExecuteCounter == 3);
-        mTime = 4500;
-        mService.runNextTask();
-        assertTrue(sExecuteCounter == 3);
-    }
-
-    @Test
-    public void testMinimalIntervalPolicy() {
-        MinimalIntervalPolicyTask task1 = (MinimalIntervalPolicyTask) submitTask(
-                BaseTask.createIntent(mTestContext, MinimalIntervalPolicyTask.class, 0));
-        mService.runNextTask();
-        assertTrue(task1.hasRan);
-        MinimalIntervalPolicyTask task2 = (MinimalIntervalPolicyTask) submitTask(
-                BaseTask.createIntent(mTestContext, MinimalIntervalPolicyTask.class, 0));
-        mService.runNextTask();
-        assertTrue(!task2.hasRan);
-
-        mTime = 1500;
-        mService.runNextTask();
-
-        MinimalIntervalPolicyTask task3 = (MinimalIntervalPolicyTask) submitTask(
-                BaseTask.createIntent(mTestContext, MinimalIntervalPolicyTask.class, 0));
-        mService.runNextTask();
-        assertTrue(task3.hasRan);
-    }
-
-    public abstract static class PolicyTestTask extends BaseTask {
-
-        public PolicyTestTask() {
-            super(1);
-        }
-
-        @Override
-        public void onExecuteInBackgroundThread() {
-            sExecuteCounter++;
-        }
-    }
-
-    public static class PostponeTask extends PolicyTestTask {
-
-        PostponeTask() {
-            addPolicy(new PostponePolicy(1000));
-        }
-    }
-
-    public static class FailingRetryTask extends PolicyTestTask {
-
-        public FailingRetryTask() {
-            addPolicy(new RetryPolicy(2, 1000));
-        }
-
-        @Override
-        public void onExecuteInBackgroundThread() {
-            super.onExecuteInBackgroundThread();
-            fail();
-        }
-    }
-
-    public static class MinimalIntervalPolicyTask extends PolicyTestTask {
-
-        boolean hasRan;
-
-        MinimalIntervalPolicyTask() {
-            addPolicy(new MinimalIntervalPolicy(1000));
-        }
-
-        @Override
-        public void onExecuteInBackgroundThread() {
-            super.onExecuteInBackgroundThread();
-            hasRan = true;
-        }
-    }
-
-}
diff --git a/tests/src/com/android/phone/vvm/omtp/scheduling/TaskSchedulerServiceTest.java b/tests/src/com/android/phone/vvm/omtp/scheduling/TaskSchedulerServiceTest.java
deleted file mode 100644
index 2dd4ecf..0000000
--- a/tests/src/com/android/phone/vvm/omtp/scheduling/TaskSchedulerServiceTest.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.scheduling;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import android.support.test.runner.AndroidJUnit4;
-
-import com.android.phone.vvm.omtp.scheduling.Task.TaskId;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.util.concurrent.TimeoutException;
-
-@RunWith(AndroidJUnit4.class)
-public class TaskSchedulerServiceTest extends TaskSchedulerServiceTestBase {
-
-    @Test
-    public void testTaskIdComparison() {
-        TaskId id1 = new TaskId(1, 1);
-        TaskId id2 = new TaskId(1, 1);
-        TaskId id3 = new TaskId(1, 2);
-        assertTrue(id1.equals(id2));
-        assertTrue(id1.equals(id1));
-        assertTrue(!id1.equals(id3));
-    }
-
-    @Test
-    public void testAddDuplicatedTask() throws TimeoutException {
-        TestTask task1 = (TestTask) submitTask(
-                TaskSchedulerService.createIntent(mTestContext, TestTask.class));
-        TestTask task2 = (TestTask) submitTask(
-                TaskSchedulerService.createIntent(mTestContext, TestTask.class));
-        assertTrue(task1.onDuplicatedTaskAddedCounter.invokedOnce());
-        mService.runNextTask();
-        verifyRanOnce(task1);
-        verifyNotRan(task2);
-        mService.runNextTask();
-        verifyRanOnce(task1);
-        verifyNotRan(task2);
-    }
-
-    @Test
-    public void testAddDuplicatedTaskAfterFirstCompleted() throws TimeoutException {
-        TestTask task1 = (TestTask) submitTask(
-                TaskSchedulerService.createIntent(mTestContext, TestTask.class));
-        mService.runNextTask();
-        verifyRanOnce(task1);
-        TestTask task2 = (TestTask) submitTask(
-                TaskSchedulerService.createIntent(mTestContext, TestTask.class));
-        assertTrue(task1.onDuplicatedTaskAddedCounter.neverInvoked());
-        mService.runNextTask();
-        verifyRanOnce(task2);
-    }
-
-    @Test
-    public void testAddMultipleTask() {
-        TestTask task1 = (TestTask) submitTask(
-                putTaskId(TaskSchedulerService.createIntent(mTestContext, TestTask.class),
-                        new TaskId(1, 0)));
-        TestTask task2 = (TestTask) submitTask(
-                putTaskId(TaskSchedulerService.createIntent(mTestContext, TestTask.class),
-                        new TaskId(2, 0)));
-        TestTask task3 = (TestTask) submitTask(
-                putTaskId(TaskSchedulerService.createIntent(mTestContext, TestTask.class),
-                        new TaskId(1, 1)));
-        assertTrue(task1.onDuplicatedTaskAddedCounter.neverInvoked());
-        mService.runNextTask();
-        verifyRanOnce(task1);
-        verifyNotRan(task2);
-        verifyNotRan(task3);
-        mService.runNextTask();
-        verifyRanOnce(task1);
-        verifyRanOnce(task2);
-        verifyNotRan(task3);
-        mService.runNextTask();
-        verifyRanOnce(task1);
-        verifyRanOnce(task2);
-        verifyRanOnce(task3);
-    }
-
-    @Test
-    public void testNotReady() {
-        TestTask task1 = (TestTask) submitTask(
-                putTaskId(TaskSchedulerService.createIntent(mTestContext, TestTask.class),
-                        new TaskId(1, 0)));
-        task1.readyInMilliseconds = 1000;
-        mService.runNextTask();
-        verifyNotRan(task1);
-        TestTask task2 = (TestTask) submitTask(
-                putTaskId(TaskSchedulerService.createIntent(mTestContext, TestTask.class),
-                        new TaskId(2, 0)));
-        mService.runNextTask();
-        verifyNotRan(task1);
-        verifyRanOnce(task2);
-        task1.readyInMilliseconds = 50;
-        mService.runNextTask();
-        verifyRanOnce(task1);
-        verifyRanOnce(task2);
-    }
-
-    @Test
-    public void testInvalidTaskId() {
-        Task task = mock(Task.class);
-        when(task.getId()).thenReturn(new TaskId(Task.TASK_INVALID, 0));
-        thrown.expect(AssertionError.class);
-        mService.addTask(task);
-    }
-
-    @Test
-    public void testDuplicatesAllowedTaskId() {
-        TestTask task1 = (TestTask) submitTask(
-                putTaskId(TaskSchedulerService.createIntent(mTestContext, TestTask.class),
-                        new TaskId(Task.TASK_ALLOW_DUPLICATES, 0)));
-        TestTask task2 = (TestTask) submitTask(
-                putTaskId(TaskSchedulerService.createIntent(mTestContext, TestTask.class),
-                        new TaskId(Task.TASK_ALLOW_DUPLICATES, 0)));
-        assertTrue(task1.onDuplicatedTaskAddedCounter.neverInvoked());
-        mService.runNextTask();
-        verifyRanOnce(task1);
-        verifyNotRan(task2);
-        mService.runNextTask();
-        verifyRanOnce(task1);
-        verifyRanOnce(task2);
-    }
-}
diff --git a/tests/src/com/android/phone/vvm/omtp/scheduling/TaskSchedulerServiceTestBase.java b/tests/src/com/android/phone/vvm/omtp/scheduling/TaskSchedulerServiceTestBase.java
deleted file mode 100644
index 63f5c2f..0000000
--- a/tests/src/com/android/phone/vvm/omtp/scheduling/TaskSchedulerServiceTestBase.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright (C) 2016 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.phone.vvm.omtp.scheduling;
-
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.os.IBinder;
-import android.os.Message;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.rule.ServiceTestRule;
-import android.support.test.runner.AndroidJUnit4;
-
-import com.android.phone.Assert;
-import com.android.phone.vvm.omtp.scheduling.Task.TaskId;
-import com.android.phone.vvm.omtp.scheduling.TaskSchedulerService.MainThreadHandler;
-import com.android.phone.vvm.omtp.scheduling.TaskSchedulerService.WorkerThreadHandler;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.rules.ExpectedException;
-import org.junit.runner.RunWith;
-
-import java.util.concurrent.TimeoutException;
-
-@RunWith(AndroidJUnit4.class)
-public class TaskSchedulerServiceTestBase {
-
-    private static final String EXTRA_ID = "test_extra_id";
-    private static final String EXTRA_SUB_ID = "test_extra_sub_id";
-
-    public TaskSchedulerService mService;
-
-    @Rule
-    public final ExpectedException thrown = ExpectedException.none();
-
-    @Rule
-    public final ServiceTestRule mServiceRule = new ServiceTestRule();
-
-    public Context mTargetContext;
-    public Context mTestContext;
-
-    private static boolean sIsMainThread = true;
-
-    private final TestMessageSender mMessageSender = new TestMessageSender();
-
-    public static Intent putTaskId(Intent intent, TaskId taskId) {
-        intent.putExtra(EXTRA_ID, taskId.id);
-        intent.putExtra(EXTRA_SUB_ID, taskId.subId);
-        return intent;
-    }
-
-    public static TaskId getTaskId(Intent intent) {
-        return new TaskId(intent.getIntExtra(EXTRA_ID, 0), intent.getIntExtra(EXTRA_SUB_ID, 0));
-    }
-
-    @Before
-    public void setUp() throws TimeoutException {
-        Assert.setIsMainThreadForTesting(true);
-        mTargetContext = InstrumentationRegistry.getTargetContext();
-        IBinder binder = null;
-        // bindService() might returns null on 2nd invocation because the service is not unbinded
-        // yet. See https://code.google.com/p/android/issues/detail?id=180396
-        while (binder == null) {
-            binder = mServiceRule
-                    .bindService(new Intent(mTargetContext, TaskSchedulerService.class));
-        }
-        mService = ((TaskSchedulerService.LocalBinder) binder).getService();
-        mTestContext = createTestContext(mTargetContext, mService);
-        mService.setMessageSenderForTest(mMessageSender);
-        mService.setTaskAutoRunDisabledForTest(true);
-        mService.setContextForTest(mTestContext);
-    }
-
-    @After
-    public void tearDown() {
-        Assert.setIsMainThreadForTesting(null);
-        mService.setTaskAutoRunDisabledForTest(false);
-        mService.clearTasksForTest();
-        mService.stopSelf();
-    }
-
-    public Task submitTask(Intent intent) {
-        Task task = mService.createTask(intent, 0, 0);
-        mService.addTask(task);
-        return task;
-    }
-
-    public static void verifyRanOnce(TestTask task) {
-        assertTrue(task.onBeforeExecuteCounter.invokedOnce());
-        assertTrue(task.executeCounter.invokedOnce());
-        assertTrue(task.onCompletedCounter.invokedOnce());
-    }
-
-    public static void verifyNotRan(TestTask task) {
-        assertTrue(task.onBeforeExecuteCounter.neverInvoked());
-        assertTrue(task.executeCounter.neverInvoked());
-        assertTrue(task.onCompletedCounter.neverInvoked());
-    }
-
-    public static class TestTask implements Task {
-
-        public int readyInMilliseconds;
-
-        private TaskId mId;
-
-        public final InvocationCounter onCreateCounter = new InvocationCounter();
-        public final InvocationCounter onBeforeExecuteCounter = new InvocationCounter();
-        public final InvocationCounter executeCounter = new InvocationCounter();
-        public final InvocationCounter onCompletedCounter = new InvocationCounter();
-        public final InvocationCounter onDuplicatedTaskAddedCounter = new InvocationCounter();
-
-        @Override
-        public void onCreate(Context context, Intent intent, int flags, int startId) {
-            onCreateCounter.invoke();
-            mId = getTaskId(intent);
-        }
-
-        @Override
-        public TaskId getId() {
-            return mId;
-        }
-
-        @Override
-        public long getReadyInMilliSeconds() {
-            Assert.isMainThread();
-            return readyInMilliseconds;
-        }
-
-        @Override
-        public void onBeforeExecute() {
-            Assert.isMainThread();
-            onBeforeExecuteCounter.invoke();
-        }
-
-        @Override
-        public void onExecuteInBackgroundThread() {
-            Assert.isNotMainThread();
-            executeCounter.invoke();
-        }
-
-        @Override
-        public void onCompleted() {
-            Assert.isMainThread();
-            onCompletedCounter.invoke();
-        }
-
-        @Override
-        public void onDuplicatedTaskAdded(Task task) {
-            Assert.isMainThread();
-            onDuplicatedTaskAddedCounter.invoke();
-        }
-    }
-
-    public static class InvocationCounter {
-
-        private int mCounter;
-
-        public void invoke() {
-            mCounter++;
-        }
-
-        public boolean invokedOnce() {
-            return mCounter == 1;
-        }
-
-        public boolean neverInvoked() {
-            return mCounter == 0;
-        }
-    }
-
-    private class TestMessageSender extends TaskSchedulerService.MessageSender {
-
-        @Override
-        public void send(Message message) {
-            if (message.getTarget() instanceof MainThreadHandler) {
-                Assert.setIsMainThreadForTesting(true);
-            } else if (message.getTarget() instanceof WorkerThreadHandler) {
-                Assert.setIsMainThreadForTesting(false);
-            } else {
-                throw new AssertionError("unexpected Handler " + message.getTarget());
-            }
-            message.getTarget().handleMessage(message);
-        }
-    }
-
-    public static void assertTrue(boolean condition) {
-        if (!condition) {
-            throw new AssertionError();
-        }
-    }
-
-    private static Context createTestContext(Context targetContext, TaskSchedulerService service) {
-        TestContext context = mock(TestContext.class);
-        when(context.getService()).thenReturn(service);
-        when(context.startService(any())).thenCallRealMethod();
-        when(context.getPackageName()).thenReturn(targetContext.getPackageName());
-        return context;
-    }
-
-    public abstract class TestContext extends Context {
-
-        @Override
-        public ComponentName startService(Intent service) {
-            getService().onStartCommand(service, 0, 0);
-            return null;
-        }
-
-        public abstract TaskSchedulerService getService();
-    }
-}
diff --git a/tests/src/com/android/services/telephony/ConferenceParticipantConnectionTest.java b/tests/src/com/android/services/telephony/ConferenceParticipantConnectionTest.java
new file mode 100644
index 0000000..73fe0af
--- /dev/null
+++ b/tests/src/com/android/services/telephony/ConferenceParticipantConnectionTest.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2017 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.services.telephony;
+
+import android.net.Uri;
+import android.support.test.runner.AndroidJUnit4;
+import android.telecom.Conference;
+import android.telecom.ConferenceParticipant;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static com.android.services.telephony.ConferenceParticipantConnection.getParticipantAddress;
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Tests proper parsing of conference event package participant addresses.
+ */
+@RunWith(AndroidJUnit4.class)
+public class ConferenceParticipantConnectionTest {
+
+    @Test
+    public void testParticipantParseSimpleTel() {
+        assertUrisEqual(Uri.parse("tel:+16505551212"),
+                getParticipantAddress(Uri.parse("tel:6505551212"), "US"));
+    }
+
+    @Test
+    public void testParticipantParseTelExtended() {
+        assertUrisEqual(Uri.parse("tel:+16505551212"),
+                getParticipantAddress(Uri.parse("tel:6505551212;phone-context=blah"), "US"));
+    }
+
+    @Test
+    public void testParticipantParseSip() {
+        assertUrisEqual(Uri.parse("tel:+16505551212"),
+                getParticipantAddress(Uri.parse("sip:16505551212;phone-context=blah.com@host.com"),
+                        "US"));
+    }
+
+    @Test
+    public void testParticipantParseSip2() {
+        assertUrisEqual(Uri.parse("tel:+12125551212"),
+                getParticipantAddress(Uri.parse("sip:+1-212-555-1212@something.com;user=phone"),
+                        "US"));
+    }
+
+    @Test
+    public void testParticipantParseTelJp() {
+        assertUrisEqual(Uri.parse("tel:+819066570660"),
+                getParticipantAddress(Uri.parse(
+                        "tel:09066570660;phone-context=ims.mnc020.mcc440.3gppnetwork.org"),
+                        "JP"));
+    }
+
+    @Test
+    public void testParticipantParseSipJp() {
+        assertUrisEqual(Uri.parse("tel:+819066571180"),
+                getParticipantAddress(Uri.parse(
+                        "sip:+819066571180@ims.mnc020.mcc440.3gppnetwork.org;user=phone"),
+                        "JP"));
+    }
+
+    private void assertUrisEqual(Uri expected, Uri actual) {
+        assertEquals(expected.getScheme(), actual.getScheme());
+        assertEquals(expected.getSchemeSpecificPart(), actual.getSchemeSpecificPart());
+    }
+}
diff --git a/tests/src/com/android/services/telephony/EmergencyCallStateListenerTest.java b/tests/src/com/android/services/telephony/EmergencyCallStateListenerTest.java
new file mode 100644
index 0000000..a9221e9
--- /dev/null
+++ b/tests/src/com/android/services/telephony/EmergencyCallStateListenerTest.java
@@ -0,0 +1,237 @@
+/*
+ * Copyright (C) 2016 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.services.telephony;
+
+import android.os.AsyncResult;
+import android.os.Handler;
+import android.telephony.ServiceState;
+import android.support.test.runner.AndroidJUnit4;
+import android.support.test.filters.FlakyTest;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import com.android.TelephonyTestBase;
+import com.android.internal.telephony.Phone;
+import com.android.internal.telephony.PhoneConstants;
+import com.android.internal.telephony.ServiceStateTracker;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+
+import static org.mockito.Matchers.anyBoolean;
+import static org.mockito.Matchers.isNull;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.eq;
+import static org.mockito.Mockito.when;
+
+/**
+ * Tests the EmergencyCallStateListener, which listens to one Phone and waits until its service
+ * state changes to accepting emergency calls or in service. If it can not find a tower to camp onto
+ * for emergency calls, then it will fail after a timeout period.
+ */
+@RunWith(AndroidJUnit4.class)
+public class EmergencyCallStateListenerTest extends TelephonyTestBase {
+
+    private static final long TIMEOUT_MS = 100;
+
+    @Mock Phone mMockPhone;
+    @Mock ServiceStateTracker mMockServiceStateTracker;
+    @Mock EmergencyCallStateListener.Callback mCallback;
+    EmergencyCallStateListener mListener;
+
+    @Before
+    public void setUp() throws Exception {
+        super.setUp();
+        mListener = new EmergencyCallStateListener();
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        mListener.getHandler().removeCallbacksAndMessages(null);
+        super.tearDown();
+    }
+
+    /**
+     * Ensure that we successfully register for the ServiceState changed messages in Telephony.
+     */
+    @Test
+    @SmallTest
+    public void testRegisterForCallback() {
+        mListener.waitForRadioOn(mMockPhone, mCallback);
+
+        waitForHandlerAction(mListener.getHandler(), TIMEOUT_MS);
+
+        verify(mMockPhone).unregisterForServiceStateChanged(any(Handler.class));
+        verify(mMockPhone).registerForServiceStateChanged(any(Handler.class),
+                eq(EmergencyCallStateListener.MSG_SERVICE_STATE_CHANGED), isNull());
+    }
+
+    /**
+     * Prerequisites:
+     *  - Phone is IN_SERVICE
+     *  - Radio is on
+     *
+     * Test: Send SERVICE_STATE_CHANGED message
+     *
+     * Result: callback's onComplete is called with the isRadioReady=true
+     */
+    @Test
+    @SmallTest
+    public void testPhoneChangeState_InService() {
+        ServiceState state = new ServiceState();
+        state.setState(ServiceState.STATE_IN_SERVICE);
+        when(mMockPhone.getState()).thenReturn(PhoneConstants.State.IDLE);
+        when(mMockPhone.getServiceStateTracker()).thenReturn(mMockServiceStateTracker);
+        when(mMockServiceStateTracker.isRadioOn()).thenReturn(true);
+        mListener.waitForRadioOn(mMockPhone, mCallback);
+        waitForHandlerAction(mListener.getHandler(), TIMEOUT_MS);
+
+        mListener.getHandler().obtainMessage(EmergencyCallStateListener.MSG_SERVICE_STATE_CHANGED,
+                new AsyncResult(null, state, null)).sendToTarget();
+
+        waitForHandlerAction(mListener.getHandler(), TIMEOUT_MS);
+        verify(mCallback).onComplete(eq(mListener), eq(true));
+    }
+
+    /**
+     * Prerequisites:
+     *  - Phone is OUT_OF_SERVICE (emergency calls only)
+     *  - Radio is on
+     *
+     * Test: Send SERVICE_STATE_CHANGED message
+     *
+     * Result: callback's onComplete is called with the isRadioReady=true
+     */
+    @Test
+    @SmallTest
+    public void testPhoneChangeState_EmergencyCalls() {
+        ServiceState state = new ServiceState();
+        state.setState(ServiceState.STATE_OUT_OF_SERVICE);
+        state.setEmergencyOnly(true);
+        when(mMockPhone.getState()).thenReturn(PhoneConstants.State.IDLE);
+        when(mMockPhone.getServiceState()).thenReturn(state);
+        when(mMockPhone.getServiceStateTracker()).thenReturn(mMockServiceStateTracker);
+        when(mMockServiceStateTracker.isRadioOn()).thenReturn(true);
+        mListener.waitForRadioOn(mMockPhone, mCallback);
+        waitForHandlerAction(mListener.getHandler(), TIMEOUT_MS);
+
+        mListener.getHandler().obtainMessage(EmergencyCallStateListener.MSG_SERVICE_STATE_CHANGED,
+                new AsyncResult(null, state, null)).sendToTarget();
+
+        waitForHandlerAction(mListener.getHandler(), TIMEOUT_MS);
+        verify(mCallback).onComplete(eq(mListener), eq(true));
+    }
+
+    /**
+     * Prerequisites:
+     *  - Phone is OUT_OF_SERVICE
+     *  - Radio is on
+     *
+     * Test: Send SERVICE_STATE_CHANGED message
+     *
+     * Result: callback's onComplete is called with the isRadioReady=true. Even though the radio is
+     * not reporting emergency calls only, we still send onComplete so that the radio can trigger
+     * the emergency call.
+     */
+    @Test
+    @SmallTest
+    public void testPhoneChangeState_OutOfService() {
+        ServiceState state = new ServiceState();
+        state.setState(ServiceState.STATE_OUT_OF_SERVICE);
+        when(mMockPhone.getState()).thenReturn(PhoneConstants.State.IDLE);
+        when(mMockPhone.getServiceState()).thenReturn(state);
+        when(mMockPhone.getServiceStateTracker()).thenReturn(mMockServiceStateTracker);
+        when(mMockServiceStateTracker.isRadioOn()).thenReturn(true);
+        mListener.waitForRadioOn(mMockPhone, mCallback);
+        waitForHandlerAction(mListener.getHandler(), TIMEOUT_MS);
+
+        // Still expect an answer because we will be sending the onComplete message as soon as the
+        // radio is confirmed to be on, whether or not it is out of service or not.
+        mListener.getHandler().obtainMessage(EmergencyCallStateListener.MSG_SERVICE_STATE_CHANGED,
+                new AsyncResult(null, state, null)).sendToTarget();
+
+        waitForHandlerAction(mListener.getHandler(), TIMEOUT_MS);
+        verify(mCallback).onComplete(eq(mListener), eq(true));
+    }
+
+    /**
+     * Prerequisites:
+     *  - Phone is OUT_OF_SERVICE (emergency calls only)
+     *  - Radio is on
+     *
+     * Test: Wait for retry timer to complete (don't send ServiceState changed message)
+     *
+     * Result: callback's onComplete is called with the isRadioReady=true.
+     */
+    @Test
+    @FlakyTest
+    @SmallTest
+    public void testTimeout_EmergencyCalls() {
+        ServiceState state = new ServiceState();
+        state.setState(ServiceState.STATE_OUT_OF_SERVICE);
+        state.setEmergencyOnly(true);
+        when(mMockPhone.getState()).thenReturn(PhoneConstants.State.IDLE);
+        when(mMockPhone.getServiceState()).thenReturn(state);
+        when(mMockPhone.getServiceStateTracker()).thenReturn(mMockServiceStateTracker);
+        when(mMockServiceStateTracker.isRadioOn()).thenReturn(true);
+        mListener.setTimeBetweenRetriesMillis(100);
+
+        // Wait for the timer to expire and check state manually in onRetryTimeout
+        mListener.waitForRadioOn(mMockPhone, mCallback);
+        waitForHandlerActionDelayed(mListener.getHandler(), TIMEOUT_MS, 500);
+
+        verify(mCallback).onComplete(eq(mListener), eq(true));
+    }
+
+    /**
+     * Prerequisites:
+     *  - Phone is OUT_OF_SERVICE
+     *  - Radio is off
+     *
+     * Test: Wait for retry timer to complete, no ServiceState changed messages received.
+     *
+     * Result:
+     * - callback's onComplete is called with the isRadioReady=false.
+     * - setRadioPower was send twice (tried to turn on the radio)
+     */
+    @Test
+    @FlakyTest
+    @SmallTest
+    public void testTimeout_RetryFailure() {
+        ServiceState state = new ServiceState();
+        state.setState(ServiceState.STATE_POWER_OFF);
+        when(mMockPhone.getState()).thenReturn(PhoneConstants.State.IDLE);
+        when(mMockPhone.getServiceState()).thenReturn(state);
+        when(mMockPhone.getServiceStateTracker()).thenReturn(mMockServiceStateTracker);
+        when(mMockServiceStateTracker.isRadioOn()).thenReturn(false);
+        mListener.setTimeBetweenRetriesMillis(50);
+        mListener.setMaxNumRetries(2);
+
+        // Wait for the timer to expire and check state manually in onRetryTimeout
+        mListener.waitForRadioOn(mMockPhone, mCallback);
+        waitForHandlerActionDelayed(mListener.getHandler(), TIMEOUT_MS, 500);
+
+        verify(mCallback).onComplete(eq(mListener), eq(false));
+        verify(mMockPhone, times(2)).setRadioPower(eq(true));
+    }
+
+}
diff --git a/tests/src/com/android/services/telephony/ImsConferenceControllerTest.java b/tests/src/com/android/services/telephony/ImsConferenceControllerTest.java
new file mode 100644
index 0000000..3d88af7
--- /dev/null
+++ b/tests/src/com/android/services/telephony/ImsConferenceControllerTest.java
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2016 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.services.telephony;
+
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.times;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
+
+import android.os.Looper;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import com.android.internal.telephony.PhoneConstants;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+
+/**
+ * Tests the functionality in ImsConferenceController.java
+ */
+
+public class ImsConferenceControllerTest {
+
+    @Mock
+    private TelephonyConnectionServiceProxy mMockTelephonyConnectionServiceProxy;
+
+    private TelecomAccountRegistry mTelecomAccountRegistry;
+
+    private MockTelephonyConnection mMockTelephonyConnectionA;
+    private MockTelephonyConnection mMockTelephonyConnectionB;
+
+    private ImsConferenceController mControllerTest;
+
+    @Before
+    public void setUp() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        if (Looper.myLooper() == null) {
+            Looper.prepare();
+        }
+        mTelecomAccountRegistry = TelecomAccountRegistry.getInstance(null);
+        mMockTelephonyConnectionA = new MockTelephonyConnection();
+        mMockTelephonyConnectionB = new MockTelephonyConnection();
+
+        mControllerTest = new ImsConferenceController(mTelecomAccountRegistry,
+                mMockTelephonyConnectionServiceProxy);
+    }
+
+    /**
+     * Behavior: add telephony connections B and A to conference controller,
+     *           set status for connections, remove one call
+     * Assumption: after performing the behaviors, the status of Connection A is STATE_ACTIVE;
+     *             the status of Connection B is STATE_HOLDING
+     * Expected: Connection A and Connection B are conferenceable with each other;
+     *           Connection B is not conferenceable with Connection A after A is removed;
+     *           addConference for ImsConference is not called
+     */
+    @Test
+    @SmallTest
+    public void testConferenceable() {
+
+        mControllerTest.add(mMockTelephonyConnectionB);
+        mControllerTest.add(mMockTelephonyConnectionA);
+
+        mMockTelephonyConnectionA.setActive();
+        mMockTelephonyConnectionB.setOnHold();
+
+        assertTrue(mMockTelephonyConnectionA.getConferenceables()
+                .contains(mMockTelephonyConnectionB));
+        assertTrue(mMockTelephonyConnectionB.getConferenceables()
+                .contains(mMockTelephonyConnectionA));
+
+        // verify addConference method is never called
+        verify(mMockTelephonyConnectionServiceProxy, never())
+                .addConference(any(ImsConference.class));
+
+        // call A removed
+        mControllerTest.remove(mMockTelephonyConnectionA);
+        assertFalse(mMockTelephonyConnectionB.getConferenceables()
+                .contains(mMockTelephonyConnectionA));
+    }
+
+    /**
+     * Behavior: add telephony connection B and A to conference controller,
+     *           set status for merged connections
+     * Assumption: after performing the behaviors, the status of Connection A is STATE_ACTIVE;
+     *             the status of Connection B is STATE_HOLDING;
+     *             getPhoneType() in the original connection of the telephony connection
+     *             is PhoneConstants.PHONE_TYPE_IMS
+     * Expected: addConference for ImsConference is called twice
+     */
+    @Test
+    @SmallTest
+    public void testMergeMultiPartyCalls() {
+
+        when(mMockTelephonyConnectionA.mMockRadioConnection.getPhoneType())
+                .thenReturn(PhoneConstants.PHONE_TYPE_IMS);
+        when(mMockTelephonyConnectionB.mMockRadioConnection.getPhoneType())
+                .thenReturn(PhoneConstants.PHONE_TYPE_IMS);
+        when(mMockTelephonyConnectionA.mMockRadioConnection.isMultiparty()).thenReturn(true);
+        when(mMockTelephonyConnectionB.mMockRadioConnection.isMultiparty()).thenReturn(true);
+
+        mControllerTest.add(mMockTelephonyConnectionB);
+        mControllerTest.add(mMockTelephonyConnectionA);
+
+        mMockTelephonyConnectionA.setActive();
+        mMockTelephonyConnectionB.setOnHold();
+
+        verify(mMockTelephonyConnectionServiceProxy, times(2))
+                .addConference(any(ImsConference.class));
+
+    }
+}
diff --git a/tests/src/com/android/services/telephony/MockTelephonyConnection.java b/tests/src/com/android/services/telephony/MockTelephonyConnection.java
new file mode 100644
index 0000000..b2d6ed8
--- /dev/null
+++ b/tests/src/com/android/services/telephony/MockTelephonyConnection.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2016 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.services.telephony;
+
+import static org.mockito.Mockito.when;
+
+import com.android.internal.telephony.Call;
+import com.android.internal.telephony.Phone;
+
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+/**
+ * Mock Telephony Connection used in TelephonyConferenceController.java for testing purpose
+ */
+
+public class MockTelephonyConnection extends TelephonyConnection {
+
+    @Mock
+    com.android.internal.telephony.Connection mMockRadioConnection;
+
+    @Mock
+    Call mMockCall;
+
+    @Mock
+    Phone mMockPhone;
+
+    @Override
+    public com.android.internal.telephony.Connection getOriginalConnection() {
+        return mMockRadioConnection;
+    }
+
+    public MockTelephonyConnection() {
+        super(null, null);
+        MockitoAnnotations.initMocks(this);
+
+        // Set up mMockRadioConnection and mMockPhone to contain an active call
+        when(mMockRadioConnection.getState()).thenReturn(Call.State.ACTIVE);
+        when(mMockRadioConnection.getCall()).thenReturn(mMockCall);
+        when(mMockPhone.getRingingCall()).thenReturn(mMockCall);
+        when(mMockCall.getState()).thenReturn(Call.State.ACTIVE);
+    }
+
+    @Override
+    public boolean isConferenceSupported() {
+        return true;
+    }
+
+    @Override
+    public Phone getPhone() {
+        return mMockPhone;
+    }
+
+    public TelephonyConnection cloneConnection() {
+        return this;
+    }
+
+}
diff --git a/tests/src/com/android/services/telephony/RadioOnStateListenerTest.java b/tests/src/com/android/services/telephony/RadioOnStateListenerTest.java
deleted file mode 100644
index a8142e1..0000000
--- a/tests/src/com/android/services/telephony/RadioOnStateListenerTest.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (C) 2016 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.services.telephony;
-
-import android.os.AsyncResult;
-import android.os.Handler;
-import android.telephony.ServiceState;
-import android.support.test.runner.AndroidJUnit4;
-
-import com.android.TelephonyTestBase;
-import com.android.internal.telephony.Phone;
-import com.android.internal.telephony.PhoneConstants;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-
-import static org.mockito.Matchers.anyBoolean;
-import static org.mockito.Matchers.isNull;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.when;
-
-/**
- * Tests the RadioOnStateListener, which listens to one Phone and waits until its service
- * state changes to accepting emergency calls or in service. If it can not find a tower to camp onto
- * for emergency calls, then it will fail after a timeout period.
- */
-@RunWith(AndroidJUnit4.class)
-public class RadioOnStateListenerTest extends TelephonyTestBase {
-
-    private static final long TIMEOUT_MS = 100;
-
-    @Mock Phone mMockPhone;
-    @Mock RadioOnStateListener.Callback mCallback;
-    RadioOnStateListener mListener;
-
-    @Before
-    public void setUp() throws Exception {
-        super.setUp();
-        mListener = new RadioOnStateListener();
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        mListener.getHandler().removeCallbacksAndMessages(null);
-        super.tearDown();
-    }
-
-    @Test
-    public void testRegisterForCallback() {
-        mListener.waitForRadioOn(mMockPhone, mCallback);
-
-        waitForHandlerAction(mListener.getHandler(), TIMEOUT_MS);
-
-        verify(mMockPhone).unregisterForServiceStateChanged(any(Handler.class));
-        verify(mMockPhone).registerForServiceStateChanged(any(Handler.class),
-                eq(RadioOnStateListener.MSG_SERVICE_STATE_CHANGED), isNull());
-    }
-
-    @Test
-    public void testPhoneChangeState_InService() {
-        ServiceState state = new ServiceState();
-        state.setState(ServiceState.STATE_IN_SERVICE);
-        when(mMockPhone.getState()).thenReturn(PhoneConstants.State.IDLE);
-        mListener.waitForRadioOn(mMockPhone, mCallback);
-        waitForHandlerAction(mListener.getHandler(), TIMEOUT_MS);
-
-        mListener.getHandler().obtainMessage(RadioOnStateListener.MSG_SERVICE_STATE_CHANGED,
-                new AsyncResult(null, state, null)).sendToTarget();
-
-        waitForHandlerAction(mListener.getHandler(), TIMEOUT_MS);
-        verify(mCallback).onComplete(eq(mListener), eq(true));
-    }
-
-    @Test
-    public void testPhoneChangeState_EmergencyCalls() {
-        ServiceState state = new ServiceState();
-        state.setState(ServiceState.STATE_OUT_OF_SERVICE);
-        state.setEmergencyOnly(true);
-        when(mMockPhone.getState()).thenReturn(PhoneConstants.State.IDLE);
-        when(mMockPhone.getServiceState()).thenReturn(state);
-        mListener.waitForRadioOn(mMockPhone, mCallback);
-        waitForHandlerAction(mListener.getHandler(), TIMEOUT_MS);
-
-        mListener.getHandler().obtainMessage(RadioOnStateListener.MSG_SERVICE_STATE_CHANGED,
-                new AsyncResult(null, state, null)).sendToTarget();
-
-        waitForHandlerAction(mListener.getHandler(), TIMEOUT_MS);
-        verify(mCallback).onComplete(eq(mListener), eq(true));
-    }
-
-    @Test
-    public void testPhoneChangeState_OutOfService() {
-        ServiceState state = new ServiceState();
-        state.setState(ServiceState.STATE_OUT_OF_SERVICE);
-        when(mMockPhone.getState()).thenReturn(PhoneConstants.State.IDLE);
-        when(mMockPhone.getServiceState()).thenReturn(state);
-        mListener.waitForRadioOn(mMockPhone, mCallback);
-        waitForHandlerAction(mListener.getHandler(), TIMEOUT_MS);
-
-        // Don't expect any answer, since it is not the one that we want and the timeout for giving
-        // up hasn't expired yet.
-        mListener.getHandler().obtainMessage(RadioOnStateListener.MSG_SERVICE_STATE_CHANGED,
-                new AsyncResult(null, state, null)).sendToTarget();
-
-        waitForHandlerAction(mListener.getHandler(), TIMEOUT_MS);
-        verify(mCallback, never()).onComplete(any(RadioOnStateListener.class), anyBoolean());
-    }
-
-    @Test
-    public void testTimeout_EmergencyCalls() {
-        ServiceState state = new ServiceState();
-        state.setState(ServiceState.STATE_OUT_OF_SERVICE);
-        state.setEmergencyOnly(true);
-        when(mMockPhone.getState()).thenReturn(PhoneConstants.State.IDLE);
-        when(mMockPhone.getServiceState()).thenReturn(state);
-        mListener.waitForRadioOn(mMockPhone, mCallback);
-        mListener.setTimeBetweenRetriesMillis(500);
-
-        // Wait for the timer to expire and check state manually in onRetryTimeout
-        waitForHandlerActionDelayed(mListener.getHandler(), TIMEOUT_MS, 600);
-
-        verify(mCallback).onComplete(eq(mListener), eq(true));
-    }
-
-    @Test
-    public void testTimeout_RetryFailure() {
-        ServiceState state = new ServiceState();
-        state.setState(ServiceState.STATE_POWER_OFF);
-        when(mMockPhone.getState()).thenReturn(PhoneConstants.State.IDLE);
-        when(mMockPhone.getServiceState()).thenReturn(state);
-        mListener.waitForRadioOn(mMockPhone, mCallback);
-        mListener.setTimeBetweenRetriesMillis(100);
-        mListener.setMaxNumRetries(2);
-
-        // Wait for the timer to expire and check state manually in onRetryTimeout
-        waitForHandlerActionDelayed(mListener.getHandler(), TIMEOUT_MS, 600);
-
-        verify(mCallback).onComplete(eq(mListener), eq(false));
-        verify(mMockPhone, times(2)).setRadioPower(eq(true));
-    }
-
-}
diff --git a/tests/src/com/android/services/telephony/TelephonyConferenceControllerTest.java b/tests/src/com/android/services/telephony/TelephonyConferenceControllerTest.java
new file mode 100644
index 0000000..739359a
--- /dev/null
+++ b/tests/src/com/android/services/telephony/TelephonyConferenceControllerTest.java
@@ -0,0 +1,176 @@
+/*
+ * Copyright (C) 2016 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.services.telephony;
+
+import android.os.Looper;
+import android.telecom.Conference;
+import android.telecom.Connection;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.mockito.ArgumentCaptor;
+
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.any;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+/**
+ * Tests the functionality in TelephonyConferenceController.java
+ * Assumption: these tests are based on setting status manually
+ */
+
+public class TelephonyConferenceControllerTest {
+
+    @Mock
+    private TelephonyConnectionServiceProxy mMockTelephonyConnectionServiceProxy;
+
+    @Mock
+    private Conference.Listener mMockListener;
+
+    private MockTelephonyConnection mMockTelephonyConnectionA;
+    private MockTelephonyConnection mMockTelephonyConnectionB;
+
+    private TelephonyConferenceController mControllerTest;
+
+    @Before
+    public void setUp() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        if (Looper.myLooper() == null) {
+            Looper.prepare();
+        }
+        mMockTelephonyConnectionA = new MockTelephonyConnection();
+        mMockTelephonyConnectionB = new MockTelephonyConnection();
+
+        mControllerTest = new TelephonyConferenceController(mMockTelephonyConnectionServiceProxy);
+    }
+
+    /**
+     * Behavior: add telephony connections B and A to conference controller,
+     *           set status for connections and calls, remove one call
+     * Assumption: after performing the behaviours, the status of Connection A is STATE_ACTIVE;
+     *             the status of Connection B is STATE_HOLDING;
+     *             the call in the original connection is Call.State.ACTIVE;
+     *             isMultiparty of the call is false;
+     *             isConferenceSupported of the connection is True
+     * Expected: Connection A and Connection B are conferenceable with each other
+     */
+    @Test
+    @SmallTest
+    public void testConferenceable() {
+
+        when(mMockTelephonyConnectionA.mMockRadioConnection.getCall()
+                .isMultiparty()).thenReturn(false);
+        when(mMockTelephonyConnectionB.mMockRadioConnection.getCall()
+                .isMultiparty()).thenReturn(false);
+
+        // add telephony connection B
+        mControllerTest.add(mMockTelephonyConnectionB);
+
+        // add telephony connection A
+        mControllerTest.add(mMockTelephonyConnectionA);
+
+        mMockTelephonyConnectionA.setActive();
+        mMockTelephonyConnectionB.setOnHold();
+
+        assertTrue(mMockTelephonyConnectionA.getConferenceables()
+                .contains(mMockTelephonyConnectionB));
+        assertTrue(mMockTelephonyConnectionB.getConferenceables()
+                .contains(mMockTelephonyConnectionA));
+
+        // verify addConference method is never called
+        verify(mMockTelephonyConnectionServiceProxy, never())
+                .addConference(any(TelephonyConference.class));
+
+        // call A removed
+        mControllerTest.remove(mMockTelephonyConnectionA);
+        assertFalse(mMockTelephonyConnectionB.getConferenceables()
+                .contains(mMockTelephonyConnectionA));
+    }
+
+    /**
+     * Behavior: add telephony connection B and A to conference controller,
+     *           set status for connections and merged calls, remove one call
+     * Assumption: after performing the behaviours, the status of Connection A is STATE_ACTIVE;
+     *             the status of Connection B is STATE_HOLDING;
+     *             the call in the original connection is Call.State.ACTIVE;
+     *             isMultiparty of the call is True;
+     *             isConferenceSupported of the connection is True
+     * Expected: Connection A and Connection B are conferenceable with each other
+     *           addConference is called
+     */
+    @Test
+    @SmallTest
+    public void testMergeMultiPartyCalls() {
+
+        // set isMultiparty() true to create the same senario of merge behaviour
+        when(mMockTelephonyConnectionA.mMockRadioConnection.getCall()
+                .isMultiparty()).thenReturn(true);
+        when(mMockTelephonyConnectionB.mMockRadioConnection.getCall()
+                .isMultiparty()).thenReturn(true);
+
+        // Add connections into connection Service
+        Collection<Connection> allConnections = new ArrayList<Connection>();
+        allConnections.add(mMockTelephonyConnectionA);
+        allConnections.add(mMockTelephonyConnectionB);
+        when(mMockTelephonyConnectionServiceProxy.getAllConnections())
+                .thenReturn(allConnections);
+
+        // add telephony connection B
+        mControllerTest.add(mMockTelephonyConnectionB);
+
+        // add telephony connection A
+        mControllerTest.add(mMockTelephonyConnectionA);
+
+        mMockTelephonyConnectionA.setActive();
+        mMockTelephonyConnectionB.setOnHold();
+
+        assertTrue(mMockTelephonyConnectionA.getConferenceables()
+                .contains(mMockTelephonyConnectionB));
+        assertTrue(mMockTelephonyConnectionB.getConferenceables()
+                .contains(mMockTelephonyConnectionA));
+
+        // capture the argument in the addConference method, and verify it is called
+        ArgumentCaptor<TelephonyConference> argumentCaptor = ArgumentCaptor.
+                forClass(TelephonyConference.class);
+        verify(mMockTelephonyConnectionServiceProxy).addConference(argumentCaptor.capture());
+
+        // add a listener to the added conference
+        argumentCaptor.getValue().addListener(mMockListener);
+
+        verify(mMockListener, never()).onDestroyed(any(Conference.class));
+
+        // call A removed
+        mControllerTest.remove(mMockTelephonyConnectionA);
+        assertFalse(mMockTelephonyConnectionB.getConferenceables()
+                .contains(mMockTelephonyConnectionA));
+
+        //onDestroy should be called during the destroy
+        verify(mMockListener).onDestroyed(any(Conference.class));
+    }
+}
diff --git a/tests/src/com/android/services/telephony/TelephonyConnectionServiceTest.java b/tests/src/com/android/services/telephony/TelephonyConnectionServiceTest.java
new file mode 100644
index 0000000..45f74df
--- /dev/null
+++ b/tests/src/com/android/services/telephony/TelephonyConnectionServiceTest.java
@@ -0,0 +1,527 @@
+/*
+ * Copyright (C) 2016 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.services.telephony;
+
+import android.telephony.RadioAccessFamily;
+import android.telephony.ServiceState;
+import android.support.test.runner.AndroidJUnit4;
+import android.telephony.TelephonyManager;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import com.android.TelephonyTestBase;
+import com.android.internal.telephony.Phone;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+
+import static junit.framework.Assert.assertEquals;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+/**
+ * Unit tests for TelephonyConnectionService.
+ */
+
+@RunWith(AndroidJUnit4.class)
+public class TelephonyConnectionServiceTest extends TelephonyTestBase {
+
+    private static final int SLOT_0_PHONE_ID = 0;
+    private static final int SLOT_1_PHONE_ID = 1;
+
+    @Mock TelephonyConnectionService.TelephonyManagerProxy mTelephonyManagerProxy;
+    @Mock TelephonyConnectionService.SubscriptionManagerProxy mSubscriptionManagerProxy;
+    @Mock TelephonyConnectionService.PhoneFactoryProxy mPhoneFactoryProxy;
+
+    TelephonyConnectionService mTestConnectionService;
+
+    @Before
+    public void setUp() throws Exception {
+        super.setUp();
+        mTestConnectionService = new TelephonyConnectionService();
+        mTestConnectionService.setPhoneFactoryProxy(mPhoneFactoryProxy);
+        mTestConnectionService.setTelephonyManagerProxy(mTelephonyManagerProxy);
+        mTestConnectionService.setSubscriptionManagerProxy(mSubscriptionManagerProxy);
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        mTestConnectionService = null;
+        super.tearDown();
+    }
+
+    /**
+     * Prerequisites:
+     * - MSIM Device, two slots with SIMs inserted
+     * - Users default Voice SIM choice is IN_SERVICE
+     *
+     * Result: getFirstPhoneForEmergencyCall returns the default Voice SIM choice.
+     */
+    @Test
+    @SmallTest
+    public void testDefaultVoiceSimInService() {
+        Phone slot0Phone = makeTestPhone(SLOT_0_PHONE_ID, ServiceState.STATE_IN_SERVICE,
+                false /*isEmergencyOnly*/);
+        Phone slot1Phone = makeTestPhone(SLOT_1_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                true /*isEmergencyOnly*/);
+        setDefaultPhone(slot0Phone);
+        setupDeviceConfig(slot0Phone, slot1Phone, SLOT_0_PHONE_ID);
+
+        Phone resultPhone = mTestConnectionService.getFirstPhoneForEmergencyCall();
+
+        assertEquals(slot0Phone, resultPhone);
+    }
+
+    /**
+     * Prerequisites:
+     * - MSIM Device, two slots with SIMs inserted
+     * - Slot 0 is OUT_OF_SERVICE, Slot 1 is OUT_OF_SERVICE (emergency calls only)
+     *
+     * Result: getFirstPhoneForEmergencyCall returns the slot 1 phone
+     */
+    @Test
+    @SmallTest
+    public void testSlot1EmergencyOnly() {
+        Phone slot0Phone = makeTestPhone(SLOT_0_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        Phone slot1Phone = makeTestPhone(SLOT_1_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                true /*isEmergencyOnly*/);
+        setDefaultPhone(slot0Phone);
+        setupDeviceConfig(slot0Phone, slot1Phone, SLOT_0_PHONE_ID);
+
+        Phone resultPhone = mTestConnectionService.getFirstPhoneForEmergencyCall();
+
+        assertEquals(slot1Phone, resultPhone);
+    }
+
+    /**
+     * Prerequisites:
+     * - MSIM Device, two slots with SIMs inserted
+     * - Slot 0 is OUT_OF_SERVICE, Slot 1 is IN_SERVICE
+     *
+     * Result: getFirstPhoneForEmergencyCall returns the slot 1 phone
+     */
+    @Test
+    @SmallTest
+    public void testSlot1InService() {
+        Phone slot0Phone = makeTestPhone(SLOT_0_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        Phone slot1Phone = makeTestPhone(SLOT_1_PHONE_ID, ServiceState.STATE_IN_SERVICE,
+                false /*isEmergencyOnly*/);
+        setDefaultPhone(slot0Phone);
+        setupDeviceConfig(slot0Phone, slot1Phone, SLOT_0_PHONE_ID);
+
+        Phone resultPhone = mTestConnectionService.getFirstPhoneForEmergencyCall();
+
+        assertEquals(slot1Phone, resultPhone);
+    }
+
+    /**
+     * Prerequisites:
+     * - MSIM Device, two slots with SIMs inserted
+     * - Slot 0 is PUK locked, Slot 1 is ready
+     * - Slot 0 is LTE capable, Slot 1 is GSM capable
+     *
+     * Result: getFirstPhoneForEmergencyCall returns the slot 1 phone. Although Slot 0 is more
+     * capable, it is locked, so use the other slot.
+     */
+    @Test
+    @SmallTest
+    public void testSlot0PukLocked() {
+        Phone slot0Phone = makeTestPhone(SLOT_0_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        Phone slot1Phone = makeTestPhone(SLOT_1_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        setDefaultPhone(slot0Phone);
+        setupDeviceConfig(slot0Phone, slot1Phone, SLOT_0_PHONE_ID);
+        // Set Slot 0 to be PUK locked
+        setPhoneSlotState(SLOT_0_PHONE_ID, TelephonyManager.SIM_STATE_PUK_REQUIRED);
+        setPhoneSlotState(SLOT_1_PHONE_ID, TelephonyManager.SIM_STATE_READY);
+        // Make Slot 0 higher capability
+        setPhoneRadioAccessFamily(slot0Phone, RadioAccessFamily.RAF_LTE);
+        setPhoneRadioAccessFamily(slot1Phone, RadioAccessFamily.RAF_GSM);
+
+        Phone resultPhone = mTestConnectionService.getFirstPhoneForEmergencyCall();
+
+        assertEquals(slot1Phone, resultPhone);
+    }
+
+    /**
+     * Prerequisites:
+     * - MSIM Device, two slots with SIMs inserted
+     * - Slot 0 is PIN locked, Slot 1 is ready
+     * - Slot 0 is LTE capable, Slot 1 is GSM capable
+     *
+     * Result: getFirstPhoneForEmergencyCall returns the slot 1 phone. Although Slot 0 is more
+     * capable, it is locked, so use the other slot.
+     */
+    @Test
+    @SmallTest
+    public void testSlot0PinLocked() {
+        Phone slot0Phone = makeTestPhone(SLOT_0_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        Phone slot1Phone = makeTestPhone(SLOT_1_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        setDefaultPhone(slot0Phone);
+        setupDeviceConfig(slot0Phone, slot1Phone, SLOT_0_PHONE_ID);
+        // Set Slot 0 to be PUK locked
+        setPhoneSlotState(SLOT_0_PHONE_ID, TelephonyManager.SIM_STATE_PIN_REQUIRED);
+        setPhoneSlotState(SLOT_1_PHONE_ID, TelephonyManager.SIM_STATE_READY);
+        // Make Slot 0 higher capability
+        setPhoneRadioAccessFamily(slot0Phone, RadioAccessFamily.RAF_LTE);
+        setPhoneRadioAccessFamily(slot1Phone, RadioAccessFamily.RAF_GSM);
+
+        Phone resultPhone = mTestConnectionService.getFirstPhoneForEmergencyCall();
+
+        assertEquals(slot1Phone, resultPhone);
+    }
+
+    /**
+     * Prerequisites:
+     * - MSIM Device, two slots with SIMs inserted
+     * - Slot 1 is PUK locked, Slot 0 is ready
+     * - Slot 1 is LTE capable, Slot 0 is GSM capable
+     *
+     * Result: getFirstPhoneForEmergencyCall returns the slot 0 phone. Although Slot 1 is more
+     * capable, it is locked, so use the other slot.
+     */
+    @Test
+    @SmallTest
+    public void testSlot1PukLocked() {
+        Phone slot0Phone = makeTestPhone(SLOT_0_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        Phone slot1Phone = makeTestPhone(SLOT_1_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        setDefaultPhone(slot0Phone);
+        setupDeviceConfig(slot0Phone, slot1Phone, SLOT_0_PHONE_ID);
+        // Set Slot 1 to be PUK locked
+        setPhoneSlotState(SLOT_0_PHONE_ID, TelephonyManager.SIM_STATE_READY);
+        setPhoneSlotState(SLOT_1_PHONE_ID, TelephonyManager.SIM_STATE_PUK_REQUIRED);
+        // Make Slot 1 higher capability
+        setPhoneRadioAccessFamily(slot0Phone, RadioAccessFamily.RAF_GSM);
+        setPhoneRadioAccessFamily(slot1Phone, RadioAccessFamily.RAF_LTE);
+
+        Phone resultPhone = mTestConnectionService.getFirstPhoneForEmergencyCall();
+
+        assertEquals(slot0Phone, resultPhone);
+    }
+
+    /**
+     * Prerequisites:
+     * - MSIM Device, two slots with SIMs inserted
+     * - Slot 1 is PIN locked, Slot 0 is ready
+     * - Slot 1 is LTE capable, Slot 0 is GSM capable
+     *
+     * Result: getFirstPhoneForEmergencyCall returns the slot 0 phone. Although Slot 1 is more
+     * capable, it is locked, so use the other slot.
+     */
+    @Test
+    @SmallTest
+    public void testSlot1PinLocked() {
+        Phone slot0Phone = makeTestPhone(SLOT_0_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        Phone slot1Phone = makeTestPhone(SLOT_1_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        setDefaultPhone(slot0Phone);
+        setupDeviceConfig(slot0Phone, slot1Phone, SLOT_0_PHONE_ID);
+        // Set Slot 1 to be PUK locked
+        setPhoneSlotState(SLOT_0_PHONE_ID, TelephonyManager.SIM_STATE_READY);
+        setPhoneSlotState(SLOT_1_PHONE_ID, TelephonyManager.SIM_STATE_PIN_REQUIRED);
+        // Make Slot 1 higher capability
+        setPhoneRadioAccessFamily(slot0Phone, RadioAccessFamily.RAF_GSM);
+        setPhoneRadioAccessFamily(slot1Phone, RadioAccessFamily.RAF_LTE);
+
+        Phone resultPhone = mTestConnectionService.getFirstPhoneForEmergencyCall();
+
+        assertEquals(slot0Phone, resultPhone);
+    }
+
+    /**
+     * Prerequisites:
+     * - MSIM Device, two slots with SIMs inserted
+     * - Slot 1 is LTE capable, Slot 0 is GSM capable
+     *
+     * Result: getFirstPhoneForEmergencyCall returns the slot 1 phone because it is more capable
+     */
+    @Test
+    @SmallTest
+    public void testSlot1HigherCapablity() {
+        Phone slot0Phone = makeTestPhone(SLOT_0_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        Phone slot1Phone = makeTestPhone(SLOT_1_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        setDefaultPhone(slot0Phone);
+        setupDeviceConfig(slot0Phone, slot1Phone, SLOT_0_PHONE_ID);
+        setPhoneSlotState(SLOT_0_PHONE_ID, TelephonyManager.SIM_STATE_READY);
+        setPhoneSlotState(SLOT_1_PHONE_ID, TelephonyManager.SIM_STATE_READY);
+        // Make Slot 1 higher capability
+        setPhoneRadioAccessFamily(slot0Phone, RadioAccessFamily.RAF_GSM);
+        setPhoneRadioAccessFamily(slot1Phone, RadioAccessFamily.RAF_LTE);
+
+        Phone resultPhone = mTestConnectionService.getFirstPhoneForEmergencyCall();
+
+        assertEquals(slot1Phone, resultPhone);
+    }
+
+    /**
+     * Prerequisites:
+     * - MSIM Device, two slots with SIMs inserted
+     * - Slot 1 is GSM/LTE capable, Slot 0 is GSM capable
+     *
+     * Result: getFirstPhoneForEmergencyCall returns the slot 1 phone because it has more
+     * capabilities.
+     */
+    @Test
+    @SmallTest
+    public void testSlot1MoreCapabilities() {
+        Phone slot0Phone = makeTestPhone(SLOT_0_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        Phone slot1Phone = makeTestPhone(SLOT_1_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        setDefaultPhone(slot0Phone);
+        setupDeviceConfig(slot0Phone, slot1Phone, SLOT_0_PHONE_ID);
+        setPhoneSlotState(SLOT_0_PHONE_ID, TelephonyManager.SIM_STATE_READY);
+        setPhoneSlotState(SLOT_1_PHONE_ID, TelephonyManager.SIM_STATE_READY);
+        // Make Slot 1 more capable
+        setPhoneRadioAccessFamily(slot0Phone, RadioAccessFamily.RAF_LTE);
+        setPhoneRadioAccessFamily(slot1Phone,
+                RadioAccessFamily.RAF_GSM | RadioAccessFamily.RAF_LTE);
+
+        Phone resultPhone = mTestConnectionService.getFirstPhoneForEmergencyCall();
+
+        assertEquals(slot1Phone, resultPhone);
+    }
+
+    /**
+     * Prerequisites:
+     * - MSIM Device, two slots with SIMs inserted
+     * - Both SIMs PUK Locked
+     * - Slot 0 is LTE capable, Slot 1 is GSM capable
+     *
+     * Result: getFirstPhoneForEmergencyCall returns the slot 0 phone because it is more capable,
+     * ignoring that both SIMs are PUK locked.
+     */
+    @Test
+    @SmallTest
+    public void testSlot0MoreCapableBothPukLocked() {
+        Phone slot0Phone = makeTestPhone(SLOT_0_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        Phone slot1Phone = makeTestPhone(SLOT_1_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        setDefaultPhone(slot0Phone);
+        setupDeviceConfig(slot0Phone, slot1Phone, SLOT_0_PHONE_ID);
+        setPhoneSlotState(SLOT_0_PHONE_ID, TelephonyManager.SIM_STATE_PUK_REQUIRED);
+        setPhoneSlotState(SLOT_1_PHONE_ID, TelephonyManager.SIM_STATE_PUK_REQUIRED);
+        // Make Slot 0 higher capability
+        setPhoneRadioAccessFamily(slot0Phone, RadioAccessFamily.RAF_LTE);
+        setPhoneRadioAccessFamily(slot1Phone, RadioAccessFamily.RAF_GSM);
+
+        Phone resultPhone = mTestConnectionService.getFirstPhoneForEmergencyCall();
+
+        assertEquals(slot0Phone, resultPhone);
+    }
+
+    /**
+     * Prerequisites:
+     * - MSIM Device, two slots with SIMs inserted
+     * - Both SIMs have the same capability
+     *
+     * Result: getFirstPhoneForEmergencyCall returns the slot 0 phone because it is the first slot.
+     */
+    @Test
+    @SmallTest
+    public void testEqualCapabilityTwoSimsInserted() {
+        Phone slot0Phone = makeTestPhone(SLOT_0_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        Phone slot1Phone = makeTestPhone(SLOT_1_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        setDefaultPhone(slot0Phone);
+        setupDeviceConfig(slot0Phone, slot1Phone, SLOT_0_PHONE_ID);
+        setPhoneSlotState(SLOT_0_PHONE_ID, TelephonyManager.SIM_STATE_READY);
+        setPhoneSlotState(SLOT_1_PHONE_ID, TelephonyManager.SIM_STATE_READY);
+        // Make Capability the same
+        setPhoneRadioAccessFamily(slot0Phone, RadioAccessFamily.RAF_LTE);
+        setPhoneRadioAccessFamily(slot1Phone, RadioAccessFamily.RAF_LTE);
+        // Two SIMs inserted
+        setSlotHasIccCard(SLOT_0_PHONE_ID, true /*isInserted*/);
+        setSlotHasIccCard(SLOT_1_PHONE_ID, true /*isInserted*/);
+
+        Phone resultPhone = mTestConnectionService.getFirstPhoneForEmergencyCall();
+
+        assertEquals(slot0Phone, resultPhone);
+    }
+
+    /**
+     * Prerequisites:
+     * - MSIM Device, only slot 0 inserted
+     * - Both SIMs have the same capability
+     *
+     * Result: getFirstPhoneForEmergencyCall returns the slot 0 phone because it is the only one
+     * with a SIM inserted
+     */
+    @Test
+    @SmallTest
+    public void testEqualCapabilitySim0Inserted() {
+        Phone slot0Phone = makeTestPhone(SLOT_0_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        Phone slot1Phone = makeTestPhone(SLOT_1_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        setDefaultPhone(slot0Phone);
+        setupDeviceConfig(slot0Phone, slot1Phone, SLOT_0_PHONE_ID);
+        setPhoneSlotState(SLOT_0_PHONE_ID, TelephonyManager.SIM_STATE_READY);
+        setPhoneSlotState(SLOT_1_PHONE_ID, TelephonyManager.SIM_STATE_ABSENT);
+        // Make Capability the same
+        setPhoneRadioAccessFamily(slot0Phone, RadioAccessFamily.RAF_LTE);
+        setPhoneRadioAccessFamily(slot1Phone, RadioAccessFamily.RAF_LTE);
+        // Slot 0 has SIM inserted.
+        setSlotHasIccCard(SLOT_0_PHONE_ID, true /*isInserted*/);
+        setSlotHasIccCard(SLOT_1_PHONE_ID, false /*isInserted*/);
+
+        Phone resultPhone = mTestConnectionService.getFirstPhoneForEmergencyCall();
+
+        assertEquals(slot0Phone, resultPhone);
+    }
+
+    /**
+     * Prerequisites:
+     * - MSIM Device, only slot 1 inserted
+     * - Both SIMs have the same capability
+     *
+     * Result: getFirstPhoneForEmergencyCall returns the slot 1 phone because it is the only one
+     * with a SIM inserted
+     */
+    @Test
+    @SmallTest
+    public void testEqualCapabilitySim1Inserted() {
+        Phone slot0Phone = makeTestPhone(SLOT_0_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        Phone slot1Phone = makeTestPhone(SLOT_1_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        setDefaultPhone(slot0Phone);
+        setupDeviceConfig(slot0Phone, slot1Phone, SLOT_0_PHONE_ID);
+        setPhoneSlotState(SLOT_0_PHONE_ID, TelephonyManager.SIM_STATE_ABSENT);
+        setPhoneSlotState(SLOT_1_PHONE_ID, TelephonyManager.SIM_STATE_READY);
+        // Make Capability the same
+        setPhoneRadioAccessFamily(slot0Phone, RadioAccessFamily.RAF_LTE);
+        setPhoneRadioAccessFamily(slot1Phone, RadioAccessFamily.RAF_LTE);
+        // Slot 1 has SIM inserted.
+        setSlotHasIccCard(SLOT_0_PHONE_ID, false /*isInserted*/);
+        setSlotHasIccCard(SLOT_1_PHONE_ID, true /*isInserted*/);
+
+        Phone resultPhone = mTestConnectionService.getFirstPhoneForEmergencyCall();
+
+        assertEquals(slot1Phone, resultPhone);
+    }
+
+    /**
+     * Prerequisites:
+     * - MSIM Device, no SIMs inserted
+     * - SIM 1 has the higher capability
+     *
+     * Result: getFirstPhoneForEmergencyCall returns the slot 1 phone, since it is a higher
+     * capability
+     */
+    @Test
+    @SmallTest
+    public void testSim1HigherCapabilityNoSimsInserted() {
+        Phone slot0Phone = makeTestPhone(SLOT_0_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        Phone slot1Phone = makeTestPhone(SLOT_1_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        setDefaultPhone(slot0Phone);
+        setupDeviceConfig(slot0Phone, slot1Phone, SLOT_0_PHONE_ID);
+        setPhoneSlotState(SLOT_0_PHONE_ID, TelephonyManager.SIM_STATE_ABSENT);
+        setPhoneSlotState(SLOT_1_PHONE_ID, TelephonyManager.SIM_STATE_ABSENT);
+        // Make Capability the same
+        setPhoneRadioAccessFamily(slot0Phone, RadioAccessFamily.RAF_GSM);
+        setPhoneRadioAccessFamily(slot1Phone, RadioAccessFamily.RAF_LTE);
+        // No SIMs inserted
+        setSlotHasIccCard(SLOT_0_PHONE_ID, false /*isInserted*/);
+        setSlotHasIccCard(SLOT_1_PHONE_ID, false /*isInserted*/);
+
+        Phone resultPhone = mTestConnectionService.getFirstPhoneForEmergencyCall();
+
+        assertEquals(slot1Phone, resultPhone);
+    }
+
+    /**
+     * Prerequisites:
+     * - MSIM Device, no SIMs inserted
+     * - Both SIMs have the same capability (Unknown)
+     *
+     * Result: getFirstPhoneForEmergencyCall returns the slot 0 phone, since it is the first slot.
+     */
+    @Test
+    @SmallTest
+    public void testEqualCapabilityNoSimsInserted() {
+        Phone slot0Phone = makeTestPhone(SLOT_0_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        Phone slot1Phone = makeTestPhone(SLOT_1_PHONE_ID, ServiceState.STATE_OUT_OF_SERVICE,
+                false /*isEmergencyOnly*/);
+        setDefaultPhone(slot0Phone);
+        setupDeviceConfig(slot0Phone, slot1Phone, SLOT_0_PHONE_ID);
+        setPhoneSlotState(SLOT_0_PHONE_ID, TelephonyManager.SIM_STATE_ABSENT);
+        setPhoneSlotState(SLOT_1_PHONE_ID, TelephonyManager.SIM_STATE_ABSENT);
+        // Make Capability the same
+        setPhoneRadioAccessFamily(slot0Phone, RadioAccessFamily.RAF_UNKNOWN);
+        setPhoneRadioAccessFamily(slot1Phone, RadioAccessFamily.RAF_UNKNOWN);
+        // No SIMs inserted
+        setSlotHasIccCard(SLOT_0_PHONE_ID, false /*isInserted*/);
+        setSlotHasIccCard(SLOT_1_PHONE_ID, false /*isInserted*/);
+
+        Phone resultPhone = mTestConnectionService.getFirstPhoneForEmergencyCall();
+
+        assertEquals(slot0Phone, resultPhone);
+    }
+
+    private Phone makeTestPhone(int phoneId, int serviceState, boolean isEmergencyOnly) {
+        Phone phone = mock(Phone.class);
+        ServiceState testServiceState = new ServiceState();
+        testServiceState.setState(serviceState);
+        testServiceState.setEmergencyOnly(isEmergencyOnly);
+        when(phone.getServiceState()).thenReturn(testServiceState);
+        when(phone.getPhoneId()).thenReturn(phoneId);
+        return phone;
+    }
+
+    // Setup 2 SIM device
+    private void setupDeviceConfig(Phone slot0Phone, Phone slot1Phone, int defaultVoicePhoneId) {
+        when(mTelephonyManagerProxy.getPhoneCount()).thenReturn(2);
+        when(mSubscriptionManagerProxy.getDefaultVoicePhoneId()).thenReturn(defaultVoicePhoneId);
+        when(mPhoneFactoryProxy.getPhone(eq(SLOT_0_PHONE_ID))).thenReturn(slot0Phone);
+        when(mPhoneFactoryProxy.getPhone(eq(SLOT_1_PHONE_ID))).thenReturn(slot1Phone);
+    }
+
+    private void setPhoneRadioAccessFamily(Phone phone, int radioAccessFamily) {
+        when(phone.getRadioAccessFamily()).thenReturn(radioAccessFamily);
+    }
+
+    private void setPhoneSlotState(int slotId, int slotState) {
+        when(mSubscriptionManagerProxy.getSimStateForSlotIdx(slotId)).thenReturn(slotState);
+    }
+
+    private void setSlotHasIccCard(int slotId, boolean isInserted) {
+        when(mTelephonyManagerProxy.hasIccCard(slotId)).thenReturn(isInserted);
+    }
+
+    private void setDefaultPhone(Phone phone) {
+        when(mPhoneFactoryProxy.getDefaultPhone()).thenReturn(phone);
+    }
+}
diff --git a/tests/src/com/android/services/telephony/activation/ResponseReceiver.java b/tests/src/com/android/services/telephony/activation/ResponseReceiver.java
deleted file mode 100644
index 33e7f00..0000000
--- a/tests/src/com/android/services/telephony/activation/ResponseReceiver.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2015 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.services.telephony.activation;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-
-import com.android.services.telephony.Log;
-
-public class ResponseReceiver extends BroadcastReceiver {
-    volatile public static boolean responseReceived = false;
-    public static final String ACTION_ACTIVATION_RESPONSE =
-            "com.android.services.telephony.ACTIVATION_RESPONSE";
-
-    private final Object mLock;
-    private Context mContext;
-
-    ResponseReceiver(Object lock) {
-        mLock = lock;
-    }
-
-    /** ${inheritDoc} */
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        if (!ACTION_ACTIVATION_RESPONSE.equals(intent.getAction())) {
-            Log.e(this, null, "Unexpected intent: " + intent.getAction());
-            return;
-        }
-
-        responseReceived = true;
-        Log.i(this, "received intent");
-
-        if (mLock != null) {
-            synchronized(mLock) {
-                Log.i(this, "notifying");
-                mLock.notify();
-            }
-        }
-    }
-
-    void register(Context context) {
-        context.registerReceiver(this, new IntentFilter(ACTION_ACTIVATION_RESPONSE));
-        mContext = context;
-    }
-
-    void unregister() {
-        mContext.unregisterReceiver(this);
-    }
-}
diff --git a/tests/src/com/android/services/telephony/activation/SimActivationTest.java b/tests/src/com/android/services/telephony/activation/SimActivationTest.java
deleted file mode 100644
index f6060dc..0000000
--- a/tests/src/com/android/services/telephony/activation/SimActivationTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2015 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.services.telephony.activation;
-
-import android.app.PendingIntent;
-import android.content.Context;
-import android.content.Intent;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-
-import com.android.services.telephony.Log;
-
-public class SimActivationTest extends AndroidTestCase {
-
-    private static Object mActivationLock = new Object();
-    private ResponseReceiver mResponseReceiver;
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        mResponseReceiver = new ResponseReceiver(mActivationLock);
-        mResponseReceiver.register(context());
-    }
-
-    /** ${inheritDoc} */
-    @Override
-    protected void tearDown() throws Exception {
-        mResponseReceiver.unregister();
-        super.tearDown();
-    }
-
-    @SmallTest
-    public void testSimActivationResponse() throws Exception {
-        Log.i(this, "Running activation test");
-
-        Intent responseIntent = new Intent(ResponseReceiver.ACTION_ACTIVATION_RESPONSE);
-        responseIntent.setPackage(context().getPackageName());
-        PendingIntent pendingResponse = PendingIntent.getBroadcast(
-                context(), 0, responseIntent, 0);
-
-        Intent intent = new Intent(Intent.ACTION_SIM_ACTIVATION_REQUEST);
-        intent.putExtra(Intent.EXTRA_SIM_ACTIVATION_RESPONSE, pendingResponse);
-        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-
-        Log.i(this, "sent intent");
-        context().startActivity(intent);
-        synchronized (mActivationLock) {
-            Log.i(this, "waiting ");
-            mActivationLock.wait(5000);
-            Log.i(this, "unwaiting");
-        }
-        assertTrue(ResponseReceiver.responseReceived);
-    }
-
-    private Context context() {
-        return getContext();
-    }
-}