summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/Storage.java
diff options
context:
space:
mode:
authorAngus Kong <shkong@google.com>2011-09-28 22:53:37 +0800
committerAngus Kong <shkong@google.com>2011-09-29 15:28:41 +0800
commitea312297ff6132bbafed99b90a72e4858b888fa4 (patch)
treee9bd250e5ffe0cdeb13218ea1f0ce1a7b8be175e /src/com/android/camera/Storage.java
parent5fe35de7479dcb221dae3ecc08d0b33502d72a61 (diff)
downloadLegacyCamera-ea312297ff6132bbafed99b90a72e4858b888fa4.zip
LegacyCamera-ea312297ff6132bbafed99b90a72e4858b888fa4.tar.gz
LegacyCamera-ea312297ff6132bbafed99b90a72e4858b888fa4.tar.bz2
Add dimension attributes to MediaStore.
1. Width/height of still images added. 2. Resolution of videos added. bug:5376821 Change-Id: I809743ae777e6bbc01e3a86651e7cd6489a81c86
Diffstat (limited to 'src/com/android/camera/Storage.java')
-rw-r--r--src/com/android/camera/Storage.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/camera/Storage.java b/src/com/android/camera/Storage.java
index 3cb05a8..a9f67c9 100644
--- a/src/com/android/camera/Storage.java
+++ b/src/com/android/camera/Storage.java
@@ -47,8 +47,8 @@ public class Storage {
private static final int BUFSIZE = 4096;
- public static Uri addImage(ContentResolver resolver, String title,
- long date, Location location, int orientation, byte[] jpeg) {
+ public static Uri addImage(ContentResolver resolver, String title, long date,
+ Location location, int orientation, byte[] jpeg, int width, int height) {
// Save the image.
String path = DIRECTORY + '/' + title + ".jpg";
FileOutputStream out = null;
@@ -74,6 +74,8 @@ public class Storage {
values.put(ImageColumns.ORIENTATION, orientation);
values.put(ImageColumns.DATA, path);
values.put(ImageColumns.SIZE, jpeg.length);
+ values.put(ImageColumns.WIDTH, width);
+ values.put(ImageColumns.HEIGHT, height);
if (location != null) {
values.put(ImageColumns.LATITUDE, location.getLatitude());