summaryrefslogtreecommitdiff
path: root/src/com/android/camera/PhotoModule.java
Commit message (Collapse)AuthorAgeFilesLines
* Revert "camera: add support for samsung and htc camcorder modes"HEADkitkatMichael Bestas2014-10-291-6/+0
| | | | | | | | * This is moved to the device specific camera wrappers This reverts commit e43890784fd08ac92de08691c7c6ba545c7ecb80. Change-Id: I74ac0654ccf1e04cbb69e2fa8a2a651990b484a9
* Camera: Don't enable shutterdown for count down timerSuman Mukherjee2014-10-291-1/+6
| | | | | | | | | | | | For count down timer case, capture process should take place after timer expiry. Otherwise flash is getting turned ON immediately after pressing shutter button and then again during capture. Fix made by not allowing to do anything related to capture process except turning timer ON. Change-Id: I843c88ccc9c03235dc6a2a7638221c778bfc6551 CRs-Fixed: 623445
* Camera: Decrease downsample factor for smaller resolutionSuman Mukherjee2014-10-291-0/+6
| | | | | | | | | | | | | After image capture, animation takes place with a downsampled image (by factor 4). Due to downsampling smaller resolution (QCIF and others) image size for animated thumbnail is going below the allocated size and it appeared very small. Fix: For image size of resolution CIF downwards, use downsampling factor as 2 without affecting performance for other resolution. Change-Id: I1098fc1a8f6fb880d5c36ebd2eaeec4415c75fe1 CRs-Fixed: 662891
* Camera: cancel auto focus after snapshot done if in CAF mode.Kerong Sui2014-10-291-0/+4
| | | | | | | | When snapshot in CAF mode, CAF will be locked and update focus status. Application needs call cancelAutoFocus() to resume CAF after snapshot, otherwise CAF will keep in lock state. Change-Id: I2aa3965e407d01efa9dd38b1cb840404390f29ce
* Camera2: fix camera has stopped" after long press camera keykaiyiz2014-10-241-1/+1
| | | | | | | | | | | When Long press camera key to open camera, mRootView has not been created in photoModule.init. mRootView must be created before using it. CRs-Fixed: 725790 Change-Id: I70cd4ac911c79a15c52d47147414bf1fcee65b53
* Camera2: Add option to set max screen brightnessMichael Bestas2014-10-211-1/+8
| | | | | | * Set maximum screen brightness while the user is inside the camera app Change-Id: I8b16ba47a933bc7d6b0c1cd62bfd6ca54875ce1e
* Camera2: fix white balance still work when turn on the HDR modekaiyiz2014-10-211-3/+5
| | | | | | | | | | | | | | | | | | | | | Tested on target : 8916 Tested on Branch : kk Tested on AU \ tip : AU_LINUX_ANDROID_LNX.LA.3.7.1.04.04.03.031.203 Test case Verified : Yes CR Moved to Fix : Yes R notes filled : Yes DC set : Yes LOST approved (if new file \ feature added): Yes Voted on required Trunk : NA App need clear the whitebalance effect when set scene mode not auto, but the value getWhiteBalance still is not auto when change scene mode. So set white balance auto value forcely when scene mode is not auto. CRs-Fixed: 685240 Change-Id: Ib94b9cb1f3cc0c8ef63412ef75d65359ba797f37
* Camera2: fix The flashlight still is on after set scene mode not autokaiyiz2014-10-211-4/+5
| | | | | | | | | | | If we set flash mode is on when scene mode is auto, the flash mode won't be reset when change to other scenemode and still is on. Set the flash mode is auto when scene mode is not auto. CRs-Fixed: 678466 Change-Id: If3874c03dc70297326b6cd7dcceb1f4efde85956
* Camera2: update the flash icon when set HDR onKerong Sui2014-10-211-0/+2
| | | | | | | | When HDR is on the flash mode should be set to off. And the icon should be show as off too Change-Id: I2cca985694e8a5a8058d6bf5467d5375514acfab CRs-fixed: 645595
* Camera2: Fix ANR when switching camera during AFVladimir Petrov2014-10-211-0/+3
| | | | | | | | | | - Check that 'mCameraDevice' is valid at beginning of setCameraParameters(). This will avoid null pointer exceptions at some cases, when setCameraParameters() is called by focus manager after closing camera. CRs-Fixed: 668405 Change-Id: Iff4b81e725db6db11cdc205512b0fec1f71f333d
* camera: Override color effect when scene mode is activeSteve Kondik2014-10-211-4/+6
| | | | Change-Id: Ia27ed59f3f27e9c867cbb4c8823abb78b0035047
* Camera2: fix unresponsive shutter button after failureLikai Ding2014-10-211-0/+1
| | | | | | | | | | | Shutter button is disabled during capture(). It's only re-enabled in onPicutreTaken() callback. If camera is switched just before counting down finishes, picture taking may fail and shutter button is left disabled. Enabling shutter button in onPreviewStarted() fixes the problem. Change-Id: I92c644e9a0d283f9ab0269b85586f27e0f4eeb1b CRs-Fixed: 667311
* Camera2: fix a camera status bugLikai Ding2014-10-211-2/+5
| | | | | | | | | After a picture is taken for MMS app, the preview has been stopped in onPictureTaken() but the camera state is subsequently set to IDLE in ZSL mode. Add a check before assignment. Change-Id: I0610a58dbccffdba4b94140d74942c2ff60c7882 CRs-Fixed: 675176
* Camera2: Do not restart preview to update flip params during orientation change.kaiyiz2014-10-211-1/+8
| | | | | | | | | | | | | When there was a orientation change flip paramter had to be changed. Currently all parameters are set again and preview is being restarted. so preview will not be smooth when user rotae the device. This change makes sure only necessary params are updated and preview will not be restarted. CRs-Fixed: 710129 Change-Id: I564431ef8cedaf68c9d12e2a84a3a430c845ab6d
* Camera2: fix start preview when hdr is on issueKerong Sui2014-10-211-1/+2
| | | | | | | | | when we have already set hdr on and do not set off, we don't need to set it to scene mode to auto every time. This will make the camerea to start preview again, which will make the app freeze for a while. Change-Id: Ica77106b88056e289cd298eda4ccc5c3f4f6ab59 CRs-Fixed: 679200
* Camera: Disable HDR when scene mode is other than autoSanthosh Kumar Thimmanna Bhattar2014-10-211-0/+5
| | | | | | | | | | | - HDR option is enabled even when scene mode is not auto. Due to this preview and snapshot are still remain in previous scene mode after enabling HDR. - Fix is to disable the HDR when scene mode is other than auto. Change-Id: Icec96816a7ed6f3daacc8b79841dee5db6b4b04a CRs-Fixed: 648847
* Camera: open Camera and start Preview in a seperate thread.Sai Kumar Sanagavarapu2014-10-211-52/+97
| | | | | | | | Start openCamera and start preview in a separate thread so that UI initialization and preview can run parallely. This is to improve camera cold start latency. Change-Id: I57af45bc90a4db1630c73449d543c3ff0992e55c
* Camera2: fix a crash in taking pictureLikai Ding2014-10-131-1/+1
| | | | | | | | takePicture calls should not overlap, otherwise a fatal exception will occur. Check and modify camera state before the call to prevent such crash. Change-Id: I5316f0d389631c3e4b5f92a8eb81e11a5af804a6
* Camera: Cleanup qcom resourcesMichael Bestas2014-10-101-2/+2
| | | | | | | | | * 'Off' should be always the first option, else the app behaves unexpectedly * Use generic strings for all checkbox options since they should not be translated * Replace string references to entryvalues for all qcom options with the actual parameters * Group arrays & strings based on the option Change-Id: I092ce765013e7a80a2928df8e7d1b7e7bfd67905
* Camera2: Revert ZSL burst modeArne Coucheron2014-10-101-9/+2
| | | | | | | | | | * Was added in http://review.cyanogenmod.org/#/c/60993/ No idea why, as afaik ZSL burst was already supported and working * The above commit caused burst mode not working. No matter how many shots you select, only 1 is taken. Reverting it, everything is fine. Change-Id: I6d89707e1b25987ab4b5a184a9e93bd254d34a33
* Camera: Change copy right year back to 2012Vijay kumar Tumati2014-10-081-1/+1
| | | | | | | | As this is 3rd party file, we shouldn't change copy right year. Reverting it back to 2012. Change-Id: If617e7607cd89b0270aabbe1186190dfe06fe40c
* Camera2: Headset shutter modeDave Daynard2014-10-031-1/+6
| | | | | | | Use play button on headset to take a picture/video/panorama Use media next/previous for zoom Change-Id: I25c22646b041e5e0941fbe361eccfe77a2a1e42f
* Merge tag 'android-4.4.3_r1.1'Dirk Rettschlag2014-06-061-0/+4
|\ | | | | | | | | | | Android 4.4.3 release 1.1 Change-Id: Icc767484426dcecfd8b121756474c6f72f3bc7fa
| * Always set focus mode first before applying scene modeMichael Kolb2013-12-021-0/+4
| | | | | | | | | | | | | | | | | | cherrypick from Bryce branch Bug: 9577903 Bug: 11777611 Change-Id: I2c300e443a47c7bc0c20f6aaec6f6e4b6c238880
| * Reduce logging of flattened PreferencesSeth Raphael2013-11-271-2/+1
| | | | | | | | | | Bug: 11901390 Change-Id: I9f2e27e769fd745be01bb2c12a7f07b45aa0b905
| * Delay onResume tasks to speed up lockscreenAndy Huibers2013-11-191-16/+28
| | | | | | | | | | | | | | | | onResume->onPause->onResume launch sequence. Bug: 11773268 Change-Id: Iea7702a0141a390e1e9b50c738f6269c03dabcc3
* | Camera2: Fix camera application memory leakGaoxiang Chen2014-05-191-8/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | This change fix potential memory leak of camera application when swith between camera and panorama: 1. free allocated frames in jni/Mosaic 2. use application context instead of acitivity context 3. clear disappearing children of ViewGroup explicitly 4. remove IdleHandler during camera exit CRs-fixed: 622518 Change-Id: I2583709489ab2cf1fc20865fe7d2a8f56f2763c9
* | Camera2: Disable ZSL for slow shutter shotsEthan Chen2014-05-051-2/+5
| | | | | | | | Change-Id: If046c2180cf0504ce668a31fbb8c7660cd42b63e
* | Camera2: Show post-picture spinner for slow shutterEthan Chen2014-04-071-1/+2
| | | | | | | | Change-Id: I1e1eefd5731ee83a70a5270de0c254ec2deebd85
* | Camera2: Add proper support for SuperZoomEthan Chen2014-04-071-1/+6
| | | | | | | | | | | | | | * Surface this as an actual option, since it acts more like a scene mode similar to HDR. Change-Id: I386f39fa960efb0f3985ed3b8660b19f720f4720
* | Camera2: Add spinner for post-HDR modeEthan Chen2014-03-281-0/+4
| | | | | | | | Change-Id: I2912ed8b77a919d550721fd8cdfd88ac22fa45c3
* | camera: Fading capture animation for ZSL modeSteve Kondik2014-03-281-1/+3
| | | | | | | | Change-Id: I6bf5086c749799e74d9fa876a6af77157343a5f2
* | Camera: remove fine/normal/superfine jpegquality and use always intLars Greiss2014-03-151-46/+4
| | | | | | | | | | | | | | | | | | | | | | We use now a set of int values the user can exactly assign. Showing as well the normal fine superfine as choice is just a duplicate. As well we can get rid of the weird converts of the mixed values. To take care that the user does not get into problems we updated the db version and we make a convertion. Change-Id: I2615666bc1c929c0c045840fad1ece55fb0640af
* | camera: Histogram, ZSL burst mode, HDR-on-ZSLSteve Kondik2014-03-111-4/+12
| | | | | | | | | | | | | | * Optional features available on newer sensors * Histogram needs to be made pretty Change-Id: Ic46c1dfcc1de32acc22928a4431d3601b03ef513
* | camera: Add metadata-based ASDSteve Kondik2014-03-111-2/+48
| | | | | | | | | | | | | | | | | | | | * New cameras use the metadata callback to report the detected scene mode. Add support for this. * The asdModes array must be set for this to work, which should contain the ordered list of possible scenes, corresponding to the camera_asd_values array. Change-Id: I07279ae30a4cbedef02bec702252eb7e2abacd4a
* | Camera2: Do not issue autofocus cancel if preview stoppedDave Daynard2014-03-071-2/+3
| | | | | | | | | | | | | | | | | | 942890667aa08cc3c1305d7ba64c1340df1219db introduced the option to not issue autofocus cancel if the preview was stopped. Extend it to the case where the preview is stopped because the camera was called as an intent (ie from MMS client) Change-Id: I30032d8375665ecf6be471bf480c1f118d25423b
* | camera: Make some parameter lookups saferSteve Kondik2014-02-261-17/+40
| | | | | | | | | | | | | | | | * Unsupported parameters that return int values will throw an exception at the framework level if they aren't supported. Handle this better and prevent crashes. Change-Id: If5a3807dba33167ef95e4ec9e9cbeb15ed4ed591
* | Camera2: Calculate UI aspect ratio based on preview sizeVladimir Petrov2014-02-261-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This reverts change If4047860. - Simply using preview size instead of picture size at all to calculate the UI aspect ratio, avoiding tricky overwriting aspect ratio. - Will fix issues when surface texture transform is calculated based sometimes on preview size ratio and sometimes on picture size ratio. CRs-Fixed: 601495 Change-Id: I8e054c9eaafc9fb54dac2bff2c67e39f0a1fe64c
* | Update settings pref values when BSM is not auto.Santhosh Kumar H E2014-02-261-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | When BSM mode is set to a value other than auto, flash mode, white balance and few more settings will not be based on user preferred settings. So mParameter object will have default values. Updating those values in the list will over write the preferences. To preserve settings from preferences, we need to pass the same values. CRs-Fixed: 573584 Change-Id: Ic62dc537250468f189374fae9a897ee46d40e3a1
* | Camera: Prevent callling of resize before camera is initializedSanthosh Kumar Thimmanna Bhattar2014-02-261-0/+4
| | | | | | | | | | | | | | | | | | | | Prevent callling of resizeForPreviewAspectRatio before camera is initialized ( cherrypicked from commit 57698f01193a75948505d0d6c098364e155c6a5b ) Change-Id: I400dbf30c30f5e2a458eac8fe05449ee055cb0f4 CRs-Fixed: 598600
* | Camera2: Synchronize access to camera parametersSanthosh Kumar Thimmanna Bhattar2014-02-261-22/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | - Concurrent access between the main handler thread and the camera start-up thread w.r.t. 'mParameters' is possible. This change will synchronize the two threads in order to avoid any exceptions. ( cherrypicked from commit e988411c441410f270fe0b98dfd0d9b1f033503f ) Change-Id: I290452723b3687eba5240f451cc94aef175a9fc4 CRs-Fixed: 539634
* | Camera2: Check mCameradevice before setting skinToneEnhancementSanthosh Kumar Thimmanna Bhattar2014-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Null pointer exception in app is observed when we open camera and immediately press home/back button. This is because mCameradevice will be null by the time handler thread gets a message to setskinToneEnhancement parameter. ( cherrypicked from commit 06fee777df529fa53ac5c5305e7324ad1baf085d ) Change-Id: I7f216a11a29b6b205be4c2d0ca8f1c346284c294 CRs-Fixed: 547522
* | Camera2: override Saturation&Contrast item when enable scence modeSanthosh Kumar Thimmanna Bhattar2014-02-261-4/+10
| | | | | | | | | | | | | | | | | | | | When HDR or any other scene mode is enabled, should disable the saturation and contrast items into gray. ( cherrypicked from commit aceeee3ef5812836265127ed784adb4ab5ed57fb ) Change-Id: Ia4e20e0ee2f80661c8b72bf81aeee6fa96dcdf1f CRs-Fixed: 526617
* | Camera: Dont reset camera state while capture is in progress.Santhosh Kumar Thimmanna Bhattar2014-02-261-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | While capture is in progress and if we get autofocus event, currently we reset the camera state to IDLE blindly. This is resulting in app exception because it will trigger another takepicture and lower layers will return error. ( cherrypicked from commit 1bed537bb0848b6a1f64f9eb245b1c256999ebad ) Change-Id: Ia595dbad246759870371b749c0aa2def221560c5 CRs-Fixed: 550417
* | Camera: Don't do cancel_af till all CBs are received in burst shotVijay kumar Tumati2014-02-261-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Doing cancel_af in the first jpeg CB while burst shot is going on, is changing the camera state to IDLE and allowing next takePicture() which is resulting in crash as this call reaches HAL when camera is in picture taking state. Change-Id: Idd146060a73161bcc30c34756fb53662bb1f0902 CRs-Fixed: 593352
* | Camera: Avoid animating cature with decoded jpeg in long shotVijay kumar Tumati2014-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | Decoding full jpeg image and animating capture with that is causing lot of delays which effects long shot stability.This change avoids that. CRs-Fixed: 586568 Change-Id: I0133cc55e5efcc801dd9a98c289dec965aa35984
* | camera: add support for samsung and htc camcorder modescodeworkx2014-02-251-0/+7
| | | | | | | | Change-Id: I68e6995a51dffa3b5851eb4b7a3a72e60d201d5b
* | Camera2: add option to prevend autofocus cancel if preview stoppedLars Greiss2014-02-121-1/+4
| | | | | | | | | | | | | | There are camera HALs which cannot handle the autofocus cancel call if the preview stopped in startPreview(). Add an option for this HAL's to do not cancel autofocus in this cases. Change-Id: I0767cc7279405d17afc0b00120cb43e5bb309220
* | Camera2: fix possible NPE on configurationchangeLars Greiss2014-02-121-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Step to reproduce: - open camera from lockscreen - during it opens turn your phone - result: crash Due that the camera is in middle of the initialization mParameters is null at this point. Just check against null to prevend the crash. The correct resizing happens so or so during the ongoing initialization Thanks TJKV from xda for the report Change-Id: I0aab385172d7ff571adf525004305fd3b34d499c
* | Camera: Fix saturation, contrast, sharpness parametersEthan Chen2014-02-081-3/+3
| | | | | | | | | | | | | | * Old-style QCOM HALs use <setting>-max, new style HALs use max-<setting> for these parameters. Change-Id: I3b0dbd04f072cb69d09c44b5b3af1097560205b3