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

Skip to content
Commit c851f854 authored by Pavlin Radoslavov's avatar Pavlin Radoslavov
Browse files

Add null pointer checks when updating A2DP configuration values

Under expected circumstances, those null pointer checks are not
needed: onCreate() is always called before onCreateView(),
and the former creates the objects: mBluetoothSelectA2dpCodec,
mBluetoothSelectA2dpSampleRate, mBluetoothSelectA2dpBitsPerSample,
mBluetoothSelectA2dpChannelMode, mBluetoothSelectA2dpLdacPlaybackQuality .

For some unknown reason, somehow the following chain of calls is executed
before onCreate() :
  onCreateView() ->
  getActivity().registerReceiver(mBluetoothA2dpReceiver, ...) ->
  mBluetoothA2dpReceiver.onReceive(...) ->
  updateBluetoothA2dpConfigurationValues()

Adding the null pointer checks until the issue is understood.

Test: Code compilation
Bug: 35204511
Change-Id: I7c1d81015e66b26544b7b26f36cbc75f11713496
parent b65c7fc8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment