// Path: src/main/java/com/github/randoapp/cache/LruMemCache.java
// public class LruMemCache extends LruCache<String, Bitmap> implements ImageLoader.ImageCache {
//     public static int getDefaultLruCacheSize() {
//         final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);
//         final int cacheSize = maxMemory / NUMBER_OF_IMAGES_FOR_CACHING;
// 
//         return cacheSize;
//     }
// 
//     public LruMemCache() {
//         this(getDefaultLruCacheSize());
//     }
// 
//     public LruMemCache(int sizeInKiloBytes) {
//         super(sizeInKiloBytes);
//     }
// 
//     @Override
//     protected int sizeOf(String key, Bitmap value) {
//         return value.getRowBytes() * value.getHeight() / 1024;
//     }
// 
//     @Override
//     public Bitmap getBitmap(String url) {
//         return get(url);
//     }
// 
//     @Override
//     public void putBitmap(String url, Bitmap bitmap) {
//         put(url, bitmap);
//     }
// }
// 
// Path: src/main/java/com/github/randoapp/Constants.java
// public static final String DEFAULT_CACHE_DIR = "volley";
// 
// Path: src/main/java/com/github/randoapp/Constants.java
// public static final int DEFAULT_CACHE_SIZE = 20 * 1024 * 1024;


import android.content.Context;
import com.android.volley.Network;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.BasicNetwork;
import com.android.volley.toolbox.DiskBasedCache;
import com.android.volley.toolbox.HurlStack;
import com.android.volley.toolbox.ImageLoader;
import com.github.randoapp.cache.LruMemCache;
import java.io.File;
import static com.github.randoapp.Constants.DEFAULT_CACHE_DIR;
import static com.github.randoapp.Constants.DEFAULT_CACHE_SIZE;
package com.github.randoapp.network;





public class VolleySingleton {

    private static VolleySingleton instance = null;

    private RequestQueue requestQueue;
    private ImageLoader imageLoader;

    private VolleySingleton(Context context) {
        requestQueue = createRequestQueue(context);
// Path: src/main/java/com/github/randoapp/cache/LruMemCache.java
// public class LruMemCache extends LruCache<String, Bitmap> implements ImageLoader.ImageCache {
//     public static int getDefaultLruCacheSize() {
//         final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);
//         final int cacheSize = maxMemory / NUMBER_OF_IMAGES_FOR_CACHING;
// 
//         return cacheSize;
//     }
// 
//     public LruMemCache() {
//         this(getDefaultLruCacheSize());
//     }
// 
//     public LruMemCache(int sizeInKiloBytes) {
//         super(sizeInKiloBytes);
//     }
// 
//     @Override
//     protected int sizeOf(String key, Bitmap value) {
//         return value.getRowBytes() * value.getHeight() / 1024;
//     }
// 
//     @Override
//     public Bitmap getBitmap(String url) {
//         return get(url);
//     }
// 
//     @Override
//     public void putBitmap(String url, Bitmap bitmap) {
//         put(url, bitmap);
//     }
// }
// 
// Path: src/main/java/com/github/randoapp/Constants.java
// public static final String DEFAULT_CACHE_DIR = "volley";
// 
// Path: src/main/java/com/github/randoapp/Constants.java
// public static final int DEFAULT_CACHE_SIZE = 20 * 1024 * 1024;


// Path: src/main/java/com/github/randoapp/network/VolleySingleton.java
import android.content.Context;
import com.android.volley.Network;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.BasicNetwork;
import com.android.volley.toolbox.DiskBasedCache;
import com.android.volley.toolbox.HurlStack;
import com.android.volley.toolbox.ImageLoader;
import com.github.randoapp.cache.LruMemCache;
import java.io.File;
import static com.github.randoapp.Constants.DEFAULT_CACHE_DIR;
import static com.github.randoapp.Constants.DEFAULT_CACHE_SIZE;

package com.github.randoapp.network;





public class VolleySingleton {

    private static VolleySingleton instance = null;

    private RequestQueue requestQueue;
    private ImageLoader imageLoader;

    private VolleySingleton(Context context) {
        requestQueue = createRequestQueue(context);
        imageLoader = new ImageLoader(this.requestQueue, new LruMemCache());