title: best way to transfer setparameters() on surfacechanged camera
body: <p>I'm playing around with android camera functions.  I'm trying to dynamically change the camera parameters using a menu <code>onCheck</code> and then calling the <code>surfaceChanged</code> to implement the changes.</p>
  
  <pre><code>public boolean onOptionsItemSelected(MenuItem item) {
  
              Camera.Parameters parameters = camera.getParameters();
              switch (item.getItemId()) {
              case R.id.EFFECT_AQUA:
                  Toast.makeText(this, "AQUA", Toast.LENGTH_SHORT).show();
                  if (item.isChecked()) item.setChecked(false);
                  else item.setChecked(true);
                  parameters.setColorEffect(Camera.Parameters.EFFECT_AQUA);
                  surfaceChanged(null, 0, 0,0);
                  return true;
  
  public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
          Camera.Parameters parameters = camera.getParameters();
          camera.setParameters(parameters);
          camera.startPreview();
          }
  </code></pre>
  
  <p>when I run the app, checking the <code>menuItem</code> calls the <code>surfaceChanged</code> but the chosen parameters are not used/set by the setparamater command.</p>
  
  <p>I was thinking of implementing a global to capture the changes but I don't like it.  Is there another way to transfer parameters when we do a <code>surfaceChanged</code> call?</p>