summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamera Software Integration <camswint@localhost>2016-12-09 05:49:37 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-12-09 05:49:37 -0800
commitec2f20ee09c827a603227ad4b4be6a59346542cc (patch)
treedfbd2aab9b663dece541ec2fd4ce18d39d28bff5
parent1faccedafea1dfd535261d5935e457ba353296ef (diff)
parent86887b9fea3b9e279688c0af75b7d2004c93a51a (diff)
downloadandroid_packages_apps_Snap-ec2f20ee09c827a603227ad4b4be6a59346542cc.tar.gz
android_packages_apps_Snap-ec2f20ee09c827a603227ad4b4be6a59346542cc.tar.bz2
android_packages_apps_Snap-ec2f20ee09c827a603227ad4b4be6a59346542cc.zip
Merge "SnapdragonCamera: make copy of location before altering timestamp" into camera.lnx.1.0-dev.1.0
-rw-r--r--src/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 165f5f82c..2fe7de35c 100644
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -1262,10 +1262,12 @@ public class CaptureModule implements CameraModule, PhotoController,
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());
}