summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CameraActivity.java
Commit message (Collapse)AuthorAgeFilesLines
* camera2: Fix merge issuesSteve Kondik2016-08-251-2/+2
| | | | Change-Id: I9b55bcaaa03e598e57325f45e80ee8493029edf1
* SnapdragonCamera: Add video to Camera2 moduleByunghun Jeon2016-08-251-1/+2
| | | | | | Add video to Camera2 module and combine the UI Change-Id: I0bcd86eb6b95fe2180856780ddd794682259e799
* SnapdragonCamera: Fix timing of preference initializationByunghun Jeon2016-08-251-0/+4
| | | | | | | Initialize preference before making the views visible. Change-Id: Ie3d541c7fcb29ed86e0e9fd52a1a1e4ea870f009 CRs-Fixed: 982842
* SnapdragonCamera: Multiple fixes in SettingManagerJay Wang2016-08-251-0/+1
| | | | | | | | | | | | | - Setting manager instance was not destroyed when camera activity onDestroy is called and a new instance is created again when onCreate is called. Make change to destroy the setting manager during onDestroy. - Include high resolution picture sizes to the picture size list Change-Id: Id6cb52da1419f7e723304236b5d2c204d217398c CRs-Fixed: 1025845, 1025789
* SnapdragonCamera: Update settingsManager and add Dual mode to Scene modeByunghun Jeon2016-08-251-1/+4
| | | | | | | Update settingsManager and add Dual mode to Scene mode Change-Id: I508430840c3fb8c7d0b56a2a63e09b271754fcb4 CRs-Fixed: 1018118
* SnapdragonCamera: Add SettingsManager, scene, and filterByunghun Jeon2016-08-251-7/+8
| | | | | | | | | | | 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: Camera2 add dual cameraByunghun Jeon2016-08-251-1/+3
| | | | | | | Add Camera2 dual camera support to SnapdragonCamera CRs-Fixed: 989750 Change-Id: I45a749ad03a531286a39cbfcfdcb65e5cad4759e
* SnapdragonCamera: Add Camera2 modeByunghun Jeon2016-08-251-12/+43
| | | | | | | Use camera2 API to show preview and take snapshot CRs-Fixed: 989750 Change-Id: I07e2d6743529b3d3d5acecf667e9493465a094c9
* SnapdragonCamera: Fix first-time crash and cleanup permissionsJay Wang2016-08-211-1/+1
| | | | | | | | | | | As onCreate skips the creation of setting manager when the critical permissions are not granted, this causes the onDestroy to call setting manager destroy function with null pointer. Fix the issue with null check. In addition, remove unused permissions from manifest file Change-Id: I99b5f09449aacfb7eb9a5771e446df75956a9827 CRs-Fixed: 1034202
* Snap: Fix bad merge of "Fixed M permission issue"Michael Bestas2016-08-211-7/+7
| | | | Change-Id: I493cac1abc38323a4f91506898d25b4f9aea1c79
* SnapdragonCamera: Remove custom location permission request windowJay Wang2016-08-181-0/+34
| | | | | | | | When user enables the GPS locaion setting, use Android's run-time permission request interface to get the permission. Change-Id: Ib17171aeff5ccf20e2b00da08243dee1a3383611 CRs-Fixed: 1038039
* Minimum viable Android M runtime permissions handling for H.zafir2016-08-181-3/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creates new activity for permissions handling: both checking for permissions and handling error condition when critical permissions are not present. The reason for creating a new activity is so the app does not attempt to continue executing OnCreate, OnResume etc, which opens the camera while the dialogs are showing. This should not slow the app down because the permissions activity will only run when a) the first time the app has insufficient permissions and b) when a critical permission is missing and the app needs to shut down. Bug: 21273463 CRs-Fixed: 1019847 Change-Id: I603acfb3057ba26b9cfa7935eb4cb24b5d547cb5 (cherry picked from commit ad44cda82fe6ec5ee090115129223c6314f9e1bb) Fixes to M permissions. Previously, we called PermissionsActivity with startActivityForResult(). However, this creates race conditions as we check for permissions and the CameraActivity continues to operate. Now, we end CameraActivity and launch a new instance upon successful permissions resolution. We can also put the preload filmstrip logic back in its original place in onCreate. The checks for permissions happen in both onCreate and onResume. Bug: 22442745, 22478144, 22497152 CRs-Fixed: 1019847 Change-Id: I82e9125a46581db44aa61d4ee94aec5a820e9df0 (cherry picked from commit ac0e2425e77a9b69e76d2f31876798825ea44584) SnapdragonCamera: Fixed M permission issue - Resolved NPE while sending permission request - Made change to request non-critical permissions once only, but the critical permssions all th time. - Removed unused contant defines CRs-Fixed: 1019847 Change-Id: Ib997244cbcc041d86c094c7ee7a902bff56e92ad snap: Remove platform signature * We are using runtime permissions now. Change-Id: I3386214dbbc0915251941ef490e7cbaf27e6ed45
* SnapdragonCamera: Adjusting view initializationJack Yoo2016-08-141-8/+3
| | | | | | | | Instead of removing and adding the entire root view, changing only core surface view on module change. Change-Id: I5c39cf23b2a58280f4e4e8484865bbed0b12e1cf CRs-Fixed: 979254
* Snap: Remove storage menu if no external storage availablemaxwen2016-08-101-0/+1
| | | | | Change-Id: I9807c7f9303f17eb971ff1a82fbd35dfbdbfa529 Signed-off-by: Zdrowy Gosciu <ZdrowyGosciu+GITHUB@gmail.com>
* Fix android.process.media got killed when capturezfu2016-08-031-0/+5
| | | | | | | | | | | | android.process.media has a very low priority as Cached app in background. When snapdragon camera using ContentResolver and do query/updating it will promot to foreground priority, but there may have some race condition that lmk in the progress to kill media, and AMS want set to foreground. So, keep this process as foreground during the whole ActivityLife time, by hold a query cursor onCreate and destory onStop. CRs-Fixed: 984061 Change-Id: I530fddfa240030ad84dc09b599ad783f6a2f21e0
* SnapdragonCamera: Handle startPreview exception in camera.Sanjeev Garg2016-08-031-0/+9
| | | | | | | | | | If any exception occurs in start preview then camera app should handle this exception and should display error pop-up and exit gracefully. CRs-Fixed: 919778 Change-Id: I80b60224d5d47a96dad78c40f8a23e3e9be45e65
* SnapdragonCamera: Reset navigation bar state whenever screen turns onByunghun Jeon2016-08-031-0/+7
| | | | | | | Reset navigation bar state whenever screen turns on Change-Id: Ic1021322e33cf116706c533edaac0f28396fa631 CRs-Fixed: 887673
* SnapdragonCamera: Fix the preview thumbnail issuelikaid2016-08-031-0/+2
| | | | | | | | | | | | | When set the preview thumbnail imageView to visible, it used the drawable resource in cache which was set since last time. That caused we still could see the preview thumbnail though the bitmap was invalid. Clear the drawable resource in cache when the preview thumbnail is invalid. Change-Id: Id37620d32b8dff8dd3cad0f33da678b8709e6ee1 CRs-Fixed: 899905
* SnapdragonCamera: Fix display smaller thumbnail on panorama previewlikaid2016-08-031-0/+14
| | | | | | | | | | | The preview thumbnail size is calculated according to the captured image size. When capture panorama image with landscape, the height of the image will be too small to fill the thumbnail view. Enlarge the bitmap to the thumbnail size if it is not large enough. Change-Id: I65afcdf2943eed4526639ff418b929e6450711b5 CRs-Fixed: 868550
* Snap: Check photo orientation when creating thumbnailZdrowy Gosciu2016-06-081-1/+1
| | | | | Change-Id: I839b20a3b8a7a52a4c8005dce4b37732d4f43f75 Signed-off-by: Zdrowy Gosciu <ZdrowyGosciu+GITHUB@gmail.com>
* Snap: Only override power keyScott Mertz2016-05-311-2/+2
| | | | | | | | Partially revert "Snap: Use new window manager flag for prevent system keys." CYNGNOS-2958 Change-Id: I1e726aa77a6db17c8586c19ddc3b9b31b4077194
* SnapdragonCamera: Fix the memory leak on view.Jack Yoo2016-05-261-28/+49
| | | | | | | | Keep using modules instead of creating. Don't remove the view without cleaning it. Change-Id: I260a660cac3d770f7d02dfdc1881e15490da66a0 CRs-Fixed: 958510
* Snap: Use new window manager flag for prevent system keys.Adnan Begovic2016-05-231-2/+2
| | | | | Change-Id: I94ed12ddd33729a4fb486f7fb68f1bbab788b239 TICKET: FEIJ-522
* Snap: Extend user menu, disable dev menucodeworkx2016-05-141-0/+4
| | | | Change-Id: Iaa64372e5d196fd0117a32a386686bdb1fd51e45
* Snap: Fall back to REVIEW intent before VIEW intentEthan Chen2016-03-251-1/+15
| | | | Change-Id: Ie8f1dac602957cb871d0f8c7043ac0f434f4bfac
* Snap: Don't crash when hardcoded gallery intent failsEthan Chen2016-02-011-8/+16
| | | | | | | * startActivity may also throw IllegalArgumentException in addition to ActivityNotFoundException when the component can't be found. Change-Id: Ia3124591c625f4c249f3c6f76a226e8178df6e9d
* CameraActivity: Don't hide navigation barDanny Baumann2016-01-151-3/+7
| | | | | | * Make it transparent instead. Change-Id: I08b06ac72d88aaf62ae7f52a3dde9ba865bc3542
* SnapdragonCamera: fix thumbnail displayLikai Ding2016-01-141-2/+4
| | | | | | | | | | | Thumbnail image is usually larger than needed due to the choice of down-sampling factor. When the decoded bitmap is square, it's width and height is not correctly set in CircularDrawable, so only the left-top part of the cropped image is shown. Set the size and only decode exactly the region for display. Change-Id: I5f4af66a08f0dc02d84bda605b74c9e2b782fe63 CRs-Fixed: 881895
* Snap: Remove dead codeMichael Bestas2016-01-091-25/+0
| | | | | | | | | | * Remove non-standard video resolutions. * Revert "camera: override shutter sound volume" commit 8a50cda8f72738e943904fdf7cae189b2b0a8ea8. Adapted from CodeAurora commit 000c6fa3b5c95297496e0ae077030132409871ea Change-Id: I167ab5ff399c4f1d306a1a7ddf94896565c9625a
* 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
* 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: Don't display metadata in paused stateEmilian Peev2016-01-071-1/+4
| | | | | | | | | | | | | | | | The media metadata retrieval is executed in separate 'async' thread. Once done an UI dialog is generated using the resulting data. A race condition is possible when the query thread is triggered and the activity itself is paused. If the task finishes after the application is no longer running, then the UI dialog box sequence can lead to a runtime exception. To resolve this an additional check is needed which will skip the metadata display step in case the applicaiton is already paused. Change-Id: I8ed5f9b54575278f337d720f997ee649cee3f2f6
* init SDCard, fix nullptrcodeworkx2016-01-051-0/+5
| | | | Change-Id: I250664867c54a880bad63275b3c0300d8733c5af
* SnapdragonCamera: Fix compilationShuzhen Wang2016-01-021-1/+8
| | | | | | | | | | 1. Address compilation due to compiler upgrade. 2. Comment out video dependencies to enable camera. 3. Fix compilation issue due to IMountService interface change. 4. Comment out ExtendedFace. 5. Remove non-standard video resolutions. Change-Id: I167ab5ff399c4f1d306a1a7ddf94896565c9625a
* Camera2: Add option to set max screen brightnessMichael Bestas2015-09-171-0/+20
| | | | | | * Set maximum screen brightness while the user is inside the camera app Change-Id: I8b16ba47a933bc7d6b0c1cd62bfd6ca54875ce1e
* Camera: Handle keys only while in appMichael Bestas2015-09-171-1/+10
| | | | | | Thanks to Lars Greiss (SlimRoms) Change-Id: I63f757d25260fba4683f494f8b4daf178a2b4e13
* Camera: Cleanup hardware key handlingMichael Bestas2015-09-171-1/+3
| | | | | | | | | | | | | | | | | * 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
* Camera: Powerkey shutter (2/2)Michael Bestas2015-09-171-0/+16
| | | | | | | | | | | | | | Ported from cm-10.1 Including cm-10.1 camera commit: aa4ae80a41fbab763891c5ef6d67a9e5b4bb981b Don't mess around with pref local ID for power shutter initialization. Includes http://review.cyanogenmod.org/56986 [mikeioannina]: Updates for L Signed-off-by: Michael Bestas <mikeioannina@gmail.com> Change-Id: I0992baa558eefd306d00fbece59cb5c512d9448b
* SnapdragonCamera: remove nav bar to enable full screen previewByunghun Jeon2015-08-031-5/+10
| | | | | | | Remove the navigation bar in order to take advantage of full screen. Change-Id: I25f42af825c4f3b7ad6521c2ee6d62fa4219044a CRs-Fixed: 865254
* SnapdragonCamera: Gallery2 Can't show the newest picturelikaid2015-04-081-0/+2
| | | | | | | | | | Camera give Gallery2 the newest picture's index is wrong in RTL mode. Give Gallery2 the correct index. Change-Id: Ie0f3835f0a9ab46b408ffe0b4ea5dd60906267e0 CRs-Fixed: 816284
* SnapdragonCamera: Update the storage space status after remount SDcardlikaid2015-03-201-0/+20
| | | | | | | | Add broadcast receiver to monitor SDcard status, update the storage space and hint when the SDcard was mounted or unmounted. Change-Id: I4b114d42d26091588d745fee874c04d595d5cfa1 CRs-Fixed: 790983
* SnapdragonCamera: Allow edit in Gallery2 if launched from SnapcamByunghun Jeon2015-02-241-0/+5
| | | | Change-Id: I67afa657adfc137a70f0c5d8d831bc2b0cbdaaeb
* Merge "SnapdragonCamera: Fix play the video directly when goto gallery"bait_dispatcher_monitor_system2015-02-191-2/+14
|\
| * SnapdragonCamera: Fix play the video directly when goto gallerylikaid2015-02-171-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | When clicked the preview thumbnail of a video, Camera launched Gallery with the action Intent.ACTION_VIEW, it caused Gallery play the video directly after Gallery started. Set the action Intent.ACTION_MAIN when launched Gallery. Change-Id: I74c9fc7b66a8ddb5fd06ceba5a0bd370e97b1154 CRs-Fixed: 794309 (cherry picked from commit 4c0d475c7d3be21487a34491a0072918dbbac230)
* | SnapdragonCamera: circular thumbnail iconLikai Ding2015-02-171-37/+179
|/ | | | | | | | | | 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)
* SnapdragonCamera: Wake up screen when invoke camera by gesturelikaid2015-02-131-19/+31
| | | | | | | | | | | The screen didn't wake up when invoked camera by gesture on dark screen, which caused the camera view couldn't be shown successfully. Acquire a wake lock at the beginning of onCreate, to make sure the screen could be lighten up, release the lock in onDestroy. Change-Id: I081c1e8a02d9eee18e6f33b2e6535a777feb1348 CRs-Fixed: 788479
* Merge "SnapdragonCamera: Fix NPE in SnapdragonCamera during monkey test"Linux Build Service Account2015-02-091-0/+4
|\
| * SnapdragonCamera: Fix NPE in SnapdragonCamera during monkey testkaiyiz2015-01-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | The mineType will be null if get it from an invalid uri, this may happen when delete a video very quickly after taken it and back to Camera, the video data has already gone before notifyNewMeida called. Add null pointer check before use mimeType to avoid the NPE. Change-Id: I6021faf2d4016e258153f0a75419f01fdfd7ed6c CRs-Fixed: 784389
* | Camera2: Change into full screen mode when return to camera previewlikaid2015-02-051-0/+1
| | | | | | | | | | | | | | | | | | | | The screen size didn't change when return from FilmStripView to camera preview, that caused the camera preview was in mini screen. Go to full screen when the current view is camera preview. Change-Id: Ib7153335670ad8596222e3b340861508767c1fb2 CRs-Fixed: 790334