Merge "Update the call forwarding/waiting APIs"
diff --git a/res/layout/radio_info.xml b/res/layout/radio_info.xml
index 71cd32a..72627a3 100644
--- a/res/layout/radio_info.xml
+++ b/res/layout/radio_info.xml
@@ -334,11 +334,6 @@
             android:background="?android:attr/listDivider" />
 
         <!-- CellInfoListRate Selection -->
-        <!-- Location -->
-        <LinearLayout style="@style/RadioInfo_entry_layout">
-            <TextView android:text="@string/radio_info_signal_location_label" style="@style/info_label" />
-            <TextView android:id="@+id/location" style="@style/info_value" />
-        </LinearLayout>
 
         <TextView
                 android:layout_width="match_parent"
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index a88aeff..673e359 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -492,7 +492,7 @@
     <string name="disable_sim_pin" msgid="3112303905548613752">"‏محو رقم التعريف الشخصي لبطاقة SIM"</string>
     <string name="enable_sim_pin" msgid="445461050748318980">"‏تعيين رقم التعريف الشخصي لبطاقة SIM"</string>
     <string name="enable_in_progress" msgid="4135305985717272592">"جارٍ تعيين رقم التعريف الشخصي…"</string>
-    <string name="enable_pin_ok" msgid="2877428038280804256">"تم تعيين رقم التعريف الشخصي"</string>
+    <string name="enable_pin_ok" msgid="2877428038280804256">"تم ضبط رقم التعريف الشخصي"</string>
     <string name="disable_pin_ok" msgid="888505244389647754">"تم محو رقم التعريف الشخصي"</string>
     <string name="pin_failed" msgid="4527347792881939652">"رقم التعريف الشخصي غير صحيح"</string>
     <string name="pin_changed" msgid="7291153750090452808">"تم تحديث رقم التعريف الشخصي"</string>
@@ -887,7 +887,6 @@
     <string name="radio_info_dds" msgid="1122593144425697126">"‏المعرّف الفرعي لشريحة SIM التلقائية للبيانات:"</string>
     <string name="radio_info_dl_kbps" msgid="2382922659525318726">"‏معدّل نقل بيانات DL (كيلوبت في الثانية):"</string>
     <string name="radio_info_ul_kbps" msgid="2102225400904799036">"‏معدّل نقل بيانات UL (كيلوبت في الثانية):"</string>
-    <string name="radio_info_signal_location_label" msgid="6188435197086550049">"معلومات الموقع الخلوية (تم الإيقاف):"</string>
     <string name="radio_info_phy_chan_config" msgid="1277949603275436081">"‏ضبط قناة LTE Physical:"</string>
     <string name="radio_info_cell_info_refresh_rate" msgid="670511448975997340">"معدّل إعادة تحميل المعلومات الخلوية:"</string>
     <string name="radio_info_cellinfo_label" msgid="8199062974670377659">"جميع معلومات القياس الخلوية:"</string>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index a36cea3..072e1f4 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -875,7 +875,6 @@
     <string name="radio_info_dds" msgid="1122593144425697126">"‏SubId مربوط به سیم‌کارت داده پیش‌فرض:"</string>
     <string name="radio_info_dl_kbps" msgid="2382922659525318726">"‏پهنای باند DL (کیلوبیت بر ثانیه):"</string>
     <string name="radio_info_ul_kbps" msgid="2102225400904799036">"‏پهنای باند UL (کیلوبیت بر ثانیه):"</string>
-    <string name="radio_info_signal_location_label" msgid="6188435197086550049">"اطلاعات مکان شبکه همراه (منسوخ شده):"</string>
     <string name="radio_info_phy_chan_config" msgid="1277949603275436081">"‏پیکربندی کانال فیزیکی LTE:"</string>
     <string name="radio_info_cell_info_refresh_rate" msgid="670511448975997340">"نرخ بازخوانی اطلاعات شبکه همراه:"</string>
     <string name="radio_info_cellinfo_label" msgid="8199062974670377659">"همه اطلاعات اندازه‌گیری شبکه همراه:"</string>
diff --git a/res/values-ky/strings.xml b/res/values-ky/strings.xml
index f2a7b88..a9c8a83 100644
--- a/res/values-ky/strings.xml
+++ b/res/values-ky/strings.xml
@@ -472,9 +472,9 @@
     <string name="delete_fdn_contact" msgid="7027405651994507077">"Туруктуу терүү номерин жок кылуу"</string>
     <string name="deleting_fdn_contact" msgid="6872320570844460428">"Туруктуу терүү номери жок кылынууда…"</string>
     <string name="fdn_contact_deleted" msgid="1680714996763848838">"Туруктуу терүү номери өчүрүлдү."</string>
-    <string name="pin2_invalid" msgid="2313954262684494442">"БНТ жаңыртылган жок, анткени туура эмес PIN-код киргизилди."</string>
-    <string name="fdn_invalid_number" msgid="9067189814657840439">"Уруксат берилген номер жаңыртылган жок, себеби жазылган номердин саны <xliff:g id="FDN_NUMBER_LIMIT_LENGTH">%d</xliff:g> ашпашы керек."</string>
-    <string name="pin2_or_fdn_invalid" msgid="7542639487955868181">"БНТ жаңыртылган жок. PIN2 туура эмес, же телефон номуру жараксыз."</string>
+    <string name="pin2_invalid" msgid="2313954262684494442">"БНТ жаңырган жок, анткени туура эмес PIN-код киргизилди."</string>
+    <string name="fdn_invalid_number" msgid="9067189814657840439">"Уруксат берилген номер жаңырган жок, себеби жазылган номердин саны <xliff:g id="FDN_NUMBER_LIMIT_LENGTH">%d</xliff:g> ашпашы керек."</string>
+    <string name="pin2_or_fdn_invalid" msgid="7542639487955868181">"БНТ жаңырган жок. PIN2 туура эмес, же телефон номуру жараксыз."</string>
     <string name="fdn_failed" msgid="216592346853420250">"БНТ иши кыйрады."</string>
     <string name="simContacts_emptyLoading" msgid="4989040293858675483">"SIM-картадан окулууда…"</string>
     <string name="simContacts_empty" msgid="1135632055473689521">"SIM картаңызда байланыштар жок."</string>
@@ -875,7 +875,6 @@
     <string name="radio_info_dds" msgid="1122593144425697126">"Демейки оператордун SIM картасынын көз салуу идентификатору:"</string>
     <string name="radio_info_dl_kbps" msgid="2382922659525318726">"DL өткөрүү жөндөмдүүлүгү (кб/сек.):"</string>
     <string name="radio_info_ul_kbps" msgid="2102225400904799036">"UL өткөрүү жөндөмдүүлүгү (кб/сек.):"</string>
-    <string name="radio_info_signal_location_label" msgid="6188435197086550049">"Уюлдук тармакта жайгашкан жери тууралуу маалымат (жоюлган):"</string>
     <string name="radio_info_phy_chan_config" msgid="1277949603275436081">"LTE физикалык каналынын конфигурациясы:"</string>
     <string name="radio_info_cell_info_refresh_rate" msgid="670511448975997340">"Уюлдук маалыматты жаңылоо ылдамдыгы:"</string>
     <string name="radio_info_cellinfo_label" msgid="8199062974670377659">"Уюлдук чен-өлчөм маалыматтары:"</string>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 57ce289..1013da8 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -875,7 +875,6 @@
     <string name="radio_info_dds" msgid="1122593144425697126">"SubId van standaard simkaart voor data:"</string>
     <string name="radio_info_dl_kbps" msgid="2382922659525318726">"DL-bandbreedte (kbps):"</string>
     <string name="radio_info_ul_kbps" msgid="2102225400904799036">"UL-bandbreedte (kbps):"</string>
-    <string name="radio_info_signal_location_label" msgid="6188435197086550049">"Mobiele locatiegegevens (beëindigd):"</string>
     <string name="radio_info_phy_chan_config" msgid="1277949603275436081">"Fysieke LTE-kanaalconfiguratie:"</string>
     <string name="radio_info_cell_info_refresh_rate" msgid="670511448975997340">"Vernieuwingsfrequentie van mobiele data:"</string>
     <string name="radio_info_cellinfo_label" msgid="8199062974670377659">"Alle mobiele meetgegevens:"</string>
diff --git a/res/values-sq/strings.xml b/res/values-sq/strings.xml
index 2bf87a1..412fac0 100644
--- a/res/values-sq/strings.xml
+++ b/res/values-sq/strings.xml
@@ -875,7 +875,6 @@
     <string name="radio_info_dds" msgid="1122593144425697126">"ID-ja dytësore e kartës SIM të parazgjedhur të të dhënave:"</string>
     <string name="radio_info_dl_kbps" msgid="2382922659525318726">"Gjerësia e bandës DL (kbps):"</string>
     <string name="radio_info_ul_kbps" msgid="2102225400904799036">"Gjerësia e bandës UL (kbps):"</string>
-    <string name="radio_info_signal_location_label" msgid="6188435197086550049">"Informacionet e vendndodhjes të rrjetit celular (e vjetruar):"</string>
     <string name="radio_info_phy_chan_config" msgid="1277949603275436081">"Konfigurimi i kanalit fizik LTE:"</string>
     <string name="radio_info_cell_info_refresh_rate" msgid="670511448975997340">"Shpejtësia e rifreskimit të informacioneve të rrjetit celular"</string>
     <string name="radio_info_cellinfo_label" msgid="8199062974670377659">"Të gjitha informacionet e matjes së rrjetit celular:"</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 086d848..b41e1c5 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -22,7 +22,7 @@
     <string name="phoneIconLabel" msgid="3015941229249651419">"電話"</string>
     <string name="fdnListLabel" msgid="4119121875004244097">"固定撥號清單"</string>
     <string name="unknown" msgid="8279698889921830815">"不明"</string>
-    <string name="private_num" msgid="4487990167889159992">"私人號碼"</string>
+    <string name="private_num" msgid="4487990167889159992">"隱藏號碼"</string>
     <string name="payphone" msgid="7936735771836716941">"公用電話"</string>
     <string name="onHold" msgid="6132725550015899006">"通話保留"</string>
     <string name="carrier_mmi_msg_title" msgid="6050165242447507034">"「<xliff:g id="MMICARRIER">%s</xliff:g>」的訊息"</string>
@@ -875,7 +875,6 @@
     <string name="radio_info_dds" msgid="1122593144425697126">"預設資料 SIM 卡的子 ID:"</string>
     <string name="radio_info_dl_kbps" msgid="2382922659525318726">"下行頻寬 (kbps):"</string>
     <string name="radio_info_ul_kbps" msgid="2102225400904799036">"上行頻寬 (kbps):"</string>
-    <string name="radio_info_signal_location_label" msgid="6188435197086550049">"行動網路位置資訊 (已不適用):"</string>
     <string name="radio_info_phy_chan_config" msgid="1277949603275436081">"LTE 實體通道設定:"</string>
     <string name="radio_info_cell_info_refresh_rate" msgid="670511448975997340">"行動網路資訊重新整理頻率:"</string>
     <string name="radio_info_cellinfo_label" msgid="8199062974670377659">"所有行動網路測量資訊:"</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index d1ab127..83a5673 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2079,8 +2079,6 @@
     <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
     <string name="radio_info_ul_kbps">UL Bandwidth (kbps):</string>
     <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
-    <string name="radio_info_signal_location_label">Cell Location Info (deprecated):</string>
-    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
     <string name="radio_info_phy_chan_config">LTE Physical Channel Configuration:</string>
     <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
     <string name="radio_info_cell_info_refresh_rate">Cell Info Refresh Rate:</string>
diff --git a/sip/res/values-sq/strings.xml b/sip/res/values-sq/strings.xml
index 1b83380..5c50085 100644
--- a/sip/res/values-sq/strings.xml
+++ b/sip/res/values-sq/strings.xml
@@ -32,7 +32,7 @@
     <string name="saving_account" msgid="3390358043846687266">"Po ruan llogarinë…"</string>
     <string name="removing_account" msgid="1544132880414780408">"Po heq llogarinë…"</string>
     <string name="sip_menu_save" msgid="4377112554203123060">"Ruaj"</string>
-    <string name="sip_menu_discard" msgid="1883166691772895243">"Injoro"</string>
+    <string name="sip_menu_discard" msgid="1883166691772895243">"Hiq"</string>
     <string name="alert_dialog_close" msgid="1734746505531110706">"Mbyll profilin"</string>
     <string name="alert_dialog_ok" msgid="7806760618798687406">"Në rregull"</string>
     <string name="close_profile" msgid="3756064641769751774">"Mbyll"</string>
diff --git a/src/com/android/phone/CallBarringEditPreference.java b/src/com/android/phone/CallBarringEditPreference.java
index b8e3250..757600e 100644
--- a/src/com/android/phone/CallBarringEditPreference.java
+++ b/src/com/android/phone/CallBarringEditPreference.java
@@ -26,6 +26,8 @@
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
+import android.os.PersistableBundle;
+import android.telephony.CarrierConfigManager;
 import android.text.method.DigitsKeyListener;
 import android.text.method.PasswordTransformationMethod;
 import android.util.AttributeSet;
@@ -35,7 +37,6 @@
 import android.widget.TextView;
 import android.widget.Toast;
 
-import com.android.internal.telephony.CommandsInterface;
 import com.android.internal.telephony.CommandException;
 import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.PhoneFactory;
@@ -109,7 +110,7 @@
         if (!skipReading) {
             // Query call barring status
             mPhone.getCallBarring(mFacility, "", mHandler.obtainMessage(
-                    MyHandler.MESSAGE_GET_CALL_BARRING), CommandsInterface.SERVICE_CLASS_VOICE);
+                    MyHandler.MESSAGE_GET_CALL_BARRING), getServiceClassForCallBarring(mPhone));
             if (mTcpListener != null) {
                 mTcpListener.onStarted(this, true);
             }
@@ -204,7 +205,7 @@
             // Send set call barring message to RIL layer.
             mPhone.setCallBarring(mFacility, !mIsActivated, password,
                     mHandler.obtainMessage(MyHandler.MESSAGE_SET_CALL_BARRING),
-                    CommandsInterface.SERVICE_CLASS_VOICE);
+                    getServiceClassForCallBarring(mPhone));
             if (mTcpListener != null) {
                 mTcpListener.onStarted(this, false);
             }
@@ -218,6 +219,18 @@
         }
     }
 
+    private static int getServiceClassForCallBarring(Phone phone) {
+        int serviceClass = CarrierConfigManager.SERVICE_CLASS_VOICE;
+        PersistableBundle carrierConfig = PhoneGlobals.getInstance()
+                .getCarrierConfigForSubId(phone.getSubId());
+        if (carrierConfig != null) {
+            serviceClass = carrierConfig.getInt(
+                    CarrierConfigManager.KEY_CALL_BARRING_DEFAULT_SERVICE_CLASS_INT,
+                    CarrierConfigManager.SERVICE_CLASS_VOICE);
+        }
+        return serviceClass;
+    }
+
     void updateSummaryText() {
         notifyChanged();
         notifyDependencyChange(shouldDisableDependents());
@@ -327,8 +340,7 @@
                     pref.mFacility,
                     "",
                     obtainMessage(MESSAGE_GET_CALL_BARRING, 0, MESSAGE_SET_CALL_BARRING,
-                            ar.exception),
-                    CommandsInterface.SERVICE_CLASS_VOICE);
+                            ar.exception), getServiceClassForCallBarring(pref.mPhone));
         }
     }
 }
diff --git a/src/com/android/phone/TelephonyShellCommand.java b/src/com/android/phone/TelephonyShellCommand.java
index 14d67cc..c3f2974 100644
--- a/src/com/android/phone/TelephonyShellCommand.java
+++ b/src/com/android/phone/TelephonyShellCommand.java
@@ -24,13 +24,14 @@
 import android.os.RemoteException;
 import android.provider.BlockedNumberContract;
 import android.telephony.CarrierConfigManager;
-import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
 import android.telephony.emergency.EmergencyNumber;
 import android.telephony.ims.feature.ImsFeature;
 import android.util.Log;
 
 import com.android.internal.telephony.ITelephony;
+import com.android.internal.telephony.Phone;
+import com.android.internal.telephony.PhoneFactory;
 import com.android.internal.telephony.emergency.EmergencyNumberTracker;
 import com.android.internal.telephony.util.TelephonyUtils;
 
@@ -739,17 +740,21 @@
         try {
             slotId = Integer.parseInt(slotString);
         } catch (NumberFormatException e) {
+            getErrPrintWriter().println(tag + slotString + " is not a valid number for SLOT_ID.");
+            return SubscriptionManager.INVALID_SUBSCRIPTION_ID;
+        }
+
+        if (!SubscriptionManager.isValidPhoneId(slotId)) {
             getErrPrintWriter().println(tag + slotString + " is not a valid SLOT_ID.");
             return SubscriptionManager.INVALID_SUBSCRIPTION_ID;
         }
 
-        SubscriptionInfo subInfo =
-                mSubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex(slotId);
-        if (subInfo == null) {
+        Phone phone = PhoneFactory.getPhone(slotId);
+        if (phone == null) {
             getErrPrintWriter().println(tag + "No subscription found in slot " + slotId + ".");
             return SubscriptionManager.INVALID_SUBSCRIPTION_ID;
         }
-        return subInfo.getSubscriptionId();
+        return phone.getSubId();
     }
 
     private boolean checkShellUid() {
diff --git a/src/com/android/phone/settings/RadioInfo.java b/src/com/android/phone/settings/RadioInfo.java
index f20da59..b774ac6 100644
--- a/src/com/android/phone/settings/RadioInfo.java
+++ b/src/com/android/phone/settings/RadioInfo.java
@@ -52,7 +52,6 @@
 import android.telephony.CellInfoGsm;
 import android.telephony.CellInfoLte;
 import android.telephony.CellInfoWcdma;
-import android.telephony.CellLocation;
 import android.telephony.CellSignalStrengthCdma;
 import android.telephony.CellSignalStrengthGsm;
 import android.telephony.CellSignalStrengthLte;
@@ -66,8 +65,6 @@
 import android.telephony.SignalStrength;
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
-import android.telephony.cdma.CdmaCellLocation;
-import android.telephony.gsm.GsmCellLocation;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.Menu;
@@ -232,7 +229,6 @@
     private TextView mDBm;
     private TextView mMwi;
     private TextView mCfi;
-    private TextView mLocation;
     private TextView mCellInfo;
     private TextView mSent;
     private TextView mReceived;
@@ -284,7 +280,6 @@
     private boolean mCfiValue = false;
 
     private List<CellInfo> mCellInfoResult = null;
-    private CellLocation mCellLocationResult = null;
 
     private int mPreferredNetworkTypeResult;
     private int mCellInfoRefreshRateIndex;
@@ -329,11 +324,6 @@
         }
 
         @Override
-        public void onCellLocationChanged(CellLocation location) {
-            updateLocation(location);
-        }
-
-        @Override
         public void onMessageWaitingIndicatorChanged(boolean mwi) {
             mMwiValue = mwi;
             updateMessageWaiting();
@@ -499,7 +489,6 @@
         mDBm = (TextView) findViewById(R.id.dbm);
         mMwi = (TextView) findViewById(R.id.mwi);
         mCfi = (TextView) findViewById(R.id.cfi);
-        mLocation = (TextView) findViewById(R.id.location);
         mCellInfo = (TextView) findViewById(R.id.cellinfo);
         mCellInfo.setTypeface(Typeface.MONOSPACE);
 
@@ -655,7 +644,6 @@
         updateNetworkType();
         updateNrStats(null);
 
-        updateLocation(mCellLocationResult);
         updateCellInfo(mCellInfoResult);
         updateSubscriptionIds();
 
@@ -815,7 +803,6 @@
         mSent.setText("");
         mReceived.setText("");
         mCallState.setText("");
-        mLocation.setText("");
         mMwiValue = false;
         mMwi.setText("");
         mCfiValue = false;
@@ -873,45 +860,6 @@
                 + r.getString(R.string.radioInfo_display_asu));
     }
 
-    private void updateLocation(CellLocation location) {
-        Resources r = getResources();
-        if (location instanceof GsmCellLocation) {
-            GsmCellLocation loc = (GsmCellLocation) location;
-            int lac = loc.getLac();
-            int cid = loc.getCid();
-            mLocation.setText(r.getString(R.string.radioInfo_lac) + " = "
-                    + ((lac == -1) ? "unknown" : Integer.toHexString(lac))
-                    + "   "
-                    + r.getString(R.string.radioInfo_cid) + " = "
-                    + ((cid == -1) ? "unknown" : Integer.toHexString(cid)));
-        } else if (location instanceof CdmaCellLocation) {
-            CdmaCellLocation loc = (CdmaCellLocation) location;
-            int bid = loc.getBaseStationId();
-            int sid = loc.getSystemId();
-            int nid = loc.getNetworkId();
-            int lat = loc.getBaseStationLatitude();
-            int lon = loc.getBaseStationLongitude();
-            mLocation.setText("BID = "
-                    + ((bid == -1) ? "unknown" : Integer.toHexString(bid))
-                    + "   "
-                    + "SID = "
-                    + ((sid == -1) ? "unknown" : Integer.toHexString(sid))
-                    + "   "
-                    + "NID = "
-                    + ((nid == -1) ? "unknown" : Integer.toHexString(nid))
-                    + "\n"
-                    + "LAT = "
-                    + ((lat == -1) ? "unknown" : Integer.toHexString(lat))
-                    + "   "
-                    + "LONG = "
-                    + ((lon == -1) ? "unknown" : Integer.toHexString(lon)));
-        } else {
-            mLocation.setText("unknown");
-        }
-
-
-    }
-
     private String getCellInfoDisplayString(int i) {
         return (i != Integer.MAX_VALUE) ? Integer.toString(i) : "";
     }
@@ -1287,11 +1235,9 @@
     private void updateAllCellInfo() {
 
         mCellInfo.setText("");
-        mLocation.setText("");
 
         final Runnable updateAllCellInfoResults = new Runnable() {
             public void run() {
-                updateLocation(mCellLocationResult);
                 updateCellInfo(mCellInfoResult);
             }
         };
@@ -1300,7 +1246,6 @@
             @Override
             public void run() {
                 mCellInfoResult = mTelephonyManager.getAllCellInfo();
-                mCellLocationResult = mTelephonyManager.getCellLocation();
 
                 mHandler.post(updateAllCellInfoResults);
             }
diff --git a/src/com/android/phone/settings/VoicemailSettingsActivity.java b/src/com/android/phone/settings/VoicemailSettingsActivity.java
index 66b1af9..2bd5306 100644
--- a/src/com/android/phone/settings/VoicemailSettingsActivity.java
+++ b/src/com/android/phone/settings/VoicemailSettingsActivity.java
@@ -238,6 +238,10 @@
 
         mVoicemailNotificationPreference =
                 findPreference(getString(R.string.voicemail_notifications_key));
+        if (mSubMenuVoicemailSettings == null) {
+            mSubMenuVoicemailSettings =
+                    (EditPhoneNumberPreference) findPreference(BUTTON_VOICEMAIL_KEY);
+        }
         final Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);
         intent.putExtra(Settings.EXTRA_CHANNEL_ID,
                 NotificationChannelController.CHANNEL_ID_VOICE_MAIL);
@@ -250,12 +254,6 @@
         super.onResume();
         mForeground = true;
 
-        PreferenceScreen prefSet = getPreferenceScreen();
-
-        if (mSubMenuVoicemailSettings == null) {
-            mSubMenuVoicemailSettings =
-                    (EditPhoneNumberPreference) findPreference(BUTTON_VOICEMAIL_KEY);
-        }
         if (mSubMenuVoicemailSettings != null) {
             mSubMenuVoicemailSettings.setParentActivity(this, VOICEMAIL_PREF_ID, this);
             mSubMenuVoicemailSettings.setDialogOnClosedListener(this);
diff --git a/src/com/android/services/telephony/PstnIncomingCallNotifier.java b/src/com/android/services/telephony/PstnIncomingCallNotifier.java
index 97460c8..377b471 100644
--- a/src/com/android/services/telephony/PstnIncomingCallNotifier.java
+++ b/src/com/android/services/telephony/PstnIncomingCallNotifier.java
@@ -65,6 +65,12 @@
      */
     private static final int MAX_NUMBER_VERIFICATION_HANGUP_DELAY_MILLIS = 10000;
 
+    /**
+     * Hardcoded extra for a call that's used to provide metrics information to the dialer app.
+     */
+    private static final String EXTRA_CALL_CREATED_TIME_MILLIS =
+            "android.telecom.extra.CALL_CREATED_TIME_MILLIS";
+
     /** The phone object to listen to. */
     private final Phone mPhone;
 
@@ -245,8 +251,7 @@
             }
 
             // Specifies the time the call was added. This is used by the dialer for analytics.
-            extras.putLong(TelecomManager.EXTRA_CALL_CREATED_TIME_MILLIS,
-                    SystemClock.elapsedRealtime());
+            extras.putLong(EXTRA_CALL_CREATED_TIME_MILLIS, SystemClock.elapsedRealtime());
 
             PhoneAccountHandle handle = findCorrectPhoneAccountHandle();
             if (handle == null) {
@@ -276,8 +281,7 @@
         }
 
         // Specifies the time the call was added. This is used by the dialer for analytics.
-        extras.putLong(TelecomManager.EXTRA_CALL_CREATED_TIME_MILLIS,
-                SystemClock.elapsedRealtime());
+        extras.putLong(EXTRA_CALL_CREATED_TIME_MILLIS, SystemClock.elapsedRealtime());
 
         if (connection.getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) {
             if (((ImsPhoneConnection) connection).isRttEnabledForCall()) {
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java
index 7f15617..69b2a4f 100644
--- a/src/com/android/services/telephony/TelecomAccountRegistry.java
+++ b/src/com/android/services/telephony/TelecomAccountRegistry.java
@@ -106,6 +106,13 @@
      */
     private static final int LISTENER_STATE_REGISTERED = 3;
 
+    /**
+     * Copy-pasted from android.telecom.PhoneAccount -- hidden constant which is unfortunately being
+     * used by some 1P apps, so we're keeping it here until we can remove it.
+     */
+    private static final String EXTRA_SUPPORTS_VIDEO_CALLING_FALLBACK =
+            "android.telecom.extra.SUPPORTS_VIDEO_CALLING_FALLBACK";
+
     final class AccountEntry implements PstnPhoneCapabilitiesNotifier.Listener {
         private final Phone mPhone;
         private PhoneAccount mAccount;
@@ -416,7 +423,7 @@
                 extras.putBoolean(PhoneAccount.EXTRA_PLAY_CALL_RECORDING_TONE, true);
             }
 
-            extras.putBoolean(PhoneAccount.EXTRA_SUPPORTS_VIDEO_CALLING_FALLBACK,
+            extras.putBoolean(EXTRA_SUPPORTS_VIDEO_CALLING_FALLBACK,
                     mContext.getResources()
                             .getBoolean(R.bool.config_support_video_calling_fallback));