summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/MediaSaveService.java
diff options
context:
space:
mode:
authorAngus Kong <shkong@google.com>2013-03-26 11:40:40 -0700
committerAngus Kong <shkong@google.com>2013-03-26 15:42:36 -0700
commit0d00a8907096b9970ac64f52abbd2bfc1ed751b6 (patch)
treebd92779ff5810d46128c0f11a7a84c78ad52d35f /src/com/android/camera/MediaSaveService.java
parent88efa27609d08a749cda7ba928cb825de71a7f2b (diff)
downloadandroid_packages_apps_Snap-0d00a8907096b9970ac64f52abbd2bfc1ed751b6.tar.gz
android_packages_apps_Snap-0d00a8907096b9970ac64f52abbd2bfc1ed751b6.tar.bz2
android_packages_apps_Snap-0d00a8907096b9970ac64f52abbd2bfc1ed751b6.zip
Add GPSDirection tag using ExifInterface.
bug:8115825 Change-Id: Iefcbbddbb7f9fed0c386214b428d4743f67d0dd9
Diffstat (limited to 'src/com/android/camera/MediaSaveService.java')
-rw-r--r--src/com/android/camera/MediaSaveService.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/com/android/camera/MediaSaveService.java b/src/com/android/camera/MediaSaveService.java
index 48fb629e9..b1f47df77 100644
--- a/src/com/android/camera/MediaSaveService.java
+++ b/src/com/android/camera/MediaSaveService.java
@@ -26,6 +26,8 @@ import android.os.Binder;
import android.os.IBinder;
import android.util.Log;
+import com.android.gallery3d.exif.ExifInterface;
+
/*
* Service for saving images in the background thread.
*/
@@ -77,14 +79,14 @@ public class MediaSaveService extends Service {
// Runs in main thread
public void addImage(final byte[] data, String title, long date, Location loc,
- int width, int height, int orientation,
+ int width, int height, int orientation, ExifInterface exif,
OnMediaSavedListener l, ContentResolver resolver) {
if (isQueueFull()) {
Log.e(TAG, "Cannot add image when the queue is full");
return;
}
SaveTask t = new SaveTask(data, title, date, (loc == null) ? null : new Location(loc),
- width, height, orientation, resolver, l);
+ width, height, orientation, exif, resolver, l);
mTaskNumber++;
if (isQueueFull()) {
@@ -114,12 +116,13 @@ public class MediaSaveService extends Service {
private Location loc;
private int width, height;
private int orientation;
+ private ExifInterface exif;
private ContentResolver resolver;
private OnMediaSavedListener listener;
public SaveTask(byte[] data, String title, long date, Location loc,
- int width, int height, int orientation, ContentResolver resolver,
- OnMediaSavedListener listener) {
+ int width, int height, int orientation, ExifInterface exif,
+ ContentResolver resolver, OnMediaSavedListener listener) {
this.data = data;
this.title = title;
this.date = date;
@@ -127,6 +130,7 @@ public class MediaSaveService extends Service {
this.width = width;
this.height = height;
this.orientation = orientation;
+ this.exif = exif;
this.resolver = resolver;
this.listener = listener;
}
@@ -139,7 +143,7 @@ public class MediaSaveService extends Service {
@Override
protected Uri doInBackground(Void... v) {
return Storage.addImage(
- resolver, title, date, loc, orientation, data, width, height);
+ resolver, title, date, loc, orientation, exif, data, width, height);
}
@Override