I've got a stock Nexus 6p and I have noticed several times that the phone has come on by itself while in my front pocket and is waiting for some kind of input. Furthermore, in some cases it has somehow got to the dialer which has been filled with a long string random digits - fortunately it hasn't actually dialed any of them yet! I'm not sure how digits are even being dialed, as I keep the screen facing in (as the radio antennas are exposed on the back).
I turned off "Ambient Display" but this is still happening.
My phone is protected both by a PIN and the fingerprint reader, although it appears the dialer doesn't need either one to be activated?
There are apparently some apps which will "prevent" your phone from waking up when the proximity sensor detects the phone is on your pocket, but I'm wary about these without knowing more technical details: for instance, is it really possible to prevent the screen from coming on, or it detecting the screen has coming on with the proximity sensor in the "near" state and then shutting the screen back off? Are such apps even necessary any more? This seems like such a fundamental necessity that it would be built into the OS by now!
Is there some feature in Android to prevent the dialer from coming up at all without unlocking the phone? I can't even figure out how to get the dialer to come up without getting past the lock screen. (Do I have to click "Emergency" from the PIN entry screen? I'm afraid to test that as it might go directly to dialing 911 without further input!) I don't think I'm accidentally unlocking the phone with my finger as I don't usually keep my hands in my pockets; further I haven't felt any haptic feedback, and half the time I have trouble getting my finger in the right orientation to get recognized when I'm actively trying to unlock the phone.