There is no sensor inside the iPhone 4. So if the headphone or dock sensor turns pink... thats it.
You're wrong. I took the backplate off my ip4 a few day ago and I saw a sensor beside the battery. There might be more but Didn't want to do an autopsy on my phone.