Hacker News new | ask | show | jobs
by CamperBob2 463 days ago
Sometimes things are much simpler than they seem at first. You set a nonvolatile flag at startup time: badShutdown=true. Prior to shutting down normally, you clear the flag. Then, if the flag is ever found to be set at startup time, you can assume that a crash occurred.

Whether the crash was really due to the battery can be inferred from the battery's age. If the battery is relatively new or is otherwise determined to be OK, don't issue this particular warning. If it's within, say, 90% of the expected service life, then the warning makes sense.

In any event, logic similar to the above was employed at some point to determine when to degrade the phone's performance. That is the point where the warning should have been issued. There are no valid excuses for not doing so.

1 comments

So, no, you've not worked with batteries, battery management systems, or anything of the sort.

Determining battery health is hard.

LOL, so is building an iPhone.

Carrying water for a trillion-dollar corporation for free, though... that's so easy that anyone can do it. The only question is why.