With the removal of the headphone jack, phones have lost the ability to not know what is plugged in. USB and Bluetooth devices have information that the phone could account for but chooses not to.
My phone warns me I've been listening to music at a dangerous volume for a dangerous amount of time 100% of the time when I'm driving and listening via aux.
yeah lol, I'm often plugging in slightly high impedance headphones that it just can't drive very well. it's never seemed worth it run run a dac or get a special pair of phone headphones. i rarely use it that way anyway.
but yeah, pretty much every time i plug them in i have to confirm i want to hurt myself before it will allow them to be set to a useable volume.
and yes, i do still have a headphone jack, they are still out there if you're willing to not get a super expensive phone.
I held on to the 3.5mm jack for so long but i just couldnt resist the fairphone anymore. I need my replaceable battery and ports and stuff. Changing a screen or usbc port in less than 10 minutes is just a gamechanger if anything ever breaks.
Since 3.5mm jacks with insertion leaf switches are larger, the audio chips instead check for approx. 32 Ω of impedance on the audio channels, or connection between the first two pins (MIC and GND), which doubles as button press detection (some phones, including every Samsung one, check for several resistance levels, allowing for separate ⏮⏭ buttons rather than just the multipurpose ⏯). This makes sure that (high-impedance) line-in devices whose plugs bridge the first 2 pins get detected (as a side effect, your headset with mic and 1 button will only show up with the micless icon if you hold the button while plugging it in).
Therefore, phones do detect line-level devices vs headphones or aux-in ones (or at least have hardware to do so) but other than perhaps some EQ and level adjuatment in the DAC, there is no effect.