Add an option to ignore media button presses on headsets
Description
I own a headset with broken physical buttons. Every day or two, it will start spamming next track/previous track button presses. Needless to say, such a glitch makes the player unusable whenever it occurs.
Unfortunately, on Android, there is no way to disable media buttons globally without rooting the phone or physically blocking the pin (which also disables the mic). This means I need the option to make the player ignore those presses.
I'm planning to use my weekend to implement it myself. But I would also like to know if someone else is interested in such a feature.
Expected behavior
My plan is to add a new option under Audio/Headset, which would look like this:
Ignore headset media button presses
Don't react to the pause, the next track, and the previous track button presses on headsets
When the option is enabled, it should do precisely what its description states.
However, as I currently don't know how media button handling works, the exact behavior the option should have is open to suggestions.