diff options
author | Camera Software Integration <camswint@localhost> | 2016-10-03 10:13:39 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-10-03 10:13:39 -0700 |
commit | d1e00416950410d7e9f515bc619536e2a6f19ff5 (patch) | |
tree | f06ab349f7fae5884772c025368fb81d8bbb9533 /src/com | |
parent | ebf4ffc31a8edf99e14984c506231cdc4b2fd332 (diff) | |
parent | 7d9eb158ed637e5cc8fc446fa1266f07ffb04ba9 (diff) | |
download | android_packages_apps_Snap-d1e00416950410d7e9f515bc619536e2a6f19ff5.tar.gz android_packages_apps_Snap-d1e00416950410d7e9f515bc619536e2a6f19ff5.tar.bz2 android_packages_apps_Snap-d1e00416950410d7e9f515bc619536e2a6f19ff5.zip |
Merge "SnapdragonCamera: support lower resolutions for Clearsight" into camera.lnx.1.0.c7-dev
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/camera/CaptureModule.java | 19 | ||||
-rw-r--r-- | src/com/android/camera/util/CameraUtil.java | 15 |
2 files changed, 19 insertions, 15 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 00fb6f161..dee264ebc 100644 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -176,6 +176,9 @@ public class CaptureModule implements CameraModule, PhotoController, public static CaptureRequest.Key<int[]> JpegCropRectKey = new CaptureRequest.Key<>("org.codeaurora.qcamera3.jpeg_encode_crop.rect", int[].class); + public static CaptureRequest.Key<int[]> JpegRoiRectKey = + new CaptureRequest.Key<>("org.codeaurora.qcamera3.jpeg_encode_crop.roi", + int[].class); public static CameraCharacteristics.Key<Byte> MetaDataMonoOnlyKey = new CameraCharacteristics.Key<>("org.codeaurora.qcamera3.sensor_meta_data.is_mono_only", Byte.class); @@ -1339,7 +1342,7 @@ public class CaptureModule implements CameraModule, PhotoController, if (isClearSightOn()) { if(i == getMainCameraId()) { - ClearSightImageProcessor.getInstance().init(mPictureSize.getWidth(), + ClearSightImageProcessor.getInstance().init(map, mPictureSize.getWidth(), mPictureSize.getHeight(), mActivity, mOnMediaSavedListener); ClearSightImageProcessor.getInstance().setCallback(this); } @@ -3426,20 +3429,6 @@ public class CaptureModule implements CameraModule, PhotoController, return mUI.getTrackingFocusRenderer(); } - /** - * Compares two {@code Size}s based on their areas. - */ - static class CompareSizesByArea implements Comparator<Size> { - - @Override - public int compare(Size lhs, Size rhs) { - // We cast here to ensure the multiplications won't overflow - return Long.signum((long) lhs.getWidth() * lhs.getHeight() - - (long) rhs.getWidth() * rhs.getHeight()); - } - - } - private class MyCameraHandler extends Handler { public MyCameraHandler(Looper looper) { diff --git a/src/com/android/camera/util/CameraUtil.java b/src/com/android/camera/util/CameraUtil.java index 172a54582..eb237b8a4 100644 --- a/src/com/android/camera/util/CameraUtil.java +++ b/src/com/android/camera/util/CameraUtil.java @@ -61,12 +61,14 @@ import com.android.camera.CameraManager; import com.android.camera.CameraSettings; import com.android.camera.ui.RotateTextToast; import com.android.camera.util.IntentHelper; + import org.codeaurora.snapcam.R; import java.io.Closeable; import java.io.IOException; import java.lang.reflect.Method; import java.text.SimpleDateFormat; +import java.util.Comparator; import java.util.Date; import java.util.List; import java.util.Locale; @@ -1227,4 +1229,17 @@ public class CameraUtil { } return ".3gp"; } + + /** + * Compares two {@code Size}s based on their areas. + */ + public static class CompareSizesByArea implements Comparator<android.util.Size> { + + @Override + public int compare(android.util.Size lhs, android.util.Size rhs) { + // We cast here to ensure the multiplications won't overflow + return Long.signum((long) lhs.getWidth() * lhs.getHeight() - + (long) rhs.getWidth() * rhs.getHeight()); + } + } } |