add setting to save the queue on exit

This commit is contained in:
dkanada 2020-06-19 06:40:09 +09:00
commit a4969338df
6 changed files with 23 additions and 0 deletions

View file

@ -178,6 +178,7 @@ public class PlayingNotificationImpl extends PlayingNotification {
private PendingIntent buildPendingIntent(Context context, final String action, final ComponentName serviceName) {
Intent intent = new Intent(action);
intent.setComponent(serviceName);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
return PendingIntent.getService(context, 0, intent, 0);
}
}

View file

@ -110,6 +110,7 @@ public class PlayingNotificationImpl24 extends PlayingNotification {
final ComponentName serviceName = new ComponentName(service, MusicService.class);
Intent intent = new Intent(action);
intent.setComponent(serviceName);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
return PendingIntent.getService(service, 0, intent, 0);
}
}