question: public void closeCamera ( ) { try { mCameraOpenCloseLock . acquire ( ) ; if ( null != mCameraDevice ) { mCameraDevice . close ( ) ; mCameraDevice = null ; mCameraIsOpen = false ; } } catch ( InterruptedException e ) { throw new RuntimeException ( "Interrupted while trying to lock camera closing." ) ; } finally { mCameraOpenCloseLock . release ( ) ; } }
target:  close camera when not in use/pausing/leaving