fix setting of video and camera mode

Change-Id: If75199ed96559a39ad14ef69449982d1922d4ed4
Camera: Restart preview when changing preview resolution

On Cameras that has widescreen photo support, it is necessary to
restart the preview whenever the preview resolution is changed.
The Video Camera code already does this when switching from 480p
and 720p.

Change-Id: I639bfa1f12bb7af828088cc83b6d0a2b2ae80e28
Add All Camera Resolutions

Change-Id: I2c1af0db81700e0eeaf95f5d97a7ad3f6a475890
Fix galaxys2 video recording

Change-Id: I4e80bce06a22905f067f1b69dd2ed32d2c462114
Add Samsung camera settings

Change-Id: Idb5da2ce57f8339538c364a650f36c598e9e02a6
Added Galaxy S II values

Change-Id: If30bff9c61a4070119412927d489918d2ecbba94
Camera: Allow a device to request the focus modes at build time

By default, if a HAL supports touch-to-focus, mode selection is
disabled. Make that an option for devices where manual modes
work better without TTF (Macro, for instance)

Change-Id: I507ea2ba97ab721373ceb405c582ad5ead1b0902
Camera: Do not start autofocus when snapshot is in progress.

(cherry picked from commit 9fbccbe5bad2249e13a86581ecbd1e68810a0e90)

Change-Id: Id28c90b43ce33702d9c421e9a3b19d4502b77609
Camera: Don't try to set focus/metering areas when none exist

Avoid calling the set methods when the areas are null, this causes
issues with some camera HALs

Change-Id: Iea6efbe113e1c87f22c891bf8a9cd47bc2c1cb22
Camera: filter supported focus mode

The added wantsFocus parameter caused the Camera not to filter
out unsupported modes when you have touch focus.

Change-Id: I11e41da3e9e417defbb478fa2bb4dea0cc751eb5
camera: allow setting parameter "video-size" before recording starts

Change-Id: I5417304344dcc1cded76665111c85346d7712a15
camera: Add debug logging when setting parameters

Change-Id: Ida35e08e02f51b7ca2b89dfeeb7e550e6e562c25
camera: Add option to always use preferred preview size

 * This is needed to fix camcorder effect on some MSM8660 devices.

Change-Id: Iae0333f217ae556ea2f011d81cc1668416258592
camera: Fix initial parameter setting

 * setVideoMode was being called before CameraSettings was constructed,
   where is would always do nothing on the first call. Move this stuff
   to statics in the Util class instead.

Change-Id: I3837d9f597cb26ab2308a69be0ba27e3f4472c5e
camera: support for ZSL on samsung cameras

 * Various changes from CAF to support ZSL.

Change-Id: I52d2f500470d5fd6127b8f170bc8bfd4aa9cdb57

camera: Handle error callback

Add function to handle error callback from HAL
The error callback is triggered by daemon crash,
which will send error msg to HAL and call back to app
Application will stop camera/camcorder gracefully

Change-Id: If0f501d88ac06b06c6d051cffcb91800c3feda38

Camera : Restart preview when the snapshot aspect ratio changes

Restarting of preview is required when user changes to a different
picture resolution whose aspect ratio is different, as the buffers
need to be released and requested again with new preview resolution.

Change-Id: If7095f3e9879e8dcbafe57776d8dda67f9b79b74

Camera: Fix issue with preview callback buffer size mismatch.

If android.hardware.Camera.PreviewCallback  is implemented in
the application layer, then the callback buffers will be delivered
to the application. A crash was seen in switching between picture
sizes with different aspect ratios.When aspect ratio changed the
preview was restarted after some delay. This was causing intermediate
buffers size to not match with the newly selected size.
Fixed this by calling stopPreview immediately after the aspect
ratio changed. Start preview will be called at a later point.

CRs-Fixed: 327767

Change-Id: I5f5a5f2a29e90e5484f98204a49400b1d96a800e
(cherry picked from commit ef175f83d4b225a0af8544c83dc727baa67d5940)
camera: added continuous-picture focus mode

Change-Id: Ib7f40b8ec6733e52072f8a37f61c7a716d0a7a5e
Update Russian Translation-Camera-CM10
camera: Fix ZSL and resolution change lockups

 * Camera state was not being set to IDLE after preview started
 * We shouldn't do autofocus calls in ZSL mode

Change-Id: I92cd6aa1e13bc900638104fb983a52ee9d24cd83
camera: add 12 and 9MP

Change-Id: I25ada0bc4d0f1ba3cd4eda032f486c322ca0d231
Add HTC cam-mode config option

Some HTC devices require the cam-mode parameter set for the video camera to
function properly. This adds a "needsHTCCamMode" setting alongside the
existing "needsSamsungCamMode" setting.

Change-Id: I11ebd5eb1f3cc305912ce7ff195dd57070870c13