void setTorch(Camera camera, boolean newSetting) {
    Camera.Parameters parameters = camera.getParameters();
    doSetTorch(parameters, newSetting);
    camera.setParameters(parameters);
    SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
    boolean currentSetting = prefs.getBoolean(PreferencesActivity.KEY_TOGGLE_LIGHT, false);
    if (currentSetting != newSetting) {
      SharedPreferences.Editor editor = prefs.edit();
      editor.putBoolean(PreferencesActivity.KEY_TOGGLE_LIGHT, newSetting);
      editor.commit();
    }
  }
Reads, one time, values from the camera that are needed by the app.
OCRTest/src/main/java/edu/sfsu/cs/orange/ocr/camera/CameraConfigurationManager.java