My Pixel 5 had an issue with its power button a few weeks back where it would self-press the button. (I believe some rain had gotten in somehow and was shorting the button).
This resulted in the phone doing various things, such as opening the camera (double press of power), trying to turn itself off, and, worse: activating the "I'm in danger mode" (5 power presses in succession) and counting down to calling 911.
I caught it and cancelled before it dialed, then turned off the phone. However, as you might guess, the phone turned itself back on!
Fortunately I was able to (with much aggravation and accidental swaps to the camera app), eventually get to settings and disable the feature.
This resulted in the phone doing various things, such as opening the camera (double press of power), trying to turn itself off, and, worse: activating the "I'm in danger mode" (5 power presses in succession) and counting down to calling 911.
I caught it and cancelled before it dialed, then turned off the phone. However, as you might guess, the phone turned itself back on!
Fortunately I was able to (with much aggravation and accidental swaps to the camera app), eventually get to settings and disable the feature.