summaryrefslogtreecommitdiffstats
path: root/gallerycommon/src/com/android/gallery3d/common
diff options
context:
space:
mode:
authorAhbong Chang <cwahbong@google.com>2012-07-30 11:34:13 +0800
committerAhbong Chang <cwahbong@google.com>2012-07-30 11:42:01 +0800
commit813ac7496e93faa2cf0f2763df421a146d38fc11 (patch)
treef4a1064166c83f8560cdf5eaeb18a4107fd344a5 /gallerycommon/src/com/android/gallery3d/common
parentdbc472eb08c19e78811823f8b83e59c3aeacc6d0 (diff)
downloadandroid_packages_apps_Snap-813ac7496e93faa2cf0f2763df421a146d38fc11.tar.gz
android_packages_apps_Snap-813ac7496e93faa2cf0f2763df421a146d38fc11.tar.bz2
android_packages_apps_Snap-813ac7496e93faa2cf0f2763df421a146d38fc11.zip
Code clean up.
Remove unused imports. Remove unused fields. Remove unnecessary cast. Add missing override annotations. Change-Id: Idad2e587697a5015eb5363d7b71fab9de9cc8ffb
Diffstat (limited to 'gallerycommon/src/com/android/gallery3d/common')
-rw-r--r--gallerycommon/src/com/android/gallery3d/common/FileCache.java1
-rw-r--r--gallerycommon/src/com/android/gallery3d/common/Fingerprint.java4
-rw-r--r--gallerycommon/src/com/android/gallery3d/common/HttpClientFactory.java1
-rw-r--r--gallerycommon/src/com/android/gallery3d/common/Scroller.java6
4 files changed, 4 insertions, 8 deletions
diff --git a/gallerycommon/src/com/android/gallery3d/common/FileCache.java b/gallerycommon/src/com/android/gallery3d/common/FileCache.java
index a69487f4c..d7deda6fa 100644
--- a/gallerycommon/src/com/android/gallery3d/common/FileCache.java
+++ b/gallerycommon/src/com/android/gallery3d/common/FileCache.java
@@ -92,6 +92,7 @@ public class FileCache implements Closeable {
mDbHelper = new DatabaseHelper(context, dbName);
}
+ @Override
public void close() {
mDbHelper.close();
}
diff --git a/gallerycommon/src/com/android/gallery3d/common/Fingerprint.java b/gallerycommon/src/com/android/gallery3d/common/Fingerprint.java
index 39fcf9e09..2847e57ce 100644
--- a/gallerycommon/src/com/android/gallery3d/common/Fingerprint.java
+++ b/gallerycommon/src/com/android/gallery3d/common/Fingerprint.java
@@ -16,10 +16,6 @@
package com.android.gallery3d.common;
-import android.content.ContentResolver;
-import android.net.Uri;
-
-import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.security.DigestInputStream;
diff --git a/gallerycommon/src/com/android/gallery3d/common/HttpClientFactory.java b/gallerycommon/src/com/android/gallery3d/common/HttpClientFactory.java
index cb95e3329..9e327aa51 100644
--- a/gallerycommon/src/com/android/gallery3d/common/HttpClientFactory.java
+++ b/gallerycommon/src/com/android/gallery3d/common/HttpClientFactory.java
@@ -20,7 +20,6 @@ import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Build;
-import android.util.Log;
import org.apache.http.HttpVersion;
import org.apache.http.client.HttpClient;
diff --git a/gallerycommon/src/com/android/gallery3d/common/Scroller.java b/gallerycommon/src/com/android/gallery3d/common/Scroller.java
index 160f3ca43..6cefd6fb0 100644
--- a/gallerycommon/src/com/android/gallery3d/common/Scroller.java
+++ b/gallerycommon/src/com/android/gallery3d/common/Scroller.java
@@ -342,7 +342,7 @@ public class Scroller {
mFinalY = startY + dy;
mDeltaX = dx;
mDeltaY = dy;
- mDurationReciprocal = 1.0f / (float) mDuration;
+ mDurationReciprocal = 1.0f / mDuration;
}
/**
@@ -370,8 +370,8 @@ public class Scroller {
if (mFlywheel && !mFinished) {
float oldVel = getCurrVelocity();
- float dx = (float) (mFinalX - mStartX);
- float dy = (float) (mFinalY - mStartY);
+ float dx = mFinalX - mStartX;
+ float dy = mFinalY - mStartY;
float hyp = FloatMath.sqrt(dx * dx + dy * dy);
float ndx = dx / hyp;