reading comprehension.
Nobody said anything about teaching the battery. The battery charging controller built into the phone periodically measures charge state, and places the values into registers that the cpu can query. Percent of charge can never be known accurately until the is run to depletion, so until then, the charge controller simple guesses at battery life based on preprogrammed numbers.
Once the controller has seen the battery's built in protection circuit take the battery off line and then see the battery fully recharged it can then provide better estimates of actual battery runtime.
Doing this routinely is not good for your battery, and you are better off charging before your battery gets that low.
Sent from my htc one x using tapatalk 2