Do not stop service on unknown media key

This commit is contained in:
ByteHamster 2019-08-23 19:42:19 +02:00
parent b5c63db0e9
commit e5d72c90f6
1 changed files with 1 additions and 1 deletions

View File

@ -463,7 +463,7 @@ public class PlaybackService extends MediaBrowserServiceCompat {
if (keycode != -1) {
Log.d(TAG, "Received media button event");
boolean handled = handleKeycode(keycode, true);
if (!handled) {
if (!handled && !stateManager.hasReceivedValidStartCommand()) {
stateManager.stopService();
return Service.START_NOT_STICKY;
}