@Override public void close() throws IOException { if (ResponseCache.getDefault() == this.delegate) { ResponseCache.setDefault(null); } delegate.close(); }
@Override public void onCreate() { super.onCreate(); // Setting up caching ResponseCache.setDefault(new CEResponseCache()); this.prefs = PreferenceManager.getDefaultSharedPreferences(this); this.challengeData = new ChallengeData(this); this.activityData = new ActivityData(this); // Prepare Intent for UpdaterService updaterServiceIntent = new Intent(this, UpdateService.class); updaterPendingIntent = PendingIntent.getService(this, -1, updaterServiceIntent, PendingIntent.FLAG_UPDATE_CURRENT); }
public BitmapProcessor(final Context context) { ResponseCache.setDefault(new ImageResponseCache(context.getCacheDir())); }
public static void installResponseCache() { if (!IS_CACHE_DISABLED) { ResponseCache.setDefault(new LocalResponseCache()); } }