diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2017-01-05 13:57:26 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-01-05 13:57:26 -0800 |
commit | 2228b65de460d7dad2fffcf1f97f78ee741fe3a9 (patch) | |
tree | 1738fe2d3ac39c4ff61c6d9faf461d68736abb9a /src/com/android/camera/imageprocessor | |
parent | 3aa330d614ca2d0f4c4f64d3f727278ead3b69e7 (diff) | |
parent | 929d67931a209e6830b8b83d9a2a0f3dbd38c841 (diff) | |
download | android_packages_apps_Snap-2228b65de460d7dad2fffcf1f97f78ee741fe3a9.tar.gz android_packages_apps_Snap-2228b65de460d7dad2fffcf1f97f78ee741fe3a9.tar.bz2 android_packages_apps_Snap-2228b65de460d7dad2fffcf1f97f78ee741fe3a9.zip |
Merge "SnapdragonCamera: add features for 3rd-party apps" into camera.lnx.1.0-dev.1.0
Diffstat (limited to 'src/com/android/camera/imageprocessor')
-rwxr-xr-x[-rw-r--r--] | src/com/android/camera/imageprocessor/PostProcessor.java | 31 | ||||
-rwxr-xr-x[-rw-r--r--] | src/com/android/camera/imageprocessor/filter/BestpictureFilter.java | 3 |
2 files changed, 29 insertions, 5 deletions
diff --git a/src/com/android/camera/imageprocessor/PostProcessor.java b/src/com/android/camera/imageprocessor/PostProcessor.java index ed606e89e..3d4a59462 100644..100755 --- a/src/com/android/camera/imageprocessor/PostProcessor.java +++ b/src/com/android/camera/imageprocessor/PostProcessor.java @@ -363,6 +363,7 @@ public class PostProcessor{ } public boolean takeZSLPicture() { + mController.setJpegImageData(null); ZSLQueue.ImageItem imageItem = mZSLQueue.tryToGetMatchingItem(); if(mController.getPreviewCaptureResult() == null || mController.getPreviewCaptureResult().get(CaptureResult.CONTROL_AE_STATE) == CameraMetadata.CONTROL_AE_STATE_FLASH_REQUIRED) { @@ -968,6 +969,16 @@ public class PostProcessor{ mOrientation, null, mediaSavedListener, contentResolver, "jpeg"); } bytes = nv21ToJpeg(resultImage, mOrientation, waitForMetaData(0)); + if (mController.getCurrentIntentMode() == + CaptureModule.INTENT_MODE_CAPTURE) { + mController.setJpegImageData(bytes); + if (mController.isQuickCapture()) { + mController.onCaptureDone(); + } else { + mController.showCapturedReview( + bytes, mOrientation, isSelfieMirrorOn()); + } + } mActivity.getMediaSaveService().addImage( bytes, title, date, null, resultImage.outRoi.width(), resultImage.outRoi.height(), mOrientation, null, mediaSavedListener, contentResolver, "jpeg"); @@ -1034,11 +1045,21 @@ public class PostProcessor{ image.getPlanes()[0].getBuffer().get(bytes, 0, size); ExifInterface exif = Exif.getExif(bytes); int orientation = Exif.getOrientation(exif); - mActivity.getMediaSaveService().addImage( - bytes, title, date, null, image.getCropRect().width(), image.getCropRect().height(), - orientation, null, mController.getMediaSavedListener(), mActivity.getContentResolver(), "jpeg"); - mController.updateThumbnailJpegData(bytes); - image.close(); + if (mController.getCurrentIntentMode() != CaptureModule.INTENT_MODE_NORMAL) { + mController.setJpegImageData(bytes); + if (mController.isQuickCapture()) { + mController.onCaptureDone(); + } else { + mController.showCapturedReview(bytes, + orientation, isSelfieMirrorOn()); + } + } else { + mActivity.getMediaSaveService().addImage( + bytes, title, date, null, image.getCropRect().width(), image.getCropRect().height(), + orientation, null, mController.getMediaSavedListener(), mActivity.getContentResolver(), "jpeg"); + mController.updateThumbnailJpegData(bytes); + image.close(); + } } }); } diff --git a/src/com/android/camera/imageprocessor/filter/BestpictureFilter.java b/src/com/android/camera/imageprocessor/filter/BestpictureFilter.java index fcb4a4900..bf1852450 100644..100755 --- a/src/com/android/camera/imageprocessor/filter/BestpictureFilter.java +++ b/src/com/android/camera/imageprocessor/filter/BestpictureFilter.java @@ -220,6 +220,9 @@ public class BestpictureFilter implements ImageFilter { @Override public boolean isSupported() { + if (mModule.getCurrentIntentMode() != CaptureModule.INTENT_MODE_NORMAL) { + return false; + } return mIsSupported; } |