5
5
import android .util .Log ;
6
6
7
7
import com .liulishuo .filedownloader .FileDownloader ;
8
- import com .liulishuo .filedownloader .util .FileDownloadHelper ;
9
8
import com .liulishuo .filedownloader .util .FileDownloadLog ;
10
9
import com .liulishuo .filedownloader .util .FileDownloadUtils ;
11
10
12
- import java .net .Proxy ;
13
- import java .util .concurrent .TimeUnit ;
14
-
15
11
import cn .dreamtobe .threaddebugger .IThreadDebugger ;
16
12
import cn .dreamtobe .threaddebugger .ThreadDebugger ;
17
13
import cn .dreamtobe .threaddebugger .ThreadDebuggers ;
18
- import okhttp3 .OkHttpClient ;
19
14
20
15
/**
21
16
* Created by Jacksgong on 12/17/15.
@@ -38,20 +33,7 @@ public void onCreate() {
38
33
* by below code, so please do not worry about performance.
39
34
* @see FileDownloader#init(Context)
40
35
*/
41
- FileDownloader .init (getApplicationContext (),
42
- new FileDownloadHelper .OkHttpClientCustomMaker () { // is not has to provide.
43
- @ Override
44
- public OkHttpClient customMake () {
45
- // just for OkHttpClient customize.
46
- final OkHttpClient .Builder builder = new OkHttpClient .Builder ();
47
- // you can set the connection timeout.
48
- builder .connectTimeout (15_000 , TimeUnit .MILLISECONDS );
49
- // you can set the HTTP proxy.
50
- builder .proxy (Proxy .NO_PROXY );
51
- // etc.
52
- return builder .build ();
53
- }
54
- });
36
+ FileDownloader .init (getApplicationContext ());
55
37
56
38
// below codes just for monitoring thread pools in the FileDownloader:
57
39
IThreadDebugger debugger = ThreadDebugger .install (
0 commit comments