Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a63e8b7 authored by Pavlin Radoslavov's avatar Pavlin Radoslavov Committed by Andre Eisenbach
Browse files

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
parent f952a870
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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(),