@@ -0,0 +1,2236 @@
+package com.snowdream.wallpaper;%0A%0Aimport java.io.File;%0A%0Aimport android.app.Application;%0Aimport android.content.Context;%0Aimport android.os.Build;%0Aimport android.os.StrictMode;%0A%0Aimport com.nostra13.universalimageloader.cache.disc.impl.LimitedAgeDiscCache;%0Aimport com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator;%0Aimport com.nostra13.universalimageloader.cache.memory.impl.WeakMemoryCache;%0Aimport com.nostra13.universalimageloader.core.ImageLoader;%0Aimport com.nostra13.universalimageloader.core.ImageLoaderConfiguration;%0Aimport com.nostra13.universalimageloader.core.assist.QueueProcessingType;%0Aimport com.nostra13.universalimageloader.utils.StorageUtils;%0Aimport com.snowdream.wallpaper.Constants.Config;%0A%0A/**%0A * @author Sergey Tarasevich (nostra13%5Bat%5Dgmail%5Bdot%5Dcom)%0A */%0Apublic class BaseApplication extends Application %7B%0A%09@SuppressWarnings(%22unused%22)%0A%09@Override%0A%09public void onCreate() %7B%0A%09%09if (Config.DEVELOPER_MODE%0A%09%09%09%09&& Build.VERSION.SDK_INT %3E= Build.VERSION_CODES.GINGERBREAD) %7B%0A%09%09%09StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()%0A%09%09%09%09%09.detectAll().penaltyDialog().build());%0A%09%09%09StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()%0A%09%09%09%09%09.detectAll().penaltyDeath().build());%0A%09%09%7D%0A%0A%09%09super.onCreate();%0A%0A%09%09initImageLoader(getApplicationContext());%0A%09%7D%0A%0A%09public static void initImageLoader(Context context) %7B%0A%09%09// This configuration tuning is custom. You can tune every option, you%0A%09%09// may tune some of them,%0A%09%09// or you can create default configuration by%0A%09%09// ImageLoaderConfiguration.createDefault(this);%0A%09%09// method.%0A%09%09File cacheDir = StorageUtils.getCacheDirectory(context);%0A%0A%09%09ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(%0A%09%09%09%09context).memoryCache(new WeakMemoryCache())%0A%09%09%09%09.memoryCacheSize(3 * 1024 * 1024)%0A%09%09%09%09.memoryCacheExtraOptions(480, 800)%0A%09%09%09%09.threadPriority(Thread.NORM_PRIORITY - 1)%0A%09%09%09%09.denyCacheImageMultipleSizesInMemory()%0A%09%09%09%09.discCache(new LimitedAgeDiscCache(cacheDir, 2 * 24 * 60 * 60))%0A%09%09%09%09.threadPoolSize(1)%0A%09%09%09%09.discCacheFileNameGenerator(new Md5FileNameGenerator())%0A%09%09%09%09.tasksProcessingOrder(QueueProcessingType.LIFO).enableLogging()%0A%09%09%09%09.build();%0A%09%09// Initialize ImageLoader with configuration.%0A%09%09ImageLoader.getInstance().init(config);%0A%09%7D%0A%7D

debug parceable