In charging mode, force shutdown when unplugging power cable
Created by: ollieparanoid
I've also noticed that one of my devices doesn't automatically shutdown the phone when the usb gets removed. How do we want to handle that case?
We could detect if the phone is currently charging or not in
charging-sdl (it should be possible the same way we read out the charging level) and when it is not charging anymore, wait 5 seconds and then turn off the phone (e.g. look at busybox' source code for "shutdown" and execute the same syscall).