Camera: HDR: Read parameters for hardware HDR support

On mako (and soon find5), HDR mode is a scene-mode. Software HDR
uses Util.isCameraHdrSupported to check whether or not hardware
already supports it, which should also set software HDR flag.
However, this method is not called soon enough to set this flag
on time, so we call it before checking for software HDR status.

Change-Id: I24375f290d6c2cde782c43373a07e78ba5d806ff
camera: Fix parameter dumping

 * Chop up the logging so we don't create a line that's too long

Change-Id: I59e60de584d2b5007c6a7777d5e2427af275ec01
camera: Add support for ZSL on new Samsung devices

 * The camera driver on new Samsung devices requires that we send a
   magic command to the hardware in order to get ZSL behavior with
   continuous preview. On previous devices, this worked as long as the
   "cam_mode" parameter was zero (instead of null) and "camera-mode" is
   set to 1. On JF, we need to do all of these things.
 * The command we need to send is 1508, but I do not know what this
   value actually corresponds to. It was discovered by reverse
   engineering.

Change-Id: I6bccc9cd228784045eef81719892121749af4fa5
Camera: Fix for stretched preview in front camera

Stretched preview is observed due to front camera's mount angle.
This patch resizes preview frame using aspect ratios so preview is not
stretched when using the front camera in still and camcorder mode.

Change-Id: I70b5534dd3020bdf46afdfdcefc39d89a2b2e450
CRs-fixed: 435942

Camera: Fixes stretched preview in camera application

- The preview screen nail is getting set with the
  preview frame layout size, which depending on the
  preview resolution might lead to aspect ratio
  mismatches.

Change-Id: Ifdc436feffefa4ad95d3915f48724b0fc3684d9d

Camera: Updates preview screen nail correctly

- Querying the width and height of the screen nail
  currently will return the render width and height
  which in turn depend on the preview frame layout
  size. In cases where both sizes match the screen
  nail will not get updated properly. Instead of
  using the render width and height this change
  uses the actual size of the nail itself.
  This way changes to the resolutions are
  recognized properly and the nail is updated.
- This patch also removes 'updateCameraScreenNailSize()'
  and extends the functionality of 'startPreview()'
  in order to update the screen nail for the cases
  where the preview and the nail size don't match.

Change-Id: Ib99f47f4094e01724725098847f42197b4442c03
Fix preview state machine after it's restarted due to ratio changes

The camera state was being set to PREVIEW_STOPPED by the restart,
and the lack of a completion message was leaving it in that state,
breaking other checks down the line (changing scene/balance modes,
for instance, failed miserably)

Change-Id: Ia5bc6b1aab5ee85582c4c4c3d09646892e669454
camera: Fix camera storage location

Patch Set #1 - Updated 'ActivityBase.java' to use 'startStateNow', this updates the gallery storage location.
Patch Set #2 - Removed random character (dont know how that got there...)
Patch Set #3 - Fixed storage location not being set correctly on first load
Patch Set #4 - Fixed 'NullException' for 'mCameraScreenNail'

NOTE : This NEEDS http://review.cyanogenmod.org/#/c/29154/ to be re-merged.

Change-Id: Ia7a703a7fca8074075e98380c4ca0711a9a1ad4f
Camera: Add Missing AF translations & do some cleanup

Change-Id: Ie83478460d1dab00beefeccff63d07bc05fab212

Conflicts:
	res/values-af/cm_strings.xml
camera: Fix hang when changing picture size

Change-Id: I46d060d470b96be56d84f273accf54702e72b321
camera: Clean up code for restarting the preview

 * Fix another ZSL hang and remove redundant code.

Change-Id: I8075829bfc82bc94a8ae8d49234cecc4e3ca1faf
Camera: Add supportsOrientationResizePreview configuration

Current orientation resize preview patch is broken some devices (xe: tf700t). This patch adds
a new configuration for device that doesn't handle properly the orientation resize preview
detection.
Also, the patch adds some styling fixed:
- Avoice call requestLayout twice
- Avoid create variables if mOrientationResize is not going to be used

Change-Id: Ia8ad7a58b9418eedc5edde6b23eb995f5ecfdabd
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Revert all recent changes to preview orientation handling

 * Will revisit after the release.

Revert "Camera: Add supportsOrientationResizePreview configuration"

This reverts commit 1d12cab88c5c1b8ae6bb016f08e95068448cafec.

Revert "camera: Clean up code for restarting the preview"

This reverts commit 917a193a4a7736ac7657a6ac7f15a978bfe3732a.

Revert "camera: Fix hang when changing picture size"

This reverts commit d1a3d5d99006f274955b444c62c4354b425ac081.

Revert "Fix preview state machine after it's restarted due to ratio changes"

This reverts commit 5c40119365eefc1b2d9aef3c0b36cf60c44a33a8.

Revert "Camera: Fix for stretched preview in front camera"

This reverts commit b568826506d5555ee04d0a536c4687e34e648eeb.
Camera: fix preview in panorama mode

Change-Id: I2fefcf81ec0fc3c3dcfb246c73c405350661dc27
Camera: Update exposure drawables to fix various problems

Updates exposure drawables to new ones more similar to the
original AOSP drawables. Also makes them visible on light
backgrounds.

They were previously changed in change 28836.

Change-Id: I1c628980e809e48646c7a6a68a546255e2a09b80
Camera: Update timer and voice activation drawables

Replace drawables with newer version with proper
size, shadows etc.

Change-Id: I6c20403a6645463f86ac75190c0be74705cd1554
camera: add 1392x1392 resolution for galaxys s3 front cams

Change-Id: I990737403cad61eaaa75b1f958f722c5f017e35c
Camera: Wait for camera initialization

Patchset 2: Capture specific exceptions instead of a generic exception

Change-Id: Id62d0dedc630c3815dca7b101fdbf731154be3ca
JIRA: CYAN-1190
Issue: https://jira.cyanogenmod.org/browse/CYAN-1190
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
camera: Add 2.4MP, 6MP, 7MP resolution strings

Change-Id: Ic2e4d4ef1345743150d5be1fb9a0f17c909a2ff8