title: Flash goes off too early when using torch mode while taking pictures on HTC Desire
body: <p>I am having some problems with the led of the rear camera of the HTC Desire.</p>
  
  <p>I am developing an app that takes pictures using the <a href="http://developer.android.com/reference/android/hardware/Camera.Parameters.html#FLASH_MODE_TORCH" rel="nofollow">torch mode</a> and it's working great with other devices (Nexus One, Galaxy S II,...) but with the desire the led goes off just before the picture is taken. I have tested others camera apps out there (<a href="https://market.android.com/details?id=com.noclicklabs.camera&amp;feature=search_result" rel="nofollow">"Camera Magic"</a>, "Distorted Camera") and it seems they have the exact same problem.</p>
  
  <p>The code related is pretty standard (and it's working for other devices)</p>
  
  <pre><code>// set the torch mode in the Camera.Parameters 
  String flashMode = parameters.getFlashMode();
  List&lt;String&gt; flashModes = parameters.getSupportedFlashModes();
  if ((flashModes != null) &amp;&amp; (flashModes.contains(Camera.Parameters.FLASH_MODE_TORCH))) {
      parameters.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);    
  }
  ...
  ...
  // then just start the camera preview
  mCamera.startPreview();
  </code></pre>
  
  <p>I was wondering if anybody knows what the problem might be or has experienced the same? </p>