code: void initFromCameraParameters(Camera camera) {
      Camera.Parameters parameters = camera.getParameters();
      WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
      Display display = manager.getDefaultDisplay();
      Point theScreenResolution = new Point();
      getDisplaySize(display, theScreenResolution);
      screenResolution = theScreenResolution;
      Log.i(TAG, "Screen resolution: " + screenResolution);
      cameraResolution = findBestPreviewSizeValue(parameters, screenResolution);
      Log.i(TAG, "Camera resolution: " + cameraResolution);
    }
docs: Reads, one time, values from the camera that are needed by the app.