Mine, happened the same way while I'm in our church this afternoon, my phone has a built-in battery so there is no way that I can shut it down ferociously, with that I restarted it and I pressed the off button while under checking time causing my phone to restart of course. But then it, happened again.. then I did the same thing.. the 3rd time, but before it restarts "I pray to God that it may be opened for I really need it and what would I do if I lose it." Then after ending the prayer I hid my phone to may bag, leaving and trusting it all to God.
Then guess what? mine works well now.. hehe :) You just have to be reminded that you should trust and ask Him. :) He always listens.