Merge "Add SettingsMultiSelectListPreference style DO NOT MERGE"
diff --git a/Android.mk b/Android.mk
index c59d938..cb856ce 100644
--- a/Android.mk
+++ b/Android.mk
@@ -12,6 +12,7 @@
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := Settings
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
LOCAL_MODULE_TAGS := optional
diff --git a/res/values/strings.xml b/res/values/strings.xml
index bd7ce41..0b50241 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1606,6 +1606,11 @@
<!-- 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>
+
<!-- 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>
<!-- Bluetooth developer settings: Maximum number of connected audio devices -->
diff --git a/res/xml/development_prefs.xml b/res/xml/development_prefs.xml
index fb73ec4..1993857 100644
--- a/res/xml/development_prefs.xml
+++ b/res/xml/development_prefs.xml
@@ -228,6 +228,11 @@
android:title="@string/bluetooth_disable_inband_ringing"
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"/>
+
<ListPreference
android:key="bluetooth_select_avrcp_version"
android:title="@string/bluetooth_select_avrcp_version_string"
diff --git a/src/com/android/settings/development/DevelopmentSettings.java b/src/com/android/settings/development/DevelopmentSettings.java
index 40c827b..2912e17 100644
--- a/src/com/android/settings/development/DevelopmentSettings.java
+++ b/src/com/android/settings/development/DevelopmentSettings.java
@@ -214,11 +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";
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_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";
@@ -297,6 +300,7 @@
private SwitchPreference mBluetoothShowDevicesWithoutNames;
private SwitchPreference mBluetoothDisableAbsVolume;
private SwitchPreference mBluetoothDisableInbandRinging;
+ private SwitchPreference mBluetoothEnableAvdtpDelayReport;
private BluetoothA2dp mBluetoothA2dp;
private final Object mBluetoothA2dpLock = new Object();
@@ -526,6 +530,7 @@
removePreference(mBluetoothDisableInbandRinging);
mBluetoothDisableInbandRinging = null;
}
+ mBluetoothEnableAvdtpDelayReport = findAndInitSwitchPref(BLUETOOTH_ENABLE_AVDTP_DELAY_REPORT_KEY);
mBluetoothSelectAvrcpVersion = addListPreference(BLUETOOTH_SELECT_AVRCP_VERSION_KEY);
mBluetoothSelectA2dpCodec = addListPreference(BLUETOOTH_SELECT_A2DP_CODEC_KEY);
@@ -868,6 +873,7 @@
updateBluetoothShowDevicesWithoutUserFriendlyNameOptions();
updateBluetoothDisableAbsVolumeOptions();
updateBluetoothDisableInbandRingingOptions();
+ updateBluetoothEnableAvdtpDelayReportOptions();
updateBluetoothA2dpConfigurationValues();
updatePrivateDnsSummary();
}
@@ -1542,6 +1548,16 @@
}
}
+ private void updateBluetoothEnableAvdtpDelayReportOptions() {
+ updateSwitchPreference(mBluetoothEnableAvdtpDelayReport,
+ SystemProperties.getBoolean(BLUETOOTH_ENABLE_AVDTP_DELAY_REPORTS_PROPERTY, false));
+ }
+
+ private void writeBluetoothEnableAvdtpDelayReportOptions() {
+ SystemProperties.set(BLUETOOTH_ENABLE_AVDTP_DELAY_REPORTS_PROPERTY,
+ mBluetoothEnableAvdtpDelayReport.isChecked() ? "true" : "false");
+ }
+
private void updateMobileDataAlwaysOnOptions() {
updateSwitchPreference(mMobileDataAlwaysOn, Settings.Global.getInt(
getActivity().getContentResolver(),
@@ -2616,6 +2632,8 @@
writeBluetoothDisableAbsVolumeOptions();
} else if (preference == mBluetoothDisableInbandRinging) {
writeBluetoothDisableInbandRingingOptions();
+ } else if (preference == mBluetoothEnableAvdtpDelayReport) {
+ writeBluetoothEnableAvdtpDelayReportOptions();
} else if (SHORTCUT_MANAGER_RESET_KEY.equals(preference.getKey())) {
resetShortcutManagerThrottling();
} else {
diff --git a/src/com/android/settings/wifi/WifiConfigController.java b/src/com/android/settings/wifi/WifiConfigController.java
index 6935749..d0b85c2 100644
--- a/src/com/android/settings/wifi/WifiConfigController.java
+++ b/src/com/android/settings/wifi/WifiConfigController.java
@@ -517,6 +517,7 @@
mAccessPoint.getSsidStr());
} else {
config.networkId = mAccessPoint.getConfig().networkId;
+ config.hiddenSSID = mAccessPoint.getConfig().hiddenSSID;
}
config.shared = mSharedCheckBox.isChecked();
diff --git a/tests/anomaly-tester/Android.mk b/tests/anomaly-tester/Android.mk
index ade37db..5d48ca8 100644
--- a/tests/anomaly-tester/Android.mk
+++ b/tests/anomaly-tester/Android.mk
@@ -17,6 +17,7 @@
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_PACKAGE_NAME := AnomalyTester
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_INSTRUMENTATION_FOR := Settings
diff --git a/tests/unit/Android.mk b/tests/unit/Android.mk
index 060c3e1..ca7b1cd 100644
--- a/tests/unit/Android.mk
+++ b/tests/unit/Android.mk
@@ -20,6 +20,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := SettingsUnitTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_INSTRUMENTATION_FOR := Settings