The autofocus problem can be a hardware problem. I had a HTC Touch PRO with the same problem and trust me "banging it" will not solve the problem. The problem can be easily solved with a new camera module.
its a hardware problem i know maybe the bang bang would have fixed it but no. I think i somehow pressed the lens a little maybe. Can it be fixed ,,??
I didn't manage to fix that on my HTC since the autofocus is based on a magnet and a coil. If that coil is somehow damaged the autofocus will not work.