Camera: Don't do cancel_af till all CBs are received in burst shot

Doing cancel_af in the first jpeg CB while
burst shot is going on, is changing the
camera state to IDLE and allowing next
takePicture() which is resulting in crash
as this call reaches HAL when camera is in
picture taking state.

Change-Id: Idd146060a73161bcc30c34756fb53662bb1f0902
CRs-Fixed: 593352

Conflicts:
	src/com/android/camera/PhotoModule.java
Cleaned up HEAD entries
Fixed HEAD entries.  Camera: Don't do cancel_af till all CBs are received in burst shot

Doing cancel_af in the first jpeg CB while
burst shot is going on, is changing the
camera state to IDLE and allowing next
takePicture() which is resulting in crash
as this call reaches HAL when camera is in
picture taking state.

Change-Id: Idd146060a73161bcc30c34756fb53662bb1f0902
CRs-Fixed: 593352

Conflicts:
	src/com/android/camera/PhotoModule.java
Camera2: Fix concurrency issues with camera messages

Without this, multiple threads are
trying to access same data and
resulting in crash.

( cherrypicked from commit d11040c561e9add30768947aa93235ff08de03b1 )

Change-Id: Ib09950d6640afcd7962cba9ea5385d778f022abe
CRs-Fixed: 542706
Camera2: Check mCameradevice before setting skinToneEnhancement

Null pointer exception in app is observed when we open camera
and immediately press home/back button. This is because
mCameradevice will be null by the time handler thread gets a
message to setskinToneEnhancement parameter.

( cherrypicked from commit 06fee777df529fa53ac5c5305e7324ad1baf085d )

Change-Id: I7f216a11a29b6b205be4c2d0ca8f1c346284c294
CRs-Fixed: 547522

Conflicts:
	src/com/android/camera/PhotoModule.java
Camera2: Synchronize access to camera parameters

- Concurrent access between the main handler
  thread and the camera start-up thread w.r.t.
  'mParameters' is possible. This change will
  synchronize the two threads in order to avoid
  any exceptions.

( cherrypicked from commit e988411c441410f270fe0b98dfd0d9b1f033503f )

Change-Id: I290452723b3687eba5240f451cc94aef175a9fc4
CRs-Fixed: 539634

Conflicts:
	src/com/android/camera/PhotoModule.java
Camera2: Added pause button in Camcorder

- Added pause button in camcorder app.so that user pause
  recording and resume later which results in a single
  recorded clip.
CRs-Fixed: 587051

Change-Id: I2a7d8af7fcea74fe8af62c44119c3c1fa0c13e85

Conflicts:
	src/com/android/camera/VideoUI.java
Camera: Add a filter to remove unsupported hfr modes in camcorder

Some sensors don't support some hfr modes, so in camera setting,
a filter should be used to block unnecessary menu items.

( cherrypicked from commit a7536c35e22148ee1def337d36fce0682a347c92 )

Change-Id: I5b243e59c99f4daaa36022867d19782b6e2395eb
CRs-Fixed: 598600

Conflicts:
	src/com/android/camera/CameraSettings.java
Camera2: Calculate UI aspect ratio based on preview size

- This reverts change If4047860.

- Simply using preview size instead of picture size
  at all to calculate the UI aspect ratio,
  avoiding tricky overwriting aspect ratio.

- Will fix issues when surface texture transform
  is calculated based sometimes on preview size
  ratio and sometimes on picture size ratio.

CRs-Fixed: 601495
Change-Id: I8e054c9eaafc9fb54dac2bff2c67e39f0a1fe64c

Conflicts:
	src/com/android/camera/PhotoUI.java