summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* snap: UI checkpoint #2Steve Kondik2016-11-1314-648/+1060
| | | | | | | | | | * Fix bugs from previous commit * Factor out recording controls * Clean up layouts * Asynchronous control for video module * Performance improvements Change-Id: I9d5833cecbd9280845b740ee8a3c47f023470625
* snap: Hide overlays early when going to filmstripSteve Kondik2016-11-131-0/+46
| | | | Change-Id: Ic66abb6dbce0283f3c76512f40daf6bb4a9b8f54
* snap: Use reveal animation when switching modesSteve Kondik2016-11-136-51/+120
| | | | Change-Id: I7a4b4fe2c29426b57020e3a5102d89b62d46c241
* snap: Better capture animationSteve Kondik2016-11-138-237/+185
| | | | | | | * Modified version from Camera2 * Also adjust the callbacks for better response Change-Id: I85ac23cdf35d9e2625799dd64b9f86aef103be7b
* snap: UX improvements v1Steve Kondik2016-11-1316-1519/+629
| | | | | | | | | | | | | * Make the camera controls do sane things- get rid of the manual placement of every widget and use layouts * Animate everything correctly * Show ripples when clicking the shutter * Clean up a metric ton of dead code * Moved more code into BaseUI * Make setting up the camera controls less verbose and magical * Fixed up panorama layout Change-Id: Iaed44ca0201a2e2641e1c2460d3ff9ec3eae2d85
* snap: Get rid of static Context memberSteve Kondik2016-11-115-32/+14
| | | | | | | * These are never a good thing. Instead pass the activity thru CameraUtil. Change-Id: I30d73fa329e174b20e0075a49e6d1e059e30aa3e
* Revert "SnapdragonCamera: Remove swipe right to open menu"Steve Kondik2016-11-091-2/+23
| | | | | | | | * Swipe ALL the directions This reverts commit 0321ab092671d680373bff35673fa6a069d7e57e. Change-Id: I934475575fa5a65ef93a0b3813a1ffae365b0187
* CameraNext: Use Glide for async bitmap loadingcretin452016-11-0911-213/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is what Camera2 code uses. Addresses SAMBAR-766 CameraNext: Fix rotation not updated The thumbnail generated by Glide is not updated when user rotate the image manually. This is because exif is rewrite using nio mmap, however there is no nio unmap available in java. Even though the file channel is closed, the rotation modification is still in buffer, when Glide tries to dtermine the orientation of the image, it still reads the old data. Use force to ensure data is sync to disk and buffer flushed. HAM-1389 Fix memory leaks Two leaks were occuring. One was an unused Parameters in AndroidCameraManagerImpl that was holding onto excess PhotoModules. The second was Glide images for video previews that were never being cleared on recycle. issue-id: CYNGNOS-2731 CameraNext: don't call Glide to load image after Camera exits There is a race condition where the filmstrip can still be trying to load a new image just as the camera exit, and Glide gets upset if it is handed a destroyed activity context to work with. So just check for that condition and go home. Change-Id: I9e76ab40d23213c7a74c26779e345207d5fd7bae Ticket-Id: CRACKLING-1068
* Reenable left swipe for FilmstripSteve Kondik2016-11-0915-149/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * These commits are from the CameraNext application in COS. * Credits: Ed Carrigan, Ed Mancebo, Wilhelm Fitzpatrick Revert "SnapdragonCamera: Fix preview broken when coming back from gallery" This reverts commit 5b8948f83a65e8f9bd1b419bd11511e48dc34887. Revert "SnapdragonCamera: fix crash after photo deletion" This reverts commit 171d2b253a752ca104ccf4a58f4e9d6d82bd7b28. CameraNext: Fix camera crash on device unlock This patch from the plugin branch also fixes CYNGNOS-1878 Due to the bug below, when the camera is fore-grounded when device is unlocked, the SurfaceView is getting recreated, which caused it to be in a weird state when we were trying to reattach the preview to it. ----- Fixed Black Screen On Back. The issue was that mCameraView was not being populated when it should have been (after it had been added to the view hierarchy). The problem was the SurfaceView was being removed from the hierarchy when it shouldn't have been. Issue-Id: CP-129 (cherry picked from commit 4010462fe0b4cf1c15624cfca7d6a3d4d380613a) CameraNext: avoid scaling camera preview in filmstrip (cherry picked from commit 823ed983c4dccac3959635f1a14fcfe47cd7b120) CameraNext: fade camera preview to black during film strip transition Instead of scaling and translating the camera preview to make room for film strip images, we leave the preview in place and cover it gradually with the black preview cover. CameraNext : Add offset calculation for left navbar Also prevent preview from translating while hidden - was causing occasional glimpses of it in filmstrip. CameraNext : Ensure vertical/horizontal swipes don't conflict Ensure that the user can't swipe horizontally while trying to delete the image. Avoids all sorts of synching issues between mViewItem and the data adapter since the buffer is trying to constantly keep its center to be the current visible item CYNGNOS-1069 CameraNext: fix crash on entering filmstrip via thumbnail tap mVerticalViewId was getting initialized in onUp, but if filmstrip was entered without a swipe, no onUp occurred. Fixed by directly initializing the field on object creation. CameraNext: Fix ZoomView in the filmstrip The ZoomView was getting covered in the Z axis while scrolling. issue-id: SAMBAR-862 Revert "SnapdragonCamera: fix camera preview broken when resume from gallery" This reverts commit 0acc1f027637c4f0126883be68f97817d7306032. Change-Id: If4dd591c5c752a7fa33c669c15875c0077446a37
* snap: Fix advanced modes and focus overrideSteve Kondik2016-11-071-16/+24
| | | | | | | * Always allow touch focus * Set the scene mode correctly during advanced modes Change-Id: I58ad050e90578e9d23102001da2f980498b8c774
* snap: Disable makeup by defaultSteve Kondik2016-11-071-1/+1
| | | | | | | | * This depends on proprietary code which not everyone will have. * Ideally this should be set to the result of loading the JNI helper- will revisit. Change-Id: I6098955088c265d1c285a1e095595f39e4f36e5c
* Protect against multiple shutter callbacks per frame in longshot mode.Danny Baumann2016-11-071-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 Tumati2016-11-073-20/+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
* Fix up layout of auto HDR notice and histogram view.Danny Baumann2016-11-025-242/+205
| | | | Change-Id: I61f93c68b52d81c5e19919a5b0b894cf51dd35c4
* snap: Additional fixes for auto-HDR modeSteve Kondik2016-11-021-26/+40
| | | | Change-Id: I0d9b982dc9d817b40d59fc5fa58d542a213a3d1f
* snap: Fixes for advanced features and scene modesSteve Kondik2016-11-023-41/+54
| | | | | | | | * Get rid of the annoying toast when longshot is disabled * Add support for ChromaFlash as a scene mode * Adjust overrides for various scene modes Change-Id: Ifda1990f4e9b3435655664f2a6c2b31fc3ae23fa
* snap: Adjust top bar icon orderSteve Kondik2016-11-021-2/+2
| | | | Change-Id: I1fe55daca970a8e9a725718aa6a02618450ccbf6
* CameraNext: dynamically generate available photo resolutionsWilhelm Fitzpatrick2016-11-023-26/+259
| | | | | | | | | | 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: Add constrained longshot modeSteve Kondik2016-11-021-1/+20
| | | | | | | | | * 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 Kondik2016-11-021-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 Kondik2016-11-021-1/+1
| | | | Change-Id: Id93d5807fb4c4d14eeea33be0776a6f705a6c435
* Snap: Fix incorrect default ISO values parameterZhao Wei Liew2016-11-021-1/+1
| | | | | | | | | | | | This is a typo introduced by commit: c544747c2892b3984357a86b4116e1faa2be2210 We intend to default the ISO values parameter to "iso-values", but we are currently setting the ISO parameter instead. Fix the typo. Change-Id: Icea4771767c04b08e2b888bc8fb55a05fc69fa91
* Snap: Only override power keyScott Mertz2016-11-021-2/+2
| | | | | | | | Partially revert "Snap: Use new window manager flag for prevent system keys." CYNGNOS-2958 Change-Id: I1e726aa77a6db17c8586c19ddc3b9b31b4077194
* Snap: Update comment to reflect audio focus changesMichael Bestas2016-11-021-4/+2
| | | | Change-Id: I60655aa3a42be218dac5062932692a49a596bedf
* Snap: Use new window manager flag for prevent system keys.Adnan Begovic2016-11-021-2/+2
| | | | | Change-Id: I94ed12ddd33729a4fb486f7fb68f1bbab788b239 TICKET: FEIJ-522
* Snap: Extend user menu, disable dev menucodeworkx2016-11-022-15/+31
| | | | Change-Id: Iaa64372e5d196fd0117a32a386686bdb1fd51e45
* Snap: force enable zsl for lge hdrcodeworkx2016-11-021-0/+5
| | | | | | LGE HDR needs ZSL enabled Change-Id: I563b7f7cd49fcf8aad35ca4b93f839dc0a591f01
* Snap: Only set preferred preview sizes if they are validEthan Chen2016-11-021-2/+6
| | | | | | * Check if a preferred photo preview size is valid before using it. Change-Id: Ia9580b68b60df9784f657df16b317748ff40a696
* Snap: Support override maker and model exif tagKetut Putu Kumajaya2016-11-021-1/+15
| | | | | | Camera HAL not always return proper values Change-Id: Id81fe40ac84b0ffb70560e55077d90544139e463
* Snap: Add support for focus distanceSteve Kondik2016-11-025-2/+127
| | | | | | * Hook up available metadata to the new focus manager. Change-Id: I793df67a2682d8bb2dee994193111227dd8c8d5a
* Fix view index tracking.Danny Baumann2016-11-021-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
* Re-enable processing of drawable state.Danny Baumann2016-11-021-2/+2
| | | | | | | The pressed state change detection provided by it is required for properly ending longshot mode. Change-Id: Ie8fd76f0bd76f47dfa7cda28fe6401ac2d2e0607
* Snap: Fall back to REVIEW intent before VIEW intentEthan Chen2016-11-021-1/+15
| | | | Change-Id: Ie8f1dac602957cb871d0f8c7043ac0f434f4bfac
* Snap: Do not crash when cur-focus-scale is nullLuK13372016-11-021-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 modeNikita2016-11-021-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: Remove face detection option if not supportedArne Coucheron2016-11-021-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: fix camera hang on LGE G4 when flash got usedcodeworkx2016-11-021-3/+10
| | | | Change-Id: I23e53333a0bbe2a12e64e87ec8594aeaa503e9fc
* Snap: Remove video snapshot size when not supportedMichael Bestas2016-11-021-2/+6
| | | | Change-Id: I3f4dd8b76044389ee4d0d257e47b4ac90262ccc1
* Snap: Remove auto HDR option when not supportedMichael Bestas2016-11-021-3/+8
| | | | Change-Id: Iaff1bee5ad6d48df2efe189955ba91bca8ec5c32
* camera: Keep touch focus intact during back-to-back ZSL shotsSteve Kondik2016-11-022-2/+12
| | | | | | | | * If ZSL is enabled, we should not resetTouchFocus between shots. * Instead, re-kick the timer for each shot. If I set a focus point, I want that point to stick while I take a succession of shots. Change-Id: I407bb1e248cc902355d0294f47b071cc8a32fac3
* SnapdragonCamera: Scale up bitrate for HSR recordingsSultanxda2016-11-021-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>
* De-uglify menu.Danny Baumann2016-11-026-31/+22
| | | | Change-Id: I19d8a3d5a12c4be06bced056b80ad1a354c6b761
* Fix crash if Exif-Tag buffer-length and component-count are both 0tobigun2016-11-021-1/+1
| | | | Change-Id: Iad9b60d135b4f682c08c3bfc9698cdd10e1086ab
* Camera2: Only autofocus before a snap if we are actually in "auto" mode.Steve Kondik2016-11-021-4/+1
| | | | | | Original commit by cyanogen 7daaa72d35c1f8820117768e4b129acd030bcefb Change-Id: I51853913f6459b599176910f7f486f59972eaf36
* Snap: Fix crash when set infinite touch-focus durationMichael Bestas2016-11-022-2/+2
| | | | | | | * java.lang.Integer.valueOf(string) method can't parse hexadecimal values Change-Id: I42706db72fc9c1093a7aa16440af449f731e5176
* Snap: Expose video snapshot size settingMichael Bestas2016-11-021-0/+1
| | | | Change-Id: I6bf76a0a607e4c275a63c60b042ae239d893095f
* SnapdragonCamera: Set camera parameters before restarting previewSultanxda2016-11-021-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: Separate default focus time between camera/videoSultanxda2016-11-021-1/+1
| | | | | | | | | | | | | | For the camera, the user expects a default tap-to-focus duration of 3 seconds with exposure locking. For the camcorder, however, the user expects a tap-to-focus duration of 0 seconds with no exposure locking, as the rapid change in exposure while recording would negatively impact the video. Separate the tap-to-focus option to reflect the recommended defaults. [mikeioannina]: Adapted to Snap Change-Id: I75bc0610f5d301c9728b4bc104b86e0fab5493fb Signed-off-by: Sultanxda <sultanxda@gmail.com>
* Snap: Add ability to set the tap-to-focus duration to 0 secSultanxda2016-11-021-8/+15
| | | | | | | | | | | Setting a tap-to-focus duration of 0 seconds allows for a quick, manual refocus of the subject without interfering with the exposure. This is particularly useful when recording videos. [mikeioannina]: Adapted to Snap Change-Id: Ie3d92e50f755c938e9725438ba5baad0d0985485 Signed-off-by: Sultanxda <sultanxda@gmail.com>
* Snap: Add focus time support in camcorderMichael Bestas2016-11-023-0/+8
| | | | Change-Id: I5432554a40d7375ed7893c38cb2741a12cc8cc80