properly update ComponentName package
This commit is contained in:
parent
378c47f8eb
commit
4ea7448f18
@ -250,7 +250,8 @@ public class PlaybackService extends Service implements SharedPreferences.OnShar
|
|||||||
taskManager = new PlaybackServiceTaskManager(this, taskManagerCallback);
|
taskManager = new PlaybackServiceTaskManager(this, taskManagerCallback);
|
||||||
mediaPlayer = new PlaybackServiceMediaPlayer(this, mediaPlayerCallback);
|
mediaPlayer = new PlaybackServiceMediaPlayer(this, mediaPlayerCallback);
|
||||||
|
|
||||||
ComponentName eventReceiver = new ComponentName(getPackageName(), MediaButtonReceiver.class.getName());
|
ComponentName eventReceiver = new ComponentName(MediaButtonReceiver.class.getPackage().getName(),
|
||||||
|
MediaButtonReceiver.class.getName());
|
||||||
Intent mediaButtonIntent = new Intent(Intent.ACTION_MEDIA_BUTTON);
|
Intent mediaButtonIntent = new Intent(Intent.ACTION_MEDIA_BUTTON);
|
||||||
mediaButtonIntent.setComponent(eventReceiver);
|
mediaButtonIntent.setComponent(eventReceiver);
|
||||||
PendingIntent buttonReceiverIntent = PendingIntent.getBroadcast(this, 0, mediaButtonIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
PendingIntent buttonReceiverIntent = PendingIntent.getBroadcast(this, 0, mediaButtonIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user