summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Wang <jaywang@codeaurora.org>2016-05-09 14:57:25 -0700
committerSteve Kondik <steve@cyngn.com>2016-08-03 15:45:47 -0700
commita58a5375cb5b5879f6708c86cf161f06dbc6269d (patch)
treecdf9c2e991a082f9d63bbc18f6ed8ed6382c10bd
parent2a3c90cd9d2e0c539be226e39cfb0ab6eee9d6cd (diff)
downloadandroid_packages_apps_Snap-a58a5375cb5b5879f6708c86cf161f06dbc6269d.zip
android_packages_apps_Snap-a58a5375cb5b5879f6708c86cf161f06dbc6269d.tar.gz
android_packages_apps_Snap-a58a5375cb5b5879f6708c86cf161f06dbc6269d.tar.bz2
SnapdragonCamera: Add manufacture and model info
Manufacture and model information is added to the EXIF tag of saved panorama image file Change-Id: Ie5688032abc2278718dfcc0bf9129a35dedc7b8b CRs-Fixed: 1011930
-rw-r--r--src/com/android/camera/WideAnglePanoramaModule.java1
-rw-r--r--src/com/android/camera/exif/ExifInterface.java16
2 files changed, 17 insertions, 0 deletions
diff --git a/src/com/android/camera/WideAnglePanoramaModule.java b/src/com/android/camera/WideAnglePanoramaModule.java
index e385660..647e67e 100644
--- a/src/com/android/camera/WideAnglePanoramaModule.java
+++ b/src/com/android/camera/WideAnglePanoramaModule.java
@@ -835,6 +835,7 @@ public class WideAnglePanoramaModule
ExifInterface exif = new ExifInterface();
try {
exif.readExif(jpegData);
+ exif.addMakeAndModelTag();
exif.addGpsDateTimeStampTag(mTimeTaken);
exif.addDateTimeStampTag(ExifInterface.TAG_DATE_TIME, mTimeTaken,
TimeZone.getDefault());
diff --git a/src/com/android/camera/exif/ExifInterface.java b/src/com/android/camera/exif/ExifInterface.java
index f353f35..2fec1bf 100644
--- a/src/com/android/camera/exif/ExifInterface.java
+++ b/src/com/android/camera/exif/ExifInterface.java
@@ -19,6 +19,7 @@ package com.android.camera.exif;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.util.SparseIntArray;
+import android.os.Build;
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
@@ -2028,6 +2029,21 @@ public class ExifInterface {
return true;
}
+ public boolean addMakeAndModelTag() {
+ ExifTag t = buildTag(TAG_MAKE, Build.MANUFACTURER);
+ if (t == null) {
+ return false;
+ }
+ setTag(t);
+ t = buildTag(TAG_MODEL, Build.MODEL);
+ if (t == null) {
+ return false;
+ }
+ setTag(t);
+ return true;
+ }
+
+
private static Rational[] toExifLatLong(double value) {
// convert to the format dd/1 mm/1 ssss/100
value = Math.abs(value);