squid:S1213 - The members of an interface declaration or class should appear in a pre-defined order

This commit is contained in:
George Kankava
2016-03-10 13:27:20 +04:00
parent da6bc39847
commit 61b66f0f09
4 changed files with 18 additions and 18 deletions
@@ -123,6 +123,11 @@ public class BlobCache implements Closeable {
private byte[] mBlobHeader = new byte[BLOB_HEADER_SIZE]; private byte[] mBlobHeader = new byte[BLOB_HEADER_SIZE];
private Adler32 mAdler32 = new Adler32(); private Adler32 mAdler32 = new Adler32();
private int mSlotOffset;
private int mFileOffset;
private LookupRequest mLookupRequest = new LookupRequest();
// Creates the cache. Three files will be created: // Creates the cache. Three files will be created:
// path + ".idx", path + ".0", and path + ".1" // path + ".idx", path + ".0", and path + ".1"
// The ".0" file and the ".1" file each stores data for a region. Each of // The ".0" file and the ".1" file each stores data for a region. Each of
@@ -407,7 +412,6 @@ public class BlobCache implements Closeable {
// This method is for one-off lookup. For repeated lookup, use the version // This method is for one-off lookup. For repeated lookup, use the version
// accepting LookupRequest to avoid repeated memory allocation. // accepting LookupRequest to avoid repeated memory allocation.
private LookupRequest mLookupRequest = new LookupRequest();
public byte[] lookup(long key) throws IOException { public byte[] lookup(long key) throws IOException {
mLookupRequest.key = key; mLookupRequest.key = key;
mLookupRequest.buffer = null; mLookupRequest.buffer = null;
@@ -531,8 +535,6 @@ public class BlobCache implements Closeable {
// insertion. // insertion.
// If the lookup is successful, the file offset is also saved in // If the lookup is successful, the file offset is also saved in
// mFileOffset. // mFileOffset.
private int mSlotOffset;
private int mFileOffset;
private boolean lookupInternal(long key, int hashStart) { private boolean lookupInternal(long key, int hashStart) {
int slot = (int) (key % mMaxEntries); int slot = (int) (key % mMaxEntries);
if (slot < 0) slot += mMaxEntries; if (slot < 0) slot += mMaxEntries;
@@ -35,6 +35,12 @@ package com.moez.QKSMS.common.google;
public class DraftCache { public class DraftCache {
private static final String TAG = "Mms/draft"; private static final String TAG = "Mms/draft";
static final String[] DRAFT_PROJECTION = new String[] {
Conversations.THREAD_ID // 0
};
static final int COLUMN_DRAFT_THREAD_ID = 0;
private static DraftCache sInstance; private static DraftCache sInstance;
private final Context mContext; private final Context mContext;
@@ -61,12 +67,6 @@ public class DraftCache {
refresh(); refresh();
} }
static final String[] DRAFT_PROJECTION = new String[] {
Conversations.THREAD_ID // 0
};
static final int COLUMN_DRAFT_THREAD_ID = 0;
/** To be called whenever the draft state might have changed. /** To be called whenever the draft state might have changed.
* Dispatches work to a thread and returns immediately. * Dispatches work to a thread and returns immediately.
*/ */
@@ -29,6 +29,8 @@ import java.util.LinkedHashMap;
* from Peter Balwin and books app. * from Peter Balwin and books app.
*/ */
public class SimpleCache<K, V> { public class SimpleCache<K, V> {
private final SoftReferenceMap mSoftReferences;
private final HardReferenceMap mHardReferences;
/** /**
* A simple LRU cache to prevent the number of {@link java.util.Map.Entry} instances * A simple LRU cache to prevent the number of {@link java.util.Map.Entry} instances
@@ -66,13 +68,6 @@ public class SimpleCache<K, V> {
} }
} }
private static <V> V unwrap(SoftReference<V> ref) {
return ref != null ? ref.get() : null;
}
private final SoftReferenceMap mSoftReferences;
private final HardReferenceMap mHardReferences;
/** /**
* Constructor. * Constructor.
* *
@@ -95,6 +90,10 @@ public class SimpleCache<K, V> {
} }
} }
private static <V> V unwrap(SoftReference<V> ref) {
return ref != null ? ref.get() : null;
}
/** /**
* See {@link java.util.Map#get(Object)}. * See {@link java.util.Map#get(Object)}.
*/ */
@@ -47,6 +47,7 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
public class UriImage { public class UriImage {
private static final int NUMBER_OF_RESIZE_ATTEMPTS = 4;
private static final String TAG = "Mms/image"; private static final String TAG = "Mms/image";
private static final boolean DEBUG = false; private static final boolean DEBUG = false;
private static final boolean LOCAL_LOGV = false; private static final boolean LOCAL_LOGV = false;
@@ -259,8 +260,6 @@ public class UriImage {
return part; return part;
} }
private static final int NUMBER_OF_RESIZE_ATTEMPTS = 4;
/** /**
* Resize and recompress the image such that it fits the given limits. The resulting byte * Resize and recompress the image such that it fits the given limits. The resulting byte
* array contains an image in JPEG format, regardless of the original image's content type. * array contains an image in JPEG format, regardless of the original image's content type.