From 5e69aa42e76b43e68bcf6373b6c18fc0e25ea3e0 Mon Sep 17 00:00:00 2001 From: Weijie Wang Date: Thu, 13 Jul 2017 19:54:35 +0800 Subject: SnapdragonCamera: Add vendor tag util Check if the tag is available before apply the settings Change-Id: Ic0242b8aa7711ad230f3aba9e30d5da61d188fe5 --- .../codeaurora/snapcam/filter/ClearSightImageProcessor.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/org/codeaurora/snapcam/filter') diff --git a/src/org/codeaurora/snapcam/filter/ClearSightImageProcessor.java b/src/org/codeaurora/snapcam/filter/ClearSightImageProcessor.java index b2a81389d..feb6693f2 100644 --- a/src/org/codeaurora/snapcam/filter/ClearSightImageProcessor.java +++ b/src/org/codeaurora/snapcam/filter/ClearSightImageProcessor.java @@ -87,7 +87,7 @@ import com.android.camera.PhotoModule.NamedImages.NamedEntity; import com.android.camera.SettingsManager; import com.android.camera.Storage; import com.android.camera.util.CameraUtil; - +import com.android.camera.util.VendorTagUtil; public class ClearSightImageProcessor { private static final String TAG = "ClearSightImageProcessor"; @@ -1082,7 +1082,7 @@ public class ClearSightImageProcessor { private void sendReprocessRequest(CaptureRequest.Builder reprocRequest, Image image, final int camType) { try { - reprocRequest.set(CaptureModule.JpegCropEnableKey, (byte)1); + VendorTagUtil.setJpegCropEnable(reprocRequest, (byte)1); Rect cropRect = image.getCropRect(); if(cropRect == null || @@ -1093,14 +1093,14 @@ public class ClearSightImageProcessor { cropRect = getFinalCropRect(cropRect); // has crop rect. apply to jpeg request - reprocRequest.set(CaptureModule.JpegCropRectKey, + VendorTagUtil.setJpegCropRect(reprocRequest, new int[] {cropRect.left, cropRect.top, cropRect.width(), cropRect.height()}); if(camType == CAM_TYPE_MONO) { - reprocRequest.set(CaptureModule.JpegRoiRectKey, + VendorTagUtil.setJpegRoiRect(reprocRequest, new int[] {0, 0, mFinalMonoSize.getWidth(), mFinalMonoSize.getHeight()}); } else { - reprocRequest.set(CaptureModule.JpegRoiRectKey, + VendorTagUtil.setJpegRoiRect(reprocRequest, new int[] {0, 0, mFinalPictureSize.getWidth(), mFinalPictureSize.getHeight()}); } -- cgit v1.2.3