Recently picked up a Nexus One. The 2.1 API says that FLASH_MODE_TORCH should be supported, however after calling getSupportedFlashModes() I only get:
off
auto
on
When I try to set the torch flash mode, I get the following in the log file...
D/CameraService( 965): setParameters(picture-size-values=2592x1944,2048x1536,1600x1200,1024x768,512x384;taking-picture-zoom=20;zoom=2.0;antibanding=auto;zoom-supported=true;whitebalance=auto;jpeg-thumbnail-height=384;jpeg-quality=100;preview-format-values=yuv420sp;jpeg-thumbnail-quality=90;focus-mode=auto;preview-format=yuv420sp;preview-size=800x480;picture-format-values=jpeg;flash-mode-values=off,auto,on;preview-frame-rate=15;flash-mode=torch;effect-values=none,mono,negative,solarize,sepia,posterize,whiteboard,blackboard,aqua;focus-mode-values=auto,infinity;picture-size=2048x1536;max-zoom=5;effect=none;jpeg-thumbnail-width=512;whitebalance-values=auto,incandescent,fluorescent,daylight,cloudy-daylight;picture-format=jpeg;preview-size-values=1280x720,800x480,720x480,640x480,576x432,480x320,384x288,352x288,320x240,240x160,176x144;antibanding-values=off,50hz,60hz,auto)
E/QualcommCameraHardware( 965): Invalid flash mode value: torch
So it appears that the Nexus One does not support this mode.
Any ideas on how I can emulate this mode and control the LED? I need to use the camera in preview mode to get continuous images, however I also want it to work in the dark.

