summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorxianming wang <mingwax@codeaurora.org>2019-05-28 15:04:38 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2019-06-02 19:59:22 -0700
commitd43f6021c92a0ae14d9e23183e2456843a711dff (patch)
tree6e7ebc7a9bd100662446717eabeff7e1703f3325 /src
parent3bfd94586d35760af48588aa82a4549984ec1fcf (diff)
downloadandroid_packages_apps_Snap-d43f6021c92a0ae14d9e23183e2456843a711dff.tar.gz
android_packages_apps_Snap-d43f6021c92a0ae14d9e23183e2456843a711dff.tar.bz2
android_packages_apps_Snap-d43f6021c92a0ae14d9e23183e2456843a711dff.zip
SnapdragonCamera: Fix selfie mirror is not work in 3rd app
(1) App should use YUV_420_888 when enable selfie mirror. (2) App didn`t use HAL_ZSL when flash is ON. CRs-Fixed: 2457539 Change-Id: Idf87eebe3446b83550fae6856b5168be78757428
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/CaptureModule.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 9e340a022..3ea667626 100644
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -1899,12 +1899,11 @@ public class CaptureModule implements CameraModule, PhotoController,
private void takePicture() {
Log.d(TAG, "takePicture");
mUI.enableShutter(false);
- if ((mSettingsManager.isZSLInHALEnabled() &&
+ if ((mSettingsManager.isZSLInHALEnabled() || isActionImageCapture()) &&
!isFlashOn(getMainCameraId()) && (mPreviewCaptureResult != null &&
mPreviewCaptureResult.get(CaptureResult.CONTROL_AE_STATE) !=
CameraMetadata.CONTROL_AE_STATE_FLASH_REQUIRED &&
- mPreviewCaptureResult.getRequest().get(CaptureRequest.CONTROL_AE_LOCK) != Boolean.TRUE)) ||
- isActionImageCapture()) {
+ mPreviewCaptureResult.getRequest().get(CaptureRequest.CONTROL_AE_LOCK) != Boolean.TRUE)) {
takeZSLPictureInHAL();
} else {
if (isBackCamera()) {
@@ -3545,17 +3544,13 @@ public class CaptureModule implements CameraModule, PhotoController,
mFrameProcessor.onOpen(getFrameProcFilterId(), mPreviewSize);
}
- if(mPostProcessor.isZSLEnabled()) {
+ if(mPostProcessor.isZSLEnabled() && !isActionImageCapture()) {
mChosenImageFormat = ImageFormat.PRIVATE;
} else if(mPostProcessor.isFilterOn() || getFrameFilters().size() != 0 || mPostProcessor.isSelfieMirrorOn()) {
mChosenImageFormat = ImageFormat.YUV_420_888;
} else {
mChosenImageFormat = ImageFormat.JPEG;
}
- // if intent action is ACTION_IMAGE_CAPTURE, use HAL-ZSL to capture
- if (isActionImageCapture()) {
- mChosenImageFormat = ImageFormat.JPEG;
- }
setUpCameraOutputs(mChosenImageFormat);
}