Decouple HDR quick setting controls from capture modes#528
Conversation
- Decoupled dynamic range (video HDR) from image format (image HDR) settings across UI, controller, and CameraX configuration layers.
- Removed dynamic range constraints from the createImageUseCase configuration in CameraSession.kt, enabling independent Ultra HDR
image capture.
- Updated QuickSettings bottom sheet click handlers to mutate only the HDR setting relevant to the active capture mode.
- Enforced specialized Low Light Boost vs Ultra HDR conflicts in CameraXCameraSystem.kt, prioritizing Low Light Boost.
- Created HdrUiStateAdapterTest.kt covering all HDR availability states and flash conflicts.
- Refactored CameraXCameraSystemTest.kt to run parameterized HDR decoupling tests on both front and rear lenses.
There was a problem hiding this comment.
Code Review
This pull request refactors HDR and image format constraint handling when switching capture modes, ensuring HDR settings are preserved or disabled appropriately. It also adds comprehensive instrumented and unit tests to verify these behaviors. The review feedback suggests simplifying a when block in QuickSettingsScreen.kt, enforcing concurrent camera mode constraints when changing capture modes in CameraXCameraSystem.kt, and restricting the visibility of the new test class HdrUiStateAdapterTest to internal.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…oogle/jetpack-camera-app into kim/hdr/decouple-capture-modes
…ing interaction when switching to standard capture mode
This PR decouples HDR quick settings (HDR Video / HLG10 and HDR Image / Ultra HDR) from automatic capture mode transitions. Instead of forcing capture mode changes when toggling HDR, HDR availability is now constrained by the active capture mode:
HDRVideo (HLG10) is restricted toVIDEO_ONLYmode.HDRImage (Ultra HDR) is restricted toIMAGE_ONLYmode.STANDARD(hybrid) Mode (both image and video bound) is restricted to SDR/JPEGThis PR does not modify the dedicated settings screen
Benign Behavioral Changes
HDRinSTANDARDMode: HDR is now completely disabled in STANDARD mode (forces SDR/JPEG)binding and improve stability.