From b7b93211cc4171c8758de2ccc1d27b5e36c31033 Mon Sep 17 00:00:00 2001 From: Earl Ou Date: Wed, 14 Nov 2012 16:23:35 +0800 Subject: use ExifReader in MediaDetails Change-Id: If8c7f32804ba55b4b0351c350e324dc1b6e508d7 --- .../src/com/android/gallery3d/common/ExifTags.java | 27 ---------------------- .../src/com/android/gallery3d/exif/Rational.java | 9 ++++++++ 2 files changed, 9 insertions(+), 27 deletions(-) delete mode 100644 gallerycommon/src/com/android/gallery3d/common/ExifTags.java (limited to 'gallerycommon/src/com') 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 -- cgit v1.2.3