Skip to content

Commit

Permalink
Merge branch 'fix/oppo_android_13' into minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanheise committed Sep 12, 2023
2 parents aaa7911 + aa74e07 commit 544e2f8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions audio_service/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.18.12

* Fix crash with Oppo/OnePlus devices running Android 13.

## 0.18.11

* Support custom media controls (@defsub)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -650,8 +650,10 @@ private Notification buildNotification() {
builder.addAction(action);
}
final MediaStyle style = new MediaStyle()
.setMediaSession(mediaSession.getSessionToken())
.setShowActionsInCompactView(compactActionIndices);
.setMediaSession(mediaSession.getSessionToken());
if (Build.VERSION.SDK_INT < 33) {
style.setShowActionsInCompactView(compactActionIndices);
}
if (config.androidNotificationOngoing) {
style.setShowCancelButton(true);
style.setCancelButtonIntent(buildMediaButtonPendingIntent(PlaybackStateCompat.ACTION_STOP));
Expand Down Expand Up @@ -772,7 +774,7 @@ private void releaseMediaSession() {
* Gets called from background thread.
*/
synchronized void setQueue(List<MediaSessionCompat.QueueItem> queue) {
this.queue = queue;
AudioService.queue = queue;
mediaSession.setQueue(queue);
}

Expand Down
2 changes: 1 addition & 1 deletion audio_service/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: audio_service
description: Flutter plugin to play audio in the background while the screen is off.
version: 0.18.11
version: 0.18.12
repository: https://github.com/ryanheise/audio_service/tree/minor/audio_service
issue_tracker: https://github.com/ryanheise/audio_service/issues
topics:
Expand Down

0 comments on commit 544e2f8

Please sign in to comment.