protected void onPause() { super.onPause(); if (this.handler != null) { this.handler.quitSynchronously(); this.handler = null; } CameraManager.get().closeDriver(); }
public void turnOn() { try { // m_Camera = Camera.open(); m_Camera = CameraManager.get().getCamera(); Camera.Parameters mParameters; mParameters = m_Camera.getParameters(); mParameters.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH); m_Camera.setParameters(mParameters); } catch (Exception ex) { } }
public void turnOff() { try { m_Camera = CameraManager.get().getCamera(); Camera.Parameters mParameters; mParameters = m_Camera.getParameters(); mParameters.setFlashMode(Camera.Parameters.FLASH_MODE_OFF); m_Camera.setParameters(mParameters); // m_Camera.stopPreview(); // m_Camera.release(); } catch (Exception ex) { } }
private void initCamera(SurfaceHolder paramSurfaceHolder) { try { CameraManager.get().openDriver(paramSurfaceHolder); if (this.handler == null) this.handler = new CaptureActivityHandler(this, this.decodeFormats, this.characterSet); label34: return; } catch (IOException localIOException) { break label34; } catch (RuntimeException localRuntimeException) { break label34; } }