0
          return; 
        } 
 
        // stop preview before making changes 
        try { 
            mCamera.stopPreview();
        } catch (Exception e){
          // ignore: tried to stop a non-existent preview 
        } 
 
        try { 
            // Hard code camera surface rotation 90 degs to match Activity view in portrait 
            mCamera.setDisplayOrientation(90);
 
            mCamera.setPreviewDisplay(mHolder);
            mCamera.setPreviewCallback(previewCallback);
            mCamera.startPreview();
            mCamera.autoFocus(autoFocusCallback);
        } catch (Exception e){
            Log.d("DBG", "Error starting camera preview: " + e.getMessage());
        } 
    } 
}