SetFlashlightBrightnessTool
Sets the torch brightness via CameraManager.turnOnTorchWithStrengthLevel (level 0 turns it off).
Requires Android 13+ (API 33+, TIRAMISU) and a camera with FLASH_INFO_AVAILABLE; no runtime permission needed (torch control is permission-free, same as ToggleFlashlightTool). Returns an error on older API levels.
The level param is on a 0–255 scale and is mapped linearly onto the camera's native range 1..FLASH_INFO_STRENGTH_MAXIMUM_LEVEL (any non-zero input maps to at least 1, 255 maps to the maximum). turnOnTorchWithStrengthLevel throws for levels above that maximum, so the scaled value is always clamped to it. If the camera reports a maximum of 1 or less (no variable strength support), any non-zero level falls back to plain setTorchMode(true).
Output map: level (the clamped 0–255 input), status ("on"/"off"), strength_level (the native level applied; 0 when off), max_strength_level, variable_brightness_supported.