summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Snap: Replace noisy debug linestaging/cm-14.1-cafrebaseGabriele M2017-02-111-1/+1
| | | | | Change-Id: I378fc4d5fc102ec1c23995532114355b1dcdb3d6 (cherry picked from commit 75de9ea72239a662f5070be38d231a8602877d05)
* Snap: VideoModule: Restore check on mPreferenceReadGabriele M2017-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following crash when switching from picture mode to video mode for the first time: FATAL EXCEPTION: main Process: org.cyanogenmod.snap, PID: 4243 java.lang.NullPointerException: Attempt to read from field 'int android.media.CamcorderProfile.videoFrameWidth' on a null object reference at com.android.camera.VideoModule.updateCameraParametersInitialize(VideoModule.java:2778) at com.android.camera.VideoModule.setCameraParameters(VideoModule.java:2822) at com.android.camera.VideoModule.startPreview(VideoModule.java:1353) at com.android.camera.VideoModule.onPreviewUIReady(VideoModule.java:3260) at com.android.camera.VideoUI.surfaceCreated(VideoUI.java:956) at android.view.SurfaceView.updateWindow(SurfaceView.java:618) at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:161) at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2205) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6343) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874) at android.view.Choreographer.doCallbacks(Choreographer.java:686) at android.view.Choreographer.doFrame(Choreographer.java:621) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6126) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Change-Id: I8f449aaa943636a9b3ce590425e8611def8df590 (cherry picked from commit 342b6177119011ecfa2a7f97fceb4027186944e1)
* Snap: VideoModule: Update flash status on preference changeGabriele M2017-02-111-0/+2
| | | | | | | | The flash preference was read only during initialization. Do it whenever the preferences change. Change-Id: I32c0d96f6c71dca98953a7bb29dbfa2f59ac4b07 (cherry picked from commit 84752f915ee31ee5f2426474eb58ee4e05874dc6)
* Snap: Fix filtering of unsupported HFR/HSR modesMichael Bestas2017-02-111-3/+25
| | | | | Change-Id: I7721613f10a24cbd36eb0a3c5b0a46a98e828679 (cherry picked from commit 678971d123ba3255e47f6f5a7911fef6d69e3821)
* Snap: Fix max brightness and power shutter settingsGabriele M2017-02-111-2/+4
| | | | | | | | | | Checking the value of arePreviewControlsVisible() doesn't allow to reliably determine whether we are using the app or not, so do it as we used to: set a local flag as soon as we show/hide the controls and check its value. Change-Id: Iadfa86d49b74bc811006e1b477b60fc487772219 (cherry picked from commit fe100c6e50feeda676ec470e70c90621dbc57585)
* Snap: Fix NPE when parameters.getSupportedVideoSizes() is nullMichael Bestas2017-02-111-102/+22
| | | | | | | | | * Older devices do not support parameters.getSupportedVideoSizes() * Assume that the device reports valid profiles in media_profiles * Remove dead code Change-Id: Ic3488b6762496bd9498bc6bf8b48b2a2212bad51 (cherry picked from commit 2bc50511221788bf6a5815f92a07d95380e3d8ad)
* Fix shutter button pressed state tracking issues.Danny Baumann2017-02-112-3/+22
| | | | | | | | | | | - Setting pressed state to false on enabling touch caused ripples to be displayed too early - Make sure pressed state is set to true on down event and set to false on up event - Correctly set ripple hotspot Change-Id: I64bbd3be21f19f3027243514239733b57cebb81a (cherry picked from commit 7cf0bf375ea7a06f02e922f1c205ffba92935695)
* Snap: store module indexcodeworkx2017-02-111-0/+5
| | | | | | | | | | | | | Store the module index so we can use it the next time the Camera starts up. Looks like this code got lost in space during one of the recent merges. Probably somewhere around the black hole in andromeda galaxy. Credits to codeaurora Change-Id: I1be5f643fbeb985fbc4734d03498deeac3ed841b (cherry picked from commit a425da8101c4c3567b407016551b791d279fbdfe)
* Fix thumbnail sometimes not being shown initially in video mode.Danny Baumann2017-02-111-13/+13
| | | | | | | | Happened due to a race condition between surface creation and view initialization. Change-Id: I701eaa16c09a246806f5d148d0ce90f1d132e3f3 (cherry picked from commit 9936197ae3607b0fec5eb343725d6056b6d86b67)
* Snap: VideoModule: properly update focus settings when switching between camerasFlex19112017-02-111-0/+1
| | | | | Change-Id: I4c769bb4f080b8144b2571d218807bf197187a54 (cherry picked from commit 8613b0502046742d80cb9eee7cd5e9eea2ee356f)
* Snap: Fix zoom in video modeGabriele M2017-02-111-1/+1
| | | | | | | The zoom parameter was changed but never applied. Change-Id: Ibed445179835e7b6ed146058320ab5c2db0d8179 (cherry picked from commit 8c64fae391fff390bac978c6bd639434bc1b19a5)
* Snap: Remove touch AF/AEC optionSteve Kondik2017-02-093-50/+11
| | | | | | | | * Drop the use of the touchaf-aec parameter entirely. No camera needs this anymore. Change-Id: I83154a75e5375901dc6c0fc93aef23637cfdf425 (cherry picked from commit 8ba41f452222c87a733fd2d045f9c513fd8d7799)
* Correctly return to film strip after editing a picture.Danny Baumann2017-01-246-17/+24
| | | | | Change-Id: Icd4e47474f871d427d10ab2575e0d9622f1b4369 (cherry picked from commit e0a3c03cf912c6b437dd2bf96f486b88c699fb9c)
* Fix camera controls rotation.Danny Baumann2017-01-131-8/+13
| | | | Change-Id: I949b30becc8b69268ff30a0dca57e234fd078204
* Snap: Remove storage menu if no external storage availablemaxwen2017-01-041-2/+9
| | | | | Change-Id: I9807c7f9303f17eb971ff1a82fbd35dfbdbfa529 Signed-off-by: Zdrowy Gosciu <ZdrowyGosciu+GITHUB@gmail.com>
* Snap: make openLegacy an optioncodeworkx2017-01-042-11/+39
| | | | | | | Using openLegacy on QCamera3 forces it to use QCamera2 and fall back to api v1 which is not what we want on v2 devices. Change-Id: Ic392a4ae9403ebae36940ddf0727237d9cb9e8f0
* Snap: prevent NPE when checking if controls are visibleJoey Rizzoli2017-01-041-0/+3
| | | | | Change-Id: Id054ccc9445722bcb08953fd40e43a82bdd13ae2 Signed-off-by: Joey Rizzoli <joey@cyanogenmoditalia.it>
* Always set JPEG quality.Danny Baumann2017-01-041-21/+10
| | | | | | | Don't skip it (and the JPEG picture size estimation) under arbitrary conditions. Change-Id: Iee89e56ffffd3f029bc042a07cf4df18fd8fda57
* Initialize focus manager in onResume().Danny Baumann2017-01-042-0/+2
| | | | | | | | | | | Since commit 87b4a40d588a7ae8a61cb353c4cff8df37f7b483 moved camera initialization (and focus manager initialization with it) to a background thread, the focus manager initialization now races against the onPreviewRectChanged() call triggered by SurfaceView initialization in the main thread, potentially leaving the focus manager in an uninitialized state that prevented taking pictures. Change-Id: I8cf650d6a67768acd131b3cddad175ed198e0838
* Modernize look of review controls.Danny Baumann2017-01-042-4/+7
| | | | Change-Id: I79f74502364a523a7c9c9f8ae3c63c3fcfebac3d
* Clean up module switcher.Danny Baumann2017-01-041-58/+24
| | | | | | | | - Get rid of Holo highlight color - Don't hardcode pixel sizes - Simplify code Change-Id: I3695b04e99308c266537eb9b837d0b65793a33f7
* Stop data loader on activity destroy.Danny Baumann2017-01-044-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes this crash: 11-29 13:02:30.837 18338 18338 E AndroidRuntime: java.lang.IllegalArgumentException: You cannot start a load for a destroyed activity 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.bumptech.glide.manager.RequestManagerRetriever.assertNotDestroyed(RequestManagerRetriever.java:136) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.bumptech.glide.manager.RequestManagerRetriever.get(RequestManagerRetriever.java:127) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.bumptech.glide.manager.RequestManagerRetriever.get(RequestManagerRetriever.java:88) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.bumptech.glide.Glide.with(Glide.java:587) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.android.camera.data.LocalMediaData$PhotoData.loadUri(LocalMediaData.java:535) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.android.camera.data.LocalMediaData$PhotoData.loadImage(LocalMediaData.java:507) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.android.camera.data.LocalMediaData$PhotoData.fillImageView(LocalMediaData.java:485) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.android.camera.data.LocalMediaData.getView(LocalMediaData.java:232) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.android.camera.data.CameraDataAdapter.getView(CameraDataAdapter.java:101) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.android.camera.data.FixedFirstDataAdapter.getView(FixedFirstDataAdapter.java:117) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.android.camera.ui.FilmStripView.buildItemFromData(FilmStripView.java:928) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.android.camera.ui.FilmStripView.update(FilmStripView.java:2072) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.android.camera.ui.FilmStripView.-wrap12(FilmStripView.java) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.android.camera.ui.FilmStripView$4.onDataUpdated(FilmStripView.java:1803) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.android.camera.data.FixedFirstDataAdapter.onDataLoaded(FixedFirstDataAdapter.java:152) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.android.camera.data.CameraDataAdapter.replaceData(CameraDataAdapter.java:269) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.android.camera.data.CameraDataAdapter.-wrap1(CameraDataAdapter.java) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.android.camera.data.CameraDataAdapter$QueryTask.onPostExecute(CameraDataAdapter.java:359) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.android.camera.data.CameraDataAdapter$QueryTask.onPostExecute(CameraDataAdapter.java:358) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at android.os.AsyncTask.finish(AsyncTask.java:660) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at android.os.AsyncTask.-wrap1(AsyncTask.java) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:677) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6095) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) 11-29 13:02:30.837 18338 18338 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Change-Id: I43c6eb85651e5ee69647114a5ec819ed98c61720
* Improve RTL layout behaviour.Danny Baumann2017-01-045-309/+163
| | | | | | | | - Swipe in menu from the right in RTL - Make it possible to select scene/filter items in RTL - Remove/clean up some nonsense code Change-Id: I884a06f5cc6e72a1d2ee19dbdf32ce511c8466ec
* Use transparent navigation bar.Danny Baumann2017-01-0413-230/+305
| | | | | | | Ensures a 16:9 preview isn't scaled on a 16:9 screen just due to the navigation bar being shown. Change-Id: I7ca7778b0405d3e9ac7ae1db3e7a56cacd703e3b
* Fix some photo UI layout issues.Danny Baumann2017-01-042-7/+8
| | | | Change-Id: I04a68fe2e379db4a228d19cbe6444a10a8024ce0
* snap: Panorama fixesSteve Kondik2017-01-045-16/+24
| | | | | | | | * Fix animations and transitions * Disable warped preview overlay, this looks terrible and needs rewritten. Change-Id: I9474219c57fc204dd16797aa8921296e61cc9d37
* Snap: Make developer menu more accessibleMichael Bestas2017-01-042-24/+57
| | | | | | | | | | | | | | * Not all devices have red eye reduction, which made it impossible to enable advanced options. Move the toggle to max brightness option which is present in all devices. * Allow enabling advanced options through camcorder settings. * Move hardcoded strings to cm_strings for translations. * Close menus when developer mode is toggled so we can see the extra options when the menu is reopened. * Decrease taps to 7, matching Settings tap-to-enable. * Properly reset tap counter. Change-Id: Iac39b9309388b92bf75a49a6091b483b13bd9154
* snap: Fix reset of camera controlsSteve Kondik2017-01-042-1/+12
| | | | | | | | | * Need to post a runnable so everything currently in the queue finishes first. * Also force reset when hiding the preview cover to ensure no stray scroll events throw us off. Change-Id: Id1419e91f7624b4276c566228fe77d1a774ecc2b
* CameraNext: Update focus behavior for panoramasJim Wilson2017-01-041-11/+26
| | | | | | | | | | Panorama was using Infinity for the focus mode all the time for panoramas. Change to use continuous-picture in viewfinder before the actual mosaic is started then change to fixed to lock in. This allows indoor panoramas to not suck. Change-Id: Ida01ca1ded1e1058d76da851cd20e5b7072e15be (cherry picked from commit 33ece020c28796f004f28843fda28092e315c9dc)
* Make panorama able to go 270 degrees in landscapeMartin Brabham2017-01-042-5/+9
| | | | | | Change-Id: Icfab44c674bcc59c1d369af64985956ccaf63ccc issue-id: SAMBAR-869 (cherry picked from commit e0ca697b97ef2d872f682d2b357d7233762cfafd)
* Grant read URI permission for playback of video captureAlan Newberger2017-01-041-0/+1
| | | | | | | | | | | Current implementation of video capture UI configured MediaRecorder to output directly into supplied URI, which per recommendation should be a content: URI. We pass this URI to another app to play back the video, and should pass along the read permission. Bug: 19675889 Change-Id: Idfc0ee42422dde5d921e81f098d4697e652ac689
* CameraNext: stop updating the pano progress bar on pauseScott Mertz2017-01-041-7/+15
| | | | | | | | | | | Fixes a NPE if a panorama is rendering when the user pauses the activity, then launches the camera from the lockscreen and enters panorama mode. With this patch, the user is shown a message "previous panorama is rendering" instead of the progress bar. FEIJ-533 Change-Id: I3247e4bd96aa3aa67e9b1ff75d747d8be0c3c633
* CropActivity: notify MediaScanner on save completeKhalid Zubair2017-01-042-2/+13
| | | | | | | | | | | MediaScanner should be notified when a file is created or changed. Add an explicit call at the end of the async task writing saving the bitmap. Fixes FEIJ-479 where the cropped file was being shown as a 0 byte file over MTP. Change-Id: I2220654a75f502089f44e1cb24682b73516c43b0
* Fix broken filenames for cropped imagesKhalid Zubair2017-01-041-6/+7
| | | | | | | | | | | | makeAndInsertUri() was missing the filename prefix and ended up creating filenames like '_20160518_170242.JPG'. getNewFile() already does most of what we need to handle PANO and IMG prefixes. Modify it to accept a time argument and use that instead. CYNGNOS-2877 Change-Id: I593be63d43b18efbae134c10b59921498d48df8f
* Show UI when pano stitch starts and remove cancel conditionArtem Shvadskiy2017-01-041-1/+2
| | | | | Change-Id: I72b2bf2e1062a548ff9470075a5151923619e062 issue-id: FEIJ-469
* CameraNext: don't crash when pref is not booleanKeith Mok2017-01-041-4/+8
| | | | | | | | | | | | | | | | | | | | | In some situation, a portion of pref (enableRecordingLocation) is created without first calling upgradeGlobalPreference first. Leaving the pref without the version field and makes the application thinks that the pref is in old version. When it tries to do an upgrade on the pref later, it tries to getBoolean for that location field, but that location field is already in string format, making getBoolean throws an exception. The best is to call upgradeGlobalPreference and upgradeLocalPreference when the application starts. However it should be no harm just add a simple guard in getBoolean to avoid that sitation. FEIJ-1258 Change-Id: Ic73078556b1a198a58968806091f8b0afd1ad6cc
* CameraNext: Fallback to do copy exif if exif not existKeith Mok2017-01-041-1/+10
| | | | | | | | | | | If exif in jpeg does not exist, rewriteExif will throw IOException instead of returning false. Let's catch it and fallback to the original logic to do a copy instead of in-place replacement. FEIJ-1245 Change-Id: I61b8bd9b9b7c855bff1897c036d948fcd16bb30a
* snap: Improve the histogramSteve Kondik2017-01-043-39/+69
| | | | | | | * Make it work with the new UI * Make it pretty Change-Id: Ib920307639f997c82ed003e0712fb28e9912a8e8
* Remove unused menu indicators code.Danny Baumann2017-01-046-291/+1
| | | | Change-Id: I0ce48da277a532b46fdde15027f636de4d7585b7
* snap: Improve transitionsSteve Kondik2017-01-0414-317/+496
| | | | | | | | * Synchronize animation to filmstrip with input * More code cleanups, introduce BaseModule * Animations are hard Change-Id: Ie664bb2059a28b3a9f3957fb491ec28fede521e5
* snap: Check for null when setting up the focus callbackSteve Kondik2017-01-041-7/+9
| | | | | | | | * Depending on phase of moon and location of Jupiter, we might race during startup. Add a nullcheck and synchronize until we have a proper callback. Change-Id: I2d026f0eaae3541f78c105e8cb03ae38195f48ba
* snap: Use new widgets for CaptureUISteve Kondik2017-01-047-234/+85
| | | | Change-Id: I1d142d60af3f51c71ce3711642d074faf7b456c2
* SnapdragonCamera: Fix ANR during open cameraqimengp2017-01-041-0/+0
| | | | | | | | | | | When preview UI destory, app call Camera API as order: setPreviewDispaly(null) and stopPreview(). In case native window disconnected before stopPreview(), will cause ANR, since calling to native window fails. Native window is taken care within camera framework. So, by removing setPreviewDisplay(null), can avoid this issue. Change-Id: Id804f2e0876a61d974e58dd996c46fe769f69856
* SnapdragonCamera: Pictures were rotated when the device is in flat positionweijiew2017-01-041-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
* SnapdragonCamera: resolve front camera preview freeze issueJay Wang2017-01-041-2/+2
| | | | | | | | | | In camera2 implementation, there is a bug that camera ID was defined incorrectly and cause front camera preview turned off. Changing the default camera ID to invalid number and let setting manager update it to avoid wrong camera ID. Change-Id: I0c7f1638394bcddb7c30d55556afe6b5a6666e51 CRs-Fixed: 1061987
* SnapdragonCamera: ZSL for camera2Jack Yoo2017-01-043-69/+641
| | | | | | | Camera2 Zero Shutter lag. Change-Id: I09c65002e5f703e776b4c32efe78d3e95e76acda CRs-Fixed: 1060586
* snap: UI checkpoint #2Steve Kondik2017-01-0414-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 Kondik2017-01-041-0/+46
| | | | Change-Id: Ic66abb6dbce0283f3c76512f40daf6bb4a9b8f54
* snap: Use reveal animation when switching modesSteve Kondik2017-01-046-51/+120
| | | | Change-Id: I7a4b4fe2c29426b57020e3a5102d89b62d46c241
* snap: Better capture animationSteve Kondik2017-01-048-237/+185
| | | | | | | * Modified version from Camera2 * Also adjust the callbacks for better response Change-Id: I85ac23cdf35d9e2625799dd64b9f86aef103be7b