It's an amazing piece of braindead UI that holding down the power button for ~5 seconds on an Android phone triggers a reboot, even on a locked screen. Apparently no one at Google carries items other than a phone in their pockets.
I don't know how much stuff you carry with you, but with my 5'5" phone doesn't reboot with my keys on my pocket.
[1] http://www.androidpolice.com/2015/12/02/sony-is-trying-to-pu...
On the devices I've worked with, that button handling is done by the power management silicon and not by software at all.