Use OkHttpClientProvider to allow extending preconfigurated clients.
This commit is contained in:
parent
c508247542
commit
eac670b2dc
|
@ -34,8 +34,9 @@ public class OkHttpProgressGlideModule implements GlideModule {
|
|||
|
||||
@Override
|
||||
public void registerComponents(Context context, Glide glide) {
|
||||
OkHttpClient client = new OkHttpClient
|
||||
.Builder()
|
||||
OkHttpClient client = OkHttpClientProvider
|
||||
.getOkHttpClient()
|
||||
.newBuilder()
|
||||
.addInterceptor(createInterceptor(new DispatchingProgressListener()))
|
||||
.build();
|
||||
glide.register(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(client));
|
||||
|
|
Loading…
Reference in New Issue