Improve some aspects of the Downloader implementation
This commit is contained in:
parent
99e0f0c3e4
commit
1d2c616ce0
4 changed files with 61 additions and 30 deletions
|
|
@ -15,6 +15,8 @@ import com.squareup.leakcanary.LeakCanary;
|
|||
import com.squareup.leakcanary.LeakDirectoryProvider;
|
||||
import com.squareup.leakcanary.RefWatcher;
|
||||
|
||||
import org.schabi.newpipe.extractor.Downloader;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
|
@ -33,7 +35,12 @@ public class DebugApp extends App {
|
|||
public void onCreate() {
|
||||
super.onCreate();
|
||||
initStetho();
|
||||
Downloader.client = new OkHttpClient.Builder().addNetworkInterceptor(new StethoInterceptor()).readTimeout(30, TimeUnit.SECONDS).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Downloader getDownloader() {
|
||||
return org.schabi.newpipe.Downloader.init(new OkHttpClient.Builder()
|
||||
.addNetworkInterceptor(new StethoInterceptor()));
|
||||
}
|
||||
|
||||
private void initStetho() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue