Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Devices/Android versions reproduced on: Android 9
On Android 9, Bluetooth media browser service (A2dpMediaBrowserService) is a MediaBrowserService based service, not MediaBrowsesrServiceCompat based, so when A2dpMediaBrowserService set the session token, there is no EXTRA_SESSION_BINDER in its extras.
When an app has been connected to the A2dpMediaBrowserService with MediaBrowserCompat, then we do a bluetooth re-enable, this will cause A2dpMediaBrowserService to restart, and generates a new session token, then the app use the same MediaBrowserCompat instance to make a reconnection to A2dpMediaBrowserService, MediaBrowserImplApi21 .mMediaSessionToken will not be updated because there is no EXTRAS, so when the app use 'getSessionToken' in 'onConnected' callback, the old session token (before reconnection) returns.