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
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index 31c804d..5958f7b 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -1789,7 +1789,7 @@
// Init the AVRCP Version - Default
values = getResources().getStringArray(R.array.bluetooth_avrcp_version_values);
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);
mBluetoothSelectAvrcpVersion.setValue(values[index]);
mBluetoothSelectAvrcpVersion.setSummary(summaries[index]);