<string name="legacy_dhcp_client">Use legacy DHCP client</string>
<!-- Setting Checkbox title whether to always keep cellular data active. [CHAR LIMIT=80] -->
<string name="mobile_data_always_on">Cellular data always active</string>
+ <!-- Setting Checkbox title for disabling Bluetooth absolute volume -->
+ <string name="bluetooth_disable_absolute_volume">Disable absolute volume</string>
<!-- setting Checkbox summary whether to show options for wireless display certification -->
<string name="wifi_display_certification_summary">Show options for wireless display certification</string>
<string name="verify_apps_over_usb_title">Verify apps over USB</string>
<!-- Summary of checkbox setting to perform package verification on apps installed over USB/ADT/ADB [CHAR LIMIT=NONE] -->
<string name="verify_apps_over_usb_summary">Check apps installed via ADB/ADT for harmful behavior.</string>
+ <!-- Summary of checkbox for disabling Bluetooth absolute volume -->
+ <string name="bluetooth_disable_absolute_volume_summary">Disables the Bluetooth absolute volume feature in case of volume issues with remote devices such as unacceptably loud volume or lack of control.</string>
<!-- Title of checkbox setting that protects external storage. [CHAR LIMIT=32] -->
<string name="enforce_read_external_title" product="nosdcard">Protect USB storage</string>
private static final String MOBILE_DATA_ALWAYS_ON = "mobile_data_always_on";
private static final String KEY_COLOR_MODE = "color_mode";
+ private static final String BLUETOOTH_DISABLE_ABSOLUTE_VOLUME_KEY =
+ "bluetooth_disable_absolute_volume";
+ private static final String BLUETOOTH_DISABLE_ABSOLUTE_VOLUME_PROPERTY =
+ "persist.bluetooth.disableabsvol";
+
private static final String INACTIVE_APPS_KEY = "inactive_apps";
private static final String OPENGL_TRACES_KEY = "enable_opengl_traces";
private SwitchPreference mWifiAggressiveHandover;
private SwitchPreference mLegacyDhcpClient;
private SwitchPreference mMobileDataAlwaysOn;
+ private SwitchPreference mBluetoothDisableAbsVolume;
private SwitchPreference mWifiAllowScansWithTraffic;
private SwitchPreference mStrictMode;
mMobileDataAlwaysOn = findAndInitSwitchPref(MOBILE_DATA_ALWAYS_ON);
mLogdSize = addListPreference(SELECT_LOGD_SIZE_KEY);
mUsbConfiguration = addListPreference(USB_CONFIGURATION_KEY);
+ mBluetoothDisableAbsVolume = findAndInitSwitchPref(BLUETOOTH_DISABLE_ABSOLUTE_VOLUME_KEY);
mWindowAnimationScale = addListPreference(WINDOW_ANIMATION_SCALE_KEY);
mTransitionAnimationScale = addListPreference(TRANSITION_ANIMATION_SCALE_KEY);
updateMobileDataAlwaysOnOptions();
updateSimulateColorSpace();
updateUSBAudioOptions();
+ updateBluetoothDisableAbsVolumeOptions();
}
private void resetDangerousOptions() {
mLegacyDhcpClient.isChecked() ? 1 : 0);
}
+ private void updateBluetoothDisableAbsVolumeOptions() {
+ updateSwitchPreference(mBluetoothDisableAbsVolume,
+ SystemProperties.getBoolean(BLUETOOTH_DISABLE_ABSOLUTE_VOLUME_PROPERTY, false));
+ }
+
+ private void writeBluetoothDisableAbsVolumeOptions() {
+ SystemProperties.set(BLUETOOTH_DISABLE_ABSOLUTE_VOLUME_PROPERTY,
+ mBluetoothDisableAbsVolume.isChecked() ? "true" : "false");
+ }
+
private void updateMobileDataAlwaysOnOptions() {
updateSwitchPreference(mMobileDataAlwaysOn, Settings.Global.getInt(
getActivity().getContentResolver(),
writeUSBAudioOptions();
} else if (INACTIVE_APPS_KEY.equals(preference.getKey())) {
startInactiveAppsFragment();
+ } else if (preference == mBluetoothDisableAbsVolume) {
+ writeBluetoothDisableAbsVolumeOptions();
} else {
return super.onPreferenceTreeClick(preferenceScreen, preference);
}