Merge "Remove the RTT info panel when not needed" into pi-dev
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 8c771c9..c085e55 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -131,7 +131,7 @@
     <string name="stk_cc_ss_to_ussd_error" msgid="6095812685884176176">"Solicitação SS alterada para solicitação USSD"</string>
     <string name="stk_cc_ss_to_ss_error" msgid="7920654012697945858">"Alterada para uma nova solicitação SS"</string>
     <string name="stk_cc_ss_to_dial_video_error" msgid="3873905132181743781">"Solicitação SS alterada para videochamada"</string>
-    <string name="fdn_check_failure" msgid="18200614306525434">"A configuração \"Números de chamada fixos\" do app de seu telefone está ativada. Por isso, alguns recursos relacionados a chamadas não funcionam."</string>
+    <string name="fdn_check_failure" msgid="18200614306525434">"A configuração \"Números de chamada fixos\" do seu app Telefone está ativada. Por isso, alguns recursos relacionados a chamadas não funcionam."</string>
     <string name="radio_off_error" msgid="2304459933248513376">"Ligue o rádio antes de ver essas configurações."</string>
     <string name="close_dialog" msgid="2365884406356986917">"OK"</string>
     <string name="enable" msgid="7248657275000173526">"Ativar"</string>
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index d25f282..5cbb6f6 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -4177,4 +4177,27 @@
                         DEFAULT_NETWORK_MODE_PROPERTY_NAME,
                         String.valueOf(Phone.PREFERRED_NT_MODE)));
     }
+
+    @Override
+    public void setCarrierTestOverride(int subId, String mccmnc, String imsi, String iccid, String
+            gid1, String gid2, String plmn, String spn) {
+        enforceModifyPermission();
+        final Phone phone = getPhone(subId);
+        if (phone == null) {
+            loge("setCarrierTestOverride fails with invalid subId: " + subId);
+            return;
+        }
+        phone.setCarrierTestOverride(mccmnc, imsi, iccid, gid1, gid2, plmn, spn);
+    }
+
+    @Override
+    public int getCarrierIdListVersion(int subId) {
+        enforceReadPrivilegedPermission();
+        final Phone phone = getPhone(subId);
+        if (phone == null) {
+            loge("getCarrierIdListVersion fails with invalid subId: " + subId);
+            return TelephonyManager.UNKNOWN_CARRIER_ID_LIST_VERSION;
+        }
+        return phone.getCarrierIdListVersion();
+    }
 }
diff --git a/src/com/android/phone/settings/AccessibilitySettingsFragment.java b/src/com/android/phone/settings/AccessibilitySettingsFragment.java
index 314d895..57b6d8e 100644
--- a/src/com/android/phone/settings/AccessibilitySettingsFragment.java
+++ b/src/com/android/phone/settings/AccessibilitySettingsFragment.java
@@ -19,12 +19,11 @@
 import android.content.Context;
 import android.media.AudioManager;
 import android.os.Bundle;
-import android.preference.SwitchPreference;
 import android.preference.Preference;
 import android.preference.PreferenceFragment;
 import android.preference.PreferenceScreen;
+import android.preference.SwitchPreference;
 import android.provider.Settings;
-import android.telecom.TelecomManager;
 import android.telephony.CarrierConfigManager;
 import android.telephony.PhoneStateListener;
 import android.telephony.SubscriptionManager;
@@ -106,8 +105,8 @@
         if (PhoneGlobals.getInstance().phoneMgr.isRttSupported()) {
             // TODO: this is going to be a on/off switch for now. Ask UX about how to integrate
             // this settings with TTY
-            boolean rttOn = Settings.System.getInt(
-                    mContext.getContentResolver(), Settings.System.RTT_CALLING_MODE, 0) != 0;
+            boolean rttOn = Settings.Secure.getInt(
+                    mContext.getContentResolver(), Settings.Secure.RTT_CALLING_MODE, 0) != 0;
             mButtonRtt.setChecked(rttOn);
         } else {
             getPreferenceScreen().removePreference(mButtonRtt);
@@ -151,7 +150,7 @@
         } else if (preference == mButtonRtt) {
             Log.i(LOG_TAG, "RTT setting changed -- now " + mButtonRtt.isChecked());
             int rttMode = mButtonRtt.isChecked() ? 1 : 0;
-            Settings.System.putInt(mContext.getContentResolver(), Settings.System.RTT_CALLING_MODE,
+            Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.RTT_CALLING_MODE,
                     rttMode);
             // Update RTT config with IMS Manager
             ImsManager imsManager = ImsManager.getInstance(getContext(),