summaryrefslogtreecommitdiffstats
path: root/gallerycommon/src/com
diff options
context:
space:
mode:
authorEarl Ou <shunhsingou@google.com>2012-11-14 16:23:35 +0800
committerEarl Ou <shunhsingou@google.com>2012-11-14 17:07:40 +0800
commitb7b93211cc4171c8758de2ccc1d27b5e36c31033 (patch)
treeaba55c768d74417c1247a32b6d8a1477f842f926 /gallerycommon/src/com
parentb232a2caff083191ab9d24f0a164b9a83afafc1c (diff)
downloadandroid_packages_apps_Snap-b7b93211cc4171c8758de2ccc1d27b5e36c31033.zip
android_packages_apps_Snap-b7b93211cc4171c8758de2ccc1d27b5e36c31033.tar.gz
android_packages_apps_Snap-b7b93211cc4171c8758de2ccc1d27b5e36c31033.tar.bz2
use ExifReader in MediaDetails
Change-Id: If8c7f32804ba55b4b0351c350e324dc1b6e508d7
Diffstat (limited to 'gallerycommon/src/com')
-rw-r--r--gallerycommon/src/com/android/gallery3d/common/ExifTags.java27
-rw-r--r--gallerycommon/src/com/android/gallery3d/exif/Rational.java9
2 files changed, 9 insertions, 27 deletions
diff --git a/gallerycommon/src/com/android/gallery3d/common/ExifTags.java b/gallerycommon/src/com/android/gallery3d/common/ExifTags.java
deleted file mode 100644
index 9b11fe4..0000000
--- a/gallerycommon/src/com/android/gallery3d/common/ExifTags.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.gallery3d.common;
-
-/**
- * The class holds the EXIF tag names that are not available in
- * {@link android.media.ExifInterface} prior to API level 11.
- */
-public interface ExifTags {
- static final String TAG_ISO = "ISOSpeedRatings";
- static final String TAG_EXPOSURE_TIME = "ExposureTime";
- static final String TAG_APERTURE = "FNumber";
-}
diff --git a/gallerycommon/src/com/android/gallery3d/exif/Rational.java b/gallerycommon/src/com/android/gallery3d/exif/Rational.java
index 7d90262..202c5d4 100644
--- a/gallerycommon/src/com/android/gallery3d/exif/Rational.java
+++ b/gallerycommon/src/com/android/gallery3d/exif/Rational.java
@@ -42,4 +42,13 @@ public class Rational {
}
return false;
}
+
+ @Override
+ public String toString() {
+ return mNominator + "/" + mDenominator;
+ }
+
+ public double toDouble() {
+ return mNominator / (double) mDenominator;
+ }
} \ No newline at end of file