Fire the LED on the 0.5x still

0.5x is a bare Camera2 session, so CameraX never saw the flash setting and the ultra-wide still came off unlit. The native module now reads FLASH_INFO_AVAILABLE off the lens, maps off/auto/on to CONTROL_AE_MODE plus FLASH_MODE_SINGLE, and starts an AE precapture so the HAL can meter the flash before the frame. The viewfinder hands its flashMode down beside the shutter, with a Zap control that only appears where a unit exists.
This commit is contained in:
2026-09-16 18:11:17 +07:00
parent 12d58ff810
commit c40b5565d3
5 changed files with 242 additions and 99 deletions
+3
View File
@@ -13,6 +13,9 @@ export type MeterMode = 'evaluative' | 'highlight';
// Camera shutter sound. OS policy may force the click on in some regions;
// there is no native volume control (OFF/ON only).
export type ShutterSound = 'on' | 'off';
// LED flash for photo capture (never a live torch): 'auto' lets the capture
// pipeline decide from the metered scene, 'on' always fires, 'off' never does.
export type FlashMode = 'off' | 'auto' | 'on';
export type StartupMode = 'default' | 'last';
// One photo in the in-app session history (recent captures + library exports).
// uri = app-cache JPEG; assetId (when savedToLibrary) = the MediaLibrary asset