In brief:
Androidy stuff, the charger shorts the d pins.
Iphony stuff the charger provides a voltage on the d pins, the specifics of which determine the current capability.
In anycase, it is the charger that has the pins short or whatever, the shorting is the charger saying what ITs capablity is, the device looks at it to know how uch it's charging circuit can draw. Remember a usb charger is nothing more than a 5v power supply, the actual charging profile is managed by the device.