Bluetooth MaxConnectedAudioDevices show correct number
* When the preference is changed by the user, it will update the UI * When the Developer options is enabled, it will set the system property to default number * Change string "Maximum number of connected Bluetooth audio devices" to "Maximum connected Bluetooth audio devices" per discussion with Lindsay Bug: 71603731 Test: m ROBOTEST_FILTER="BluetoothMaxConnectedAudioDevicesPreferenceControllerTest" RunSettingsRoboTests -j40 Change-Id: I3e59534585065c84530da73ffded21894c845ce9
This commit is contained in:
@@ -67,6 +67,7 @@ public class BluetoothMaxConnectedAudioDevicesPreferenceController extends
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
SystemProperties.set(BLUETOOTH_MAX_CONNECTED_AUDIO_DEVICES_PROPERTY, newValue.toString());
|
||||
updateState(preference);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -88,13 +89,13 @@ public class BluetoothMaxConnectedAudioDevicesPreferenceController extends
|
||||
@Override
|
||||
protected void onDeveloperOptionsSwitchEnabled() {
|
||||
mPreference.setEnabled(true);
|
||||
mPreference.setValue(mListValues[0]);
|
||||
mPreference.setSummary(mListSummaries[0]);
|
||||
updateState(mPreference);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDeveloperOptionsSwitchDisabled() {
|
||||
mPreference.setEnabled(false);
|
||||
SystemProperties.set(BLUETOOTH_MAX_CONNECTED_AUDIO_DEVICES_PROPERTY, mListValues[0]);
|
||||
mPreference.setValue(mListValues[0]);
|
||||
mPreference.setSummary(mListSummaries[0]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user