Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.
This repository was archived by the owner on Jan 9, 2026. It is now read-only.

Black Player #557

@EnkiOficial

Description

@EnkiOficial

@Override
public void onCustomAction(@NonNull String action, Bundle extras) {
if (CUSTOM_ACTION_THUMBS_UP.equals(action)) {
LogHelper.i(TAG, "onCustomAction: favorite for current track");
MediaSessionCompat.QueueItem currentMusic = mQueueManager.getCurrentMusic();
if (currentMusic != null) {
String mediaId = currentMusic.getDescription().getMediaId();
if (mediaId != null) {
String musicId = MediaIDHelper.extractMusicIDFromMediaID(mediaId);
mMusicProvider.setFavorite(musicId, !mMusicProvider.isFavorite(musicId));
}
}
// playback state needs to be updated because the "Favorite" icon on the
// custom action will change to reflect the new favorite state.
updatePlaybackState(null);
} else {
LogHelper.e(TAG, "Unsupported action: ", action);
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions