Bring Camera To Speed (Needed For Galaxy S III GT-I9300)

Camera: Restart preview if video resolution changes in application

- Check for previous and current video size to restart the preview.

Change-Id: I875421487051f48f3ec9e9132c5813b13a11479e

Conflicts:

	src/com/android/camera/VideoCamera.java

Author: Guruprasad Gaonkar<ggaonk@codeaurora.org>

camera: add options to restart preview in certain cases

needed for borky camera hal on i9300

Change-Id: I6f5d2919fc9f1061d958517ca293a793327c7994

Author: codeworkx<daniel.hillenbrand@codeworkx.de>

restart preview on picture size changed without resetting states

Change-Id: I5bb9cafc87399907e9b11ccda418b355842030c2

Author: codeworkx<daniel.hillenbrand@codeworkx.de>

add option to restart the preview before taking a picture

Change-Id: I13db1653cdd9285388145c47b6de7c674edf4b5b

Author: codeworkx<daniel.hillenbrand@codeworkx.de>
Bring Camera to Speed 2 (Needed For Galaxy S III GT-I9300)

camera: tweak restartPreviewOnPictureSizeChange option

Change-Id: I989bb29ccba50e6802c443b4c5297b16877ca55e

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

videocamera: start preview on checkQualityAndStartPreview() in any case

preview gets stopped before checkQualityAndStartPreview() gets called.
make sure to restart it on any case otherwise the camera app will hang.

Thanks to TheUnkn0wn (XDA) for finding this.

Change-Id: If01519d16c6802b8b17fb5034102a806f755db2b

Camera: prevent camera from running away with itself when taking multiple pictures.

The problem arises when mSnapshotOnIdle gets set to true but never gets reset back to false.
The scenario this would happen would be when attempting to take another picture while a picture is being taken.

Thanks to TheUnkn0wn (XDA).

Change-Id: Ifd1a29a7e8477b6e5bcc48727c52d12cdfc59e3f

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)

Conflicts:

	src/com/android/camera/CameraSettings.java
	src/com/android/camera/FocusManager.java

camera: added continuous-picture focus mode

Change-Id: Ib7f40b8ec6733e52072f8a37f61c7a716d0a7a5e

These commits are authored by codeworkx<daniel.hillenbrand@codeworkx.de> & Steve Kondik<shade@chemlab.org>