diff options
-rw-r--r-- | res/values/config.xml | 3 | ||||
-rw-r--r-- | src/com/android/camera/PhotoModule.java | 16 |
2 files changed, 18 insertions, 1 deletions
diff --git a/res/values/config.xml b/res/values/config.xml index 5676755c1..268475a2e 100644 --- a/res/values/config.xml +++ b/res/values/config.xml @@ -61,4 +61,7 @@ <!-- Enable support for LGE HDR --> <bool name="lge_hdr_mode">false</bool> + + <!-- Set this to true to use device manufacturer and model for exif --> + <bool name="override_maker_and_model_tag">false</bool> </resources> 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. |