Camera2: Headset shutter mode

Use play button on headset to take a picture/video/panorama
Use media next/previous for zoom

Change-Id: I25c22646b041e5e0941fbe361eccfe77a2a1e42f
Automatic translation import

Change-Id: I7cd96dc059bfe27149d54b858a8a17f6bbb061b3
Camera: Fix histogram on/off states

* It made the intended behavior reverted. Histogram mode was being
  set as enabled by default, but the histogram graph was not shown on
  screen. When disabling histogram feature, then the graph was being
  displayed. In other words, completely opposite of how it should work.

* Moving disable values before enable values seems to fix this.

Change-Id: Ib6b0fbc3ce1664d448e169463f557f91b2d8d74a
Camera: Change copy right year back to 2012

As this is 3rd party file, we shouldn't
change copy right year. Reverting it
back to 2012.

Change-Id: If617e7607cd89b0270aabbe1186190dfe06fe40c
Camera2: Revert ZSL burst mode

* Was added in http://review.cyanogenmod.org/#/c/60993/
  No idea why, as afaik ZSL burst was already supported and working

* The above commit caused burst mode not working. No matter how many shots
  you select, only 1 is taken. Reverting it, everything is fine.

Change-Id: I6d89707e1b25987ab4b5a184a9e93bd254d34a33
Camera: Add ISO values for sony devices

Change-Id: I6d76e2c02ed6222e06aaa59161b3b16e885e6462
Camera: Cleanup qcom resources

* 'Off' should be always the first option, else the app behaves unexpectedly
* Use generic strings for all checkbox options since they should not be translated
* Replace string references to entryvalues for all qcom options with the actual parameters
* Group arrays & strings based on the option

Change-Id: I092ce765013e7a80a2928df8e7d1b7e7bfd67905
Camera: Make popup menus consistent

* Burst mode & focus time were the only popups that used reverse order for their options

Change-Id: Ib2ae692eaef2157754489716794c1449b2e20b75
Camera2: fix a crash in taking picture

takePicture calls should not overlap, otherwise a fatal exception will
occur. Check and modify camera state before the call to prevent such
crash.

Change-Id: I5316f0d389631c3e4b5f92a8eb81e11a5af804a6
Add 15.9MP and 11.9MP picture size to arrays.

These values are used by klte*, and possibly others

Change-Id: Ib710ce387e7a43566dfefdbebcfeef4cd80f6364
Camera: Disable video HDR on devices that don't support it

Change-Id: Ie9cb024dec64af91a96bf913d17ad4b8526a4870
Automatic translation import

Change-Id: I3ef074cdb3e6cc4f4fb72e6e03a2d6078071462f
Camera: Add proper support for ListPreference

* The original code handled only IconListPreference, resulting in many issues
* Unlike AOSP, we use a lot of ListPreference menus, so we need to properly handle them
* Avoid code duplication in PhotoMenu & VideoMenu
* Correctly disable options when they should be disabled
* Correct MoreSettingPopup handling in both photo & video settings

Change-Id: I09d7280ca58af4e4fe81635980f35d394b114f2a
Automatic translation import

Change-Id: I3398326c8727bf34b7f57549157839f2bd921f6a
Camera: open Camera and start Preview in a seperate thread.

Start openCamera and start preview in a separate thread so that
UI initialization and preview can run parallely. This is to
improve camera cold start latency.

Change-Id: I57af45bc90a4db1630c73449d543c3ff0992e55c
Camera: Disable HDR when scene mode is other than auto

- HDR option is enabled even when scene mode is not auto.
  Due to this preview and snapshot are still remain in previous
  scene mode after enabling HDR.

- Fix is to disable the HDR when scene mode is other than auto.

Change-Id: Icec96816a7ed6f3daacc8b79841dee5db6b4b04a
CRs-Fixed: 648847
Camera2: Still popup tips when change scene to other after turn off HDR

The toast popup or not depend on the value of hdr and scene mode,
but now the value mHdrOn status is not uniform with the actual hdr
value, which lead to popup toast incorrect.

Get the value of scene mode or hdr from the preference directly rather
than a new variable. So the mHdrOn is not used and delete it.

CRs-Fixed: 674521

Change-Id: I1c6926e0ba295e9869109b7412a7413323d3bd1c
Camera2: fix start preview when hdr is on issue

when we have already set hdr on and do not set off, we don't need
to set it to scene mode to auto every time. This will make the camerea
to start preview again, which will make the app freeze for a while.

Change-Id: Ica77106b88056e289cd298eda4ccc5c3f4f6ab59
CRs-Fixed: 679200
Camera2: Do not restart preview to update flip params during orientation change.

When there was a orientation change flip paramter had to be changed.
Currently all parameters are set again and preview is being restarted.
so preview will not be smooth when user rotae the device.

This change makes sure only necessary params are updated and
preview will not be restarted.

CRs-Fixed: 710129

Change-Id: I564431ef8cedaf68c9d12e2a84a3a430c845ab6d
Camera2: fix a camera status bug

After a picture is taken for MMS app, the preview has been stopped in
onPictureTaken() but the camera state is subsequently set to IDLE in
ZSL mode. Add a check before assignment.

Change-Id: I0610a58dbccffdba4b94140d74942c2ff60c7882
CRs-Fixed: 675176