summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/imageprocessor
diff options
context:
space:
mode:
authorWeijie Wang <weijiew@codeaurora.org>2017-07-13 19:54:35 +0800
committerWeijie Wang <weijiew@codeaurora.org>2017-07-13 19:54:35 +0800
commit5e69aa42e76b43e68bcf6373b6c18fc0e25ea3e0 (patch)
tree07e21f07fb4613887c352a687e4fc6351f71155b /src/com/android/camera/imageprocessor
parent2b2d7f4c6cffdc6ad6bc0b6ef459271291c99aea (diff)
downloadandroid_packages_apps_Snap-5e69aa42e76b43e68bcf6373b6c18fc0e25ea3e0.tar.gz
android_packages_apps_Snap-5e69aa42e76b43e68bcf6373b6c18fc0e25ea3e0.tar.bz2
android_packages_apps_Snap-5e69aa42e76b43e68bcf6373b6c18fc0e25ea3e0.zip
SnapdragonCamera: Add vendor tag util
Check if the tag is available before apply the settings Change-Id: Ic0242b8aa7711ad230f3aba9e30d5da61d188fe5
Diffstat (limited to 'src/com/android/camera/imageprocessor')
-rw-r--r--src/com/android/camera/imageprocessor/PostProcessor.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/com/android/camera/imageprocessor/PostProcessor.java b/src/com/android/camera/imageprocessor/PostProcessor.java
index 62aa75a4a..751007f41 100644
--- a/src/com/android/camera/imageprocessor/PostProcessor.java
+++ b/src/com/android/camera/imageprocessor/PostProcessor.java
@@ -77,14 +77,14 @@ import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
+import android.util.Size;
import java.util.TimeZone;
import java.util.concurrent.Semaphore;
import com.android.camera.imageprocessor.filter.ImageFilter;
import com.android.camera.util.CameraUtil;
import com.android.camera.util.PersistUtil;
-
-import android.util.Size;
+import com.android.camera.util.VendorTagUtil;
public class PostProcessor{
@@ -526,8 +526,8 @@ public class PostProcessor{
CaptureRequest.EDGE_MODE_HIGH_QUALITY);
builder.set(CaptureRequest.NOISE_REDUCTION_MODE,
CaptureRequest.NOISE_REDUCTION_MODE_HIGH_QUALITY);
- builder.set(CaptureModule.CdsModeKey, 2); // CDS 0-OFF, 1-ON, 2-AUTO
- builder.set(CaptureModule.JpegCropEnableKey, (byte)1);
+ VendorTagUtil.setCdsMode(builder, 2); // CDS 0-OFF, 1-ON, 2-AUTO
+ VendorTagUtil.setJpegCropEnable(builder, (byte)1);
Rect cropRect = image.getCropRect();
if(cropRect == null ||
cropRect.isEmpty()) {
@@ -539,9 +539,9 @@ public class PostProcessor{
float targetRatio = (float)targetWidth / (float)targetHeight;
cropRect = CameraUtil.getFinalCropRect(cropRect, targetRatio);
// has crop rect. apply to jpeg request
- builder.set(CaptureModule.JpegCropRectKey,
+ VendorTagUtil.setJpegCropRect(builder,
new int[] {cropRect.left, cropRect.top, cropRect.width(), cropRect.height()});
- builder.set(CaptureModule.JpegRoiRectKey,
+ VendorTagUtil.setJpegRoiRect(builder,
new int[] {0, 0, targetWidth, targetHeight});
Location location = mController.getLocationManager().getCurrentLocation();