summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Revert "SnapdragonCamera: Adding PRIVILEGED true""Arne Coucheron2017-07-281-0/+1
| | | | | | | | Breaks external storage access. This reverts commit bbb6ee12f99d32e4ce04670f1edf3fa484c0d401. Change-Id: I5b3c47a5b189fcb1592964c5eddafb49365c1571
* Revert "SnapdragonCamera: Adding PRIVILEGED true"Michael W2017-07-271-1/+0
| | | | | | | | | | | | | | This reverts commit 382e2cb9c930a129aca9e83315660e8172786fb4. * The original commit was a quick way to get the needed permissions without adding the support for runtime permissions, which are now handled. * this kind of app is not expected to be a privileged app and as consequence it ends up running in the wrong SElinux context -> Fixes taking and cropping user images Change-Id: Ic585d232ada6dcba208fcb49634e46806e4b954f
* Automatic translation importAbhisek Devkota2017-07-251-1/+1
| | | | Change-Id: I66f08baf3ac80196ad15608f9135be03cca77f08
* Automatic translation importAbhisek Devkota2017-07-227-31/+55
| | | | Change-Id: Icdce2bea8b9c08750080cae6265f7fda4fa25750
* Revert some permissions related changesGabriele M2017-07-132-4/+1
| | | | | | | | | | | | | These permissions are not required, so remove them. Since we no longer declare their use, go back to the default signing key. This will allow to disable the Snap from the settings. This reverts the following commits: 53e8b4a71dd0515d922964 ("SnapdragonCamera: Add missing permissions") bd1d6ea46043e54feca758 ("Snap: Sign with platform key") Change-Id: I54add5781555f1672918817825ea97c8b51e8ded
* Add overlay for restarting camera preview for additional camerasLuK13372017-07-122-1/+9
| | | | Change-Id: I95eb7237b101b73d66fe231a11d0c8d5156bfe47
* Automatic translation importAbhisek Devkota2017-06-303-0/+24
| | | | Change-Id: Ic79a8add4c98da08a78fc096682d8fc6617f5760
* Automatic translation importAbhisek Devkota2017-06-225-380/+392
| | | | Change-Id: Iae1d2c6d377b203ec8905d52815510c616f2f1d9
* SnapdragonCamera: Fix ghosting when non-zsl in VGA/QVGA sizemingwax2017-06-132-44/+43
| | | | | | | | | | (1) Increase the size of the preivewSize according to the ratio of the pictureSize. (2) Change the mVideoSnapshotSize from the mPictureSize to mVideoSize. (3) Reconstruction the getMaxPictureSizeLessThan4K method. CRs-Fixed: 1116242 Change-Id: Ic7dbab23fd0ee083cd38818fa39f4893de7c1d24
* SnapdragonCamera: Fix live shot image stretch when recording is 4Kmingwax2017-06-131-1/+7
| | | | | | | | | When the video is seted 4K UHD, the mVideoSnapshotSize should be setted the similar aspect ratio to ensure the picture which live shotted is not stretched. CRs-Fixed: 2012167 Change-Id: I15d139c6d558923d6b4a32ee3613c44c7a974129
* SnapdragonCamera: Fix photo reversed when enable selfie Mirrormingwax2017-06-131-3/+1
| | | | | | | | | | | When camera is opened with front camera, enable SelfieMirror in horizontal screen. When jpegData`s exif `s orientation is enabled, set the image rotation angle of 180 degrees to ensure the picture is right direction. SDM660 installed front camera is 270 degree. MSM8998 installed front camera is 90 degree. CRs-Fixed: 1112749 Change-Id: I350f588142215e7b0793d1aa6dc573bad239baac
* SnapdragonCamera: Fix photo reversed when enable selfie Mirrormingwax2017-06-131-3/+8
| | | | | | | | | When camera is open front camer, and is in horizontal screen mode enable Selfie Mirror, set the image rotation angle of 180 degrees, to ensure the picture is right direction. CRs-Fixed: 1112749 Change-Id: I9b53804b7897f174c537693ff59db96df858e71d
* SnapdragonCamera: Fix preview in wrong sizejunjiez2017-06-131-0/+3
| | | | | | | | | After setPreviewSize() is called, the size of the preview is not changed, need to invoke showSurfaceView to make it update. Change-Id: I67215bcce77c1016a0dfd66d100dcd251597af78 CRs-Fixed: 1105422
* SnapdragonCamera: Fix front camera preview flippedjunjiez2017-06-132-0/+12
| | | | | | | | Modidfy render script to implement new flip way according to the front camera mounting position. Change-Id: I5681447aa17c0499bcb7dc47eef6d4793ee68818 CRs-Fixed: 1097179
* SnapdragonCamera: Fix preview is flipped on 8996junjiez2017-06-132-6/+23
| | | | | | | | Modidfy render script to implement flip another way not 90 according to the camera mounting position. Change-Id: Id6b305fd2b00bc4193f1ba73d4253794e04ee3a6 CRs-Fixed: 1087483
* SnapdragonCamera: Camera1 Selfie Mirror orientation checkJack Yoo2017-06-131-5/+20
| | | | | | | Checking the case that front facing camera is 90 instead of 270. Change-Id: I75319db771057d64d1a21a1de825edd54af83982 CRs-Fixed: 1072060
* SnapdragonCamera: Fix Camera1 force close when refocusing the picture.pezhan2017-06-131-3/+17
| | | | | | | | | | | | When the screen is PORTRAIT mode, we get the screen always height < width. But we get the image always height < width.Under this circumstance, the inSampleSize maybe incorrect , which will cause OOM when create bitmap. Need to check the screen's orientation,and choose the correct width and height to calculate the inSampleSize. Change-Id: I11743c862ebdb9d35c4fc5de7bf40003c69b7219 CRs-Fixed: 2013250
* SnapdragonCamera: Change video snapshot picture size logicByunghun Jeon2017-06-132-15/+16
| | | | | | | | Remove auto video snapshot size menu and use picture size setting instead. In case of 4k, use one that is smaller than 4k. Change-Id: Ic8ab193055afa0f571c73a074d346c2a9f8dbacd CRs-Fixed: 1066519
* SnapdragonCamera: Avoid cancel AF shortly after triggerjunjiez2017-06-131-1/+1
| | | | | | When it's focusing, don't cancel auto foucus. Change-Id: Ib1d660ac6a99da56d70cf437dad3126a641956d1
* SnapdragonCamera: Fix crash during UI stress testjuwei2017-06-133-0/+12
| | | | | | | | | | | | CaptureModule and CaptureUI have register listeners in SettingsManager, but forget unregiseter when UI destroy. This makes the too many RenderNode objects exist and never GC. At last, the weak reference of RenderNode at native layer exceed the 51200 limitation and crash. Unregister the listener of SettingsManager will fix it. Change-Id: I2aca795c813177fd34ed18e88f5c9b929a749bff CRs-Fixed: 1103907
* SnapdragonCamera: Fix OutOfBoundsException in monkey testmingwax2017-06-131-0/+3
| | | | | | | | | | | | | In monkey test, set defaultValue operation in xml file, parsing XML in framework code, pref.getValue() return null when defaultValue not ready. When findIndexOfValue() failed to get the index of the value, it will return -1, but -1 can`t be the index of the array, it will cause exception. So if can`t find the index of the value, just go back and don`t execute the following code. Change-Id: I2b5595d7d558e3ab3863287e3d1424df141c5d59 CRs-Fixed: 1063228
* SnapdragonCamera: Fix FC for NullPointerExceptionmingwax2017-06-131-0/+13
| | | | | | | | | | | | | Permission without the case of granted, through the mms to add attachments to enter the Camera, it will lead to call two times PermissionActivity, which led to FC and the wrong interface. Add a logical judgment to call one time PermissionActivity Change-Id: I8b3f287eecb1dfc8f8c5a26a9f0b9dbe187d8ce6 CRs-Fixed: 1069373
* SnapdragonCamera: Reset zoom value when resumingByunghun Jeon2017-06-131-0/+1
| | | | | | When pause/resuming, reset zoom value to default value Change-Id: Ib1313009cfd8c44daa2032d20da863fe10eeddf0
* SnapdragonCamera: Fix capture with flash will get black image.qimengp2017-06-131-2/+0
| | | | | | Remove CONTROL_AF_STATE_PASSIVE_FOCUSED to make sure AF is ready Change-Id: I581480e5a3f1a40062140eeed0c26d769c60e4db
* SnapdragonCamera: Fix FC cause by Null pointerqimengp2017-06-131-0/+6
| | | | | | | | | | When clearSight is failed, handleTimeout() is invoked to reset clearsight Engine, but ClearsightProcessHandler is still working and try to access null pointer object. By adding protect of null pointer can fix this issue. Change-Id: I4722721f3715077ec8303c4d14693ae4c1484420
* SnapdragonCamera: Make copy of location before altering timestampJay Wang2017-06-131-1/+3
| | | | | | | | Make a copy of saved location object before altering timestamp since we may end up re-using the same location object down the line. CRs-Fixed: 1007285 Change-Id: Ifa8b7cd3ecfe2dede5cfa155818f48f51f4405f1
* Snap: Sign with platform keyArne Coucheron2017-06-131-0/+2
| | | | | | | PackageManager: Not granting permission android.permission.INTERACT_ACROSS_USERS_FULL to package org.cyanogenmod.snap (protectionLevel=258 flags=0x3858bc45) PackageManager: Not granting permission android.permission.SET_ORIENTATION to package org.cyanogenmod.snap (protectionLevel=2 flags=0x3858bc45) Change-Id: I088ea4ee72c82732f372b1d698c9c046076cd499
* Add orientation correction for landscape devicesandralex82017-06-125-6/+23
| | | | | | | | | | | | | Snap does not correctly handle devices with a landscape screen as rotation is 0 when device is in landscape while Snap assume that 0 is portrait. This lead to a rotated gui and a deformed preview. This commit: - Solve the gui rotation for Photo, Video and Panorama modules - Solve the deformed preview for Photo and Video (Panorama preview was ok with gui fix) - Solve the PhotoMenu rotation (all devices, it was also broken on portrait devices) Change-Id: Ic0b95904da6e13946c7e46e2e571b26da498db02
* Snap: Simulate back button press when menu back button is pressedGabriele M2017-06-071-8/+2
| | | | | | | | | | | | Launching Gallery when the home button (shown as back button) is pressed makes no sense, especially because it's only shown in Snap's own gallery. In addition to that, if Gallery is disabled, Snap closes itself. Fix both the issues by simply simulating a back button press when the menu back button is pressed. REGRESSION-607 Change-Id: I0b2b6ee074715e2866bcebb009118b8271b1efdf
* Automatic translation importAbhisek Devkota2017-05-311-0/+2
| | | | Change-Id: Icc291d4391d0b784b5876a6037c970f292066bae
* SnapdragonCamera: Fix torch mode with continuous shotJay Wang2017-05-301-9/+38
| | | | | | | | | Flash torch mode sometime doesn't work because the flash mode is overwritten by repeating preview request. To resolve the issue, re-configure the preview request with new flash mode. CRs-Fixed: 1077543 Change-Id: I614bac704562925cc843a9b8db2852c71368f4e5
* Revert "Snap: CaptureModule: lock exposure also when precapture trigger is ↵codeworkx2017-05-301-4/+1
| | | | | | | | started" This reverts commit 48f0e427c4d60f597235954d9bc910c5c8980dbe. Change-Id: Ie77b36e1770b2ce8999e3d98fb2cf811f2764fd1
* SnapdragonCamera: Camera2 force close after focusedweijiew2017-05-301-0/+1
| | | | | | | | | | Handler message leaks the camera id, the camera id is set to 0 when handleing Message.As we known, rear camera id is 0 and front camera id is 1. Focus action runs normall when switching to rear camera, but focus action will lead to force close when switching to fornt camera. Change-Id: I7795b7cd0c34c256d1ad0066d13a51ed54cec67d CRs-Fixed: 1094009
* SnapdragonCamera: GPS location can't be turn On in camera settingsweijiew2017-05-304-13/+18
| | | | | | | | | In Camera2, SharedPreferences persistes GPS location value by key(pref_camera2_recordlocation_key), but gets GPS location value by key(pref_camera_recordlocation_key). CRs-Fixed: 1088262 Change-Id: I33ddeb8f20fed03449bded2760c0ad1b8e36c91c
* Fixed camera crash on exitValerio Pilo2017-05-291-0/+7
| | | | | | | | | | | | | | | | This is just a copy of a fix already done long time ago (commit c3d5c2c5) only for videos, now also for photos. Original description follows: CameraNext: don't call Glide to load image after Camera exits There is a race condition where the filmstrip can still be trying to load a new image just as the camera exit, and Glide gets upset if it is handed a destroyed activity context to work with. So just check for that condition and go home. Change-Id: If7f2b2e4d23189d3c6876d47d5f2046d9e02c7b0
* Automatic translation importAbhisek Devkota2017-05-179-4/+104
| | | | Change-Id: Id0df8b8745242b9251b3c154fadfa32d76d1c661
* Snap: Fix crash switching from back to front cam in video modeArne Coucheron2017-05-081-0/+1
| | | | | | | | | | | | | | | | | | | | E CAM_VideoModule: startPreview paused=false device=false params=false E CAM_VideoModule: java.lang.Throwable E CAM_VideoModule: at com.android.camera.VideoModule.startPreview(VideoModule.java:1324) E CAM_VideoModule: at com.android.camera.VideoModule.switchCamera(VideoModule.java:3067) E CAM_VideoModule: at com.android.camera.VideoModule.onCameraPickerClicked(VideoModule.java:3251) E CAM_VideoModule: at com.android.camera.VideoMenu$4.onClick(VideoMenu.java:504) E CAM_VideoModule: at android.view.View.performClick(View.java:5637) E CAM_VideoModule: at android.view.View$PerformClick.run(View.java:22433) E CAM_VideoModule: at android.os.Handler.handleCallback(Handler.java:751) E CAM_VideoModule: at android.os.Handler.dispatchMessage(Handler.java:95) E CAM_VideoModule: at android.os.Looper.loop(Looper.java:154) E CAM_VideoModule: at android.app.ActivityThread.main(ActivityThread.java:6186) E CAM_VideoModule: at java.lang.reflect.Method.invoke(Native Method) E CAM_VideoModule: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) E CAM_VideoModule: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) Change-Id: I2005b09737fd4d739e1415a457b05d575da95582
* Automatic translation importAbhisek Devkota2017-04-282-0/+9
| | | | Change-Id: Id6f2f610fe04e653f02fa1a6ecb96c98cf471681
* Automatic translation importAbhisek Devkota2017-04-2025-9/+2149
| | | | Change-Id: I43a8bc820f65e167509af1f0899f63874676bbe5
* Fix some inconsistencies of the HDR buttonGabriele M2017-04-101-9/+12
| | | | | | | | | | | | Issues fixed: - The HDR button disappeared and never came back when switching from a camera without HDR support and one with HDR support. - The HDR button disappeared upon disabling HDR on a device without auto-HDR support. - The filter mode button was not re-enabled upon disabling HDR. Change-Id: Ie7dbf91efa2d6bffc810ca79c73bb0edaa8d56ca
* CameraControls: Toggle the status of disabled viewsGabriele M2017-04-101-3/+15
| | | | | | | | If we toggle the status of all the visible views, we might enable views that were disabled for some specific reason. Save the list of views that we disabled and re-enable only those views. Change-Id: I50fad8e93f89fd9e872ab2fb4f1cb6cd6c9c3f9f
* Never remove unsupported controlsGabriele M2017-04-102-14/+15
| | | | | | | | | | | | | | Different cameras support different features. If we remove certain controls because the current camera doesn't support them, they won't be available for the other camera once we switch to it, even if it supports them. Disable the controls instead of removing them. This completes commit a8285adbba49868378f795a6f37401b9334061c4 ("Snap: Fix effect and picture program overlay buttons") and also changes the way buttons are hidden so that each button stays in its initial position. Change-Id: I7af9655265163b00495af5aa0bb745aa4cc1ed47
* WideAnglePanoramaUI: Correctly position the progressbarGabriele M2017-04-101-4/+14
| | | | | | | | | The progressbar is not visible on devices with the navbar and the cancel button that appears when generating the final picture overlaps with the home button. Take into account the presence of the navbar when calculating the position of the progressbar. Change-Id: I81551477c426244531342e81c595ee020fe066c6
* Snap: CaptureModule: set switcher index on resumecodeworkx2017-04-091-0/+1
| | | | | | Fixes showing wrong drawable on module switcher when switching from other modules. Change-Id: Ia2a4971c79d13c12434a4abfbcf926ebd078172f
* Snap: CaptureUI: fix ModuleSwitcher being invisibleJay Wang2017-04-092-4/+46
| | | | Change-Id: If0a88140a1e73b3f8a7281274896af047af2abde
* CaptureUI: fix crash on setOrientationJay Wang2017-04-041-0/+2
| | | | | | Wrong child node Change-Id: I502eaaa5b011b6c07540032a56184af8e1757716
* Snap: Fix effect and picture program overlay buttonsDominggoes Isakh2017-04-041-2/+4
| | | | | | | | | | When you switch between front and back camera, the camera with the least features removes the overlay buttons causing the other camera not able to use the supported features. BUGBASH-320 Change-Id: I500d48c42ac5797aa1a44664f58057ad4f8189c3
* Always apply frame size reduction to panorama picturesGabriele M2017-04-042-8/+2
| | | | | | | | | | | | | | | | Panorama mode requires quite some memory, especially after the frame num bump done with commit aa0733567c30 ("Make panorama able to go 270 degrees in landscape"). Some devices run out of memory while taking a panorama picture and force close Snap before the picture is complete. We have a config to reduce the memory requirements that reduces the size of each frame, but it's applied only if ro.config.low_ram is true. Bump the default value to 100 and always respect it. Devices having ro.config.low_ram set to true will have to override this config from their device tree. BUGBASH-326 Change-Id: Ic6d24b17b2293adf8d715904c8c1874a4c624e99
* Never ignore finger swipes in gallery modeGabriele M2017-04-042-8/+0
| | | | | | | | | | | | | | Under certain conditions finger swipes are ignored. Steps to reproduce the bug: - Open left menu - Close menu choosing an option or tapping out of the preview - Tap preview of last picture in bottom left corner Swipes in the gallry should now be ignored until a right to left swipe is performed in the preview. Change-Id: I3928d84360266cca368265553a037192aa5d6780
* Fix record time sometimes not seencb2017-04-041-0/+1
| | | | Change-Id: I63a3df10c64a0141cfda161310c3a404349d5c70