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

Change-Id: I9cc63fee8d8be224990646f16324f60e63816ae9
camera: add support for htc camcorder mode

Change-Id: I56739157380f596c9f3bbbe7aecd8f532d619c72
camera2: prevent NPE because a null inage data has been added

Happens mostly with video snapshots

E/AndroidRuntime(18624): java.lang.NullPointerException

E/AndroidRuntime(18624): at com.android.camera.data.LocalData.compare(LocalData.java:186)
E/AndroidRuntime(18624): at com.android.camera.data.LocalData.compare(LocalData.java:170)
E/AndroidRuntime(18624): at com.android.camera.data.CameraDataAdapter.insertData(CameraDataAdapter.java:247)
E/AndroidRuntime(18624): at com.android.camera.data.CameraDataAdapter.addNewPhoto(CameraDataAdapter.java:171)
E/AndroidRuntime(18624): at com.android.camera.data.AbstractLocalDataAdapterWrapper.addNewPhoto(AbstractLocalDataAdapterWrapper.java:74)
E/AndroidRuntime(18624): at com.android.camera.CameraActivity.notifyNewMedia(CameraActivity.java:760)
E/AndroidRuntime(18624): at com.android.camera.VideoModule.onMediaSaved(VideoModule.java:193)
E/AndroidRuntime(18624): at com.android.camera.MediaSaveService.onPostExecute(MediaSaveService.java:188)
E/AndroidRuntime(18624): at com.android.camera.MediaSaveService.onPostExecute(MediaSaveService.java:141)
E/AndroidRuntime(18624): at android.os.AsyncTask.finish(AsyncTask.java:632)
E/AndroidRuntime(18624): at android.os.AsyncTask.access00(AsyncTask.java:177)
E/AndroidRuntime(18624): at android.os.AsyncTask.handleMessage(AsyncTask.java:645)
E/AndroidRuntime(18624): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(18624): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(18624): at android.app.ActivityThread.main(ActivityThread.java:4998)
E/AndroidRuntime(18624): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(18624): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(18624): at com.android.internal.os.ZygoteInit.run(ZygoteInit.java:777)
E/AndroidRuntime(18624): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
E/AndroidRuntime(18624): at dalvik.system.NativeStart.main(Native Method)

Change-Id: I97277371414e8c850370d779f25779662cb44e49
Camera2: Add workaround for non functioning camcorder on some devices

Change-Id: Idaf71858a814a48204793348b6ebc86527599dc3