Merge "DO NOT MERGE Move IMS registration state to SIM status screen"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index f037eb1..0d7b095 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -779,8 +779,10 @@
     <string name="encryption_and_credential_settings_title">Encryption &amp; credentials</string>
     <!-- Security Settings screen Encryption and crendential summary -->
     <string name="encryption_and_credential_settings_summary" product="default">Phone encrypted</string>
+    <string name="decryption_settings_summary" product="default">Phone not encrypted</string>
     <!-- Security Settings screen Encryption and crendential summary -->
     <string name="encryption_and_credential_settings_summary" product="tablet">Device encrypted</string>
+    <string name="decryption_settings_summary" product="tablet">Device not encrypted</string>
     <!-- Security Settings screen setting option title for the item to take you to the lock screen preference screen [CHAR LIMIT=60] -->
     <string name="lockscreen_settings_title">Lock screen preferences</string>
 
@@ -1606,10 +1608,10 @@
     <!-- Summary of checkbox for disabling Bluetooth inband ringing in Development Settings -->
     <string name="bluetooth_disable_inband_ringing_summary">Don’t play custom phone ringtones on Bluetooth headsets</string>
 
-    <!-- Setting title for enabling Bluetooth delay reporting in Development Settings -->
-    <string name="bluetooth_enable_avdtp_delay_reports">Enable Bluetooth Audio Delay Report handling</string>
-    <!-- Summary of checkbox for enabling Bluetooth delay reporting in Development Settings -->
-    <string name="bluetooth_enable_avdtp_delay_reports_summary">Handle Audio Delay Reports recieved from remote devices</string>
+    <!-- Setting title for disabling Bluetooth delay reporting in Development Settings -->
+    <string name="bluetooth_disable_avdtp_delay_reports">Disable Bluetooth Audio Delay Report handling</string>
+    <!-- Summary of checkbox for disabling Bluetooth delay reporting in Development Settings -->
+    <string name="bluetooth_disable_avdtp_delay_reports_summary">Stop Handling Audio Delay Reports received from remote devices</string>
 
     <!-- Bluetooth developer settings: Maximum number of connected audio devices -->
     <string name="bluetooth_max_connected_audio_devices_string">Maximum number of connected Bluetooth audio devices</string>
diff --git a/res/xml/development_prefs.xml b/res/xml/development_prefs.xml
index 1993857..db01394 100644
--- a/res/xml/development_prefs.xml
+++ b/res/xml/development_prefs.xml
@@ -229,9 +229,9 @@
             android:summary="@string/bluetooth_disable_inband_ringing_summary"/>
 
         <SwitchPreference
-            android:key="bluetooth_enable_avdtp_delay_reports"
-            android:title="@string/bluetooth_enable_avdtp_delay_reports"
-            android:summary="@string/bluetooth_enable_avdtp_delay_reports_summary"/>
+            android:key="bluetooth_disable_avdtp_delay_reports"
+            android:title="@string/bluetooth_disable_avdtp_delay_reports"
+            android:summary="@string/bluetooth_disable_avdtp_delay_reports_summary"/>
 
         <ListPreference
             android:key="bluetooth_select_avrcp_version"
diff --git a/res/xml/security_settings_misc.xml b/res/xml/security_settings_misc.xml
index 7946dd9..ade4782 100644
--- a/res/xml/security_settings_misc.xml
+++ b/res/xml/security_settings_misc.xml
@@ -60,7 +60,6 @@
     <Preference
         android:key="encryption_and_credential"
         android:title="@string/encryption_and_credential_settings_title"
-        android:summary="@string/encryption_and_credential_settings_summary"
         android:fragment="com.android.settings.EncryptionAndCredential"/>
 
     <Preference android:key="manage_trust_agents"
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java
index 55f21fd..23b149a 100644
--- a/src/com/android/settings/SecuritySettings.java
+++ b/src/com/android/settings/SecuritySettings.java
@@ -427,6 +427,17 @@
         mEnterprisePrivacyPreferenceController.displayPreference(root);
         mEnterprisePrivacyPreferenceController.onResume();
 
+        final Preference encryptioncredential = root.findPreference(KEY_ENCRYPTION_AND_CREDENTIALS);
+        if (LockPatternUtils.isDeviceEncryptionEnabled()) {
+                final String summaryencrypt = getContext().getString(
+                        R.string.encryption_and_credential_settings_summary);
+                encryptioncredential.setSummary(summaryencrypt);
+        } else {
+                final String summarydecrypt = getContext().getString(
+                        R.string.decryption_settings_summary);
+                encryptioncredential.setSummary(summarydecrypt);
+        }
+
         return root;
     }
 
diff --git a/src/com/android/settings/WifiCallingSettings.java b/src/com/android/settings/WifiCallingSettings.java
index cb661ed..57f61b6 100644
--- a/src/com/android/settings/WifiCallingSettings.java
+++ b/src/com/android/settings/WifiCallingSettings.java
@@ -193,9 +193,6 @@
                 // not show notification, we are changing result code here.
                 setResultCode(Activity.RESULT_CANCELED);
 
-                // UX requirement is to disable WFC in case of "permanent" registration failures.
-                mSwitch.setChecked(false);
-
                 showAlert(intent);
             }
         }
diff --git a/src/com/android/settings/development/DevelopmentSettings.java b/src/com/android/settings/development/DevelopmentSettings.java
index 078489e..e0ae111 100644
--- a/src/com/android/settings/development/DevelopmentSettings.java
+++ b/src/com/android/settings/development/DevelopmentSettings.java
@@ -214,14 +214,14 @@
                                     "persist.bluetooth.disableinbandringing";
     private static final String BLUETOOTH_BTSNOOP_ENABLE_PROPERTY =
                                     "persist.bluetooth.btsnoopenable";
-    private static final String BLUETOOTH_ENABLE_AVDTP_DELAY_REPORTS_PROPERTY =
-            "persist.bluetooth.enabledelayreports";
+    private static final String BLUETOOTH_DISABLE_AVDTP_DELAY_REPORTS_PROPERTY =
+            "persist.bluetooth.disabledelayreports";
 
     static final String BLUETOOTH_MAX_CONNECTED_AUDIO_DEVICES_PROPERTY =
             "persist.bluetooth.maxconnectedaudiodevices";
 
     private static final String BLUETOOTH_DISABLE_INBAND_RINGING_KEY = "bluetooth_disable_inband_ringing";
-    private static final String BLUETOOTH_ENABLE_AVDTP_DELAY_REPORT_KEY = "bluetooth_enable_avdtp_delay_reports";
+    private static final String BLUETOOTH_DISABLE_AVDTP_DELAY_REPORT_KEY = "bluetooth_disable_avdtp_delay_reports";
     private static final String BLUETOOTH_SELECT_AVRCP_VERSION_KEY = "bluetooth_select_avrcp_version";
     private static final String BLUETOOTH_SELECT_A2DP_CODEC_KEY = "bluetooth_select_a2dp_codec";
     private static final String BLUETOOTH_SELECT_A2DP_SAMPLE_RATE_KEY = "bluetooth_select_a2dp_sample_rate";
@@ -300,7 +300,7 @@
     private SwitchPreference mBluetoothShowDevicesWithoutNames;
     private SwitchPreference mBluetoothDisableAbsVolume;
     private SwitchPreference mBluetoothDisableInbandRinging;
-    private SwitchPreference mBluetoothEnableAvdtpDelayReport;
+    private SwitchPreference mBluetoothDisableAvdtpDelayReport;
 
     private BluetoothA2dp mBluetoothA2dp;
     private final Object mBluetoothA2dpLock = new Object();
@@ -530,7 +530,7 @@
             removePreference(mBluetoothDisableInbandRinging);
             mBluetoothDisableInbandRinging = null;
         }
-        mBluetoothEnableAvdtpDelayReport = findAndInitSwitchPref(BLUETOOTH_ENABLE_AVDTP_DELAY_REPORT_KEY);
+        mBluetoothDisableAvdtpDelayReport = findAndInitSwitchPref(BLUETOOTH_DISABLE_AVDTP_DELAY_REPORT_KEY);
 
         mBluetoothSelectAvrcpVersion = addListPreference(BLUETOOTH_SELECT_AVRCP_VERSION_KEY);
         mBluetoothSelectA2dpCodec = addListPreference(BLUETOOTH_SELECT_A2DP_CODEC_KEY);
@@ -873,7 +873,7 @@
         updateBluetoothShowDevicesWithoutUserFriendlyNameOptions();
         updateBluetoothDisableAbsVolumeOptions();
         updateBluetoothDisableInbandRingingOptions();
-        updateBluetoothEnableAvdtpDelayReportOptions();
+        updateBluetoothDisableAvdtpDelayReportOptions();
         updateBluetoothA2dpConfigurationValues();
         updatePrivateDnsSummary();
     }
@@ -1549,14 +1549,14 @@
         }
     }
 
-    private void updateBluetoothEnableAvdtpDelayReportOptions() {
-        updateSwitchPreference(mBluetoothEnableAvdtpDelayReport,
-                SystemProperties.getBoolean(BLUETOOTH_ENABLE_AVDTP_DELAY_REPORTS_PROPERTY, false));
+    private void updateBluetoothDisableAvdtpDelayReportOptions() {
+        updateSwitchPreference(mBluetoothDisableAvdtpDelayReport,
+                SystemProperties.getBoolean(BLUETOOTH_DISABLE_AVDTP_DELAY_REPORTS_PROPERTY, false));
     }
 
-    private void writeBluetoothEnableAvdtpDelayReportOptions() {
-        SystemProperties.set(BLUETOOTH_ENABLE_AVDTP_DELAY_REPORTS_PROPERTY,
-                mBluetoothEnableAvdtpDelayReport.isChecked() ? "true" : "false");
+    private void writeBluetoothDisableAvdtpDelayReportOptions() {
+        SystemProperties.set(BLUETOOTH_DISABLE_AVDTP_DELAY_REPORTS_PROPERTY,
+                mBluetoothDisableAvdtpDelayReport.isChecked() ? "true" : "false");
     }
 
     private void updateMobileDataAlwaysOnOptions() {
@@ -2656,8 +2656,8 @@
             writeBluetoothDisableAbsVolumeOptions();
         } else if (preference == mBluetoothDisableInbandRinging) {
             writeBluetoothDisableInbandRingingOptions();
-        } else if (preference == mBluetoothEnableAvdtpDelayReport) {
-            writeBluetoothEnableAvdtpDelayReportOptions();
+        } else if (preference == mBluetoothDisableAvdtpDelayReport) {
+            writeBluetoothDisableAvdtpDelayReportOptions();
         } else if (SHORTCUT_MANAGER_RESET_KEY.equals(preference.getKey())) {
             resetShortcutManagerThrottling();
         } else {
diff --git a/tests/app/Android.mk b/tests/app/Android.mk
index c0c0ccf..02883e3 100644
--- a/tests/app/Android.mk
+++ b/tests/app/Android.mk
@@ -21,6 +21,7 @@
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
 
 LOCAL_PACKAGE_NAME := SettingsTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
 
 LOCAL_INSTRUMENTATION_FOR := Settings