I know that some laptops (e.g. Lenovo ThinkPad) have user-controllable software to disable battery charging even when AC power is plugged in. This feature takes precedence.
When a typical mobile device (phone or tablet) is connected to a USB port, the mobile device will automatically draw power from USB to supply its electronics and charge its battery. But this default behavior isn't always desirable.
For example, a laptop on battery probably should not waste run time supplying any power to a phone. Presumably a phone is connected to a laptop for data transfer. So the laptop should not power the phone's electronics or charge its battery.
If mobile devices could control the power they demand from the USB port, along the lines of the ThinkPad feature, they would be less of a drain on the USB host. I'm aware that a workaround is to charge a phone to 100% from AC power, then immediately plug the phone into the USB port. Because the phone's battery is full, it should only draw power from the USB port for the electronics.
But is such technology already implemented in some mobile devices, allowing them to optimize performance in this way?