Android turns on randomly

Hey guys,
I got a Xperia Z, recently I had the phone in my pocket in the school.
I used it about 2 hours before I turned it off with 80% battery, while I was sitting in a lesson, I noticed that
my phone went hot, the strange thing is that I turned it off before.
Well, after the school it was randomly on, but the screen didn't work so I had to hard-restart the phone.
When it was on again, battery was 1%, I turned it off with like 80%.
I had the same problem with an other device too, and I'm definitely sure that I didn't turn it on while

I was in school. I'm running the latest DirtyUnicorns with Rojak kernel.
You may know some solutions?
Thanks for help

Hey guys,
I got a Xperia Z, recently I had the phone in my pocket in the school.
I used it about 2 hours before I turned it off with 80% battery, while I was sitting in a lesson, I noticed that
my phone went hot, the strange thing is that I turned it off before.
Well, after the school it was randomly on, but the screen didn't work so I had to hard-restart the phone.
When it was on again, battery was 1%, I turned it off with like 80%.
I had the same problem with an other device too, and I'm definitely sure that I didn't turn it on while

I was in school. I'm running the latest DirtyUnicorns with Rojak kernel.
You may know some solutions?
Thanks for help

XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality.Are you a developer?