Add default value to Bluetooth AVRCP version property get
When the property isn't set a crash can occur since we try to look up an empty property value. Bug: 36531010 Test: Open Developer options after a factory reset Change-Id: I82c0fde00774ab1a4f3e4c44a715c74d4a7804e9
This commit is contained in:
committed by
Pavlin Radoslavov
parent
07328d3983
commit
bb1174de5e
@@ -1794,7 +1794,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
|
|||||||
// Init the AVRCP Version - Default
|
// Init the AVRCP Version - Default
|
||||||
values = getResources().getStringArray(R.array.bluetooth_avrcp_version_values);
|
values = getResources().getStringArray(R.array.bluetooth_avrcp_version_values);
|
||||||
summaries = getResources().getStringArray(R.array.bluetooth_avrcp_versions);
|
summaries = getResources().getStringArray(R.array.bluetooth_avrcp_versions);
|
||||||
String value = SystemProperties.get(BLUETOOTH_AVRCP_VERSION_PROPERTY);
|
String value = SystemProperties.get(BLUETOOTH_AVRCP_VERSION_PROPERTY, values[0]);
|
||||||
index = mBluetoothSelectAvrcpVersion.findIndexOfValue(value);
|
index = mBluetoothSelectAvrcpVersion.findIndexOfValue(value);
|
||||||
mBluetoothSelectAvrcpVersion.setValue(values[index]);
|
mBluetoothSelectAvrcpVersion.setValue(values[index]);
|
||||||
mBluetoothSelectAvrcpVersion.setSummary(summaries[index]);
|
mBluetoothSelectAvrcpVersion.setSummary(summaries[index]);
|
||||||
|
Reference in New Issue
Block a user