summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 2e6a127ba..6242fe499 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -1179,10 +1179,12 @@ public class CaptureModule extends BaseModule<CaptureUI> implements PhotoControl
Location location = mLocationManager.getCurrentLocation();
if(location != null) {
- Log.d(TAG, "captureStillPicture gps: " + location.toString());
+ // make copy so that we don't alter the saved location since we may re-use it
+ location = new Location(location);
// workaround for Google bug. Need to convert timestamp from ms -> sec
location.setTime(location.getTime()/1000);
captureBuilder.set(CaptureRequest.JPEG_GPS_LOCATION, location);
+ Log.d(TAG, "captureStillPicture gps: " + location.toString());
} else {
Log.d(TAG, "captureStillPicture no location - getRecordLocation: " + getRecordLocation());
}