summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/data
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2013-09-27 10:51:02 -0700
committerztenghui <ztenghui@google.com>2013-09-27 11:13:15 -0700
commitaf41aaa4005d7abcc45ea3c7fb87af098ef49ce8 (patch)
tree9cd86336c784f1569b3db692abea85dd7058a227 /src/com/android/camera/data
parent3cde3ece3e6e384f831a02f21c677e292a824df8 (diff)
downloadandroid_packages_apps_Snap-af41aaa4005d7abcc45ea3c7fb87af098ef49ce8.tar.gz
android_packages_apps_Snap-af41aaa4005d7abcc45ea3c7fb87af098ef49ce8.tar.bz2
android_packages_apps_Snap-af41aaa4005d7abcc45ea3c7fb87af098ef49ce8.zip
Don't update the width and height in MediaStore after rotation
bug:10917681 Change-Id: I897d883636991f5b95290acf57c2a84eadd7c5d2
Diffstat (limited to 'src/com/android/camera/data')
-rw-r--r--src/com/android/camera/data/RotationTask.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/com/android/camera/data/RotationTask.java b/src/com/android/camera/data/RotationTask.java
index 8daead156..000444729 100644
--- a/src/com/android/camera/data/RotationTask.java
+++ b/src/com/android/camera/data/RotationTask.java
@@ -120,20 +120,18 @@ public class RotationTask extends AsyncTask<LocalData, Void, LocalData> {
PhotoData result = null;
if (success) {
- // Swap width and height after rotation.
+ // Swap width and height after rotation. The new width and height
+ // will be used to create the PhotoData, not used to update
+ // MediaStore or Exif. Because we will re-calculate the width and
+ // height based on the orientation info.
int oldWidth = imageData.getWidth();
int newWidth = imageData.getHeight();
int newHeight = oldWidth;
- values.put(Images.Media.WIDTH, newWidth);
- values.put(Images.Media.HEIGHT, newHeight);
// MediaStore using SQLite is thread safe.
values.put(Images.Media.ORIENTATION, finalRotationDegrees);
mContext.getContentResolver().update(imageData.getContentUri(),
- values, "_id=?",
- new String[] {
- String.valueOf(imageData.getId()) });
-
+ values, null, null);
double[] latLong = data.getLatLong();
double latitude = 0;
double longitude = 0;