camera_common: change torch status callback API

Update the torch status callback API so that HAL must invoke
the torch status callback whenever the torch status changes
including changes by set_torch_mode().

The problem of the previous approach was camera service needed
to invoke the callback after calling set_torch_mode() and two
sources of the torch status changes (HAL and camera service)
caused a race condition.

Add STATUS_ON and remove STATUS_AVAILABLE which isn't useful
because STATUS_OFF means torch is off and available. STATUS_ON
means torch is on and available.

Bug: 2682206
Change-Id: Ide5d289c5f485404a3ba46e6cb359fa8a52da0bb
1 file changed