On this page

Symptoms

During a secure call, the side volume keys doesn't change the voice volume.

Cause

During a call, the proximity sensor poweroff the screen and disable the side keys. It happens only on HTC devices with HTC Sense 4.0 and Android Ice Cream Sandwich

Workaround

Move the phone from your ear and use the volume keys.