summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Snap: Handle SDCard-removed caselineage-17.0Michael W2019-11-251-0/+8
| | | | | | | | | | | | | | * When the storage path has been set to SDCard but the card has been removed, there is currently no way to alter the setting and to get your cam to work properly again * Check the writeable-state of the sdcard on startup and fall back to using the internal storage in that case * The startup-flag is used to keep the current behaviour with removed SDcards while cam is still active * Fixes: https://gitlab.com/LineageOS/issues/android/issues/1376 Change-Id: Ib408883a6810693c93488f8a02fe061c56932d1d
* Snap: Don't remove scene modes!dianlujitao2019-11-211-5/+1
| | | | | | This partially reverts commit 8acb462b46c930bf6f6c6192012a11f2e127ecc4. Change-Id: I5864924938189b17efa9a496912a51b9c2b233c1
* Snap: Perform null check on AF state in updateCaptureStateMachinedianlujitao2019-11-211-0/+5
| | | | | | | | | * Some camera HAL implementations don't push AF state to urgent metadata. E.g. for QCOM camera HAL this happens only after https://source.codeaurora.org/quic/la/platform/hardware/qcom/camera/commit/?h=LA.UM.7.2.r1-07700-sdm660.0&id=d276a953295364b967c36038362c1e7ea268bdad * Fix crash on capture after c724bc35a9c5f3b36ce36a2081559e2644993da4 Change-Id: I8980fd3fb7d7db4f61189281580ecb17778602df
* Snap: Fix getting supported ISO with legacy HALdianlujitao2019-11-211-6/+21
| | | | | | | | * org.codeaurora.qcamera3.iso_exp_priority.iso_available_modes is QCOM specific vendor tag and not implemented in legacy HALs. * Restore pre-17.0 behavior by falling back to AOSP camera characteristics Change-Id: I299e7bfb867496c63ec873ea4cea29b0b8bb595f
* Snap: Don't query camera hardware on camera button actionLuK13372019-11-111-11/+0
| | | | | | | | * Android 10 does not allow idle apps to do anything camera related so lets just launch the app unconditionally instead. Change-Id: I117b1442e5ca107205d4b69cbfd32d5375995d78
* Fix NPE when removing RAW settingLuK13372019-11-091-1/+1
| | | | | | | * That preference is already gone when developer options are disabled. Change-Id: I040d153561cce691e8e5689bb810585071cb5836
* Fix use of deprecated SoundPool API in SnapJean-Michel Trivi2019-11-094-18/+42
| | | | | | | | | | | Don't use stream types for operations other than volume control [Chippa_a]: Extended for Snap Bug: 122901916 Test: verify logcat doesn't show warnings, see bug Change-Id: Id5b4f3b3c56c61a2f00172a470410e0670ce81b4 Signed-off-by: Chippa-a <vusal1372@gmail.com>
* Stop using deprecated Canvas APIs.Derek Sollenberger2019-11-091-1/+1
| | | | | | Bug: 73777445 Test: compile Change-Id: Ib8a0b7dcbe606c2a1a9df26549cc805c6eeb892b
* Snap: Fix Undo button behaviourNBruderman2019-11-091-1/+2
| | | | | | | | | | | | | | The undo behaviour depends on if the camera present secure settings or not. If secure, it should have 1 placeholder. 0 in other cases. Repro (for non secure cameras): 1. Leave only 3 pictures on the album. 2. Delete one picture, it will work fine. 3. Leave only 2 pictures on the album. 4. Try to delete, and you will go straight to the camera, without the undo pannel showing up. Change-Id: I360076381867a74628ffa492065ccf2ca53c72d6
* Snap: allow to disable image stabilization per devicecodeworkx2019-11-091-0/+6
| | | | Change-Id: I4317f84285bdf97ba321ad5ddba7453f2b5d3b0c
* Snap: Fix picture size preferencedianlujitao2019-11-091-1/+3
| | | | | | | | * Picture sizes are dynamically generated and no longer come with initial entries, thus reloadInitialEntriesAndEntryValues() would just set it to empty. Change-Id: I4d601bdf0faf8065ada7ea252c9d6120a230a420
* Snap: make support for bokeh mode configurable per devicecodeworkx2019-11-091-3/+20
| | | | | | Support is disabled by default. Change-Id: I5ab480e4eed9d314ae6f5ef78c5246397ebbe587
* Snap: Always allow 100% JPEG quality to be setZhao Wei Liew2019-11-091-17/+11
| | | | | | | | | | 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: Disable debugging of double open issueWang Han2019-11-091-1/+1
| | | | | | * Slows down camera opening and useless for us Change-Id: I2826704afc6b15fc4ca51ee0d29553f5b3dfb858
* Snap: Add missing NULL check in updatePictureAndVideoSize()Wang Han2019-11-091-9/+11
| | | | | | | * Fixes crash when enabling Qcfa Change-Id: I506a1d7da0b91bc48484bd251e0c6c9042962421 Signed-off-by: Chippa-a <vusal1372@gmail.com>
* Snap: Check various feature support before applyingWang Han2019-11-091-2/+14
| | | | | | * Fixes crash on devices which does not support it Change-Id: I39b9424ad200db6819a11aac6c319a22542d4131
* Fix get aePref is null in PhotoMenujinwu2019-11-091-1/+1
| | | | Change-Id: I225ab63336302ff0b3b863e9cb6d2ba74ed0ac3e
* Fix to change default mode to Camera1 HAL1zhuw2019-11-091-1/+1
| | | | Change-Id: Id8f03260cf4753206240cf829eea9be5735b90e6
* SnapdragonCamera: Fix parameters NullPointerExceptionxianming wang2019-11-091-0/+1
| | | | | | | Fix parameters is NullPointerException in China App Stress. CRs-Fixed: 2307806 Change-Id: I71fff4cb32361ad0e66d6460ca8dc01167c8a009
* SnapdragonCamera: SetParameters use the mParameters Objectmingwax2019-11-091-1/+1
| | | | | | | | User should use the mParameters take the place of mCameraDevice. getParameters. In order to update parameter in time. CRs-Fixed: 2054913 Change-Id: I605f05322a2a6072c40014f7ab472802c0350107
* DisableCameraReceiver: Initialize CameraHolder before usedianlujitao2019-11-091-0/+14
| | | | Change-Id: If4c38d19d3c88317ddd4f651acea5e036dbe8544
* Fix force close when launch camera on Pzhuw2019-11-096-88/+84
| | | | | | Don't use hardware.camera.CameraInfo any more Change-Id: I2d0dacc0b597c05df9eacd2fee1e26a33d4de8e7
* CameraSettings: Do not crash if zoom ratios are not exposeddkati2019-11-091-4/+5
| | | | | | | | | | * On some devices, wrappers do not expose the zoom ratios, so the list of zoomRatios is empty. So the .add() method cant run from a null class. If zoom ratios are not exposed, simply return an empty list and the camera will take the default HAL's zoom ratios -This fixes front camera photo shoot on jfltexx Change-Id: Ic64e41a8c5a2d51966ec95d4b020e5d3951eac0e
* Snap: Allow quickreader to work with secure deviceMichael W2019-11-091-2/+3
| | | | | | | | | | | * Mimic the behaviour from CameraActivity to allow using the quickreader activity with locked screen * Pass the value if mSecureCamera as SECURE_CAMERA_EXTRA flag to get knowledge if the WindowManager flags have to be modified * Also tested: Scanning an url doesn't allow bypassing the lockscreen, so it's only the reader itself which will work with a locked device Change-Id: Ia9da7b712f5e5aab32a49d272e3d42651dee412d
* SnapdragonCamera: Panorama, replace border drawabledarkobas2019-11-091-3/+1
| | | | Change-Id: Ic86c7146f53b96e70259fd6da81050277ebda23b
* Snap: Configure focus ring preview dimensionsEthan Chen2019-11-092-1/+2
| | | | Change-Id: I49d7f28fb2f731e18c73b9d944882f9f8a4fb5c2
* Snap: Add support for focus distanceSteve Kondik2019-11-095-2/+128
| | | | | | * Hook up available metadata to the new focus manager. Change-Id: I793df67a2682d8bb2dee994193111227dd8c8d5a
* Drop new focus indicator into Camera2.Paul Rohde2019-11-0932-352/+2138
| | | | | | | * Create a new custom focus view that interacts with physical lens diopter changes. * Replace all occurances of the old focus indicator with the new one. Change-Id: Ia02646ce4d1eb059ecb8a1dfccc15dfc9c167e1b
* Snap: don't try to set up cameras with ids greater than MAX_NUM_CAMcodeworkx2019-11-091-1/+11
| | | | | | * fixes ArrayIndexOutOfBoundsException on setUpCameraOutputs Change-Id: I1565576b604bdcebea85d65f3c7a2b332292ed2d
* Snap: Convert "save best" dialog text to a quantity stringMichael W2019-11-091-3/+4
| | | | | | | | | * Saving 1 vs saving several can be a different string in other languages (e.g. German: "1 von 10 Bildern wird gespeichert[...]" vs "2 von 10 Bildern werden gespeichert[...]") * Also fixes a missing "be" in the source string ("will _be_ deleted") Change-Id: I0f0a91fa3cd1abe17c9d3eef453c4ed706a6fb25
* Snap: add QReader to module switchJoey Rizzoli2019-10-252-4/+18
| | | | | | | | | | | | | | | | | | | Author: Joey Rizzoli <joey@lineageos.org> Date: Fri Dec 15 21:54:27 2017 +0100 Snap: add QReader to module switch Change-Id: I7cc33c7ebc6de35d19979a9a70f198029e46d88f Signed-off-by: Joey Rizzoli <joey@lineageos.org> Author: Arne Coucheron <arco68@gmail.com> Date: Sun Jan 14 16:53:49 2018 +0100 QuickReader: Match switch icon size and fill color with other icons Change-Id: I9bfa84ed1ea188470cb9a58c5d59cf8a6b270215 Change-Id: Ia7f575bf6cab7d24a6d1ad167b44a02feb1457d2
* Snap: check tags before using themcodeworkx2019-10-252-1/+7
| | | | | | | MessageQueue-JNI: java.lang.IllegalArgumentException: Could not find tag for key 'org.codeaurora.qcamera3.saturation.use_saturation') Change-Id: Ia42c67552f9d4574e5f86af2ac5aea853198d0ed
* Snap: Rip out hdr-need-1x optionPaul Keith2019-10-253-28/+0
| | | | | | | | | | * This breaks HDR on every device that has this param, because this makes the camera HAL return *1* e*x*tra frame at 0 exposure, and since Snap doesn't know what to do with this extra frame, it erroneously saves it as a second picture on device storage * Remove this option entirely to make HDR great again Change-Id: I8ef4072eb030f4ab6e608a0da268274a3dc58e34
* Snap: Fix panorama layoutArne Coucheron2019-10-253-9/+39
| | | | | | Loosely based on old cyngn patches. Change-Id: I7fdb6ba82243f2f28e8ea655f83f0339d49de5ad
* Snap: Arrange video menu so it's similar to photo menuArne Coucheron2019-10-251-7/+7
| | | | Change-Id: I3bd89db44663594871a992e6856f55fef8a70c85
* Snap: Remove "help screen on first start" featureArne Coucheron2019-10-255-544/+0
| | | | | | | | | | | | | | | | | | | | Revert "SnapdragonCamera: Add help menu to camera2" This reverts commit 0dbfdffc9994a17e60c57b17c3cc5743cc75e155. Change-Id: Icb4e4bbc2b7883fa232483615a18d3197b2577bd Revert "SnapdragonCamera: Move help menu string to ressource" This reverts commit 901130273dbfc753ef883941a4e93b50056177e4. Change-Id: I82815ee7ef80985c88315c40d6b222f688fd6b75 Revert "SnapdragonCamera: Adding help screen on first start" This reverts commit 666692bf730a1c46210cc74781a56afb4b6fcf28. Change-Id: I8f2ee58c263537c3a02248aa344516f5321de13f
* Snap: Fix filter mode button after disabling HDR modeArne Coucheron2019-10-251-1/+4
| | | | Change-Id: I24953691c020727900a8cd944e60c27a24ff62c9
* Snap: Fix swipe right to open menuArne Coucheron2019-10-251-3/+10
| | | | Change-Id: I74b9230e7c63813b3e8b716acf66b10c835f12b5
* Snap: Don't close slide out menu after selecting scene modeArne Coucheron2019-10-251-1/+0
| | | | | | Keep consistent with how filter mode menu behaves. Change-Id: If53bdca075bf97e1f2ad3b8a3f494dcb720026dc
* Snap: Increase default pano capture pixels to 1440x1000Arne Coucheron2019-10-251-2/+2
| | | | Change-Id: I5a67ee329a46701629b017c57f640a5be1976288
* Snap: Show remaining photos on initial startArne Coucheron2019-10-251-0/+1
| | | | | | Also increase margin a bit. Change-Id: Id8ddb1137094f03bd26b487575b555bbadd80432
* SnapdragonCamera: Add missing toast on HSR/HFR overrideAlex Naidis2019-10-251-0/+2
| | | | | | | | | Add in a missing toast to warn a user when the wanted HSR/HFR mode gets overriden due to the incompatibility with image stabilization. Change-Id: Ib81c50e8fad0bca075e6b33399321da42d77eb03 Signed-off-by: Alex Naidis <alex.naidis@linux.com>
* Snap: Don't do touch-to-focus on top of UI elementsSultanxda2019-10-253-4/+21
| | | | | | | | Don't process touch-to-focus for taps that are located on either the top or bottom UI panes. Change-Id: Iac4ccda8625080ff0bd1133ac339e53c423b626d Signed-off-by: Sultanxda <sultanxda@gmail.com>
* Snap: Render zoom circle in the center of the camera previewSultanxda2019-10-251-1/+18
| | | | | | | | | Previously, the zoom circle was rendered in the center of the entire screen, making it look unevenly placed due to the uneven sizes of the top and bottom UI panes. The camera preview in this case is calculated to be the portion of the screen between the top and bottom UI panes. Change-Id: I67678f7bc227cf2b7a6eed3161805b2b107c488a
* SnapdragonCamera: Enforce 120ms delay in between shutter clicksSultanxda2019-10-251-2/+10
| | | | | | | To prevent unintentional duplicate photo captures. Change-Id: I5b24d834ba6eb7e2f606d656a71f5878ab8d08f5 Signed-off-by: Alex Naidis <alex.naidis@linux.com>
* SnapdragonCamera: Fix shutter button clicks in rapid succession getting ignoredSultanxda2019-10-251-1/+1
| | | | | | | | | | | | | | Due to this check, the shutter button would be disabled until each photo would finish processing. This results in the shutter button getting disabled for quite a long time when ZSL isn't used, forcing the user to wait until the previous shot is finished before requesting a new shot. Fix the HDR check so that shutter button clicks in quick succession work. There is code in place to handle button clicks in rapid succession, so this is fine. Change-Id: Ifc36a22e4ec3a1be24e5a9b40c3fc682e82605b3 Signed-off-by: Alex Naidis <alex.naidis@linux.com>
* VideoModule: don't set negative HFR valueAnas Karbila2019-10-251-1/+5
| | | | | | Change-Id: Ic5e429c16792af7f3af0155f50c162487ffa4ef7 (cherry picked from commit 460c0f207ad453473a1d2d5f0f94651578f5eccb) Signed-off-by: Alex Naidis <alex.naidis@linux.com>
* ListPreference: prevent ArrayIndexOutOfBoundsExceptionThecrazyskull2019-10-251-0/+1
| | | | | | * Index value is not allowed to be higher/equal to the array length Change-Id: Iff361603f337e4e77085717fce6227815ea06fc7
* Protect against multiple shutter callbacks per frame in longshot mode.Danny Baumann2019-10-251-0/+8
| | | | | | | | | | Some devices send multiple shutter callbacks for one captured frame in longshot mode. As this causes mismatch between the calculated number of captured frames and the calculated number of JPEGs received for those, which in turn leads to longshot mode never being ended properly, protect against that scenario by discarding all but the first callback. Change-Id: I0c3a270f664a0cd16354fb0a13c5941a52001650
* SnapdragonCamera: Longshot with Burst Functionality.Vijay kumar Tumati2019-10-253-19/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a new Longshot feature where in the snapshot frames captured at ISP is @ 3fps and output JPEG encoded rate is @ 1.2 fps. This can be enabled by setting following setprop with the maximum number of snapshots. adb shell setprop persist.camera.longshot.max <max_number> e.g.:adb shell setprop persist.camera.longshot.max 10 If the number is -1, then the existing Longshot will be used. Main changes: 1) The number of Snapshot/Preview/Metadata buffers are increased to make sure no frames will be dropped @ ISP and to maintain burst fps. e.g.: For max number of 10 snapshots, Snapshot buffers are increased to 9 from existing 6. This buffer numbers are derived considering snapshot YUV frames @ 3 fps and JPEG encoding @ 1.2 fps. 2) Shutter will be played after receiving YUV frame instead of reprocess frame. 3) New Longshot stop command is sent after receiving all the required YUV callbacks or releasing the shutter before reaching Max number. 4) Existing Longshot off command is sent after receiving all JPEG CB.s for the issued TakePictures() and also shutter button will be disabled until all the JPEG callbacks are received. Change-Id: Id0c21aeb67245530768bf3ab859d39dea7e2bc40