diff options
author | Chih-Chung Chang <chihchung@google.com> | 2009-09-28 10:47:18 -0700 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2009-09-28 10:47:18 -0700 |
commit | 140229cc988a264d9719b8dcc41196cc87092440 (patch) | |
tree | 69cb1840562153b83cbd1162a58b50a6662b5930 /src/com/android/camera/Camera.java | |
parent | bf45b96e76d84856ab510508ea5dafd9ab834eba (diff) | |
download | LegacyCamera-140229cc988a264d9719b8dcc41196cc87092440.zip LegacyCamera-140229cc988a264d9719b8dcc41196cc87092440.tar.gz LegacyCamera-140229cc988a264d9719b8dcc41196cc87092440.tar.bz2 |
Fix orientation not stored in the database.
Diffstat (limited to 'src/com/android/camera/Camera.java')
-rw-r--r-- | src/com/android/camera/Camera.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index 5896644..b9ed66e 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -537,27 +537,25 @@ public class Camera extends Activity implements View.OnClickListener, try { long dateTaken = System.currentTimeMillis(); String name = createName(dateTaken) + ".jpg"; + int[] degree = new int[1]; mLastContentUri = ImageManager.addImage( mContentResolver, name, dateTaken, - loc, // location for the database goes here - 0, // the dsp will use the right orientation so - // don't "double set it" - ImageManager.CAMERA_IMAGE_BUCKET_NAME, name, null, data); + loc, // location from gps/network + ImageManager.CAMERA_IMAGE_BUCKET_NAME, name, + null, data, + degree); if (mLastContentUri == null) { // this means we got an error mCancel = true; } - int degree = 0; if (!mCancel) { - degree = ImageManager.getExifOrientation( - ImageManager.CAMERA_IMAGE_BUCKET_NAME + "/" + name); ImageManager.setImageSize(mContentResolver, mLastContentUri, new File(ImageManager.CAMERA_IMAGE_BUCKET_NAME, name).length()); } - return degree; + return degree[0]; } catch (Exception ex) { Log.e(TAG, "Exception while compressing image.", ex); return 0; |