From 0a63e8b768b4c10b93acb1cafcfcf027f4817558 Mon Sep 17 00:00:00 2001 From: Pavlin Radoslavov Date: Tue, 10 Jan 2017 15:40:13 -0800 Subject: [PATCH] Moved the Bluetooth-related default config init within onCreate() This should avoid potential crashes in case somehow onCreateView() is called without onCreate() being called first. Test: Manual UI interaction with Developer Settings Bug: 34192829 Change-Id: Iaf46d05f30d20f98727c4dbfb91feef8509c92f7 --- src/com/android/settings/DevelopmentSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java index f085ae3092e..b39097b40be 100644 --- a/src/com/android/settings/DevelopmentSettings.java +++ b/src/com/android/settings/DevelopmentSettings.java @@ -475,6 +475,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment mBluetoothSelectA2dpBitsPerSample = addListPreference(BLUETOOTH_SELECT_A2DP_BITS_PER_SAMPLE_KEY); mBluetoothSelectA2dpChannelMode = addListPreference(BLUETOOTH_SELECT_A2DP_CHANNEL_MODE_KEY); mBluetoothSelectA2dpLdacPlaybackQuality = addListPreference(BLUETOOTH_SELECT_A2DP_LDAC_PLAYBACK_QUALITY_KEY); + initBluetoothConfigurationValues(); mWindowAnimationScale = addListPreference(WINDOW_ANIMATION_SCALE_KEY); mTransitionAnimationScale = addListPreference(TRANSITION_ANIMATION_SCALE_KEY); @@ -668,7 +669,6 @@ public class DevelopmentSettings extends RestrictedSettingsFragment updateUsbConfigurationValues(); } - initBluetoothConfigurationValues(); BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); if (adapter != null) { adapter.getProfileProxy(getActivity(),