I have seen the following gotcha giving me java.io.IOException: setPreviewDisplay failed:
If you do both video and photo, there are two functions, camera.unlock() and camera.reconnect(). You must camera.unlock() before recording a video and camera.reconnect() before taking a photo.