Review suggestions

pull/8678/head
Stypox 2022-07-26 16:35:57 +02:00 zatwierdzone przez litetex
rodzic 510efaae97
commit 973a966011
2 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -126,7 +126,7 @@ public class PlayQueueNavigator implements MediaSessionConnector.QueueNavigator
.setTitle(item.getTitle())
.setSubtitle(item.getUploader());
// set additional metadata for A2DP/AVRCP
// set additional metadata for A2DP/AVRCP (Audio/Video Bluetooth profiles)
final Bundle additionalMetadata = new Bundle();
additionalMetadata.putString(MediaMetadataCompat.METADATA_KEY_TITLE, item.getTitle());
additionalMetadata.putString(MediaMetadataCompat.METADATA_KEY_ARTIST, item.getUploader());

Wyświetl plik

@ -105,8 +105,10 @@ public final class NotificationUtil {
final int[] compactSlots = compactSlotList.stream().mapToInt(Integer::intValue).toArray();
final MediaStyle mediaStyle = new MediaStyle().setShowActionsInCompactView(compactSlots);
player.UIs().get(MediaSessionPlayerUi.class).flatMap(MediaSessionPlayerUi::getSessionToken)
.ifPresent(mediaStyle::setMediaSession);
player.UIs()
.get(MediaSessionPlayerUi.class)
.flatMap(MediaSessionPlayerUi::getSessionToken)
.ifPresent(mediaStyle::setMediaSession);
builder.setStyle(mediaStyle)
.setPriority(NotificationCompat.PRIORITY_HIGH)