smdk4412-common: camera: don't defer picture if CAF is in progress

CAF is considerably slower than Auto or Touch Focus and since we
are deferring the picture while CAF is in progress, there are
delays while taking the picture and these delays are sometimes
huge.

Disregard the CAF state since we could Touch to Focus if required.

Change-Id: If981f6402cc97e0781060dc48fa7d8e44288168f
camera: Fix loss of focus mode between shots

exynos_camera->focus_mode can't be relied upon to verify the previous
state, since a snapshot will reset the focus state. This was causing
any mode besides auto-focus (enum 0) to fail after the first photo
was taken, including the default continuous-picture.

Always make sure the focus-mode is up to date when set_params is
called

Change-Id: I8e6f52093ad897bcf04bc5047bb1fcd4f109dc55
smdk4412: Enable camera message management

 * Fixes the deadlocks seen with back-to-back shots

Change-Id: I539b2618187fa4598556359f9dbce61f729cd909
Merge "smdk4412-common: camera: don't defer picture if CAF is in progress" into cm-11.0
Make it n8020 compatible (same as i925, with gsm and w/o cdma stuff).

Change-Id: I4b5f37938a9a60857c53c74db4f52b6d9d721929
smdk4412-common: Add support for Tab 3 8.0

Includes: SM-T310, SM-T311, and SM-T315

Change-Id: I2c235ba5297d9ff3fd3c400b0a7dde4bce89465e
smdk4412-common: Don't build torch for devices without flash

For devices without a flash set TARGET_HAS_CAM_FLASH := false

Change-Id: I8fb1648f443abadd8677fd6780ba95a40c613cf0
smdk4412-common: camera: implement CAMERA_MSG_FOCUS_MOVE to report CAF

Since we are querying the status of CAF in real time, implement
CAMERA_MSG_FOCUS_MOVE to report the CAF status.

Also monitor the state of AutoFocus and report success or failure
only when AutoFocus has started. This prevents reporting false
AutoFocus status which relates to the previous AutoFocus result.

Change-Id: Icb151dca150f932b42b276c45ec392e3dae413cc
Merge "smdk4412-common: Don't build torch for devices without flash" into cm-11.0
Remove uncommon stuff from init.smdk4x12.rc

Change-Id: I74cff4414e4e0ad4c89230524a31b62f1e1d1325
smdk4412: remove unused overlay

Change-Id: Idd80804431926df507914c4a1d53a05770429ea4
Merge "smdk4412-common: camera: implement CAMERA_MSG_FOCUS_MOVE to report CAF" into cm-11.0
camera: Hold 25 msec between preview cycles on restart

If doing a preview restart with an active listener, give said
listener a bit of time to clean up before starting up the preview
again. This should be sufficient to prevent shutdown/start race
conditions during externally triggered restarts.

Change-Id: Id4a722c472eeffb50a332b0dabc29d9e23062883
smdk4412-common: rename Gallery2 -> Camera2

Change-Id: Id8d11bb4a864060d0bc49fd9da28c4ca09c851d6
Camera2: Don't reset the focus mode when using TTF

The mode switch makes the previous focus result go away
at snapshot time, and we don't want that.

Change-Id: I5a3c9e6e945b095f5bbcd724ef32222c77c53c23
smdk4412-common: camera: properly enable touch to focus mode

Touch to focus is not properly enforced unless the focus mode
is set to FOCUS_MODE_TOUCH.

https://github.com/CyanogenMod/android_kernel_samsung_smdk4412/blob/cm-11.0/drivers/media/video/s5c73m3.c#L1857

Change-Id: I67236ae7ae687fbc0b7450102d744472a81def99
media_codecs: Don't try to use absent VP8 decoder

Change-Id: Ie4882b2e7dc675fda1b1cc4295f2a95d7d7c4482
Merge "smdk4412-common: camera: properly enable touch to focus mode" into cm-11.0
Proper battery paths

* 4.4 introduces a new daemon, healthd, that handles battery status
    - resides in: /system/core/healthd
    - BatteryMonitor.cpp iterates through all the *directories* under
      /sys/class/power_supply looking for a file called 'type'
    - if the type == Battery, it assumes this is the location for the
      battery stats for the device. Only the first directory that matches
      this criteria is used.
    - on msm8660/d2/jf/s2 kernels, this search results in:
      /sys/class/power_supply/fuelgauge.
    - To determine capacity, healthd looks at the contents of the
      'capacity' file under this discovered base path. This results
      in /sys/class/power_supply/fuelgauge/capacity on msm8660/d2/jf/s2
      kernels.
    - Unfortunately, this is the wrong path. The capacity file at this
      location returns a large negative number.
    - Other paths like status, voltage_now, and present are also
      incorrectly determined.
  * For comparison, in 4.3 battery statistics gathering was handled by
    frameworks/base/services/jni/com_android_server_BatteryService.cpp
    - BatteryService does a similar search for a file called 'type' with
      the contents of 'Battery'
    - But the search logic is different here: it takes the *last* path that
      matches the criteria.
    - This results in the correct /sys/class/power_supply/battery
  * This patch overrides the discovery mechanism for battery status completely.

Change-Id: I4579c92bba5596eef4dac67b8c0687be50a1d2f5
smdk4412-common: camera: Don't set focus to FOCUS_MODE_TOUCH after taking a picture

After picture has been taken in stock camera app, FocusAreas is resetted to the center
of the preview screen, causing the HAL to detect the non (0,0,0,0,0) as a tap in the
screen.

Change-Id: Id41d108c6bb59a05a0a98efbaef51d14f50741fd