Camera2: update the flash icon when set HDR on

When HDR is on the flash mode should be set to off. And
the icon should be show as off too

Change-Id: I2cca985694e8a5a8058d6bf5467d5375514acfab
CRs-fixed: 645595
Camera2: fix The flashlight still is on after set scene mode not auto

If we set flash mode is on when scene mode is auto, the flash mode won't
be reset when change to other scenemode and still is on.

Set the flash mode is auto when scene mode is not auto.

CRs-Fixed: 678466

Change-Id: If3874c03dc70297326b6cd7dcceb1f4efde85956
Revert "Camera2: Fix WB onScreenIndicator when some are settings filtered out."

* This is obsolete with the new WB mode picker and the AOSP fix

This reverts commit ede1eb17b2e36bfc867ba85877f686674d682d0e.

Change-Id: I77b89278276b67c7ae329e14b56ca3800aa98f42
Fix WB indicator override

Patching into Carlsbad from Bryce.

  Bug: 9372794

Change-Id: I4f23f05ca1acaef84a24034237e82001aac09f78
Camera2: fix white balance still work when turn on the HDR mode

Tested on target : 8916
Tested on Branch : kk
Tested on AU \ tip : AU_LINUX_ANDROID_LNX.LA.3.7.1.04.04.03.031.203
Test case Verified : Yes
CR Moved to Fix : Yes
R notes filled : Yes
DC set : Yes
LOST approved (if new file \ feature added): Yes
Voted on required Trunk : NA

App need clear the whitebalance effect when set scene mode not auto, but
the value getWhiteBalance still is not auto when change scene mode.

So set white balance auto value forcely when scene mode is not auto.

CRs-Fixed: 685240

Change-Id: Ib94b9cb1f3cc0c8ef63412ef75d65359ba797f37
Camera2: some aapt warnings cleanup

during the move from Gallery2 into new Camera2 package some
unused values were moved as well. Remove them

Change-Id: I4a514c76ccc70c61bb0a97ecafda7e1f9ede9f35
Camera2: wait for previous saving picture done during panorama capture

If saving pano picture thread is still running during onResume,
we need to wait until it completes.

CRs-fixed: 637244
Change-Id: I9ae5cb75a930421325d2e7d4d1b30306c867c6cf
Camera2: save the picture when rotate the device

If we rotate the device, the panoroma can not mosaic image, so if
we rotate the device, we should stop capture immediately and save the
previous capture frames.

Change-Id: I4ba304957d4083b4ae58c084239d6dc3d7f4dc89
CRs-fixed: 627105
Camera2: add new mime type for panorama picture

Add mime type 'image/jpeg', along with 'jpeg',
So the DISPLAY_NAME of captured picture is correctly saved.

Change-Id: I40a3c660311f1a3c69078ae3580dd74def9d69ba
Camera2: Add option to set max screen brightness

* Set maximum screen brightness while the user is inside the camera app

Change-Id: I8b16ba47a933bc7d6b0c1cd62bfd6ca54875ce1e
camera2: Fix memory leak when suspend/resume camera

Clear Overrides Map when init, to prevent memory leak.

Change-Id: Iaca466f91fb7dc6273b03c2f148439fb1795b1d6
Camera2: fix flash light turn on after resume camera activity

If user choose an app to open video, onResume will be called after
the choose dialog is dismiss. The function opencamera will be called
and the value mPreviewFocused will be set true, which lead to flash
light turn on when setCameraParameters.

The value mPreviewFocused won't be true if not in Camera Preview, we
can use the visible of mCameraControls to judge.

CRs-Fixed: 680450

Change-Id: Ia04ae0fb77f05fb991e5262f86cbe6f308db7709
Camera2: the menu button should not visible in some cases

When we start camcorder from other activity, we touch home key, then
back to the activity, this button will cover with the save button.The
patch will fix this issue

Change-Id: I74dc5f556d2a30af651d53b39c2bb4397a59884e
CRs-fixed: 633613
Camera2: disable the shutter button when not previewing

Camera app will crash if the shutter button is clicked while not
previewing. Disable the shutter button in onStopPreview() as it's
called by onSurfaceTextureDestroyed().

Change-Id: Ied369610c590323b977b4ac1c3150c6c905e9466
CRs-Fixed: 669190
Merge remote-tracking branch 'cm/cm-11.0' into HEAD