MediaSessionService: Add missing addSession call

PiperOrigin-RevId: 420285295
This commit is contained in:
olly 2022-01-07 15:07:39 +00:00 committed by bachinger
parent 3d8b1c9904
commit e06b15506c

View file

@ -357,9 +357,10 @@ public abstract class MediaSessionService extends Service {
if (session == null) {
ControllerInfo controllerInfo = ControllerInfo.createLegacyControllerInfo();
session = onGetSession(controllerInfo);
}
if (session == null) {
return START_STICKY;
if (session == null) {
return START_STICKY;
}
addSession(session);
}
KeyEvent keyEvent = intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT);
if (keyEvent != null) {