I had that happen once with a Samsung, but not an S5. I heard a China Mobile recorded message telling that 911 was the wrong number for emergencies. Phone was locked in my pocket. What I think happened, a button must have got pushed, and then phone somehow got to the emergency dialler and called 911. I just put it down to fluke.
In a pocket, that's very near your skin and so could operate the touch screen. Buttons can inadvertently be operated when a phone is in a pocket which turns the screen on. Have you got the phone in a wallet type case that covers the screen when not using it, or is the screen uncovered in your pocket?