camera: fix VideoModule memory leak

Layout change listener should be removed when module onpause,
otherwise the VideoModule will not be able to release.

Change-Id: I929526cae01b549044fef305d5af247b41420b0a
CRs-Fixed: 549757
Camera: Add camcorder pause feature

Add Camcorder pause/resume feature, recording can pause,
then resume to go on recording.

Change-Id: I64840a982535f481655723bc7e03302d8b765132
Camera: Fix for stretched preview in camera and camcorder.

Stretched preview is observed due to camera sensor's mount angle.
So resize the preview frame using aspect ratios to avoid this.

Change-Id: Ie8a9e062782aa6caaa80ddab705c937da6b0761e
CRs-fixed: 510295
Camera: Do not create start preview thread if one thread is alive

It will have exception if two same threads tried to manipulate
same UI component, check the thread status before create a new
one.

Change-Id: I6f9a5c03f46360d15fdcebcd52c48b924f5b42ad
CRs-fixed: 545574
Camera: Fix swiping disabled after unsupported video prompt

Before recording starts, some parameters will be checked.
If failed, the recording will not run. So the swiping disable
should be done after this check.

Change-Id: I3e6b0bf1f5d5eb8eef333dac79e56e01bd51b43d
CRs-Fixed: 523885
Camera: Fix camera crash when post picture taken in message app

When post the picture taken in message, the gestures should be
disabled, that's to say, you can not touch screen to AF or show
the preference menu.
1. Disable gestures.
2. Disable keyevent.

Change-Id: I70d478979b0738334886dc3ca6534ca428159339
CRs-Fixed: 520918
Camera: fix panorama rotation issues on 8226.

preview and snapshot are rotated unexpectedly
on 8226 but is fine on 8974. Need to change
rotation angles in panorama based on
sensor mount angle.

Change-Id: I0eff35e574b57b787683722bb16762b7b9b0ee2a
CRs-Fixed: 495787
(cherry picked from commit 7c0e1e546ac903268a16df6a1823743711e396e4)
Camera: Fix panorama preview/snapshot rotation issue

Remove earlier hardcode and use unified solution to solve Panorama
preview and snapshot rotation issue by using sensor mount angle and
angle compensation in panorama postprocessing.

Change-Id: If68c6500c41c7cb3c461352826f1fec45db0a5b0
Camera App: FaceView: Fix for no smile drawing

In case of 'no smile' indicator,
center the line without any offsets.

Change-Id: I3992b6be2cf20d19bdb7c9cee85691cff3ce2feb
Camera: Draw smile indicator based on display orientation

Without this, smile indicator is always drawn horizontally
which is a vertical line in 90 and 270 degree cases

CRs-Fixed: 539887

Change-Id: I320b90a7a8981075565171e69b64e7d3dc832a6f
Camera: Prevent callling of resize  before camera is initialized

Prevent callling of resizeForPreviewAspectRatio
before camera is initialized

Change-Id: If8595cd26f4b0e131aa97f6f1f14b2c98e7a21ad
camera: VideoModule: fix NPE while trying to set HFR video parameter

* getSupportedVideoHighFrameRateModes can return null on a device
  which doesn't support it, so check if it's not null rather than
  checking if it's size is > 0.

Change-Id: Ie5be1f8a0f885ea913be5fb1eb44a97e648756d6
Revert "Camera: Request for 2 snapshots in HDR Mode."

This reverts commit 3fd51b1e22d0d9e8816ba56ca10ab609214920a4.
Gallery2: camera: Invoke camera UI functions only after initialization.

When switching from Panorama mode to Camera mode, the CameraActivity
invokes two functions openModule and onOrientationChanged.
openModule initializes PhotoModule. As part of the PhotoModule
initialization, the PhotoUI and PhotoMenu are initialized.
But this is acheived by posting a message to the handler. When the
message is read by the Handler, the PhotoUI's onCameraOpen is invoked
which initializes the PhotoMenu. But sometimes before this message
is read by the Handler, the onOrientationChanged is invoked, which
invokes couple of functions from PhotoUI class acting on the PhotoMenu.
But since the PhotoMenu is still not initialized, it throws up error in
the form of NullPointerExceptions.
Fix this by checking if the PhotoUI and PhotoMenu have been initialized.
If they have not yet been initialized, send a message to the Handler to
invoke these PhotoUI functionalities after the PhotoUI has been
initialized completely.

CRs-Fixed: 519055
Change-Id: I06ea54aa56da96459db6cacea92b02d0f8c23bcd
Camera: Change volume hard key button to zoom function

Able to capture image through volume hard key
button in camera application, change the function
to zoom function.

Change-Id: Iab9fc2492b2e2ff89cd58c21bac2f147f47b77e2