Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc6dfb02 authored by LuK1337's avatar LuK1337
Browse files

Eleven: Fix crash after receiving media button intent

* Since eleven is not allowed to launch background services
  we need to use ctx.startForegroundService().

Change-Id: Id8eea0f43c3fec982dc14ee289229793ab908739
parent f1b554ba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -76,6 +76,6 @@ public class MediaButtonIntentReceiver extends WakefulBroadcastReceiver {
        i.putExtra(MusicPlaybackService.CMDNAME, command);
        i.putExtra(MusicPlaybackService.FROM_MEDIA_BUTTON, true);
        i.putExtra(MusicPlaybackService.TIMESTAMP, timestamp);
        startWakefulService(context, i);
        context.startForegroundService(i);
    }
}