summaryrefslogtreecommitdiffstats
path: root/gallerycommon/src/com/android
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
commitca56f8e30a4d91c7b7e6f75a39a1a69801e49cbb (patch)
tree0adef1be98e7516af96e422fd6c30be4565d0774 /gallerycommon/src/com/android
parent90feaa549de22d45f790073bc2d351a93ccc76b6 (diff)
downloadandroid_packages_apps_Gallery2-ca56f8e30a4d91c7b7e6f75a39a1a69801e49cbb.tar.gz
android_packages_apps_Gallery2-ca56f8e30a4d91c7b7e6f75a39a1a69801e49cbb.tar.bz2
android_packages_apps_Gallery2-ca56f8e30a4d91c7b7e6f75a39a1a69801e49cbb.zip
use ExifReader in MediaDetails
Change-Id: If8c7f32804ba55b4b0351c350e324dc1b6e508d7
Diffstat (limited to 'gallerycommon/src/com/android')
-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 9b11fe416..000000000
--- 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 7d9026261..202c5d46d 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