Merge "Add null pointer checks when updating A2DP configuration values" am: 6f7437580c am: bd3f96703c am: fae23e1e00

am: 73aa2c6b3f

Change-Id: Iac81cb29671c198414a53c517deb6db962294d0a
This commit is contained in:
Pavlin Radoslavov
2017-02-11 01:34:12 +00:00
committed by android-build-merger

View File

@@ -1847,7 +1847,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
default: default:
break; break;
} }
if (index >= 0) { if (index >= 0 && mBluetoothSelectA2dpCodec != null) {
summaries = resources.getStringArray(R.array.bluetooth_a2dp_codec_summaries); summaries = resources.getStringArray(R.array.bluetooth_a2dp_codec_summaries);
streaming = resources.getString(R.string.bluetooth_select_a2dp_codec_streaming_label, summaries[index]); streaming = resources.getString(R.string.bluetooth_select_a2dp_codec_streaming_label, summaries[index]);
mBluetoothSelectA2dpCodec.setSummary(streaming); mBluetoothSelectA2dpCodec.setSummary(streaming);
@@ -1874,7 +1874,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
default: default:
break; break;
} }
if (index >= 0) { if (index >= 0 && mBluetoothSelectA2dpSampleRate != null) {
summaries = resources.getStringArray(R.array.bluetooth_a2dp_codec_sample_rate_summaries); summaries = resources.getStringArray(R.array.bluetooth_a2dp_codec_sample_rate_summaries);
streaming = resources.getString(R.string.bluetooth_select_a2dp_codec_streaming_label, summaries[index]); streaming = resources.getString(R.string.bluetooth_select_a2dp_codec_streaming_label, summaries[index]);
mBluetoothSelectA2dpSampleRate.setSummary(streaming); mBluetoothSelectA2dpSampleRate.setSummary(streaming);
@@ -1896,7 +1896,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
default: default:
break; break;
} }
if (index >= 0) { if (index >= 0 && mBluetoothSelectA2dpBitsPerSample != null) {
summaries = resources.getStringArray(R.array.bluetooth_a2dp_codec_bits_per_sample_summaries); summaries = resources.getStringArray(R.array.bluetooth_a2dp_codec_bits_per_sample_summaries);
streaming = resources.getString(R.string.bluetooth_select_a2dp_codec_streaming_label, summaries[index]); streaming = resources.getString(R.string.bluetooth_select_a2dp_codec_streaming_label, summaries[index]);
mBluetoothSelectA2dpBitsPerSample.setSummary(streaming); mBluetoothSelectA2dpBitsPerSample.setSummary(streaming);
@@ -1915,7 +1915,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
default: default:
break; break;
} }
if (index >= 0) { if (index >= 0 && mBluetoothSelectA2dpChannelMode != null) {
summaries = resources.getStringArray(R.array.bluetooth_a2dp_codec_channel_mode_summaries); summaries = resources.getStringArray(R.array.bluetooth_a2dp_codec_channel_mode_summaries);
streaming = resources.getString(R.string.bluetooth_select_a2dp_codec_streaming_label, summaries[index]); streaming = resources.getString(R.string.bluetooth_select_a2dp_codec_streaming_label, summaries[index]);
mBluetoothSelectA2dpChannelMode.setSummary(streaming); mBluetoothSelectA2dpChannelMode.setSummary(streaming);
@@ -1941,7 +1941,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
index = -1; index = -1;
break; break;
} }
if (index >= 0) { if (index >= 0 && mBluetoothSelectA2dpLdacPlaybackQuality != null) {
summaries = resources.getStringArray(R.array.bluetooth_a2dp_codec_ldac_playback_quality_summaries); summaries = resources.getStringArray(R.array.bluetooth_a2dp_codec_ldac_playback_quality_summaries);
streaming = resources.getString(R.string.bluetooth_select_a2dp_codec_streaming_label, summaries[index]); streaming = resources.getString(R.string.bluetooth_select_a2dp_codec_streaming_label, summaries[index]);
mBluetoothSelectA2dpLdacPlaybackQuality.setSummary(streaming); mBluetoothSelectA2dpLdacPlaybackQuality.setSummary(streaming);