summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* CameraNext: dynamically generate available photo resolutionsWilhelm Fitzpatrick2018-01-2672-1007/+303
| | | | | | | | | | Instead of depending on a large matching table, generated the list of picture sizes to show to the user directly from the supported list returned by the camera. The list is filtered to remove uselessly small resolutions on modern devices, to group resolutions by aspect ratio, and to filter out fairly similar sizes. Change-Id: I47a67a89786543baec133cf7e71df9819793ebac
* Snap: Fix possible NPEMichael W2018-01-261-2/+4
| | | | | | | | Seems like getSupportedFocusModes() can return null. Check for null before using it further Change-Id: I46860f780b99970cbe9857c8ba73691d69321488 Reference: BugDumps 20161014-20 L#131
* Snap: Remove storage menu if no external storage availablemaxwen2018-01-261-2/+9
| | | | | Change-Id: I9807c7f9303f17eb971ff1a82fbd35dfbdbfa529 Signed-off-by: Zdrowy Gosciu <ZdrowyGosciu+GITHUB@gmail.com>
* snap: Add constrained longshot modeSteve Kondik2018-01-262-1/+26
| | | | | | | | | * On the OP3, we can only use Longshot in a single scene mode without conflicting with other built-in postprocessing features which cannot be disabled. Add support for this. When a scene specified in the longshot-scenemodes list is active, continuous shot will be enabled. Change-Id: I79878e5ac918e907ddc5b3ca168e49f4e06656c3
* snap: Always turn touch-af-aec onSteve Kondik2018-01-261-0/+6
| | | | | | | | * Most cameras do this by default, but on at least one device it starts with the option disabled. This stops AEC from updating during touch focus. Change-Id: I4bdb6cdbad86f3798c0288d6a32b7e8062e297f3
* Snap: Unbreak auto-HDRSteve Kondik2018-01-261-1/+1
| | | | Change-Id: Id93d5807fb4c4d14eeea33be0776a6f705a6c435
* Snap: Always allow 100% JPEG quality to be setZhao Wei Liew2018-01-261-24/+6
| | | | | | | | | | Previously, we were checking if the selected JPEG quality was 100% and not setting the JPEG quality if some conditions were met. There isn't any history nor explanation on why we weren't setting the JPEG quality to 100%, so just remove the redundant check. Change-Id: Ie0ab555ad35942bd115751fd10e4f4c11fa7a76d
* Snap: Make developer menu more accessibleMichael Bestas2018-01-263-23/+58
| | | | | | | | | | | | | | * Not all devices have red eye reduction, which made it impossible to enable advanced options. Move the toggle to max brightness option which is present in all devices. * Allow enabling advanced options through camcorder settings. * Move hardcoded strings to cm_strings for translations. * Close menus when developer mode is toggled so we can see the extra options when the menu is reopened. * Decrease taps to 7, matching Settings tap-to-enable. * Properly reset tap counter. Change-Id: Iac39b9309388b92bf75a49a6091b483b13bd9154
* Snap: Extend user menu, disable dev menucodeworkx2018-01-262-15/+31
| | | | Change-Id: Iaa64372e5d196fd0117a32a386686bdb1fd51e45
* Snap: force enable zsl for lge hdrcodeworkx2018-01-261-0/+5
| | | | | | LGE HDR needs ZSL enabled Change-Id: I563b7f7cd49fcf8aad35ca4b93f839dc0a591f01
* Snap: Support override maker and model exif tagKetut Putu Kumajaya2018-01-262-1/+18
| | | | | | Camera HAL not always return proper values Change-Id: Id81fe40ac84b0ffb70560e55077d90544139e463
* Fix view index tracking.Danny Baumann2018-01-261-6/+4
| | | | | | | As we have a header and a footer view now, the assumption 'pref list size == child count' doesn't hold anymore. Change-Id: I1b4ab16907eea758921ccce64af01d2a73e82459
* Snap: Fall back to REVIEW intent before VIEW intentEthan Chen2018-01-261-1/+15
| | | | Change-Id: Ie8f1dac602957cb871d0f8c7043ac0f434f4bfac
* Snap: Do not crash when cur-focus-scale is nullLuK13372018-01-261-2/+10
| | | | | | | * Some cameras simply don't set this parameter. * Also set cur-focus-diopter to 0 if it's null. Change-Id: Ib1049012de9a58279560c14ed77f83f52c07fe30
* Snap: Fix incorrect preview layout surface size in landscape modeNikita2018-01-261-4/+9
| | | | | | If height is smaller than width it means that orientation sets to horizontal and we should decrease width instead height to get normal preview size. Change-Id: Ifa211ad2604fb730fb85b01ae1d7c93c9b7aa2ce
* Snap: fix camera hang on LGE G4 when flash got usedcodeworkx2018-01-261-3/+10
| | | | Change-Id: I23e53333a0bbe2a12e64e87ec8594aeaa503e9fc
* Snap: Remove face detection option if not supportedArne Coucheron2018-01-261-0/+14
| | | | | | | Removes the face detection option from preference list if the "face-detection" camera parameter is blank/doesn't exist. Change-Id: I2ec82ae38505b6674f1a34e98d1b1fb2dbc2a714
* Snap: Remove video snapshot size when not supportedMichael Bestas2018-01-261-3/+7
| | | | Change-Id: I3f4dd8b76044389ee4d0d257e47b4ac90262ccc1
* Snap: Remove auto HDR option when not supportedMichael Bestas2018-01-261-3/+8
| | | | Change-Id: Iaff1bee5ad6d48df2efe189955ba91bca8ec5c32
* Snap: Fix filtering of unsupported HFR/HSR modesMichael Bestas2018-01-261-3/+26
| | | | Change-Id: I7721613f10a24cbd36eb0a3c5b0a46a98e828679
* SnapdragonCamera: Scale up bitrate for HSR recordingsSultanxda2018-01-261-1/+2
| | | | | | | | | | Currently, bitrate is only scaled up for HFR (slow-mo) recordings, not HSR (full high-speed) recordings. Scale up the bitrate for HSR to prevent video-quality degradation. Change-Id: Icc009ad4b22d990cc6df6773d965579a7d9cb091 Signed-off-by: Sultanxda <sultanxda@gmail.com>
* Snap: Don't crash if user saved preference is not validGabriele M2018-01-261-1/+5
| | | | | | | | If the user sets some preference value that is later removed, Snap will crash because of on an ArrayIndexOutOfBoundsException. Make sure this doesn't happen. Change-Id: I629acebaf762f49f05dc1bfa0542f11979ae269d
* Snap: Cleanup flash iconsMichael Bestas2018-01-264-0/+13
| | | | | | * Adapt some forgotten ones to material Change-Id: Ie50a7f58b78def8e1da2eae92ae458c729fd7ddb
* Fix crash if Exif-Tag buffer-length and component-count are both 0tobigun2018-01-261-1/+1
| | | | Change-Id: Iad9b60d135b4f682c08c3bfc9698cdd10e1086ab
* SnapdragonCamera: Set camera parameters before restarting previewSultanxda2018-01-261-0/+1
| | | | | | | | | Ensure that all of the updated camera parameters are propagated to the camera HAL prior to restarting the preview. This fixes the split-exposure observed when turning ZSL off and on without exiting the app. Change-Id: I392549ae7cc75b150e01cf8b635d2e3f1ad6ffb9 Signed-off-by: Sultanxda <sultanxda@gmail.com>
* Snap: Don't crash when hardcoded gallery intent failsEthan Chen2018-01-261-8/+16
| | | | | | | * startActivity may also throw IllegalArgumentException in addition to ActivityNotFoundException when the component can't be found. Change-Id: Ia3124591c625f4c249f3c6f76a226e8178df6e9d
* Snap: do not restart preview during longshotscodeworkx2018-01-261-4/+5
| | | | Change-Id: I6ad439dc0be7c6e0d13ac7c22aacdc0ad559d051
* SnapdragonCamera: Fix UI alignment glitches when nav-bar is enabledSultanxda2018-01-262-2/+2
| | | | | | | | | Snapdragon Camera is immersive (i.e. fullscreen), so we expect to receive the actual size of the display here, not the modified size when the nav-bar is enabled. Change-Id: I942829f77dda0dbb9dd65a60e66a540eecf708e7 Signed-off-by: Sultanxda <sultanxda@gmail.com>
* Snap: Don't enable ZSL when disabling HDRGabriele M2018-01-261-1/+2
| | | | | | | Instead, restore the default value. This prevents issues on devices that don't support ZSL. Change-Id: I9c456cd6503df29800e2bc7ccaa691cb3fb42681
* SnapdragonCamera: Remove 'off' option for antibandingSultanxda2018-01-262-5/+2
| | | | | | | | Antibanding is very important for UX with regard to photographing in artificial lighting, so don't provide users with an option to turn antibanding off. Change-Id: I080a48a88b6faee69a67df8706e0a3acd1c233f0
* SnapdragonCamera: Fix overly-aggressive auto rotationSultanxda2018-01-261-2/+2
| | | | Change-Id: I534c0e36ac826b1d46befe99182bfbfb3b0f22da
* SnapdragonCamera: Add option to control antibanding in camcorderSultanxda2018-01-264-18/+16
| | | | | | | The antibanding setting in camcorder is linked to the setting in camera mode for better UX (if you change one, the other will change accordingly). Change-Id: I98c1bc65472cf8eec530f5a7572f46458b0ab3fa
* Snap: Actually select the highest quality video by defaultChristopher R. Palmer2018-01-262-2/+9
| | | | | | | | | | | Prior to this commit Snap assumes that the HAL returns the list of supported video sizes in descending order of quality and simply picks the first one from the list as the default quality. Instead, find the first matching entry of pref_video_quality_entryvalues that the HAL indicated was supported. Change-Id: Ifea79e0e16a9015557539e098317536a32b9ff1f
* Snap: Remove touch AF/AEC optionSteve Kondik2018-01-266-88/+11
| | | | | | | | * Drop the use of the touchaf-aec parameter entirely. No camera needs this anymore. Change-Id: I83154a75e5375901dc6c0fc93aef23637cfdf425 (cherry picked from commit 8ba41f452222c87a733fd2d045f9c513fd8d7799)
* Snap: Support for HTC's HDR modeSteve Kondik2018-01-262-12/+13
| | | | | | | | | | * HDR was never actually working on CM because we did not instruct the camera to take all exposures. The HAL tells us that we'll get one JPEG, but we should snap 3 times. We handle this behavior in the framework now, but we should honor the num-jpegs-per-shutter value in the JPEG callback. Change-Id: I7124bf08985ae23b21ac4e294fb889ac4106946b
* Snap: special handling of hdr-mode parameter for lge devicescodeworkx2018-01-263-16/+44
| | | | Change-Id: Iefee1f15f5649c2f93c59fcbdedcf953e9e0bc54
* Move mApplicationContext to init()LuK13372018-01-261-2/+1
| | | | | | | | | | | | | | Fixes following NPE: 01-11 17:36:42.607 4329 4391 E AndroidRuntime: FATAL EXCEPTION: Thread-235 01-11 17:36:42.607 4329 4391 E AndroidRuntime: Process: org.cyanogenmod.snap, PID: 4329 01-11 17:36:42.607 4329 4391 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference 01-11 17:36:42.607 4329 4391 E AndroidRuntime: at com.android.camera.PhotoModule.updateCameraParametersPreference(PhotoModule.java:3492) 01-11 17:36:42.607 4329 4391 E AndroidRuntime: at com.android.camera.PhotoModule.setCameraParameters(PhotoModule.java:3714) 01-11 17:36:42.607 4329 4391 E AndroidRuntime: at com.android.camera.PhotoModule.startPreview(PhotoModule.java:2715) 01-11 17:36:42.607 4329 4391 E AndroidRuntime: at com.android.camera.PhotoModule.-wrap14(PhotoModule.java) 01-11 17:36:42.607 4329 4391 E AndroidRuntime: at com.android.camera.PhotoModule$OpenCameraThread.run(PhotoModule.java:265) Change-Id: I6ca0dfe402cab46dd7b6f102921062f3c7ec8d43
* Snap: Fix NPE when parameters.getSupportedVideoSizes() is nullMichael Bestas2018-01-261-102/+21
| | | | | | | | * Older devices do not support parameters.getSupportedVideoSizes() * Assume that the device reports valid profiles in media_profiles * Remove dead code Change-Id: Ic3488b6762496bd9498bc6bf8b48b2a2212bad51
* Snap: Fall back to default quality instead of 352x288Michael Bestas2018-01-261-9/+2
| | | | | | * Not all devices support this resolution Change-Id: I42d2037b4e32c7f5c88a60b5da1895dcb761d176
* Snap: Fix aapt warningsLars Greiss2018-01-2661-401/+5
| | | | Change-Id: I6d48105f0407ded104244eb5ace4a3ace76eb402
* Snap: Remove CAF Chinese translationsMichael Bestas2018-01-262-492/+8
| | | | Change-Id: Icb15ed42b62a8a85a7691c5cfc606307689cbcae
* CameraActivity: Handle NPE when film strip view is nullLuK13372018-01-261-1/+3
| | | | Change-Id: I0de4ec0f2cb4653822249ea97e8a07c890fc7231
* Snap: restart preview when shutter-speed gets disabledcodeworkx2018-01-261-1/+14
| | | | Change-Id: I3884b23f1c855cfffeb20ca6e2a760732370d772
* SnapdragonCamera: Fix incorrect viewfinder ratio for 13.1MP shotsSultanxda2018-01-261-1/+1
| | | | | | Set the aspect tolerance to 0.02 to compensate for 13.1MP (4208x3120) shots. 13.1MP will now be properly registered as a 4/3 resolution when the viewfinder ratio is calculated. Change-Id: I41540a0d5fbe11f59d776a6e70e82baa463fff59
* Snap: Fix NPE when switching flash modesmyfluxi2018-01-261-3/+5
| | | | | | If device does not support AE bracketing. Change-Id: I6ec89518addbc786a01291e9f7dd3be3d83cb588
* Snap: add fallback for invalid video qualitiescodeworkx2018-01-261-0/+7
| | | | | | Might happen when updating from previous versions of Snap Change-Id: Ib52a2daff5a45c33ede1effd7cb7bed2fe61e5cc
* Snap: add support for mw_continuous-picture focus modecodeworkx2018-01-264-12/+31
| | | | Change-Id: If165370b52d7454c69e2cdeb9d837d049010b0e8
* Snap: add support for shutter speedcodeworkx2018-01-266-0/+111
| | | | Change-Id: Id3393280c7c1c2f292d71587ba099e8dbafd1340
* Snap: Add touch-to-focus timeout duration settingsjt11342018-01-267-5/+58
| | | | | | Signed-off-by: Michael Bestas <mikeioannina@gmail.com> Change-Id: Ib2c2c152a52b2616dd0da6f071f572d34fe64065
* Snap: make openLegacy an optioncodeworkx2018-01-262-16/+36
| | | | | | | Using openLegacy on QCamera3 forces it to use QCamera2 and fall back to api v1 which is not what we want on v2 devices. Change-Id: Ic392a4ae9403ebae36940ddf0727237d9cb9e8f0