summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Snap: Add more resolutionsEthan Chen2016-01-112-0/+8
| | | | | | * Add some 16:9 20MP resolutions Change-Id: I85dc481a4f1df98d75d1e3176ba1a72002d1a2c8
* Snap: More strings cleanupMichael Bestas2016-01-112-55/+54
| | | | | | | | | * Set untranslatables * Move all resolution strings in one place & improve them * TODO: Automatically calculate MP from picture size and get rid of the resolutions array Change-Id: I579d6ba7378849d891d7ed64a6b8c70e2b62ca3c
* Snap: special handling of hdr-mode parameter for lge devicescodeworkx2016-01-113-17/+45
| | | | Change-Id: Iefee1f15f5649c2f93c59fcbdedcf953e9e0bc54
* Fix mismerge of "SnapdragonCamera: fix screen flash on resuming"Arne Coucheron2016-01-111-1/+0
| | | | Change-Id: I9c2c7a74b5816b3f930e22ee1fce625e7ad768e3
* Don't do touch-to-focus for touches outside of the preview.Danny Baumann2016-01-112-7/+1
| | | | | | | | | | Issue was twofold: - Preview size was updated from the root view instead of the preview surface view. As the preview rect is already correctly updated from the surface view, remove the redundant size update code. - Touches outside of the preview rect weren't discarded properly. Change-Id: I1c9a4398aa51a828b5362fcd7bcd5a7a7e4691db
* SnapdragonCamera: Hide camera controllers when review captured imagelikaid2016-01-112-0/+18
| | | | | | | | | | | | The camera settings options including scene mode, color effect, switcher for back/front camera, and the beautification make-up should only be shown on camera preview, since they are not used for editing pictures. Hide these camera setting options to avoid making user confused. Change-Id: I26599c4d97043069eee9c1a069325735ba625a94 CRs-Fixed: 895938
* Move mApplicationContext to init()LuK13372016-01-111-2/+1
| | | | | | | | | | | | | | Fixes following NPE: 01-11 17:36:42.607 4329 4391 E AndroidRuntime: FATAL EXCEPTION: Thread-235 01-11 17:36:42.607 4329 4391 E AndroidRuntime: Process: org.cyanogenmod.snap, PID: 4329 01-11 17:36:42.607 4329 4391 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference 01-11 17:36:42.607 4329 4391 E AndroidRuntime: at com.android.camera.PhotoModule.updateCameraParametersPreference(PhotoModule.java:3492) 01-11 17:36:42.607 4329 4391 E AndroidRuntime: at com.android.camera.PhotoModule.setCameraParameters(PhotoModule.java:3714) 01-11 17:36:42.607 4329 4391 E AndroidRuntime: at com.android.camera.PhotoModule.startPreview(PhotoModule.java:2715) 01-11 17:36:42.607 4329 4391 E AndroidRuntime: at com.android.camera.PhotoModule.-wrap14(PhotoModule.java) 01-11 17:36:42.607 4329 4391 E AndroidRuntime: at com.android.camera.PhotoModule$OpenCameraThread.run(PhotoModule.java:265) Change-Id: I6ca0dfe402cab46dd7b6f102921062f3c7ec8d43
* Snap: support setting default preview resolution via overlaycodeworkx2016-01-102-44/+18
| | | | Change-Id: I14c17aec6e5d582cc1f884eba40868a58cab1d03
* Snap: Fix NPE when parameters.getSupportedVideoSizes() is nullMichael Bestas2016-01-111-97/+21
| | | | | | | | * Older devices do not support parameters.getSupportedVideoSizes() * Assume that the device reports valid profiles in media_profiles * Remove dead code Change-Id: Ic3488b6762496bd9498bc6bf8b48b2a2212bad51
* Snap: Fall back to default quality instead of 352x288Michael Bestas2016-01-111-9/+2
| | | | | | * Not all devices support this resolution Change-Id: I42d2037b4e32c7f5c88a60b5da1895dcb761d176
* Snap: Fix NPE if mCameraDevice == nullBjörn Fries2016-01-111-2/+1
| | | | Change-Id: I27ee6f3b6b6bec95661741a0907708e6ebd79752
* Snap: Fix aapt warningsLars Greiss2016-01-1160-398/+0
| | | | Change-Id: I6d48105f0407ded104244eb5ace4a3ace76eb402
* Snap: Set untranslatablesMichael Bestas2016-01-111-88/+89
| | | | Change-Id: Iff00f7e61abdf75ca0735752d8985a9818508157
* Snap: support usage of preview size 2560x1440 via system propcodeworkx2016-01-101-0/+7
| | | | Change-Id: I52b0f7aab55d0a001fc1149fbd82c8188f57be9d
* Snap: Set parameters before starting previewlion07382016-01-101-5/+6
| | | | | | | Old parameters are used when grabbing focus mode. Camera parameters should be set to FocusOverlayManager before starting preview. Change-Id: I908559e1c2003be47b486996b0ec016b78107468
* Snap: Remove CAF Chinese translationsMichael Bestas2016-01-092-246/+8
| | | | Change-Id: Icb15ed42b62a8a85a7691c5cfc606307689cbcae
* Snap: Fix jni compiler warningsMichael Bestas2016-01-093-4/+4
| | | | Change-Id: I091a8928a9a0674c54759ff8b384259d8f16793e
* Snap: Remove dead codeMichael Bestas2016-01-096-41/+0
| | | | | | | | | | * Remove non-standard video resolutions. * Revert "camera: override shutter sound volume" commit 8a50cda8f72738e943904fdf7cae189b2b0a8ea8. Adapted from CodeAurora commit 000c6fa3b5c95297496e0ae077030132409871ea Change-Id: I167ab5ff399c4f1d306a1a7ddf94896565c9625a
* Revert "Snapdragon: Add icons for Snapdragon beautification feature"Michael Bestas2016-01-0971-0/+0
| | | | | | | | * Useless This reverts commit 58569f7517c85d45c0b19b6d24fd934ca384f831. Change-Id: If0779dd8480d3865cbc6976969cd2b014a51821b
* Snap: FilmStripView must exist before loading photo/video modulescodeworkx2016-01-091-8/+12
| | | | Change-Id: Ife58cd6cde57f38343c73518d6561036a13dbf06
* CameraActivity: Handle NPE when film strip view is nullLuK13372016-01-091-1/+3
| | | | Change-Id: I0de4ec0f2cb4653822249ea97e8a07c890fc7231
* Snap: initial materializationjrizzoli2016-01-09281-142/+1041
| | | | | | | Just for initial ship Change-Id: I8d6c0d71d1b94e6eb2f43ab962fb92de0e6c7093 Signed-off-by: jrizzoli <joey@cyanogenmoditalia.it>
* SnapdragonCamera: Add missing permissionsJay Wang2016-01-081-0/+2
| | | | | | Add permission to access RotationPolicy Change-Id: Ib64b2119b04f6470d12ba469db1aba0762f73062
* SnapdragonCamera: Preventing duplicated call of setEnableJack Yoo2016-01-081-2/+4
| | | | | | | Prevent it from calling twice on animation case. CRs-Fixed: 944874 Change-Id: I96468b627719d48bbd1fc857556dff8f27f46665
* SnapdragonCamera: Restart preview in a corner caseSuman Mukherjee2016-01-081-0/+3
| | | | | | | | | | | Issue: If user sets feature.restart flag as 1, turn off ZSL,HDR 1x and capture an image with HDR, then after capture preview is not getting restarted. Fix: Set the needRestartPreview flag based on above condition. Change-Id: I4e2c9db20d5148de2b6b63288dc0d3eb75ee5a9c
* SnapdragonCamera: Fix rtl photo menu touch issuelikaid2016-01-081-0/+5
| | | | | | | | The touch rect is not correctly checked on RTL mode. Recheck touch rect range on preview menu. Change-Id: I40e980377f1765c9caea397a3be085142dd006ce CRs-Fixed: 904563
* Read camera state from HAL instead of local state variable.Santhosh Kumar H E2016-01-081-1/+2
| | | | | | | | | | | | | Camera open thread opens the hardware and triggers preview. State of preview is updated over a handler message to UI thred. In between this surface window re-creation happens in UI thread. To set new window to HAL, preview should be in stopped state. Since state updation hasn't completed yet, UI thread reads old state and sets window while HAL is in previewing state. This lead to crash. To avoid the error read the camera state from HAL through framework API rather local state variable. Change-Id: Ieee86edc601f43b85773392a9a44853b4a56cde8
* Update camera state immediately after start preview.Santhosh Kumar H E2016-01-081-2/+21
| | | | | | | | | | | | | | When user delete all the images in gallery to come back to camera, surface view gets created, destroyed and recreated. Since camera state is updated over handler message after start preview, by the time handler thread updates the state background thread would have stopped the preview. So during surface recreation, state variable is read wrong and it doesn't allow start preview. This change makes sure state variable is updated immediately after start preview and only UI updation is moved to main thread through handler message. Change-Id: I289814821d5c3652b06301d1d4a854e9e40670b6
* Consider fractional value in zoom circle calculation.Santhosh Kumar H E2016-01-081-6/+6
| | | | | | | | Fractional value was lost while rounding off zoom circle size to integer value. Due to this user was not able to zoom upto max zoom level. Change-Id: I99888075f4a484320939f813164bbca9c94dc11a
* Enable extended face detection feature.Santhosh Kumar H E2016-01-081-3/+2
| | | | | | | Enable extended face detection support since it was commented out during basic bringup. Change-Id: Iea1549f770dffb119f1ebe94262ad7ba74323c14
* SnapdragonCamera: notify focus manager about surface changeLikai Ding2016-01-081-0/+4
| | | | | | | | | | If device and preview have different aspect ratio, preview doesn't occupy full screen. So SurfaceView's dimensions including margins need to be considered for transformation matrix. Otherwise touch focus area set to HAL won't match with actual user touch point on screen. Change-Id: I6b7bfa6e3cb831592615dc5dfc45622f106c99d0
* SnapdragonCamera: fix screen flash on resumingLikai Ding2016-01-081-0/+7
| | | | | | | | | Currently preview cover will be hidden shortly after preview started, but if the actual first frame comes late, the main screen will flash. Register a oneshot preview callback to hide preview cover. Change-Id: I81fabf2d97c32fc2112cf4fceef4edd0872439e2 CRs-Fixed: 889021
* SnapdragonCamera: fix screen flash on resumingLikai Ding2016-01-083-1/+19
| | | | | | | | | Currently preview cover will be hidden shortly after preview started, but if the actual first frame comes late, the main screen will flash. Register a oneshot preview callback to hide preview cover. CRs-Fixed: 881290 Change-Id: I5d93e57f0b9aa338c6b34461d5e3ee31806b6706
* SnapdragonCamera: Hide the preview cover when preview has startedlikaid2016-01-082-3/+8
| | | | | | | | | | | The preview cover was shown when onPause, but didn't hide after resume. That caused the video preview turned to black screen. After the camera preview starts, hide the preview cover if it is still showing. Change-Id: I79fdcd45d46d7c083a132e864bbf42649b100ae4 CRs-Fixed: 865933
* PhotoUI: Calling layoutPreview on holdersize become validJack Yoo2016-01-081-1/+3
| | | | | | | Need to ensure calling layoutPreview on max size change Change-Id: I8c49397c85c592879c38585ff66d1d24bde72d86 CRs-Fixed: 927240
* SnapdragonCamera: Improvement in open camera latencySanjeev Garg2016-01-081-34/+36
| | | | | | | | | setContentView(R.layout.camera_filmstrip) call in the app takes ~40 msec before actual openCamera call is made. This is adding to the total APP camera open latency. So Opening camera in parallel to the call to setContentView(R.layout.camera_filmstrip) to save this time. Change-Id: I8e3797e65d17021853e0e04873178a372f12f195
* SnapdragonCamera: Make camcorder switcher icon invisible.likaid2016-01-082-1/+9
| | | | | | | | | | | When take photo for contact and back from setting ,the camcorder switcher icon will show. When take photo from contact,then set the camcoder switcher icon invisible. Change-Id: If0153650d131c5b1ee78a79c255c637aab410d8e CRs-Fixed: 884351
* SnapdragonCamera: Fix the icons disappeared when start recording failedlikaid2016-01-081-9/+13
| | | | | | | | | | | | The camera switch icon and color effect icon are hidden when start recording, they will be shown again in onStopVideoRecording. But if the start recording failed, the onStopVideoRecording will not be called, that causes the icons disappeared. Show the icons if start video recording failed. Change-Id: I05f64d6fc4928adbd6d8e43e0b31e21e8cb6ea9e CRs-Fixed: 863790
* Snap: fix typo in PhotoModulecodeworkx2016-01-091-1/+0
| | | | Change-Id: Ied37999553d04dcc970da23ccce4dd7c9abf3b48
* Snap: 100 chars!codeworkx2016-01-081-1/+2
| | | | Change-Id: Ia48f48fcd8b8546ca68969198a60f568bae805d6
* Snap: restart preview when shutter-speed gets disabledcodeworkx2016-01-081-1/+13
| | | | Change-Id: I3884b23f1c855cfffeb20ca6e2a760732370d772
* tests: fix class nameDan Pasanen2016-01-082-2/+2
| | | | | | * fixes compile, we are not camera2 Change-Id: Ia7c463745e91ee02aa12f77c9e9d06b602692c4c
* SnapdragonCamera: Fix incorrect viewfinder ratio for 13.1MP shotsSultanxda2016-01-081-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: Fix NPE when switching flash modesmyfluxi2016-01-071-3/+5
| | | | | | If device does not support AE bracketing. Change-Id: I6ec89518addbc786a01291e9f7dd3be3d83cb588
* SnapdragonCamera: Add support for high-speed video recordingPraveen Chavan2016-01-072-66/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | [1] Use combination of MediaRecorder.setCaptureRate and setVideoFrameRate API to achieve HFR/HSR ------------------------------------------------------------ CaptureRate videoFrameRate Recorded-video ------------------------------------------------------------ 120 30 slow-mo @30fps 120 120 high-speed-video @120fps ------------------------------------------------------------ Deprecate usage of custom fields added to media-profiles for checking max-capabilities. Instead, introduce high-speed profiles and advertize correct values (resolution, fps) to indicate target capabilities. Add conversion routines in CameraSettings to convert from normal quality level to time-lapse/high-speed quality. Also, add back 4KDCI and VGA support TODO: Implement bitrate scaling if AOSP does not implement in native. Change-Id: Ic1d5ed8ef52348cab2383abe304056e0401f7069
* Snap: add fallback for invalid video qualitiescodeworkx2016-01-071-0/+7
| | | | | | Might happen when updating from previous versions of Snap Change-Id: Ib52a2daff5a45c33ede1effd7cb7bed2fe61e5cc
* SnapdragonCamera: Query camcorder profiles before usageSai Kumar Sanagavarapu2016-01-074-31/+47
| | | | | | | | 1. Use generic camcorder profile query mechanism instead of hardcoding profile enums in app. 2. Fix NPE during startpreview if mFocusManager is null. Change-Id: I7bfc00f68f512c3029ca8ba75863583f1b376094
* Revert "SnapdragonCamera: Filter out unsupported video encoders inSusmitha Gummalla2016-01-071-33/+0
| | | | | | | | | | | | app" This reverts commit bac24e32cc1d2ff2fd5150e304b0898f449628ef. This is removing H265 encoder from the UI options, which is a FR requirement on 8994. We need to add H265 in media profiles and then commit this change. Change-Id: Id67fe2c83b12011ae82a14183ecc1ef34a38e8fb
* SnapdragonCamera: fix messy photo in Panorama modeLikai Ding2016-01-071-1/+1
| | | | | | | | | | If camera is kept still in panorama mode, the result looks messy. The root cause is that, when calculating and comparing distance in Blend::ComputeMask, double numbers are compared directly. Comparing them against a small negative number fixes the problem. Change-Id: I713f59b4e21c508e20eb4dabc5edb1652b3ddb1a CRs-Fixed: 794974
* SnapdragonCamera: Correct AutoHDR callback data size checkEmilian Peev2016-01-071-1/+1
| | | | | | | | | | | | | | | | | | Currently the AutoHDR functionality which handles metadata callbacks always assumes that the length of the callback data buffer will be equal to 12 bytes. It will always try to read and convert 3 32-bit integers. The check before this processing is incorrect as it allows buffers which are less than 12 bytes to be processed as well. This can lead to array out of bounds exceptions, which are also possible during FD snapshot metadata callbacks that don't contain any faces. In this particular scenario the metadata callback buffer size will be 8 bytes. Change-Id: I4094aaa56aa4135d2d806861353d49c8d7f9985c CRs-Fixed: 799110