android_device_samsung_klte.../camera
Phillip Berndt 7dff3c94cb klte-common: Fix HDR mode
This is a follow-up to Ifb15e64b4c351d7195e5ad3f5d5315419790d0f8.
The change fixed a crash upon deactivation of torch mode by removing
code that forecully set or unset Zero Shutter Lag. This change results
in HDR not working anymore, but SEGFAULTing the camera instead. The
commit addressed this by disabling HDR entirely.

The present change reinstates the removed code, but executes it
conditionally only if the camera is not in torch mode. This prevents the
crash upon disabling torch mode and simultaneously leaves HDR in a
working condition.

Torch mode can only be reliably detected when it is activated by checking
whether the requested settings have a "flash-mode" of "torch" set.
Deactivation simply asks to deactivate the flash, which cannot be told
apart from the camera app requesting the same before taking a photo. The
CameraWrapper however stores the current settings, so by checking if
they contain a "flash-mode" of "torch", it is still possible to detect
the mode's deactivation. The only possible problem with this approach
could arise if the camera went directly from torch mode to camera mode
with HDR, but this apparently does not happen.

Change-Id: I71611257868b3bf86041adf7aed931cf92880ddc
2017-01-20 17:29:34 +01:00
..
Android.mk klte-common: Import camera wrapper 2014-11-23 03:07:25 -08:00
CameraWrapper.cpp klte-common: Fix HDR mode 2017-01-20 17:29:34 +01:00