|
|
|
|
@ -5,6 +5,7 @@ import com.github.tvbox.osc.util.SSL.SSLSocketFactoryCompat; |
|
|
|
|
import com.lzy.okgo.OkGo; |
|
|
|
|
import com.lzy.okgo.https.HttpsUtils; |
|
|
|
|
import com.lzy.okgo.interceptor.HttpLoggingInterceptor; |
|
|
|
|
import com.lzy.okgo.model.HttpHeaders; |
|
|
|
|
import com.orhanobut.hawk.Hawk; |
|
|
|
|
import com.squareup.picasso.OkHttp3Downloader; |
|
|
|
|
import com.squareup.picasso.Picasso; |
|
|
|
|
@ -22,6 +23,7 @@ import okhttp3.Cache; |
|
|
|
|
import okhttp3.HttpUrl; |
|
|
|
|
import okhttp3.OkHttpClient; |
|
|
|
|
import okhttp3.dnsoverhttps.DnsOverHttps; |
|
|
|
|
import okhttp3.internal.Version; |
|
|
|
|
import xyz.doikki.videoplayer.exo.ExoMediaSourceHelper; |
|
|
|
|
|
|
|
|
|
public class OkGoHelper { |
|
|
|
|
@ -130,9 +132,10 @@ public class OkGoHelper { |
|
|
|
|
th.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
HttpHeaders.setUserAgent(Version.userAgent()); |
|
|
|
|
|
|
|
|
|
OkHttpClient okHttpClient = builder.build(); |
|
|
|
|
OkGo.getInstance().setOkHttpClient(okHttpClient); |
|
|
|
|
OkGo.getInstance().setRetryCount(2); |
|
|
|
|
|
|
|
|
|
initExoOkHttpClient(); |
|
|
|
|
initPicasso(okHttpClient); |
|
|
|
|
|