diff options
author | Ketut Putu Kumajaya <ketut.kumajaya@gmail.com> | 2016-04-25 22:46:06 +0700 |
---|---|---|
committer | Ketut Putu Kumajaya <ketut.kumajaya@gmail.com> | 2016-05-01 23:12:38 +0700 |
commit | 35cf43e34c230f2a4cff1d147685c8da026d2b1f (patch) | |
tree | 23ec268258f00b4a1741072bda30cbcc57536649 /src/com/android/camera/PhotoModule.java | |
parent | cd544e6e0ea8c89a9c42f8e81b4a091dd2b0090f (diff) | |
download | android_packages_apps_Snap-35cf43e34c230f2a4cff1d147685c8da026d2b1f.tar.gz android_packages_apps_Snap-35cf43e34c230f2a4cff1d147685c8da026d2b1f.tar.bz2 android_packages_apps_Snap-35cf43e34c230f2a4cff1d147685c8da026d2b1f.zip |
Snap: Support override maker and model exif tag
Camera HAL not always return proper values
Change-Id: Id81fe40ac84b0ffb70560e55077d90544139e463
Diffstat (limited to 'src/com/android/camera/PhotoModule.java')
-rw-r--r-- | src/com/android/camera/PhotoModule.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java index 859f42f48..d48557d0c 100644 --- a/src/com/android/camera/PhotoModule.java +++ b/src/com/android/camera/PhotoModule.java @@ -1211,6 +1211,21 @@ public class PhotoModule mUI.setSwipingEnabled(true); } + ExifInterface exif = Exif.getExif(jpegData); + boolean overrideMakerAndModelTag = false; + if (mApplicationContext != null) { + overrideMakerAndModelTag = + mApplicationContext.getResources() + .getBoolean(R.bool.override_maker_and_model_tag); + } + + if (overrideMakerAndModelTag) { + ExifTag maker = exif.buildTag(ExifInterface.TAG_MAKE, Build.MANUFACTURER); + exif.setTag(maker); + ExifTag model = exif.buildTag(ExifInterface.TAG_MODEL, Build.MODEL); + exif.setTag(model); + } + mReceivedSnapNum = mReceivedSnapNum + 1; mJpegPictureCallbackTime = System.currentTimeMillis(); if(mSnapshotMode == CameraInfo.CAMERA_SUPPORT_MODE_ZSL) { @@ -1303,7 +1318,6 @@ public class PhotoModule } } if (!mRefocus || (mRefocus && mReceivedSnapNum == 7)) { - ExifInterface exif = Exif.getExif(jpegData); int orientation = Exif.getOrientation(exif); if (!mIsImageCaptureIntent) { // Burst snapshot. Generate new image name. |