Android 5.1 "battery killer" glitch?

A

AC Question

Hello

I was messing around w android 5.1 today and i found a "bug"... Anyways my battery was nearly dead so i left my phone screen on so it would completely empty and turn itself off, and when it turned itself off i turned it back on. Ofc it didn't boot to the menu but it shut down somewhere in the booting process ( i assume the battery is really empty at this point). But i turned it on again and it booted to the starting android animation and then a window appeared saying " Android is starting: Optimising app 1 of 120..." Its the window that you usualy get after the system update but the strange thing is the battery was still dead but the phone didn't shut itself off ! Anyways it did that for a while so i thought... The phone can do that process for a while right (if you have 300 apps that can take up to 15 min or more), and if your battery is empty enough you can undervoltage the battery cells ? I don't know at what voltage the system assumes the battery is empty but if its low enough it can drain them dangerously low! I thought this was a one time thing so i tried to do that again and it repeated itself and even worse i still didn't plug the phone in the ac adaptor! So i am assuming the phone doesn't check the battery level when its "optimising the apps"? And yes this can be dangerous for the battery!

If you have any more questions feel free to ask. And if some one can explain this thing i would like that aswell ;)