OkHttpClient$Builder.smali 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988
  1. .class public final Lokhttp3/OkHttpClient$Builder;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # annotations
  5. .annotation system Ldalvik/annotation/EnclosingClass;
  6. value = Lokhttp3/OkHttpClient;
  7. .end annotation
  8. .annotation system Ldalvik/annotation/InnerClass;
  9. accessFlags = 0x19
  10. name = "Builder"
  11. .end annotation
  12. # instance fields
  13. .field authenticator:Lokhttp3/Authenticator;
  14. .field cache:Lokhttp3/Cache;
  15. .field certificateChainCleaner:Lokhttp3/internal/tls/CertificateChainCleaner;
  16. .field certificatePinner:Lokhttp3/CertificatePinner;
  17. .field connectTimeout:I
  18. .field connectionPool:Lokhttp3/ConnectionPool;
  19. .field connectionSpecs:Ljava/util/List;
  20. .annotation system Ldalvik/annotation/Signature;
  21. value = {
  22. "Ljava/util/List<",
  23. "Lokhttp3/ConnectionSpec;",
  24. ">;"
  25. }
  26. .end annotation
  27. .end field
  28. .field cookieJar:Lokhttp3/CookieJar;
  29. .field dispatcher:Lokhttp3/Dispatcher;
  30. .field dns:Lokhttp3/Dns;
  31. .field eventListenerFactory:Lokhttp3/EventListener$Factory;
  32. .field followRedirects:Z
  33. .field followSslRedirects:Z
  34. .field hostnameVerifier:Ljavax/net/ssl/HostnameVerifier;
  35. .field final interceptors:Ljava/util/List;
  36. .annotation system Ldalvik/annotation/Signature;
  37. value = {
  38. "Ljava/util/List<",
  39. "Lokhttp3/Interceptor;",
  40. ">;"
  41. }
  42. .end annotation
  43. .end field
  44. .field internalCache:Lokhttp3/internal/cache/InternalCache;
  45. .field final networkInterceptors:Ljava/util/List;
  46. .annotation system Ldalvik/annotation/Signature;
  47. value = {
  48. "Ljava/util/List<",
  49. "Lokhttp3/Interceptor;",
  50. ">;"
  51. }
  52. .end annotation
  53. .end field
  54. .field pingInterval:I
  55. .field protocols:Ljava/util/List;
  56. .annotation system Ldalvik/annotation/Signature;
  57. value = {
  58. "Ljava/util/List<",
  59. "Lokhttp3/Protocol;",
  60. ">;"
  61. }
  62. .end annotation
  63. .end field
  64. .field proxy:Ljava/net/Proxy;
  65. .field proxyAuthenticator:Lokhttp3/Authenticator;
  66. .field proxySelector:Ljava/net/ProxySelector;
  67. .field readTimeout:I
  68. .field retryOnConnectionFailure:Z
  69. .field socketFactory:Ljavax/net/SocketFactory;
  70. .field sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
  71. .field writeTimeout:I
  72. # direct methods
  73. .method public constructor <init>()V
  74. .locals 1
  75. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  76. new-instance v0, Ljava/util/ArrayList;
  77. invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
  78. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->interceptors:Ljava/util/List;
  79. new-instance v0, Ljava/util/ArrayList;
  80. invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
  81. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->networkInterceptors:Ljava/util/List;
  82. new-instance v0, Lokhttp3/Dispatcher;
  83. invoke-direct {v0}, Lokhttp3/Dispatcher;-><init>()V
  84. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->dispatcher:Lokhttp3/Dispatcher;
  85. sget-object v0, Lokhttp3/OkHttpClient;->DEFAULT_PROTOCOLS:Ljava/util/List;
  86. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->protocols:Ljava/util/List;
  87. sget-object v0, Lokhttp3/OkHttpClient;->DEFAULT_CONNECTION_SPECS:Ljava/util/List;
  88. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->connectionSpecs:Ljava/util/List;
  89. sget-object v0, Lokhttp3/EventListener;->NONE:Lokhttp3/EventListener;
  90. invoke-static {v0}, Lokhttp3/EventListener;->factory(Lokhttp3/EventListener;)Lokhttp3/EventListener$Factory;
  91. move-result-object v0
  92. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->eventListenerFactory:Lokhttp3/EventListener$Factory;
  93. invoke-static {}, Ljava/net/ProxySelector;->getDefault()Ljava/net/ProxySelector;
  94. move-result-object v0
  95. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->proxySelector:Ljava/net/ProxySelector;
  96. sget-object v0, Lokhttp3/CookieJar;->NO_COOKIES:Lokhttp3/CookieJar;
  97. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->cookieJar:Lokhttp3/CookieJar;
  98. invoke-static {}, Ljavax/net/SocketFactory;->getDefault()Ljavax/net/SocketFactory;
  99. move-result-object v0
  100. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->socketFactory:Ljavax/net/SocketFactory;
  101. sget-object v0, Lokhttp3/internal/tls/OkHostnameVerifier;->INSTANCE:Lokhttp3/internal/tls/OkHostnameVerifier;
  102. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->hostnameVerifier:Ljavax/net/ssl/HostnameVerifier;
  103. sget-object v0, Lokhttp3/CertificatePinner;->DEFAULT:Lokhttp3/CertificatePinner;
  104. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->certificatePinner:Lokhttp3/CertificatePinner;
  105. sget-object v0, Lokhttp3/Authenticator;->NONE:Lokhttp3/Authenticator;
  106. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->proxyAuthenticator:Lokhttp3/Authenticator;
  107. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->authenticator:Lokhttp3/Authenticator;
  108. new-instance v0, Lokhttp3/ConnectionPool;
  109. invoke-direct {v0}, Lokhttp3/ConnectionPool;-><init>()V
  110. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->connectionPool:Lokhttp3/ConnectionPool;
  111. sget-object v0, Lokhttp3/Dns;->SYSTEM:Lokhttp3/Dns;
  112. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->dns:Lokhttp3/Dns;
  113. const/4 v0, 0x1
  114. iput-boolean v0, p0, Lokhttp3/OkHttpClient$Builder;->followSslRedirects:Z
  115. iput-boolean v0, p0, Lokhttp3/OkHttpClient$Builder;->followRedirects:Z
  116. iput-boolean v0, p0, Lokhttp3/OkHttpClient$Builder;->retryOnConnectionFailure:Z
  117. const/16 v0, 0x2710
  118. iput v0, p0, Lokhttp3/OkHttpClient$Builder;->connectTimeout:I
  119. iput v0, p0, Lokhttp3/OkHttpClient$Builder;->readTimeout:I
  120. iput v0, p0, Lokhttp3/OkHttpClient$Builder;->writeTimeout:I
  121. const/4 v0, 0x0
  122. iput v0, p0, Lokhttp3/OkHttpClient$Builder;->pingInterval:I
  123. return-void
  124. .end method
  125. .method constructor <init>(Lokhttp3/OkHttpClient;)V
  126. .locals 2
  127. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  128. new-instance v0, Ljava/util/ArrayList;
  129. invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
  130. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->interceptors:Ljava/util/List;
  131. new-instance v0, Ljava/util/ArrayList;
  132. invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
  133. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->networkInterceptors:Ljava/util/List;
  134. iget-object v0, p1, Lokhttp3/OkHttpClient;->dispatcher:Lokhttp3/Dispatcher;
  135. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->dispatcher:Lokhttp3/Dispatcher;
  136. iget-object v0, p1, Lokhttp3/OkHttpClient;->proxy:Ljava/net/Proxy;
  137. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->proxy:Ljava/net/Proxy;
  138. iget-object v0, p1, Lokhttp3/OkHttpClient;->protocols:Ljava/util/List;
  139. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->protocols:Ljava/util/List;
  140. iget-object v0, p1, Lokhttp3/OkHttpClient;->connectionSpecs:Ljava/util/List;
  141. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->connectionSpecs:Ljava/util/List;
  142. iget-object v0, p0, Lokhttp3/OkHttpClient$Builder;->interceptors:Ljava/util/List;
  143. iget-object v1, p1, Lokhttp3/OkHttpClient;->interceptors:Ljava/util/List;
  144. invoke-interface {v0, v1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
  145. iget-object v0, p0, Lokhttp3/OkHttpClient$Builder;->networkInterceptors:Ljava/util/List;
  146. iget-object v1, p1, Lokhttp3/OkHttpClient;->networkInterceptors:Ljava/util/List;
  147. invoke-interface {v0, v1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
  148. iget-object v0, p1, Lokhttp3/OkHttpClient;->eventListenerFactory:Lokhttp3/EventListener$Factory;
  149. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->eventListenerFactory:Lokhttp3/EventListener$Factory;
  150. iget-object v0, p1, Lokhttp3/OkHttpClient;->proxySelector:Ljava/net/ProxySelector;
  151. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->proxySelector:Ljava/net/ProxySelector;
  152. iget-object v0, p1, Lokhttp3/OkHttpClient;->cookieJar:Lokhttp3/CookieJar;
  153. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->cookieJar:Lokhttp3/CookieJar;
  154. iget-object v0, p1, Lokhttp3/OkHttpClient;->internalCache:Lokhttp3/internal/cache/InternalCache;
  155. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->internalCache:Lokhttp3/internal/cache/InternalCache;
  156. iget-object v0, p1, Lokhttp3/OkHttpClient;->cache:Lokhttp3/Cache;
  157. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->cache:Lokhttp3/Cache;
  158. iget-object v0, p1, Lokhttp3/OkHttpClient;->socketFactory:Ljavax/net/SocketFactory;
  159. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->socketFactory:Ljavax/net/SocketFactory;
  160. iget-object v0, p1, Lokhttp3/OkHttpClient;->sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
  161. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
  162. iget-object v0, p1, Lokhttp3/OkHttpClient;->certificateChainCleaner:Lokhttp3/internal/tls/CertificateChainCleaner;
  163. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->certificateChainCleaner:Lokhttp3/internal/tls/CertificateChainCleaner;
  164. iget-object v0, p1, Lokhttp3/OkHttpClient;->hostnameVerifier:Ljavax/net/ssl/HostnameVerifier;
  165. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->hostnameVerifier:Ljavax/net/ssl/HostnameVerifier;
  166. iget-object v0, p1, Lokhttp3/OkHttpClient;->certificatePinner:Lokhttp3/CertificatePinner;
  167. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->certificatePinner:Lokhttp3/CertificatePinner;
  168. iget-object v0, p1, Lokhttp3/OkHttpClient;->proxyAuthenticator:Lokhttp3/Authenticator;
  169. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->proxyAuthenticator:Lokhttp3/Authenticator;
  170. iget-object v0, p1, Lokhttp3/OkHttpClient;->authenticator:Lokhttp3/Authenticator;
  171. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->authenticator:Lokhttp3/Authenticator;
  172. iget-object v0, p1, Lokhttp3/OkHttpClient;->connectionPool:Lokhttp3/ConnectionPool;
  173. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->connectionPool:Lokhttp3/ConnectionPool;
  174. iget-object v0, p1, Lokhttp3/OkHttpClient;->dns:Lokhttp3/Dns;
  175. iput-object v0, p0, Lokhttp3/OkHttpClient$Builder;->dns:Lokhttp3/Dns;
  176. iget-boolean v0, p1, Lokhttp3/OkHttpClient;->followSslRedirects:Z
  177. iput-boolean v0, p0, Lokhttp3/OkHttpClient$Builder;->followSslRedirects:Z
  178. iget-boolean v0, p1, Lokhttp3/OkHttpClient;->followRedirects:Z
  179. iput-boolean v0, p0, Lokhttp3/OkHttpClient$Builder;->followRedirects:Z
  180. iget-boolean v0, p1, Lokhttp3/OkHttpClient;->retryOnConnectionFailure:Z
  181. iput-boolean v0, p0, Lokhttp3/OkHttpClient$Builder;->retryOnConnectionFailure:Z
  182. iget v0, p1, Lokhttp3/OkHttpClient;->connectTimeout:I
  183. iput v0, p0, Lokhttp3/OkHttpClient$Builder;->connectTimeout:I
  184. iget v0, p1, Lokhttp3/OkHttpClient;->readTimeout:I
  185. iput v0, p0, Lokhttp3/OkHttpClient$Builder;->readTimeout:I
  186. iget v0, p1, Lokhttp3/OkHttpClient;->writeTimeout:I
  187. iput v0, p0, Lokhttp3/OkHttpClient$Builder;->writeTimeout:I
  188. iget p1, p1, Lokhttp3/OkHttpClient;->pingInterval:I
  189. iput p1, p0, Lokhttp3/OkHttpClient$Builder;->pingInterval:I
  190. return-void
  191. .end method
  192. # virtual methods
  193. .method public addInterceptor(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;
  194. .locals 1
  195. if-eqz p1, :cond_0
  196. iget-object v0, p0, Lokhttp3/OkHttpClient$Builder;->interceptors:Ljava/util/List;
  197. invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  198. return-object p0
  199. :cond_0
  200. new-instance p1, Ljava/lang/IllegalArgumentException;
  201. const-string v0, "interceptor == null"
  202. invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  203. throw p1
  204. .end method
  205. .method public addNetworkInterceptor(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;
  206. .locals 1
  207. if-eqz p1, :cond_0
  208. iget-object v0, p0, Lokhttp3/OkHttpClient$Builder;->networkInterceptors:Ljava/util/List;
  209. invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  210. return-object p0
  211. :cond_0
  212. new-instance p1, Ljava/lang/IllegalArgumentException;
  213. const-string v0, "interceptor == null"
  214. invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  215. throw p1
  216. .end method
  217. .method public authenticator(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;
  218. .locals 1
  219. if-eqz p1, :cond_0
  220. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->authenticator:Lokhttp3/Authenticator;
  221. return-object p0
  222. :cond_0
  223. new-instance p1, Ljava/lang/NullPointerException;
  224. const-string v0, "authenticator == null"
  225. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  226. throw p1
  227. .end method
  228. .method public build()Lokhttp3/OkHttpClient;
  229. .locals 1
  230. new-instance v0, Lokhttp3/OkHttpClient;
  231. invoke-direct {v0, p0}, Lokhttp3/OkHttpClient;-><init>(Lokhttp3/OkHttpClient$Builder;)V
  232. return-object v0
  233. .end method
  234. .method public cache(Lokhttp3/Cache;)Lokhttp3/OkHttpClient$Builder;
  235. .locals 0
  236. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->cache:Lokhttp3/Cache;
  237. const/4 p1, 0x0
  238. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->internalCache:Lokhttp3/internal/cache/InternalCache;
  239. return-object p0
  240. .end method
  241. .method public certificatePinner(Lokhttp3/CertificatePinner;)Lokhttp3/OkHttpClient$Builder;
  242. .locals 1
  243. if-eqz p1, :cond_0
  244. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->certificatePinner:Lokhttp3/CertificatePinner;
  245. return-object p0
  246. :cond_0
  247. new-instance p1, Ljava/lang/NullPointerException;
  248. const-string v0, "certificatePinner == null"
  249. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  250. throw p1
  251. .end method
  252. .method public connectTimeout(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;
  253. .locals 1
  254. const-string v0, "timeout"
  255. invoke-static {v0, p1, p2, p3}, Lokhttp3/internal/Util;->checkDuration(Ljava/lang/String;JLjava/util/concurrent/TimeUnit;)I
  256. move-result p1
  257. iput p1, p0, Lokhttp3/OkHttpClient$Builder;->connectTimeout:I
  258. return-object p0
  259. .end method
  260. .method public connectionPool(Lokhttp3/ConnectionPool;)Lokhttp3/OkHttpClient$Builder;
  261. .locals 1
  262. if-eqz p1, :cond_0
  263. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->connectionPool:Lokhttp3/ConnectionPool;
  264. return-object p0
  265. :cond_0
  266. new-instance p1, Ljava/lang/NullPointerException;
  267. const-string v0, "connectionPool == null"
  268. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  269. throw p1
  270. .end method
  271. .method public connectionSpecs(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;
  272. .locals 0
  273. .annotation system Ldalvik/annotation/Signature;
  274. value = {
  275. "(",
  276. "Ljava/util/List<",
  277. "Lokhttp3/ConnectionSpec;",
  278. ">;)",
  279. "Lokhttp3/OkHttpClient$Builder;"
  280. }
  281. .end annotation
  282. invoke-static {p1}, Lokhttp3/internal/Util;->immutableList(Ljava/util/List;)Ljava/util/List;
  283. move-result-object p1
  284. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->connectionSpecs:Ljava/util/List;
  285. return-object p0
  286. .end method
  287. .method public cookieJar(Lokhttp3/CookieJar;)Lokhttp3/OkHttpClient$Builder;
  288. .locals 1
  289. if-eqz p1, :cond_0
  290. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->cookieJar:Lokhttp3/CookieJar;
  291. return-object p0
  292. :cond_0
  293. new-instance p1, Ljava/lang/NullPointerException;
  294. const-string v0, "cookieJar == null"
  295. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  296. throw p1
  297. .end method
  298. .method public dispatcher(Lokhttp3/Dispatcher;)Lokhttp3/OkHttpClient$Builder;
  299. .locals 1
  300. if-eqz p1, :cond_0
  301. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->dispatcher:Lokhttp3/Dispatcher;
  302. return-object p0
  303. :cond_0
  304. new-instance p1, Ljava/lang/IllegalArgumentException;
  305. const-string v0, "dispatcher == null"
  306. invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  307. throw p1
  308. .end method
  309. .method public dns(Lokhttp3/Dns;)Lokhttp3/OkHttpClient$Builder;
  310. .locals 1
  311. if-eqz p1, :cond_0
  312. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->dns:Lokhttp3/Dns;
  313. return-object p0
  314. :cond_0
  315. new-instance p1, Ljava/lang/NullPointerException;
  316. const-string v0, "dns == null"
  317. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  318. throw p1
  319. .end method
  320. .method public eventListener(Lokhttp3/EventListener;)Lokhttp3/OkHttpClient$Builder;
  321. .locals 1
  322. if-eqz p1, :cond_0
  323. invoke-static {p1}, Lokhttp3/EventListener;->factory(Lokhttp3/EventListener;)Lokhttp3/EventListener$Factory;
  324. move-result-object p1
  325. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->eventListenerFactory:Lokhttp3/EventListener$Factory;
  326. return-object p0
  327. :cond_0
  328. new-instance p1, Ljava/lang/NullPointerException;
  329. const-string v0, "eventListener == null"
  330. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  331. throw p1
  332. .end method
  333. .method public eventListenerFactory(Lokhttp3/EventListener$Factory;)Lokhttp3/OkHttpClient$Builder;
  334. .locals 1
  335. if-eqz p1, :cond_0
  336. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->eventListenerFactory:Lokhttp3/EventListener$Factory;
  337. return-object p0
  338. :cond_0
  339. new-instance p1, Ljava/lang/NullPointerException;
  340. const-string v0, "eventListenerFactory == null"
  341. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  342. throw p1
  343. .end method
  344. .method public followRedirects(Z)Lokhttp3/OkHttpClient$Builder;
  345. .locals 0
  346. iput-boolean p1, p0, Lokhttp3/OkHttpClient$Builder;->followRedirects:Z
  347. return-object p0
  348. .end method
  349. .method public followSslRedirects(Z)Lokhttp3/OkHttpClient$Builder;
  350. .locals 0
  351. iput-boolean p1, p0, Lokhttp3/OkHttpClient$Builder;->followSslRedirects:Z
  352. return-object p0
  353. .end method
  354. .method public hostnameVerifier(Ljavax/net/ssl/HostnameVerifier;)Lokhttp3/OkHttpClient$Builder;
  355. .locals 1
  356. if-eqz p1, :cond_0
  357. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->hostnameVerifier:Ljavax/net/ssl/HostnameVerifier;
  358. return-object p0
  359. :cond_0
  360. new-instance p1, Ljava/lang/NullPointerException;
  361. const-string v0, "hostnameVerifier == null"
  362. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  363. throw p1
  364. .end method
  365. .method public interceptors()Ljava/util/List;
  366. .locals 1
  367. .annotation system Ldalvik/annotation/Signature;
  368. value = {
  369. "()",
  370. "Ljava/util/List<",
  371. "Lokhttp3/Interceptor;",
  372. ">;"
  373. }
  374. .end annotation
  375. iget-object v0, p0, Lokhttp3/OkHttpClient$Builder;->interceptors:Ljava/util/List;
  376. return-object v0
  377. .end method
  378. .method public networkInterceptors()Ljava/util/List;
  379. .locals 1
  380. .annotation system Ldalvik/annotation/Signature;
  381. value = {
  382. "()",
  383. "Ljava/util/List<",
  384. "Lokhttp3/Interceptor;",
  385. ">;"
  386. }
  387. .end annotation
  388. iget-object v0, p0, Lokhttp3/OkHttpClient$Builder;->networkInterceptors:Ljava/util/List;
  389. return-object v0
  390. .end method
  391. .method public pingInterval(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;
  392. .locals 1
  393. const-string v0, "interval"
  394. invoke-static {v0, p1, p2, p3}, Lokhttp3/internal/Util;->checkDuration(Ljava/lang/String;JLjava/util/concurrent/TimeUnit;)I
  395. move-result p1
  396. iput p1, p0, Lokhttp3/OkHttpClient$Builder;->pingInterval:I
  397. return-object p0
  398. .end method
  399. .method public protocols(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;
  400. .locals 3
  401. .annotation system Ldalvik/annotation/Signature;
  402. value = {
  403. "(",
  404. "Ljava/util/List<",
  405. "Lokhttp3/Protocol;",
  406. ">;)",
  407. "Lokhttp3/OkHttpClient$Builder;"
  408. }
  409. .end annotation
  410. new-instance v0, Ljava/util/ArrayList;
  411. invoke-direct {v0, p1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
  412. sget-object p1, Lokhttp3/Protocol;->HTTP_1_1:Lokhttp3/Protocol;
  413. invoke-interface {v0, p1}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
  414. move-result p1
  415. if-eqz p1, :cond_2
  416. sget-object p1, Lokhttp3/Protocol;->HTTP_1_0:Lokhttp3/Protocol;
  417. invoke-interface {v0, p1}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
  418. move-result p1
  419. if-nez p1, :cond_1
  420. const/4 p1, 0x0
  421. invoke-interface {v0, p1}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
  422. move-result p1
  423. if-nez p1, :cond_0
  424. sget-object p1, Lokhttp3/Protocol;->SPDY_3:Lokhttp3/Protocol;
  425. invoke-interface {v0, p1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
  426. invoke-static {v0}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
  427. move-result-object p1
  428. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->protocols:Ljava/util/List;
  429. return-object p0
  430. :cond_0
  431. new-instance p1, Ljava/lang/IllegalArgumentException;
  432. const-string v0, "protocols must not contain null"
  433. invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  434. throw p1
  435. :cond_1
  436. new-instance p1, Ljava/lang/IllegalArgumentException;
  437. new-instance v1, Ljava/lang/StringBuilder;
  438. invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
  439. const-string v2, "protocols must not contain http/1.0: "
  440. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  441. invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  442. invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  443. move-result-object v0
  444. invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  445. throw p1
  446. :cond_2
  447. new-instance p1, Ljava/lang/IllegalArgumentException;
  448. new-instance v1, Ljava/lang/StringBuilder;
  449. invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
  450. const-string v2, "protocols doesn\'t contain http/1.1: "
  451. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  452. invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  453. invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  454. move-result-object v0
  455. invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  456. throw p1
  457. .end method
  458. .method public proxy(Ljava/net/Proxy;)Lokhttp3/OkHttpClient$Builder;
  459. .locals 0
  460. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->proxy:Ljava/net/Proxy;
  461. return-object p0
  462. .end method
  463. .method public proxyAuthenticator(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;
  464. .locals 1
  465. if-eqz p1, :cond_0
  466. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->proxyAuthenticator:Lokhttp3/Authenticator;
  467. return-object p0
  468. :cond_0
  469. new-instance p1, Ljava/lang/NullPointerException;
  470. const-string v0, "proxyAuthenticator == null"
  471. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  472. throw p1
  473. .end method
  474. .method public proxySelector(Ljava/net/ProxySelector;)Lokhttp3/OkHttpClient$Builder;
  475. .locals 0
  476. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->proxySelector:Ljava/net/ProxySelector;
  477. return-object p0
  478. .end method
  479. .method public readTimeout(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;
  480. .locals 1
  481. const-string v0, "timeout"
  482. invoke-static {v0, p1, p2, p3}, Lokhttp3/internal/Util;->checkDuration(Ljava/lang/String;JLjava/util/concurrent/TimeUnit;)I
  483. move-result p1
  484. iput p1, p0, Lokhttp3/OkHttpClient$Builder;->readTimeout:I
  485. return-object p0
  486. .end method
  487. .method public retryOnConnectionFailure(Z)Lokhttp3/OkHttpClient$Builder;
  488. .locals 0
  489. iput-boolean p1, p0, Lokhttp3/OkHttpClient$Builder;->retryOnConnectionFailure:Z
  490. return-object p0
  491. .end method
  492. .method setInternalCache(Lokhttp3/internal/cache/InternalCache;)V
  493. .locals 0
  494. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->internalCache:Lokhttp3/internal/cache/InternalCache;
  495. const/4 p1, 0x0
  496. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->cache:Lokhttp3/Cache;
  497. return-void
  498. .end method
  499. .method public socketFactory(Ljavax/net/SocketFactory;)Lokhttp3/OkHttpClient$Builder;
  500. .locals 1
  501. if-eqz p1, :cond_0
  502. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->socketFactory:Ljavax/net/SocketFactory;
  503. return-object p0
  504. :cond_0
  505. new-instance p1, Ljava/lang/NullPointerException;
  506. const-string v0, "socketFactory == null"
  507. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  508. throw p1
  509. .end method
  510. .method public sslSocketFactory(Ljavax/net/ssl/SSLSocketFactory;)Lokhttp3/OkHttpClient$Builder;
  511. .locals 3
  512. if-eqz p1, :cond_1
  513. invoke-static {}, Lokhttp3/internal/platform/Platform;->get()Lokhttp3/internal/platform/Platform;
  514. move-result-object v0
  515. invoke-virtual {v0, p1}, Lokhttp3/internal/platform/Platform;->trustManager(Ljavax/net/ssl/SSLSocketFactory;)Ljavax/net/ssl/X509TrustManager;
  516. move-result-object v0
  517. if-eqz v0, :cond_0
  518. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
  519. invoke-static {v0}, Lokhttp3/internal/tls/CertificateChainCleaner;->get(Ljavax/net/ssl/X509TrustManager;)Lokhttp3/internal/tls/CertificateChainCleaner;
  520. move-result-object p1
  521. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->certificateChainCleaner:Lokhttp3/internal/tls/CertificateChainCleaner;
  522. return-object p0
  523. :cond_0
  524. new-instance v0, Ljava/lang/IllegalStateException;
  525. new-instance v1, Ljava/lang/StringBuilder;
  526. invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
  527. const-string v2, "Unable to extract the trust manager on "
  528. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  529. invoke-static {}, Lokhttp3/internal/platform/Platform;->get()Lokhttp3/internal/platform/Platform;
  530. move-result-object v2
  531. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  532. const-string v2, ", sslSocketFactory is "
  533. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  534. invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  535. move-result-object p1
  536. invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  537. invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  538. move-result-object p1
  539. invoke-direct {v0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
  540. throw v0
  541. :cond_1
  542. new-instance p1, Ljava/lang/NullPointerException;
  543. const-string v0, "sslSocketFactory == null"
  544. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  545. throw p1
  546. .end method
  547. .method public sslSocketFactory(Ljavax/net/ssl/SSLSocketFactory;Ljavax/net/ssl/X509TrustManager;)Lokhttp3/OkHttpClient$Builder;
  548. .locals 0
  549. if-eqz p1, :cond_1
  550. if-eqz p2, :cond_0
  551. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
  552. invoke-static {p2}, Lokhttp3/internal/tls/CertificateChainCleaner;->get(Ljavax/net/ssl/X509TrustManager;)Lokhttp3/internal/tls/CertificateChainCleaner;
  553. move-result-object p1
  554. iput-object p1, p0, Lokhttp3/OkHttpClient$Builder;->certificateChainCleaner:Lokhttp3/internal/tls/CertificateChainCleaner;
  555. return-object p0
  556. :cond_0
  557. new-instance p1, Ljava/lang/NullPointerException;
  558. const-string p2, "trustManager == null"
  559. invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  560. throw p1
  561. :cond_1
  562. new-instance p1, Ljava/lang/NullPointerException;
  563. const-string p2, "sslSocketFactory == null"
  564. invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  565. throw p1
  566. .end method
  567. .method public writeTimeout(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;
  568. .locals 1
  569. const-string v0, "timeout"
  570. invoke-static {v0, p1, p2, p3}, Lokhttp3/internal/Util;->checkDuration(Ljava/lang/String;JLjava/util/concurrent/TimeUnit;)I
  571. move-result p1
  572. iput p1, p0, Lokhttp3/OkHttpClient$Builder;->writeTimeout:I
  573. return-object p0
  574. .end method