When I connect my Android 4 phone (Galaxy Nexus) to a computer using USB, the storage of the phone is automatically mounted on the computer. How can I connect my phone using USB for charging only? In Android 2.x I had to explicitely choose "USB storage", in Android 4 there is only the choice between MTP and PTP? ):
When your phone is plugged into a computer there should be a USB symbol in the notifications bar. Tapping the notification associated with this should allow you to switch between MTP/PTP (whichever you have selected in settings) and "just charge".
EDIT: apologies, it looks as though this is an HTC-specific thing, and not general. I'm new here - should I leave this answer with this edit, or delete the answer?