Commit e04efc0d authored by Geoffrey Métais's avatar Geoffrey Métais

Set Playbackservice foreground only when needed

parent 73e27544
......@@ -247,7 +247,7 @@ public class PlaybackService extends MediaBrowserServiceCompat{
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
if (AndroidUtil.isOOrLater && !VLCApplication.isForeground()) forceForeground();
if (AndroidUtil.isOOrLater && !mIsForeground && !VLCApplication.isForeground()) forceForeground();
if (intent == null) return START_NOT_STICKY;
final String action = intent.getAction();
if (Intent.ACTION_MEDIA_BUTTON.equals(action)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment