How close is this to being implemented and this is basically all code needed to make it work
If battery % 80 stop charging which exploit would os need to protect against with this feature

Until then, perhaps Accubattery. Not making any assumption about privacy, but you could easily block net access

    5 days later

    PaulDavis
    Yeah this is how I've been doing it for the past few years. It works surprisingly well!

    It has woken me up once or twice as well.