I do lots of testing of apps in real phones, not emulators.
The thing is that the phones must be connected to the PC all day. Because of this, phones battery get swollen and I have to buy phones regularly.
Do you know any android phone which can be connected and on all day all week without getting swollen after a time?
Must be real phones, emulators are descarted.
Android can do that by itself these days; at least LineageOS can.
Lineage and some vendor ROMs like OneUI can. Pixels can’t.
https://support.google.com/pixelphone/answer/6090612?hl=en
“To protect your battery health and help extend its lifespan, your phone automatically limits charging to about 70%-80% under certain conditions, such as: Continuous charging for more than a few hours under high temperatures. Continuous charging for more than several days.”
That’s behavioral recommendations, not a setting in the phone.
He wouldn’t need the setting if he’s leaving the phone plugged in all the time.
But that’s why they need the setting, because they are leaving it plugged in all the time.
Per the way that feature is supposed to work, leaving it plugged in all the time would stop charging at a certain point in an effort to prevent battery degradation and thermal runaway.
It’s not a setting because it works automatically. You don’t need a switch to toggle this behaviour. It’s always on.