summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ui/FilmStripView.java
Commit message (Collapse)AuthorAgeFilesLines
* CameraNext: Use Glide for async bitmap loadingcretin452016-11-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-091-49/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* SnapdragonCamera: Add SettingsManager, scene, and filterByunghun Jeon2016-05-311-31/+1
| | | | | | | | | | | Add SettingsManager to work as a database for settings. It will handle all dependencies and populate the values. Add scene mode and filter. Restructure UI and menu by combining them and leave the handling of settings to SettingsManager Change-Id: I185163fdddbffd29434e6a9c41b33be6d3388f88 CRs-Fixed: 1018118
* SnapdragonCamera: Add Camera2 modeByunghun Jeon2016-03-301-1/+32
| | | | | | | Use camera2 API to show preview and take snapshot CRs-Fixed: 989750 Change-Id: I07e2d6743529b3d3d5acecf667e9493465a094c9
* SnapdragonCamera: Adding null exception handler.Jack Yoo2016-01-301-2/+6
| | | | | | | | | There's a case the view's children got removed from the group while it's processing the layout change. It can bypass its view layout. Change-Id: Ib9a7ff71af79a88e81acfceedc06b3cc26fac0c5 CRs-Fixed: 963356
* SnapdragonCamera: Removing filmstrip view touch handlerJack Yoo2016-01-241-1/+0
| | | | | | | Removing unused filmstrip view touch handler Change-Id: I5b93d68c646a224d6b14b35740821fbe302eaeca CRs-Fixed: 961644
* SnapdragonCamera: fix crash after photo deletionLikai Ding2015-05-121-11/+12
| | | | | | | | | In FilmStripView.reload(), camera view is unintentionally removed, which causes unnecessary surface creation and deletion, eventually leads to crash. Fix the check in FilmStripView and set mCameraView correctly. Change-Id: I11efbe52b7639a98798ff16e9281b8799cc5e788
* SnapdragonCamera: fix camera preview broken when resume from gallerylikaid2015-03-231-6/+2
| | | | | | | | | | The postion of preview view wasn't centered after rotated device with camera in background. Adjust the view position when camera draws preview layout each time. Change-Id: I488c25cda23f101cf1f1a10c54ca3d537474e53c CRs-Fixed: 795482
* SnapdragonCamera: Fix preview broken when coming back from galleryByunghun Jeon2015-03-101-3/+4
| | | | | | | | | Fix preview broken when user goes to gallery using thumbnail in portrait, rotates to landscape in gallery and back key to come back to camera Change-Id: Ib9a8ce69bfbb85573cae55da79901705f726cc22 CRs-Fixed: 802169
* SnapdragonCamera: circular thumbnail iconLikai Ding2015-02-171-2/+2
| | | | | | | | | | 1. change thumbnail icon to circular and its background to transparent 2. speed up loading with optimal sample size and region decoder 3. fix orientation bug regarding panorama photos 4. don't fire load task on fake onDataLoaded() call Change-Id: I7f4eb8dad4c54a01a7ccd98907e06952e470840b (cherry picked from commit ac714ea974b4bd0ef99403def5aa7d8a3deecc5d)
* Camera2: Reset zoom parameter after updatekaiyiz2014-12-121-0/+1
| | | | | | | | | | | | When exif data of a photo is changed, the view will update, but the zoom parameter is not reset, and the image load the zoomed image which is not exists, so there will be a black view. When photo is update, reset zoom view to full image. CRs-Fixed: 745326 Change-Id: I48a0a12241087ff9e99be83234b47b21c63b1867
* SnapdragonCamera: Add back missing setting menusByunghun Jeon2014-11-191-6/+6
| | | | | | Adding back missing setting menus Change-Id: I803d3f694b1953aa6a8932cbba6bb55c0d0e6352
* SnapdragonCamera: Add preview thumbnail buttonByunghun Jeon2014-11-191-4/+8
| | | | | | Add preview thumbnail button and touch it to go to gallery Change-Id: Ib80ef94c677c204d7f0826356792aba2aa11d4d1
* SnapdragonCamera: Modify SnapdragonCamera UIByunghun Jeon2014-11-171-1/+109
| | | | | | Modified SnapdragonCamera setting menus with new icons Change-Id: I726296dfb100ac81ad6f1cd84420ae27c0ae1201
* Rename module and package name to co-exist with AOSP appSachin Shah2014-08-161-1/+1
| | | | | | | | Rename package from com.android.camera2 to org.codeaurora.snapcam, module name from Camera2 to SnapdragonCamera and app name from "Camera" to "Snapdragon Camera" Change-Id: I2800070e72631e119a15fe0132424d1047be9f0c
* Merge "Camera: Revering changes of clear preview frame during activity pause."Linux Build Service Account2013-12-081-14/+0
|\
| * Camera: Revering changes of clear preview frame during activity pause.c_shrini2013-12-051-14/+0
| | | | | | | | | | | | | | | | | | | | | | In camera application, the preview frame is rendered on the surface texture. When user pause, this surface texture is retained by the activity. Upon user resume, it will be destroyed and recreated so that new preview frames can be rendered on it. During this period, a flickering impact is seen on UI. Change-Id: I5728d5d7f28ec45121f375928bf2c9effd9bd620 CRs-fixed: 583474
* | Merge remote-tracking branch into merge_branchSanthosh Kumar H E2013-12-061-14/+39
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delay onResume tasks to speed up lockscreen onResume->onPause->onResume launch sequence. Import translations. DO NOT MERGE gcam: Clean up placeholders, and add deletion robustness. Fix issue of focus indicator staying on without being hidden Ensure view size gets updated after phone decors change. Show the 100% state of the progress at least one frame. Add parameters and deduplicate parameter changes Revert parallel opening camera in photo mode. Differentiate the InProgressData from the normal PhotoData. Close mode menus if another control is touched Start gcam module directly when handling capture intent. Import translations. DO NOT MERGE Add a null check to fix NPE Add logging to various actions Ensure mOpenCameraThread has been setup before dereferencing. Add logging to various actions Ensure mOpenCameraThread has been setup before dereferencing. Add GCam progress indicator. hide preview cover on arrival of new preview data if hidden Fix photo mode is getting stuck in a single CameraState. ... Conflicts: res/layout/photo_module.xml res/values/arrays.xml src/com/android/camera/CameraActivity.java src/com/android/camera/PhotoUI.java src/com/android/camera/Storage.java src/com/android/camera/WideAnglePanoramaModule.java src/com/android/camera/ui/FilmStripView.java Change-Id: Ic41b4e7e07b2b0ed7936b78a6c5f05270d05985f
| * Add a null check to fix NPEztenghui2013-11-081-1/+4
| | | | | | | | | | bug: 11594111 Change-Id: Ica2ffe315c4e4eaa818aa609d9600d5e67e54b3b
| * Add logging to various actionsSeth Raphael2013-11-071-0/+3
| | | | | | | | | | | | Bug: 11514148 Change-Id: Ib31a74a6badc4dcdeaa316e032f4aef17edd06b2
| * Preserve high resolution image on touch during zoomDoris Liu2013-11-041-8/+11
| | | | | | | | | | Bug: 11477449 Change-Id: I08b33cee258de1f90e5fa60e6483834dd5197bd2
| * Don't call onCurrentDataChanged for CameraPreview when reloading.ztenghui2013-10-211-3/+14
| | | | | | | | | | | | | | | | In this case, camera preview didn't change, so there is no need to call onCurrentDataChanged. bug:11237255 Change-Id: I788a2ee4e7337721d0bbd6aa75e7da6d382bf282
| * Merge "Don't allow swipe into the film strip view when swipe is disabled" ↵ztenghui2013-10-171-1/+8
| |\ | | | | | | | | | into gb-ub-photos-carlsbad
| | * Don't allow swipe into the film strip view when swipe is disabledztenghui2013-10-151-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The swipe is supposed to be intercepted by FilmStripView, however, when the children is not handling the scroll / fling gestures, FilmStripView will still has to handle it. In this case, we need to detect whether or not the swipe has been disabled. bug:11234333 bug:11221594 Change-Id: I1d0fbac65050aef225fb880a41df735e98bf48db
* | | Camera2:Fix crash on launch of camera after deleting camera folder.Vasantha Balla2013-11-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - If video starts playing from camera and suddenly camera folder is deleted from gallery, then crash is seen while launching camera. - Film strip reload is not getting called for this case and trying to access old data from data adapter which is null.Added reload function if only camera preview is present and no other camera data. CRs-Fixed: 567569 Change-Id: I9c6c7ebe63c553ccc68b985e00fa0ca722d77157
* | | Clear preview frame during activity pause in full screen camera mode.Santhosh Kumar H E2013-11-121-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CameraActivity Reloads views on filmstrip during resume (If the CameraActivity go to pause state when user is in full screen camera mode). While reloading surface texture is destroyed and recreated. So when user press power key to pause and unlock to resume, till the surface texture is destroyed user see the old frame (which was rendered before onPause). Followed by gray screen till surface creation and start of preview. It created filckering impact on UI. Fix here is to destroy the surfaceTexure in onPause itself so during next resume user won't see old frame. Change-Id: I035671cfa61dcfefe7a6392a316fae6739e81247 CRs-Fixed: 566255
* | | Revert "Clear preview frame on surfaceTexture during activity pause."Shruthi Krishna2013-11-081-15/+0
| | | | | | | | | | | | | | | | | | This reverts commit 9930c01a3859dd103851f772801c0fdfaf727921 Change-Id: I0339d52e6a8718dd2029fc4689299e451c7944be
* | | Clear preview frame on surfaceTexture during activity pause.Suman Mukherjee2013-11-061-0/+15
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | CameraActivity Reloads views on filmstrip during each resume. While reloading surface texture is destroyed and recreated. So when user press power key to pause and unlock to resume, till the surface texture is destroyed user see the old frame (which was rendered before onPause). Followed by gray screen till surface creation and start of preview. It created filckering impact on UI. Fix here is to destroy the surfaceTexure in onPause itself so during next resume user won't see old frame. Change-Id: Id5c787586288de660dc6ad91f3c2ae018761ddd4 CRs-Fixed: 566255
* | Merge "Do not show any bottom controls in secure camera to prevent launching ↵Erin Dahlgren2013-10-151-1/+7
|\ \ | | | | | | | | | out of app behavior." into gb-ub-photos-carlsbad
| * | Do not show any bottom controls in secure camera to prevent launching out of ↵Erin Dahlgren2013-10-151-1/+7
| | | | | | | | | | | | | | | | | | | | | app behavior. Bug: 11235651 Change-Id: Iafc0b7930c8c016bd6ab11b13d6572241c5ef074
* | | Prevent crash after deleting album from Gallery by checking for more null ↵Erin Dahlgren2013-10-151-1/+14
|/ / | | | | | | | | | | | | pointers. Bug: 10950130 Change-Id: I284e2016676e15c7f2ad23de71a965ab50c5d743
* | Set camera controls visibility based on whether the camera preview is centered.Erin Dahlgren2013-10-141-4/+60
| | | | | | | | | | Bug: 10861015 Change-Id: Ib0c4945e35cee16b73a4bba913e11d0f79a26176
* | Workaround to prevent the data focus callback.Angus Kong2013-10-131-7/+16
| | | | | | | | | | | | bug:11205669 Change-Id: I5b2d33422ec5f6fe21c81e39d24f36ec8b61ce4e
* | Adjust the position after layout change.Angus Kong2013-10-121-20/+20
|/ | | | | | bug:10993660 Change-Id: Ia07b8238a09e761a02fe11577b738776ab965b30
* Merge "Avoid unnecessary bringChildToFront() calls." into gb-ub-photos-carlsbadAngus Kong2013-10-111-4/+17
|\
| * Avoid unnecessary bringChildToFront() calls.Angus Kong2013-10-111-4/+17
| | | | | | | | | | | | bug:10750719 Change-Id: I831d9ecead91d64c7a0b6a665e9c842ef17d8a8a
* | Merge "Check both the requestId of current item and total items in filmstrip ↵Erin Dahlgren2013-10-111-7/+5
|\ \ | | | | | | | | | for bottom controls." into gb-ub-photos-carlsbad
| * | Check both the requestId of current item and total items in filmstrip for ↵Erin Dahlgren2013-10-101-7/+5
| |/ | | | | | | | | | | | | bottom controls. Bug: 11169201 Change-Id: I9d42b168efe62712f76165db5221757a1f20013f
* / Add fling support in zoom viewDoris Liu2013-10-101-4/+120
|/ | | | | | Bug: 10679704 Change-Id: I7ab72fdf4e836495b2471c65fd57f952e863f1dd
* Update bottom edit control for photos inside secure and insecure mode.Erin Dahlgren2013-10-091-2/+4
| | | | | Bug: 11067201 Change-Id: I21a775d46c26206e340c830fceafaf52e7a06ac5
* Update bottom controls and action bar with a tighter bounds on data change.Erin Dahlgren2013-10-091-4/+9
| | | | | Bug: 11087361 Change-Id: Ie319d1767eb671ca7ed4a129aa9b75c77d63b20d
* Merge "Make the transition animation identical." into gb-ub-photos-carlsbadAngus Kong2013-10-091-6/+27
|\
| * Make the transition animation identical.Angus Kong2013-10-091-6/+27
| | | | | | | | | | | | | | | | | | The animation of transition between camera preview and filmstrip should be a special case to prevent jank. bug:11011577 Change-Id: If611599203e845d098cd6e4acb56d5631d085ffe
* | Enter fullscreen if all items are removed.Angus Kong2013-10-091-0/+5
| | | | | | | | | | | | bug:11066937 Change-Id: Ibf9b03adc0d00838ba23c65361aa7c783c835d90
* | Allow scaling beyond 1:1 in zoom viewDoris Liu2013-10-081-4/+24
|/ | | | | Bug: 10950226 Change-Id: I38828edaf4010170f6c6db18b8c5fdeef91b4f11
* Keep the ImageData size info consistent with MediaStore and Exifztenghui2013-10-071-14/+23
| | | | | | | | Basically, the width and hight in the ImageData will be pre-rotation. bug:11067085 Change-Id: I377caf2f1d49d26b4d6823d4e72168a055d80858
* Merge "Make space for photosphere rendering text" into gb-ub-photos-carlsbadErin Dahlgren2013-10-031-1/+1
|\
| * Make space for photosphere rendering textErin Dahlgren2013-10-031-1/+1
| | | | | | | | | | Bug: 11005014 Change-Id: I1f92322ff5a53b8bf6752841efd3a59e366d78fb
* | Merge "Reads PhotoSphere metadata once fully loaded so that PhotoSphere ↵Erin Dahlgren2013-10-021-9/+17
|\ \ | | | | | | | | | viewer icon is visible." into gb-ub-photos-carlsbad
| * | Reads PhotoSphere metadata once fully loaded so that PhotoSphere viewer icon ↵Erin Dahlgren2013-10-011-9/+17
| |/ | | | | | | | | | | | | is visible. Bug: 10715651 Change-Id: Ib71a3e4469d1ecee87b9423b03b8898294a7ffa6