mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-05 08:33:07 +00:00
Added FLAG_IMMUTABLE
This commit is contained in:
@@ -156,7 +156,7 @@ public class MusicService extends Service implements Playback.PlaybackCallbacks
|
|||||||
Intent mediaButtonIntent = new Intent(Intent.ACTION_MEDIA_BUTTON);
|
Intent mediaButtonIntent = new Intent(Intent.ACTION_MEDIA_BUTTON);
|
||||||
mediaButtonIntent.setComponent(mediaButtonReceiverComponentName);
|
mediaButtonIntent.setComponent(mediaButtonReceiverComponentName);
|
||||||
|
|
||||||
PendingIntent mediaButtonReceiverPendingIntent = PendingIntent.getBroadcast(getApplicationContext(), 0, mediaButtonIntent, 0);
|
PendingIntent mediaButtonReceiverPendingIntent = PendingIntent.getBroadcast(getApplicationContext(), 0, mediaButtonIntent, PendingIntent.FLAG_IMMUTABLE);
|
||||||
|
|
||||||
mediaSession = new MediaSessionCompat(this, getResources().getString(R.string.app_name), mediaButtonReceiverComponentName, mediaButtonReceiverPendingIntent);
|
mediaSession = new MediaSessionCompat(this, getResources().getString(R.string.app_name), mediaButtonReceiverComponentName, mediaButtonReceiverPendingIntent);
|
||||||
mediaSession.setCallback(new MediaSessionCompat.Callback() {
|
mediaSession.setCallback(new MediaSessionCompat.Callback() {
|
||||||
|
|||||||
Reference in New Issue
Block a user