There is a setting in modern devices. Apple started doing it a few years ago, especially if you’re someone who charges their phone over night. It’ll stay at a medium charge and display a message that says “Will finish charging by X:XX AM” (generally right before your alarm goes off.)
Their laptops will also stay at ~80% if you leave it plugged in all the time.
It wasn’t a setting back in the day because they always wanted “maximum” performance and didn’t care about longevity.
Latest Answers