summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Snap: Allow quickreader to work with secure deviceMichael W2018-08-131-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 drawabledarkobas2018-06-051-3/+1
| | | | Change-Id: Ic86c7146f53b96e70259fd6da81050277ebda23b
* SnapdragonCamera: Change static nature for persist flagSuman Mukherjee2018-05-193-12/+17
| | | | | | | | Issue: Due to static declaration of flip flags, flip effect is not getting reflected until the application will get stopped. Change-Id: If47653a365c840ce262fe9c270472cf41e7dbdba Fix: In place of static, use flip flags as normal variable.
* Snap: Check for ACCESS_FINE_LOCATION instead of ACCESS_COARSE_LOCATIONArne Coucheron2018-05-184-9/+9
| | | | | | | | ACCESS_FINE_LOCATION is now required for GPS location feature to work. | LocationManager: java.lang.SecurityException: "gps" location provider requires ACCESS_FINE_LOCATION permission. Change-Id: I6b2f11bdab719cb9fc74a67a8e91ad558269d579
* Fix snapshot failed with logical camerazhuw2018-04-221-0/+3
| | | | | | if ZSl is enabled , use takeZSLpicture and return Change-Id: I501b40218daef5a5f2847426df00ab18743ee63f
* Add ui toast for bokehzhuw2018-04-222-0/+97
| | | | | | add ui toast change for bokeh Change-Id: I51598fbe80dd979159cbe9aadeaea26169026d4d
* Snap: Configure focus ring preview dimensionsEthan Chen2018-03-162-1/+2
| | | | Change-Id: I49d7f28fb2f731e18c73b9d944882f9f8a4fb5c2
* Snap: Add support for focus distanceSteve Kondik2018-03-175-3/+127
| | | | | | * Hook up available metadata to the new focus manager. Change-Id: I793df67a2682d8bb2dee994193111227dd8c8d5a
* Drop new focus indicator into Camera2.Paul Rohde2018-03-1732-340/+2137
| | | | | | | * 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: fix copy and paste failcodeworkx2018-03-121-1/+1
| | | | | | https://github.com/LineageOS/android_packages_apps_Snap/commit/70dbc05d00a5e6011f532d029c50bfb4a17a2e57 Change-Id: I9bee85c9a454dad074fec688974cc84b629cd62d
* Snap: add missing null check on isCamera2Supportedcodeworkx2018-03-111-12/+16
| | | | Change-Id: I61c04c7cb8d344573ab7fb11f7114f09aaf24fb7
* Snap: don't try to set up cameras with ids greater than MAX_NUM_CAMcodeworkx2018-03-111-1/+11
| | | | | | * fixes ArrayIndexOutOfBoundsException on setUpCameraOutputs Change-Id: I1565576b604bdcebea85d65f3c7a2b332292ed2d
* Do not crash if we don't have support for RAW filesAndreas Schneider2018-03-061-1/+3
| | | | Change-Id: I179e2a430b6ea790d6b4a68b124944e09f4b1715
* Snap: Fix "Convert "save best" dialog text to a quantity string"Michael Bestas2018-02-221-2/+2
| | | | | | * Fixes I0f0a91fa3cd1abe17c9d3eef453c4ed706a6fb25 Change-Id: Ib4f2aa3854127ffd96bfa744987adfd65fa306fe
* Snap: Convert "save best" dialog text to a quantity stringMichael W2018-02-211-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: update shutter buttons on CaptureUIcodeworkx2018-01-273-29/+4
| | | | | | https://review.lineageos.org/#/c/200740/ Change-Id: I674de05dfb46fb714979ac66c16a85825af13c95
* Revert "Snap: Bring back original shutter icons and animation"Paul Keith2018-01-275-71/+4
| | | | | | | | No reason to do use caf ones This reverts commit a465e3a0cf7a81c7cb9a0e80cbfa7527e7d7de77. Change-Id: I611351ddfa0b24087cc58466dcba95ab4999d1bd
* Snap: add QReader to module switchJoey Rizzoli2018-01-272-4/+17
| | | | | Change-Id: I7cc33c7ebc6de35d19979a9a70f198029e46d88f Signed-off-by: Joey Rizzoli <joey@lineageos.org>
* Snap: check tags before using themcodeworkx2018-01-272-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 Keith2018-01-273-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: Bring back original shutter icons and animationArne Coucheron2018-01-275-4/+71
| | | | Change-Id: I843ba306053ea7f14fbf805c8633c02a854f84df
* Snap: Fix panorama layoutArne Coucheron2018-01-273-9/+39
| | | | | | Loosely based on old cyngn patches. Change-Id: I7fdb6ba82243f2f28e8ea655f83f0339d49de5ad
* Snap: Arrange video menu so it's similar to photo menuArne Coucheron2018-01-271-7/+7
| | | | Change-Id: I3bd89db44663594871a992e6856f55fef8a70c85
* Snap: Remove "help screen on first start" featureArne Coucheron2018-01-276-545/+2
| | | | | | | | | | | | | | | | | | | | 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 Coucheron2018-01-271-1/+4
| | | | Change-Id: I24953691c020727900a8cd944e60c27a24ff62c9
* Snap: Fix swipe right to open menuArne Coucheron2018-01-271-3/+10
| | | | Change-Id: I74b9230e7c63813b3e8b716acf66b10c835f12b5
* Snap: Don't close slide out menu after selecting scene modeArne Coucheron2018-01-271-1/+0
| | | | | | Keep consistent with how filter mode menu behaves. Change-Id: If53bdca075bf97e1f2ad3b8a3f494dcb720026dc
* Snap: Increase default pano capture pixels to 1440x1000Arne Coucheron2018-01-271-2/+2
| | | | Change-Id: I5a67ee329a46701629b017c57f640a5be1976288
* Snap: Show remaining photos on initial startArne Coucheron2018-01-271-0/+1
| | | | | | Also increase margin a bit. Change-Id: Id8ddb1137094f03bd26b487575b555bbadd80432
* SnapdragonCamera: Add missing toast on HSR/HFR overrideAlex Naidis2018-01-271-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 elementsSultanxda2018-01-273-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 previewSultanxda2018-01-271-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 clicksSultanxda2018-01-271-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 ignoredSultanxda2018-01-271-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 Karbila2018-01-271-1/+5
| | | | | | Change-Id: Ic5e429c16792af7f3af0155f50c162487ffa4ef7 (cherry picked from commit 460c0f207ad453473a1d2d5f0f94651578f5eccb) Signed-off-by: Alex Naidis <alex.naidis@linux.com>
* ListPreference: prevent ArrayIndexOutOfBoundsExceptionThecrazyskull2018-01-271-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 Baumann2018-01-271-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 Tumati2018-01-273-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
* Snapdragon Camera: Use consistent API for preview fps resetEmilian Peev2018-01-272-5/+12
| | | | | | | | | | Instead of using preview fps range API during preview framerate reset use the fixed fps API. This is to avoid any inconsistent behavior that can be triggered when using both APIs from MediaRecorder and Snapdragon application side. Change-Id: Ib5251d8ea4d697db9bdea4e5ebf20606b286f54f
* Snapdragon Camera: Avoid possible race conditionEmilian Peev2018-01-271-0/+9
| | | | | | | | | | | | | | | | | | Camera open and preview start are currently executed in a separate thread different from the main handler thread. If the main thread tries to switch the camera immediately after the open camera thread starts a race condition is possible. This race condition can lead to a failing assert in CameraHolder which can receive two camera open requests one after another. To resolve this the main handler thread needs to check whether an open camera thread got initialized and started previously. If the check is positive, it needs to wait until the separate thread finishes before proceeding with the camera switch sequence. Change-Id: I409e3158bc976120de31540351ea8e55fddbca46
* Camera: Set preview fps after recording.Suman Mukherjee2018-01-271-0/+12
| | | | | | | | 4k DCI recorded FPS is getting picked up from profile and not getting reset to preview FPS after stop recording. Fix made to set the preview FPS range after stop recording. Change-Id: I4892e6fcee3eefbcbd6ca9426e56e2303cdad844
* Initialize focus overlay manager if it is not initialized.Santhosh Kumar H E2018-01-271-3/+9
| | | | | | | | | | | Camera open thread initializes the focus overlay manager after opening camera. In a rare scenario above background thread had not initialized focus overlay manager by the time UI thread start acessesing it, so we see a crash. Initialize focus overlay manager from UI thread if it is not initialized already. Change-Id: I1635c8759d0e0647fe61fe975a0cc24df40df529
* Never ignore finger swipes in gallery modeGabriele M2018-01-272-8/+0
| | | | | | | | | | | | | | Under certain conditions finger swipes are ignored. Steps to reproduce the bug: - Open left menu - Close menu choosing an option or tapping out of the preview - Tap preview of last picture in bottom left corner Swipes in the gallry should now be ignored until a right to left swipe is performed in the preview. Change-Id: I3928d84360266cca368265553a037192aa5d6780
* Focus only when tapping the previewGabriele M2018-01-271-2/+2
| | | | | | | | Calling onSingleTapUp() from onScroll() is causing Snap to issue a focus request for every touch movement, including the gestures to open the menu and the gallery. Change-Id: If913607735add13c1af8e0882748d4800e4e10f9
* Add overlay for restarting camera preview for additional camerasLuK13372018-01-271-1/+6
| | | | Change-Id: I95eb7237b101b73d66fe231a11d0c8d5156bfe47
* Snap: Simulate back button press when menu back button is pressedGabriele M2018-01-271-8/+2
| | | | | | | | | | | | Launching Gallery when the home button (shown as back button) is pressed makes no sense, especially because it's only shown in Snap's own gallery. In addition to that, if Gallery is disabled, Snap closes itself. Fix both the issues by simply simulating a back button press when the menu back button is pressed. REGRESSION-607 Change-Id: I0b2b6ee074715e2866bcebb009118b8271b1efdf
* Always apply frame size reduction to panorama picturesGabriele M2018-01-271-7/+1
| | | | | | | | | | | | | | | | Panorama mode requires quite some memory, especially after the frame num bump done with commit aa0733567c30 ("Make panorama able to go 270 degrees in landscape"). Some devices run out of memory while taking a panorama picture and force close Snap before the picture is complete. We have a config to reduce the memory requirements that reduces the size of each frame, but it's applied only if ro.config.low_ram is true. Bump the default value to 100 and always respect it. Devices having ro.config.low_ram set to true will have to override this config from their device tree. BUGBASH-326 Change-Id: Ic6d24b17b2293adf8d715904c8c1874a4c624e99
* Snap: Allow switching beyond just 2 camerasChristian Frisson2018-01-273-3/+8
| | | | | | | | Some devices have dual rear cameras, which means that they will have more than just 2 camera ID's (0 and 1). For example, the LG G5 has 0, 1 and 2. Allow Snap to run cycle through more than just 0 and 1 Change-Id: I50d8b6c02c97961990b1fbf69b9cf706c422381c
* Snap: CaptureModule: check if ZSL is supported before using itcodeworkx2018-01-273-45/+70
| | | | Change-Id: Ifde34ce367ceeb19ad71bcff0c4518d578bb52a5
* Snap: detect and use Camera2 if availablecodeworkx2018-01-263-10/+42
| | | | | | Also add overlay option to enable support for Camera2 to retain current behaviour. Change-Id: I20939e33f4bb687e4abea11bbcdb9bf246b156e4