Last active
January 2, 2018 17:31
-
-
Save Ansh1234/71895bbd1ea6d6d060a41b649adfcbdf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Picasso build() { | |
Context context = this.context; | |
if (downloader == null) { | |
downloader = new OkHttp3Downloader(context); | |
} | |
if (cache == null) { | |
cache = new LruCache(context); | |
} | |
if (service == null) { | |
service = new PicassoExecutorService(); | |
} | |
if (transformer == null) { | |
transformer = RequestTransformer.IDENTITY; | |
} | |
Stats stats = new Stats(cache); | |
Dispatcher dispatcher = new Dispatcher(context, service, HANDLER, downloader, cache, stats); | |
return new Picasso(context, dispatcher, cache, listener, transformer, requestHandlers, stats, | |
defaultBitmapConfig, indicatorsEnabled, loggingEnabled); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment