Missing strings for Camera2 translated to Russian

Change-Id: Id81d7d62cc3fd53d6915172fa7ab45bdc2a3ad3b
Camera2: check always for the highest supported video quality

we do not set the default quality per device on overlays. So in most cases
like it is now it would always fetch the default quality. We want always the
highest available.

So check for it.

As well do not check height/width for the 3 main video qualities. There
is no need and either the camera HAL support it or not. This prevends
especially for weird camera HAL's like exynos4 wrong support lists.

Change-Id: Id00f08cf3baf44f6d51a883153f812bac24f1fa6
Camera2: fix array derp

we set the default quality in strings.xml to 5 but CIF is fetching in arrays.xml
the strings value. So whatever expilicit set the int values always directly in the
array

Change-Id: I1f1c80d3b6412d2035d22d98ba2ad9cfb3375b71
Camera2: do not set a video quality default in video preferences

we set them now always in java code. So get rid of it here to prevend any
wrong shown starting values on first camera start.

Change-Id: I2b2e308ba01d79445de3c483c35c2e7b8c2dfa22
camera: ZSL and focus fixes

 * Drop the use of the touchaf-aec parameter entirely. No camera needs
   this anymore.
 * Only autofocus before a snap if we are actually in "auto" mode.
 * Change ZSL from a preference to an overlay boolean.

Change-Id: Ia94b6f7b7b6283facd7bb22db80e3eb389d136da
Merge "Missing strings for Camera2 translated to Russian" into kk4.4
White panorama ui

white progress indicator
white recording shutter button

Change-Id: I8c2eddc6059ae19a2c98cf928b51bab4c05c9232
TRDS: Darker Camera

black dialogs

Change-Id: If130343a91dc30d3cc3af082e6f5c43803588a30
Camera2: add extended volume key and power key control

This commit introduces several things for camera/video/panorama mode:

- volume key mode control (VolumeUp & VolumeDown):
  - shutter/shutter with pre focus
  - focus/shutter (for video and panorama only shutter)
  - shutter/ focus (for video and panorama only shutter)
  - zoom up / zoom down (default) (only camera and video)

- power key control (enabled by default):
  - on/off power shutter with pre focus

As well this commit fixes the updatepreferences which is not correct called
on camera change. All possible updates are put into the handler que now.

Moved initTruView and initSmartCapture into main preference
methods.

Changed app to a priv-app to avoid to sign it with platform certificate so that
user can use this app as well on other roms with different certificate

Implemented method to prevend any key action when not in camera application
(like filmstripview or when menu is up etc)

several small fixes and cleanup

Thanks to CAF for the basic zoom code

Patchset:
- add zoom indicator to zoom feature
- try catch for power key override if a user try to install it on
  a rom without override support. Disables it completly.
- small cleanup

Patchet:
- fix sharedpreferences derp

PatchSet:
- add more zoomsteps for smoother zooming

Change-Id: Icc2e17cfde019c4d87202c0daea6eec380f3a204
Camera2: enable UI for all Camera features

this commit finally enables all features we did not enabled till now.

If the camera HAL supports it this new features are available
over a new settings UI

power key shutter
volume key controlls
picture format
picture histogram
saturation
contrast
sharpness
autoexposure
antibanding
denoise
auto focus selectable zone
face detection
face recognition
AE hdr bracket

as well this options were moved into the new settings UI

location
true view
picture size
jpeg quality
focus mode

Same for video mode will follow with a final clean up of unused drawables

Patchset:
- set default value of powershutter to off

Change-Id: I3c52287afe8af10c6148b048ddd705876c82b6e3
Camera2: enable settings UI for all video features

this commit finally enables all features we did not enabled till now.

If the camera HAL supports it this new features are available
over a new settings UI

power key shutter
volume key controlls
video digital image stabilization
video encoder
audio encoder
video duration
video high frame rate
video hdr

as well this options were moved into the new settings UI

location
video quality
jpeg quality

and final cleanup

Change-Id: I331cec1444967902e4c837692a2dab24ce8ff674
Camera: Round camera settings icon margins to 8

Rounding margins of camera settings icon to 8.
This would avoid overlapping of constituent tiles.

Change-Id: I4c1ccd2dfeec082c7164d19ba02bb9d939ac3ddd
Camera2: fix long press shutter behavior

Long press shutter should perform auto focus and take the photo
when the shutter is released. This behavior is broken in
f5b1181157b6d7f65376c0068768f8f3f94b5d69 when longshot/burst mode
is added by CAF.

Fix by only setting the long click handler for longshot/burst when
it is enabled.

Change-Id: I5149134641ec790c03857b4ea23c43a9ff0adfda
Camera: Set the width dynamic to parent from fixed 400px

Width of the seekbar was 400px and that caused overflow for
the rightmost text value.

Set the width match_parent so that it'll change dynmaically
with the text window.

Change-Id: I51069d4c5687e72516bc4a5afc59f9f3ae6f8e88
CRs-fixed: 582325
Camera: Enable module switcher on resume

For HDR mode, on pressing shutter key, module switcher icon will be
turned off. That'll not be activated if user relaunch camera
after pressing home key in HDR mode while capturing image.

Enable switcher in UI on resuming camera module.

Change-Id: I094f4941f87149e4c5b2393881ed5175c4388559
CRs-fixed: 580450
Camera2: Fix for unsupported resolutions by codec.

Currently, logic for unsupported resolution for a codec is
hardcoded and is limited to only H263 and 1280x720 resolution.
Ideally, we should read capabilities of each codec from
mediaprofiles.xml and check it against selected profile.
Toast message is posted if any unsupported resolution is
selected.

Also skip setparameter call to HAL during recording,
when orientation gets changed.

Change-Id: Ife7dde725882d8217fadff7b56687cdad2c72ae4
Set original camera parameters while switching between modules.

Camera holder maintains a local variable to get original params
and set those params back when user switch between modules. But
these parameters were obtained from the instance of camera manager.
So object in Camera holder will be a reference to an object in
camera manager. Becasue of this all the parameters set in photo
module are getting reflected in other modules.
This change makes sure the camera holder's parameters object is
created separately by getting data from camera device.
Also reverted the alternative solution to reset scene mode in
video and panorama module.

CRs-Fixed: 579747

Change-Id: I02637fb2c215aeb1ba9076629400a339c31178ad
camera2: save on external storage

based on the old 4.2 patches and adapted to the new
4.4 camera and the raw feature we have this commit
allows to save the taken pics/videos on external
sdcard

Patchset:

fix gallery strip view

Change-Id: Id75959bc26eb8c95aff30acb2448b8e522da7e6b
Revert "camera2: set focusmode default always to auto"

This reverts commit 81c1bee193e0a6dbc74f29ce3966f13e7de4c2ae.

Change-Id: I6e1b1200c2e2743bedc3483b2f6c88ceb2b09e8b
Camera2: actually fix ArrayAdapter on MoreSettingsPopup

Like CAF already discovered googles attempt to handle the
ArrayAdapter listview does not work as expected if the scroll view
is larger then the screen. CAF tried to fix it with this commit on landscape
view

https://github.com/SlimRoms/packages_apps_Camera2/commit/c5b0bfcf2340f02ca65ad3d8c08b5c7d74776ea1

which is only a dirty workaround fix for the actual root cause and only works
on landscape partly and if the complete layout is loaded new completly not.

Whatever to fix it we need to override and set getItemViewType(int)
and getViewTypeCount() to actually allow to handle propper two row
layouts like it is needed in MoreSettingsPopup (either checkbox layout
or menu layout). The actual detection which type of preference
we need is handled in getItemViewType.

Change-Id: I6b48ca83daa5f10a7783dfa29c63e9c0bc562167