How to disable headset jack control

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
model E5823
Android version 7.1.1

Show Accepted Answer

Guest Quick Reply (No URL, BBcode or HTML)

Last post by dubuque.dawson
47 minutes ago
Last post by kheaney
2 hours ago
Last post by
2 hours ago
Last post by dorcas67
1 hour ago
note 8
Started by rosalind33
Last post by stracke.mitchel
3 hours ago