camera: added needsEarlyVideoSize

Needed to fix crash on e.g. find5 when switching to
video mode on fromt camera

Change-Id: I1af8fd487f2e8ecf2fcf7b2b2aa9dce53da3f391
Add Samsung camcorder mode

Credit to: codeworkx

Change-Id: I9a54c2e1d9090f4bf11fe04cbb4a7ecd697d8054
Add options to better control video preview size

That patch needs to be merged before : https://gerrit.omnirom.org/#/c/2468/

Credit to: Steve Kondik

PatchSet: correct logic to do not break other devices

Change-Id: I9cc63fee8d8be224990646f16324f60e63816ae9
Camera: don't display picture size unless supported

Otherwise the option will force close when selected

PatchSet:
- remove duplicate adding the pie button
- cleanup

Change-Id: I2047c90ab08e7d7abcf11d817b5ddf106df2c732
camera: Add ZSL support for Samsung/Qualcomm cameras

 * Preview management for Samsung/Qualcomm cameras

Patchset 3: merge conflicts fixed
            build errors fixed

PatchSet 4: codestyle corrections

Change-Id: Ib36bd21c9a76b45bced3eee2f25acc35b5d82b30
Fixes Mako continues focus  problem

rebase

Change-Id: I25187998003d357ec5ed3b10329fb39941f47bea
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
Camera: add Smart capture

add back smart capture feature. Recoded and addapt to the
new aosp camera. This time each camera and video can set it
seperatly.

drawables by kbeezie

Change-Id: I87a895c21c53d11cab573df4fd76f1628ca03b1a
TrueView Returns!

This adds the ability to view the complete sensor frame image
rather than the cropped preview used by AOSP to fill the entire
surface.

Change-Id: I79b14a165c66fa4f8b8e43598bd6a80e4de1c08b
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: Iac4f5b8054039918dfe4a9bc0f1b0394900a797c
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
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
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
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: add ability to call needAutoFocusCall when using continous picture

Some camera HALs like the one from mako need a autofocuscall on continous picture
focus mode to proper work. Give for this devices the ability to turn this on.

Effected devices need to set the overlay value to truem

PS2:
- fix derp

Change-Id: Iab57406ef0d84dd6747952fac04cb29953f1646c
Camera2: fix power key shutter default behaviour

lol big midnight last minute change derp

Change-Id: I512d3180fb6491113d67ff86853ac549bea33761
Camera2: move back out as privileged app

Due that I introduced a fall back system it is not needed any
more to keep it as privileged app. Move it back to normal app.

Change-Id: Icbd90d45287614dc51a2db15e0c8c959ca164ad5