Skip to content

Commit d4b0217

Browse files
committed
session: fix IllegalStateException when calling setSessionExtras()
...from thread which isn't application thread. This change makes the demo app work with player using a non-main application thread.
1 parent a1738f9 commit d4b0217

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/session/src/main/java/androidx/media3/session/MediaSessionLegacyStub.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ public void onSessionExtrasChanged(int seq, Bundle sessionExtras) {
11341134
PlayerWrapper playerWrapper = sessionImpl.getPlayerWrapper();
11351135
playerWrapper.setLegacyExtras(sessionExtras);
11361136
sessionCompat.setExtras(playerWrapper.getLegacyExtras());
1137-
sessionCompat.setPlaybackState(sessionImpl.getPlayerWrapper().createPlaybackStateCompat());
1137+
updateLegacySessionPlaybackState(sessionImpl.getPlayerWrapper());
11381138
}
11391139

11401140
@Override

0 commit comments

Comments
 (0)