Camera: fix crash on restore preference

Storage option did not have a default value and so the camera
crashes when one does a 'restore preference' since it'll try
to find a value for the storage 'null'.

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

Change-Id: Ida35e08e02f51b7ca2b89dfeeb7e550e6e562c25
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
Camera: Hide storage option if device only has one storage

Change-Id: I75966ef09bce73153facb0241fee6c73bc667c78
camera: add options to restart preview in certain cases

needed for borky camera hal on i9300

Change-Id: I6f5d2919fc9f1061d958517ca293a793327c7994
camera: Fix controls on tablets without zoom support

 * The wheel UI is totally broken if zoom isn't supported.
 * Always add the control and set it disabled instead.

Change-Id: I2bbab0d9cecbd28fb4d2a088d7a302da67d87204
restart preview on picture size changed without resetting states

Change-Id: I5bb9cafc87399907e9b11ccda418b355842030c2
add option to restart the preview before taking a picture

Change-Id: I13db1653cdd9285388145c47b6de7c674edf4b5b
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: tweak restartPreviewOnPictureSizeChange option

Change-Id: I989bb29ccba50e6802c443b4c5297b16877ca55e
camera: Add additional resolutions

Change-Id: Ia09683e7ca6215636b70e43e14eb8a1fff5ac232
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)
Camera: add burst mode (up to 20 shots)

Change-Id: I182554ce32bd8ac62cd1aeaff84f21d4fcac3f30