The mini jack port on my phone seems to be slightly broken, and things plugged in would trigger music controls (like pausing/playing, or volume control). At first this only happened with speakers that have their own power source or battery, but now also with ordinary earphones, with the phone in a pocket for example
How can I disable those controls completely?
I use an Xperia Z5 mini
Android version 7.1.1