Fix SRI orientation on manta

Bug: 11292213
Change-Id: I7977de4c5bb906eec5431e706e28118837a682e7
Don't crash when preview surface could not be set.

  Bug: 11021188

Change-Id: Idfc1cf5c50ac1f3f46956079c3231cbdda32e1a4
The initial focus value should be true.

Every time when we enter the wide angel (SRI) module, the preview should be
in focus.

bug:11234723
Change-Id: I218573946609f1e0e4415621a71b96a20775237d
Camera: Add initial QCom value add features.

- Enhance the camera picture size table by adding more number of
  supported resolutions.
- Enhance the camcorder menu by adding support for additional video
  and audio codecs.
- Also provide option to select the duration of the recording clip.

(cherry picked from commit 7a5402332f3b527767b85c1fc112880d02a47c0e)

Change-Id: I553d4eb74337701bc57d069c8374646a7e15c2d5
(cherry picked from commit cdffd7510e1f9a236e43438f035bc5be9e3c0c17)
(cherry picked from commit 93c32e9e069d7c48b71fbbe45cae59a54df443ec)
(cherry picked from commit f6b24346ab9d28953a5697924d6815ed2c006cf3)
CameraApp: Histogram disabled in ZSL after capture

Histogram is disabled after every capture and enabled during
preview. For ZSL mode, histogram is not disabled after capture.

(cherry picked from commit cb58b0e64c05eb0c0173aa198e2836fc6a7467a0)

Change-Id: Ibf32cb56d0b1c11b321f7a36e4c53f5d036ff671
(cherry picked from commit 91edd2cf79da7dbd21175ed1331c6655529c4e5b)
(cherry picked from commit 6f2344ba8dda48557f05302ec6b689e4123dcaf8)
(cherry picked from commit 9add261e83cbb2b74cb0ab67115886eec321b0b9)
Camera: Fix for focus mode option missing in camera settings

Also add "Normal" and "CAF" options under focus mode settings

(cherrypicked from commit ce394a31d3ad72228861322ff8cf82e494ddf358)

Change-Id: Id9168d43d92adf3e209896b2501f28d4a0f0293c
(cherry picked from commit c207527c898023862063dac98e60da0490af27f1)
(cherry picked from commit 631d0f1abe7447915bd6fd75308d523d7a734cfb)
(cherry picked from commit 8ccaca55d0b6cd75321ab26f2781ae6f8c737270)
Camera: Fix for the AF brackets issues in Face Detetcion.

Also disable the FD start flag from stopPreview.
(cherrypicked from commit 2ae27a714a9f0e4d2369f3d080d41982f76c8e2f)

Change-Id: Ic6fe9d119633627b94f3635d59eedd87db1709c9
(cherry picked from commit 14c156cc70ac1a181539102fd899a24858589422)
(cherry picked from commit 2e7cb29544fc26de520762aea4cd6d8dc2749639)
(cherry picked from commit 98b6affb83eb092a25e294b6447d49f6c048cea2)
Camera: Shutdown the camera in case of UNKNOWN_ERROR.

Currently the camera application shuts down the camera
only in case of SERVER_DIED error. But if the camera driver
goes into a bad state, it just sends a UNKNOWN_ERROR. So
shutdown the camera even in UNKNOWN_ERROR case.

(cherrypicked from commit 432da3d40184abbffc0ca75fa10cb20e76520bdb )

Change-Id: I5d9329538646dad30eacd30b3cfa3bfd6769b600
(cherry picked from commit 14b02e245490c780fca5952a4d5b84f99225c0e6)
(cherry picked from commit a1f653ce704efc7110b00e8ee7d56a954be6eb23)
(cherry picked from commit 7b6c06353bf26a0a7b3c50ebeb8337d05e471a11)
Camera: Make HDR off in UI when ZSL is on

- Make HDR off in UI when ZSL is on
(cherrypicked from commit 9f00bc61e0fda6caa4d5bc7ed41329c4389145c3 )

Change-Id: Iabc668ab2b276f3eec81a4a454d1ba2213e84cea
(cherry picked from commit 8e3b4e324211829c95b125290d278d317b49faa1)
(cherry picked from commit 1107a9e7733e425efe08fcc181f59002eb8b43cd)
(cherry picked from commit f14f055a429a136dfb0ecb1f0719e21c71c327cd)
Camera:Avoid recording for unsupported format in HFR.

 -There is no condition in Camera VideoModule.java to check if
  unsupported resolution or codec is set for HFR.
 -Check is added and displayed toast message for Unsupported
  resolution or codec.

(cherrypicked from commit 299c6c7f4ad266509abb6031986849495bdf0830)

Change-Id: I22a81e2be466353a8b141bb9b84bb95d063fa98b
(cherry picked from commit 39a199b6fce45de26636b9161376c6af1dccc1bc)
(cherry picked from commit 31d99e7881138f184c48e6305abbef141291ff6c)
(cherry picked from commit 11563cb78844db0202b11e0aa36e14a48f8954ef)
Camera:Define KPI words

KPI words are defined for Shutterlag.

Change-Id: I544b3b7050f724cf915e2625bea1fb53c7ca9258
(cherry picked from commit 14124588b6e98167153578174d0ed9d9d341dfa7)
(cherry picked from commit 644a7e8e6d5b3a7c7b569d2aa368fdc23468d57f)
(cherry picked from commit 66138a1bf4923a47943ac8e01ca24acbb89feda6)
Camera: Use default value in case new value is not supported

- Instead of throwing exception in case of new value is not supported,
just use the default one
- The scenario for fixed issue is:
1. Start back camera
2. Select some scene mode that doesn't overwrite focus mode
3. Go to video mode
4. Switch to front camera (focus mode is change to continuous video
    automatically, based on supported values)
5. Switch to back camera (focus mode is still video)
6. Switch to image mode (focus mode continuous is still selected,
    but not supported for image)

(cherry picked from 3d5393822990a36e6723657ab7807d1aa15f5fb9 )

Change-Id: I0512cb1db6c6fdda826d88a22642bff911b68d2d
(cherry picked from commit b70466eba25662171f209164392489ab147ac5f9)
(cherry picked from commit f871072244ce7d429266ff916319361cbfb6b837)
(cherry picked from commit 63fd837bf89903e2e9e472ba4aa56bdd584020b2)
Camcorder: Set audio code in profile based on hfr and time lapse settings.

Set audio codec in media profile only when time lapse is not set and
hfr is set to Off mode.

(cherry picked from commit f0a631472983c59e0fe936bffacc2fde763517f6 )

Change-Id: Id4ce04793b0968a18ec9c3ee3c71f77c7d0a4d34
(cherry picked from commit 47eec26bb58c977dceb07497c590f7dabf0417e6)
(cherry picked from commit aa4e7a3a4da9e46aee154a4152f2b93be888a9da)
(cherry picked from commit b7667e7e853248f516bb2edbc01f8c5cb7e5a7ab)
camera: change for zsl and hdr incompatible

Camera will crash when capture in zsl and hdr mode sametime, change
to fix this issue through enabling one mode will disable the other one.

(cherry picked from commit 4e4301d6cd56e710d1d628be23bcb1477759fd9b)

Change-Id: I1a9ceaa9698c01246e98284e25ff34c50bf5fc74
(cherry picked from commit f208f2709eb452fc956b5ee8349d41b09f8d2837)
(cherry picked from commit 4f7013911538ba244a1333d301ce5388a6f60769)
(cherry picked from commit 0917909d7fc6fc3a2084a5cdafea68d1c2d0bc82)
Camera: Propagate power mode selection from UI to lower layers.

Send the power mode(low power/normal power mode) selection from the
UI layer to lower layers, such that the camcorder topology is
setup in accordance with the power mode selection.

(cherry picked from commit 7243d4392808d32e7d729d6976078c8f6a82c8fa)

Change-Id: Ia36e9c01a871ccd35f68f54d815f642792fd68b9
(cherry picked from commit 60ef6c5aadbb6a0b0717c2521cd51143da13679b)
(cherry picked from commit e73a3ff6465bdbfd8edf62a8d259590bd94b7453)
(cherry picked from commit 75551bc48481c6c5864645ef74b0059bb569e692)
Camera: Fix the countdown timer values updated on UI.

The count down timer values shown on the UI are not reflecting
the values actually selected.
For eg: If user selects 6 seconds, the value selected is 10 seconds.
This is because the code populating the UI is not picking up the
expected duration value. Fix this by showing the correct duration
value on the UI.

(cherry picked from commit 2856dcfb239a33c8f9d2051b3549190c17a666d9 )

Change-Id: I6a3fed525b373ce3d415b95dc7a4b6336210bd15
(cherry picked from commit d08a0c0f4a06d6f700a019a0ecd77b918015c798)
(cherry picked from commit 4d582e49339beb9502b381c129f0942be0e044ea)
(cherry picked from commit a6855eae463be00da29532c35334bdc3b163f77d)
Camera: fix panorama rotation issues.

preview and snapshot are rotated unexpectedly.
Need to change rotation angles in panorama based on
sensor mount angle.

(cherrypicked from commit e80845863aa453eb85cbf7f01af32b9c0c0b874a)

Change-Id: I09d3111c3513141bffc649349a55d36a79818124
(cherry picked from commit 85ce7ba402fe354784505a8d6939700706e4401b)
(cherry picked from commit be1768dfed2acedb34a3f393304999df3d4cabfb)
(cherry picked from commit 790aeae0ed544e10ede5ccd7636eb4cf08a1d979)
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.

(cherrypicked from commit a585a576a3259477a460e367fe4af69a448a2d25 )

Change-Id: Ie7130a0670174d5957b871b76b05a0bfdd9d4d27
(cherry picked from commit 21a26f3ffe023ee550a51a547e46c75c3dd914a6)
(cherry picked from commit 50aebc4f3fbdf6f07a4b87cc87eef7e30257a05b)
(cherry picked from commit e5fb76066ab7b5d1f82beb16a3fb8c4e5c031671)
Camera: Menu & zoom options are overlapping in front camera.

When user presses the menuoptions the popup is displayed and UI will
have the controll over it, again when zoom is triggered the zoom
renderer was not hiding the menu popup. This change will synchronise
both listeners mentioned above.

(cherrypicked from commit 713847197c35409f0f198903f6b3dd3c39296848 )

Change-Id: Ic4509fe4473070c73dba377c5fdc3f224af71ee0
(cherry picked from commit 6c464f1402110b1f0f9790d5a9479dc3031d04eb)
(cherry picked from commit 4fe74b8ad31a6d43c179e0181813ba3bf4c58feb)
(cherry picked from commit e525f04730668369f76afb41870199eaad0b9375)
CameraApp: Updating zoom value from camera device parameters.

When user switches from one camera to other the zoom values were
stored in a class variable. Due to which the application was using
the same zoom value for different preview size cameras. And which
was making the app to apply same zoom value for two different sizes
while rendering. This change will enable the app to use different
zoom values for different preview sizes.

(cherry picked from commit cf97ea085c2258173f13c757d20eaffcafe23de9)

Change-Id: I1cd0994b4b4ebc8eba931f4b05512871897bf8c6
(cherry picked from commit 6fa132eca1ff1872e3fee8e842b570d30c55c78e)
(cherry picked from commit 8c4cdf02fd57f4a008f01ed0e97bcf4b3c8d88cd)
(cherry picked from commit e2ddc26ba302add0d8e10121927bc8f35e89795b)