summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/util
Commit message (Collapse)AuthorAgeFilesLines
* SnapdragonCamera: Pictures were rotated when the device is in flat positionweijiew2016-11-131-7/+8
| | | | | | | | | | | Normally, the picture taken by front camera needs to rotate 270 degree and the picture taken by rear camera needs to rotate 90 degree. Launch camera app when the device is in a close to flat position, camera app can’t get device’s orientation. The picture will not be rotated when the orientation is unknown. Change-Id: I41d19f162f28aa6838b0246f14475480c8703e06 CRs-Fixed: 1063452
* snap: UI checkpoint #2Steve Kondik2016-11-131-1/+13
| | | | | | | | | | * Fix bugs from previous commit * Factor out recording controls * Clean up layouts * Asynchronous control for video module * Performance improvements Change-Id: I9d5833cecbd9280845b740ee8a3c47f023470625
* snap: UX improvements v1Steve Kondik2016-11-131-1/+1
| | | | | | | | | | | | | * 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-111-1/+1
| | | | | | | * These are never a good thing. Instead pass the activity thru CameraUtil. Change-Id: I30d73fa329e174b20e0075a49e6d1e059e30aa3e
* CameraNext: dynamically generate available photo resolutionsWilhelm Fitzpatrick2016-11-021-0/+45
| | | | | | | | | | 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
* SnapdragonCamera: Fix overly-aggressive auto rotationSultanxda2016-11-021-2/+2
| | | | Change-Id: I534c0e36ac826b1d46befe99182bfbfb3b0f22da
* Drop new focus indicator into Camera2.Paul Rohde2016-11-021-17/+2
| | | | | | | * 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: Support for HTC's HDR modeSteve Kondik2016-11-021-2/+11
| | | | | | | | | | * 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
* SnapdragonCamera: Fix incorrect viewfinder ratio for 13.1MP shotsSultanxda2016-11-021-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: add support for mw_continuous-picture focus modecodeworkx2016-11-021-0/+1
| | | | Change-Id: If165370b52d7454c69e2cdeb9d837d049010b0e8
* add support for luminance-condition parametercodeworkx2016-11-021-0/+13
| | | | Change-Id: Idf845a5f55abf9b72f61ac4bac59ee2258043482
* Camera: Cleanup hardware key handlingMichael Bestas2016-11-021-0/+12
| | | | | | | | | | | | | | | | | * Fix power shutter behaviour in camcorder mode * Disable volume change while in panorama mode, volume buttons should only handle camera operations while in the camera * Add camera/power/volume key shutter handling in panorama mode On devices with a hardware camera key: * Disable power & volume shutter features * Volume buttons control the zoom On devices without a hardware camera key: * When power shutter is disabled, volume buttons control the shutter (like AOSP) * When power shutter is enabled, volume buttons control the zoom Change-Id: I141946d5b6f5aec8b1e9a9f99270d30295596079
* Revert "SnapdragonCamera: Forbid volume key can take picture"Michael Bestas2016-11-021-4/+0
| | | | | | This reverts commit e73e717b8be1ba834161914af4debc61c1feb8be. Change-Id: Iee719f34f6016f89ec0bb1c078bfa25c2f718436
* Camera: fix preview for landscape devicesPawit Pornkitprasan2016-11-021-0/+6
| | | | | | | | | | Landscape devices have broken preview because PORTRAIT mode is being abused to check for screen rotation. Use proper rotation check to fix. Ported from cm-10.2 Change-Id: I75588cbce9843e180e4be7591f6a43bcec788506
* camera: Cleanup and compatibility fixesSteve Kondik2016-11-021-0/+8
| | | | | | | * Don't crash for unavailable integer parameters * Kill logspam Change-Id: I6dbcf5560f96ce6173a847501721f589766889bc
* camera: Add parameter debugging supportSteve Kondik2016-11-021-6/+22
| | | | Change-Id: Ifc1653f0046af169ba36d94796b4d9a3055c6798
* Snapdragon Camera: Use consistent API for preview fps resetEmilian Peev2016-11-021-0/+9
| | | | | | | | | | 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
* SnapdragonCamera: support lower resolutions for ClearsightJay Wang2016-09-271-0/+15
| | | | | | | | | | Support different resolutions when capturing in Clearsight mode. Also downscale the mono image to 2MP resolution when bayer size is greater than 2MP. If bayer size is less than 2MP, mono size will match with bayer. CRs-Fixed: 1058843 Change-Id: I8f9ddd81dd640b4efc316dd9ff05c26f339396a5
* SnapdragonCamera: Allow persist flag to hardcode preview sizeByunghun Jeon2016-08-161-0/+4
| | | | | | | Use perfirst flag to hardcode preview size in Camera2 mode CRs-Fixed: 1050106 Change-Id: Ib718497efdff13115c95011d08020474dc929573
* SnapdragonCamera: Add video to Camera2 moduleByunghun Jeon2016-06-292-0/+176
| | | | | | Add video to Camera2 module and combine the UI Change-Id: I0bcd86eb6b95fe2180856780ddd794682259e799
* SnapdragonCamera: Update settingsManager and add Dual mode to Scene modeByunghun Jeon2016-05-311-1/+1
| | | | | | | Update settingsManager and add Dual mode to Scene mode Change-Id: I508430840c3fb8c7d0b56a2a63e09b271754fcb4 CRs-Fixed: 1018118
* SnapdragonCamera: Add continuous shot and count downByunghun Jeon2016-05-311-0/+51
| | | | | | | Add continous shot and count down to CaptureModule Change-Id: I986302201f742d7671a67c26953eecc2a0276294 CRs-Fixed: 1018118
* SnapdragonCamera: Add SettingsManager, scene, and filterByunghun Jeon2016-05-311-29/+0
| | | | | | | | | | | 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: refactor clearsight code and add persist flagsJay Wang2016-04-291-351/+0
| | | | | | | | | | | | | Move out core ClearSight logic to ClearSightImageProcessor.java Move core ClearSight files to new package: org/codeaurora/snapcam/filter Add persist flags: timestamp difference threshold: persist.camera.cs.threshold burst shot count: persist.camera.cs.burstcount dump source frames: persist.camera.cs.dumpframes CRs-Fixed: 993611 Change-Id: Ic8953a72e8697e494c3ae342bebc70f60540474b
* SnapdragonCamera: Add support for ClearSight captureCullum Baldwin2016-04-121-0/+351
| | | | | | | Add support to capture ClearSight images. CRs-Fixed: 993611 Change-Id: Ifaeafa53ee5d095fe322e48f968cdeec03c64077
* SnapdragonCamera: Camera2 add touch to focusByunghun Jeon2016-03-301-4/+21
| | | | | | | Add touch to focus to Camera2 CRs-Fixed: 989750 Change-Id: I5c7c85dcc12eefb11e5f1b5e6a823a327b2647e4
* SnapdragonCamera: Camera2 add zoom supportByunghun Jeon2016-03-301-0/+12
| | | | | | | Add zoom support to Camera2 CRs-Fixed: 989750 Change-Id: Id6b558ff5215f04ca7c201b1d1807521d615c353
* SnapdragonCamera: fix the incorrect aspect ratio calculationCamera Software Integration2016-01-081-26/+30
| | | | | | | | | | | For square size picture, the function that calculates the closest aspect ratio, forced it to use 4:3 ratio and caused the preview stretched from 1:1 to 4:3. Fix the issue by skipping the logic that forces it to 4:3 aspect ratio when the picture size is square. Change-Id: Ia7d8250152ce37f4444f7db7c752eeb8489d9a2f CRs-Fixed: 955824
* Revert "SnapdragonCamera: Use floating components during video record."Byunghun Jeon2015-10-291-14/+0
| | | | | | This reverts commit 59b05fd1d75943f037aec41def16cdceb6443ecf. Change-Id: I807bdbf0fe669a989d58484ab11451c891acaf5b
* SnapdragonCamera: Use floating components during video record.Jay Wang2015-09-161-0/+14
| | | | | | | | During recording, there are only 2 widgets on UI. Directly attaching them to window manager and making main UI layer fully transparent can reduce power consumption. Change-Id: I8c4f4768ab91d50fc72080f0f6d7316ee2e60ef4
* SnapdragonCamera: Limit preview size by capping display dimensions.Sai Kumar Sanagavarapu2015-08-141-0/+33
| | | | | | | | | | | | | | | | | | | | | By capping the display panel dimensions, effectively limit the preview size configured to backend. This will help in optimizing power and bandwidth. Properties to be configured : camera.display.umax -> set it to the upper max of display panel size camera.display.lmax -> set it to the lower max of display panel size For example if the properties are set as below : adb shell setprop camera.display.umax 1920x1080 adb shell setprop camera.display.lmax 1280x720 Then, in devices having display panel size >1080p, panel size will be seen as 1080p. If its 1080p or lesser (but >=720p), limit it to next allowed max which is 720p. For < 720p, there is no need to do any capping. By capping the panel size, we are indirectly controlling the preview size being chosen in getOptimalPreviewSize(). Change-Id: Ia9963467dbda7fb47d96a96a345f26a5e38a95a1
* SnapdragonCamera: Add new preview aspect ratio for 3:2 pictureslikaid2015-07-021-3/+18
| | | | | | | | | When the captured picture was 3:2 aspect ratio (e.g 720x480), the image was deformed on camera preview, since it was treated as 4:3 ratio on preview layout. Change-Id: I4c170f53c9dfdc7e90ee736631be02cef1f574c2 CRs-Fixed: 857138
* Snapdragon: Fix photo/video preview to match with captured photo/videoByunghun Jeon2015-02-201-0/+23
| | | | | | | | Photo and video preview and the captured results are different for some resolutions. Fix them to match the result. Change-Id: Ie5fb1954448fa54ffb968f2882e74bfd98c97548 CRs-Fixed: 791082
* SnapdragonCamera: fix portrait orientationLikai Ding2015-02-021-2/+4
| | | | | | | | | | | | Fix camera activity to portrait, so there is no delay when rotation occurs. Main changes are: 1. RotateLayout now supports padding and dynamically added child. 2. Camera controls and gesture detetion are now orientation-aware. 3. Toasts are replaced with RotateTextToast. 4. Obselete layout files are removed. Change-Id: I338849bd7fb84b847eb357f771a24a5cc09bf6fa
* SnapdragonCamera: allow some deviation on screen ratioLikai Ding2015-01-131-11/+3
| | | | | | | | Some screen resolutions are not exactly but very close to 16:9. Allow some deviation to enable new preview feature on these screens. Change-Id: I85db85bf43dacaa510184dd7ba3308a9aa914d4a CRs-Fixed: 780739
* SnapdragonCamera: support 4:3 preview on 16:9 screenLikai Ding2015-01-081-0/+32
| | | | | | | | When preview is set to 4:3 on a 16:9 screen, resize SurfaceView to 4:3 and cover other parts of the screen. Otherwise camera controls have a semi-transparent background. Change-Id: Icfbe6318b6a9de9a988468078b474e842f6ddd8c
* Merge "SnapdragonCamera: fix app crash when there is no map app"Linux Build Service Account2014-12-061-2/+8
|\
| * SnapdragonCamera: fix app crash when there is no map appkaiyiz2014-11-301-2/+8
| | | | | | | | | | | | | | | | | | | | | | ActivityNotFoundException happened after click showOnMap menu when there is no map app. Catch the Exception to avoid app crash. CRs-Fixed: 753928 Change-Id: I1cf6e5f098f239719750840508b715a08e9a5e45
* | SnapdragonCamera: Forbid volume key can take picturekaiyiz2014-11-131-0/+4
|/ | | | | | | | | | | In CMCC Mode, don't need take picture when press volume key. Add a boolean value for judge whether need to take picture when press volume key, and overlay it in Carrier package. CRs-Fixed: 685391 Change-Id: Ice83c93ea417c1e64cbc5c6751d5f7e38c07606a
* SnapdragonCamera: Add OptimalJpegThumbnailSize selction logic in APP.satyavaraprasad yerramsetti2014-10-311-0/+32
| | | | | | | | | | | - Set a jpegthumbnail size that is closest to the Picture height and has the right aspect ratio. - Earlier this logic was implemented in HAL but due to CTS2 testJpegExif failure, moving this to APP CRs-Fixed: 748114 Change-Id: Ia2c97bf8cec7198ee291e63c3be9bbe5fb18b3b7
* 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
* Camera: Initial Refocus supportEmilian Peev2014-06-261-9/+34
| | | | | | | | | Refocus mode is enabled which expects 7 snapshots in burst from the camera. The captured images are stored with custom names. Change-Id: I7c1f9ef15d710118f7089c2fc584da450ab0984c
* Camera2: Adding support for Auto HDRAbhishek Pant2014-06-061-0/+4
| | | | | | | | Adding support for Auto HDR for camera application. CRs-fixed: 629556 Change-Id: I02cdc2accb3e9fd4a9039b7f632ba3eb04fcc798
* Merge remote-tracking branch into merge_branchSanthosh Kumar H E2013-12-061-17/+31
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 logging to various actionsSeth Raphael2013-11-071-0/+2
| | | | | | | | | | | | Bug: 11514148 Change-Id: Ib31a74a6badc4dcdeaa316e032f4aef17edd06b2
| * Merge "gcam: Add generic preview fps range selection." into ↵Ruben Brunk2013-10-311-1/+4
| |\ | | | | | | | | | gb-ub-photos-carlsbad
| | * gcam: Add generic preview fps range selection.Ruben Brunk2013-10-291-1/+4
| | | | | | | | | | | | | | | Bug: 11433097 Change-Id: Ice0f7ad3cd0684183298ce03bab3038a41316cf6
| * | Remove CameraUtil.launchGallery, ensure SecureCamera uses Gallery up iconAlan Newberger2013-10-301-16/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | CameraUtil.launchGallery incorrectly describes a mechanism to call an APP_GALLERY category intent. Since we're using Gallery icon we should go direct to Gallery, which IntentHelper already does. Simply removed the util class and call the helper direct from the activity. Also noticed during testing that the SecureCamera was not correctly showing the Gallery icon, though its behavior would take user to Gallery. Finally, removing restriction that the video player intent should go to Gallery, instead it should route to system preferred intent. Bug: 11065256 Change-Id: I941f9469de169919c4bac6c91dde7e577921f737
| * Fix the mapping between preview UI and camera sensorDoris Liu2013-10-281-0/+25
| | | | | | | | | | Bug: 11409659 Change-Id: I46ae3d7797590d59befbdc394d5304f14a212a80
* | Camera2: Fix compilation issuesManish Kumar2013-10-311-0/+1
| | | | | | | | | | | | | | | | Fix compilation issues Change-Id: I77317b64eb11663dadff6a0b46e08e49d9e8ab21 (cherry picked from commit 53fa3ae8cd74ce42810f6d638bb7efe15fd01ba4) (cherry picked from commit 4151656344e66f7f43f017ab33ff42a33e6df552)