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

Skip to content
Commit 974aa63d authored by Sanket Agarwal's avatar Sanket Agarwal
Browse files

A2DP MediaSession active state management and NPE

UIs (such as SystemUI) depend on MediaSession.isActive state to
determine whether to show it on the overview (or shades). Currently we
are keeping the session active ever since the first bluetooth connect (A2DP) happens.

This change makes the session to be active when the device connects and
the first play happens (i.e. the play state of remote device
irrespective of who initated it) and in-active when device disconnects.

Also, avoid a NPE that may happen due to races between delay in
broadcasts and accesing bluetooth state machine.

Bug: b/28345602
Bug: b/28330860

Change-Id: Id7686308ada0b608b959258d137772ee5f24c18f
(cherry picked from commit ffb10b68)
parent e1c4c4cd
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