summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/gallery3d/util')
-rw-r--r--src/com/android/gallery3d/util/GalleryUtils.java1
-rw-r--r--src/com/android/gallery3d/util/MediaSetUtils.java1
-rw-r--r--src/com/android/gallery3d/util/PriorityThreadFactory.java1
-rw-r--r--src/com/android/gallery3d/util/Profile.java2
-rw-r--r--src/com/android/gallery3d/util/ProfileData.java1
-rw-r--r--src/com/android/gallery3d/util/ReverseGeocoder.java1
-rw-r--r--src/com/android/gallery3d/util/ThreadPool.java10
7 files changed, 17 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/util/GalleryUtils.java b/src/com/android/gallery3d/util/GalleryUtils.java
index 05198f41b..3b73d344c 100644
--- a/src/com/android/gallery3d/util/GalleryUtils.java
+++ b/src/com/android/gallery3d/util/GalleryUtils.java
@@ -164,6 +164,7 @@ public class GalleryUtils {
public static void fakeBusy(JobContext jc, int timeout) {
final ConditionVariable cv = new ConditionVariable();
jc.setCancelListener(new CancelListener() {
+ @Override
public void onCancel() {
cv.open();
}
diff --git a/src/com/android/gallery3d/util/MediaSetUtils.java b/src/com/android/gallery3d/util/MediaSetUtils.java
index 3bb3f8bd1..b71326a39 100644
--- a/src/com/android/gallery3d/util/MediaSetUtils.java
+++ b/src/com/android/gallery3d/util/MediaSetUtils.java
@@ -50,6 +50,7 @@ public class MediaSetUtils {
// Sort MediaSets by name
public static class NameComparator implements Comparator<MediaSet> {
+ @Override
public int compare(MediaSet set1, MediaSet set2) {
int result = set1.getName().compareToIgnoreCase(set2.getName());
if (result != 0) return result;
diff --git a/src/com/android/gallery3d/util/PriorityThreadFactory.java b/src/com/android/gallery3d/util/PriorityThreadFactory.java
index 67b215274..30d8e4a96 100644
--- a/src/com/android/gallery3d/util/PriorityThreadFactory.java
+++ b/src/com/android/gallery3d/util/PriorityThreadFactory.java
@@ -35,6 +35,7 @@ public class PriorityThreadFactory implements ThreadFactory {
mPriority = priority;
}
+ @Override
public Thread newThread(Runnable r) {
return new Thread(r, mName + '-' + mNumber.getAndIncrement()) {
@Override
diff --git a/src/com/android/gallery3d/util/Profile.java b/src/com/android/gallery3d/util/Profile.java
index 6b6e5c3c3..7ed72c90e 100644
--- a/src/com/android/gallery3d/util/Profile.java
+++ b/src/com/android/gallery3d/util/Profile.java
@@ -32,6 +32,7 @@ import java.util.Random;
// can be called in onPause() to ensure all profiling is disabled when an
// activity is paused.
public class Profile {
+ @SuppressWarnings("unused")
private static final String TAG = "Profile";
private static final int NS_PER_MS = 1000000;
@@ -56,6 +57,7 @@ public class Profile {
private HandlerThread mHandlerThread;
private Handler mHandler;
private Runnable mProcessRunnable = new Runnable() {
+ @Override
public void run() {
synchronized (Watchdog.this) {
processList();
diff --git a/src/com/android/gallery3d/util/ProfileData.java b/src/com/android/gallery3d/util/ProfileData.java
index 02eb37a90..a1bb8e1e4 100644
--- a/src/com/android/gallery3d/util/ProfileData.java
+++ b/src/com/android/gallery3d/util/ProfileData.java
@@ -31,6 +31,7 @@ import java.util.Map.Entry;
// The addSample() method adds a sample. The dumpToFile() method saves the data
// to a file. The reset() method clears all samples.
public class ProfileData {
+ @SuppressWarnings("unused")
private static final String TAG = "ProfileData";
private static class Node {
diff --git a/src/com/android/gallery3d/util/ReverseGeocoder.java b/src/com/android/gallery3d/util/ReverseGeocoder.java
index 3df4c4933..a8b26d9b5 100644
--- a/src/com/android/gallery3d/util/ReverseGeocoder.java
+++ b/src/com/android/gallery3d/util/ReverseGeocoder.java
@@ -35,6 +35,7 @@ import java.util.List;
import java.util.Locale;
public class ReverseGeocoder {
+ @SuppressWarnings("unused")
private static final String TAG = "ReverseGeocoder";
public static final int EARTH_RADIUS_METERS = 6378137;
public static final int LAT_MIN = -90;
diff --git a/src/com/android/gallery3d/util/ThreadPool.java b/src/com/android/gallery3d/util/ThreadPool.java
index 71bb3c5b7..4c077c8f3 100644
--- a/src/com/android/gallery3d/util/ThreadPool.java
+++ b/src/com/android/gallery3d/util/ThreadPool.java
@@ -22,6 +22,7 @@ import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class ThreadPool {
+ @SuppressWarnings("unused")
private static final String TAG = "ThreadPool";
private static final int CORE_POOL_SIZE = 4;
private static final int MAX_POOL_SIZE = 8;
@@ -98,6 +99,7 @@ public class ThreadPool {
}
private class Worker<T> implements Runnable, Future<T>, JobContext {
+ @SuppressWarnings("hiding")
private static final String TAG = "Worker";
private Job<T> mJob;
private FutureListener<T> mListener;
@@ -114,6 +116,7 @@ public class ThreadPool {
}
// This is called by a thread in the thread pool.
+ @Override
public void run() {
T result = null;
@@ -137,6 +140,7 @@ public class ThreadPool {
}
// Below are the methods for Future.
+ @Override
public synchronized void cancel() {
if (mIsCancelled) return;
mIsCancelled = true;
@@ -150,14 +154,17 @@ public class ThreadPool {
}
}
+ @Override
public boolean isCancelled() {
return mIsCancelled;
}
+ @Override
public synchronized boolean isDone() {
return mIsDone;
}
+ @Override
public synchronized T get() {
while (!mIsDone) {
try {
@@ -170,12 +177,14 @@ public class ThreadPool {
return mResult;
}
+ @Override
public void waitDone() {
get();
}
// Below are the methods for JobContext (only called from the
// thread running the job)
+ @Override
public synchronized void setCancelListener(CancelListener listener) {
mCancelListener = listener;
if (mIsCancelled && mCancelListener != null) {
@@ -183,6 +192,7 @@ public class ThreadPool {
}
}
+ @Override
public boolean setMode(int mode) {
// Release old resource
ResourceCounter rc = modeToCounter(mMode);