Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61b66f0f authored by George Kankava's avatar George Kankava
Browse files

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

parent da6bc398
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -123,6 +123,11 @@ public class BlobCache implements Closeable {
    private byte[] mBlobHeader = new byte[BLOB_HEADER_SIZE];
    private Adler32 mAdler32 = new Adler32();

    private int mSlotOffset;
    private int mFileOffset;

    private LookupRequest mLookupRequest = new LookupRequest();

    // Creates the cache. Three files will be created:
    // path + ".idx", path + ".0", and path + ".1"
    // 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
    // accepting LookupRequest to avoid repeated memory allocation.
    private LookupRequest mLookupRequest = new LookupRequest();
    public byte[] lookup(long key) throws IOException {
        mLookupRequest.key = key;
        mLookupRequest.buffer = null;
@@ -531,8 +535,6 @@ public class BlobCache implements Closeable {
    // insertion.
    // If the lookup is successful, the file offset is also saved in
    // mFileOffset.
    private int mSlotOffset;
    private int mFileOffset;
    private boolean lookupInternal(long key, int hashStart) {
        int slot = (int) (key % mMaxEntries);
        if (slot < 0) slot += mMaxEntries;
+6 −6
Original line number Diff line number Diff line
@@ -35,6 +35,12 @@ package com.moez.QKSMS.common.google;
public class DraftCache {
    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 final Context mContext;
@@ -61,12 +67,6 @@ public class DraftCache {
        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.
     *  Dispatches work to a thread and returns immediately.
     */
+6 −7
Original line number Diff line number Diff line
@@ -29,6 +29,8 @@ import java.util.LinkedHashMap;
 * from Peter Balwin and books app.
 */
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
@@ -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.
     *
@@ -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)}.
     */
+1 −2
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ import java.io.IOException;
import java.io.InputStream;

public class UriImage {
    private static final int NUMBER_OF_RESIZE_ATTEMPTS = 4;
    private static final String TAG = "Mms/image";
    private static final boolean DEBUG = false;
    private static final boolean LOCAL_LOGV = false;
@@ -259,8 +260,6 @@ public class UriImage {
        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
     * array contains an image in JPEG format, regardless of the original image's content type.