On a tangentially related topic:<p>When I used to listen to music on my previous phone (a Nexus 4) I would have to constantly adjust the phone&#x27;s volume: all the way to maximum when using an aux cord in my car, and way back down when using headphones. Recently I upgraded to a Nexus 5X, and noticed a surprising new feature. Somehow, the phone detects which device it&#x27;s plugged into, and remembers a separate, previously-set volume level for each device.<p>Does anyone know how this works? It&#x27;s really convenient, which makes it surprising that I can&#x27;t find it documented or even mentioned anywhere online. I&#x27;m assuming the audio hardware is somehow sensing the impedance of whatever it&#x27;s connected to, but is that really a reliable indicator of headphones vs. line-level inputs?