mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-27 20:36:51 +01:00
Some key events were not working with the default audio player. Reported in #322
This commit is contained in:
parent
98999993e5
commit
4120d686b8
@ -69,7 +69,9 @@ public class GBMusicControlReceiver extends BroadcastReceiver {
|
||||
Intent upIntent = new Intent(Intent.ACTION_MEDIA_BUTTON, null);
|
||||
KeyEvent upEvent = new KeyEvent(eventtime, eventtime, KeyEvent.ACTION_UP, keyCode, 0);
|
||||
upIntent.putExtra(Intent.EXTRA_KEY_EVENT, upEvent);
|
||||
upIntent.setPackage(audioPlayer);
|
||||
if (!"default".equals(audioPlayer)) {
|
||||
upIntent.setPackage(audioPlayer);
|
||||
}
|
||||
context.sendOrderedBroadcast(upIntent, null);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user