Charger detection improvements