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
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index f085ae3..b39097b 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -475,6 +475,7 @@
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 @@
updateUsbConfigurationValues();
}
- initBluetoothConfigurationValues();
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
if (adapter != null) {
adapter.getProfileProxy(getActivity(),