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

Skip to content
Commit d6c39db2 authored by Ray Kuo's avatar Ray Kuo
Browse files

AVRCP: Check mMediaSessionManager is not null before handling callback

While the Bluetooth is turning off and MediaPlayerList is cleaned up,
handling the unexpected onAddressedPlayerChanged() callback from the
MediaSessionManager causes the NPE. This NPE happens at
getActivePlayer().unregisterCallback() in the setActivePlayer() function
due to the return value of getActivePlayer() will be null.

Before handling the onAddressedPlayerChanged() callback, add a check of
mMediaSessionManager is not cleaned up to fix this issue.

Bug: 135727092
Test: make, tune the timing of cleaning up MediaPlayerList to hit this
issue, perform Airplane mode on/off and AVRCP related tests.

Change-Id: I7ef66d1977a6e31c989e2d1ec4a87ca8144b3778
parent 24243f4e
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