SurfacePreviewStrategy(CameraView cameraView) {
   this.cameraView = cameraView;
   preview = new SurfaceView(cameraView.getContext());
   previewHolder = preview.getHolder();
   previewHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
   previewHolder.addCallback(this);
 }
 @Override
 public void surfaceDestroyed(SurfaceHolder holder) {
   cameraView.previewDestroyed();
 }
 @Override
 public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
   cameraView.initPreview(width, height);
 }
 @Override
 public void surfaceCreated(SurfaceHolder holder) {
   cameraView.previewCreated();
 }