summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKetut Putu Kumajaya <ketut.kumajaya@gmail.com>2016-04-25 22:46:06 +0700
committerArne Coucheron <arco68@gmail.com>2018-01-26 01:03:45 +0100
commit7da308fe23a4c6020a9730e6683b3023a57b93a9 (patch)
tree8e972e4ba462b29a411891b610cdc7ac67b98049 /src
parent646a2f3266c53ec004cd52aa6bddb60faf897932 (diff)
downloadandroid_packages_apps_Snap-7da308fe23a4c6020a9730e6683b3023a57b93a9.tar.gz
android_packages_apps_Snap-7da308fe23a4c6020a9730e6683b3023a57b93a9.tar.bz2
android_packages_apps_Snap-7da308fe23a4c6020a9730e6683b3023a57b93a9.zip
Snap: Support override maker and model exif tag
Camera HAL not always return proper values Change-Id: Id81fe40ac84b0ffb70560e55077d90544139e463
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/PhotoModule.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 4e852419c..d769f8bca 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -1430,6 +1430,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 == CameraInfoWrapper.CAMERA_SUPPORT_MODE_ZSL) {
@@ -1517,7 +1532,6 @@ public class PhotoModule
}
}
if (!mRefocus || (mRefocus && mReceivedSnapNum == 7)) {
- ExifInterface exif = Exif.getExif(jpegData);
int orientation = Exif.getOrientation(exif);
if(mCameraId == CameraHolder.instance().getFrontCameraId()) {
IconListPreference selfieMirrorPref = (IconListPreference) mPreferenceGroup