Commit e06b1550 by olly Committed by bachinger

MediaSessionService: Add missing addSession call

PiperOrigin-RevId: 420285295
parent 3d8b1c99
...@@ -357,10 +357,11 @@ public abstract class MediaSessionService extends Service { ...@@ -357,10 +357,11 @@ public abstract class MediaSessionService extends Service {
if (session == null) { if (session == null) {
ControllerInfo controllerInfo = ControllerInfo.createLegacyControllerInfo(); ControllerInfo controllerInfo = ControllerInfo.createLegacyControllerInfo();
session = onGetSession(controllerInfo); session = onGetSession(controllerInfo);
}
if (session == null) { if (session == null) {
return START_STICKY; return START_STICKY;
} }
addSession(session);
}
KeyEvent keyEvent = intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT); KeyEvent keyEvent = intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT);
if (keyEvent != null) { if (keyEvent != null) {
session.getSessionCompat().getController().dispatchMediaButtonEvent(keyEvent); session.getSessionCompat().getController().dispatchMediaButtonEvent(keyEvent);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment