Cookie.smali 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756
  1. .class public final Lokhttp3/Cookie;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # annotations
  5. .annotation system Ldalvik/annotation/MemberClasses;
  6. value = {
  7. Lokhttp3/Cookie$Builder;
  8. }
  9. .end annotation
  10. # static fields
  11. .field private static final DAY_OF_MONTH_PATTERN:Ljava/util/regex/Pattern;
  12. .field private static final MONTH_PATTERN:Ljava/util/regex/Pattern;
  13. .field private static final TIME_PATTERN:Ljava/util/regex/Pattern;
  14. .field private static final YEAR_PATTERN:Ljava/util/regex/Pattern;
  15. # instance fields
  16. .field private final domain:Ljava/lang/String;
  17. .field private final expiresAt:J
  18. .field private final hostOnly:Z
  19. .field private final httpOnly:Z
  20. .field private final name:Ljava/lang/String;
  21. .field private final path:Ljava/lang/String;
  22. .field private final persistent:Z
  23. .field private final secure:Z
  24. .field private final value:Ljava/lang/String;
  25. # direct methods
  26. .method static constructor <clinit>()V
  27. .locals 1
  28. const-string v0, "(\\d{2,4})[^\\d]*"
  29. invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
  30. move-result-object v0
  31. sput-object v0, Lokhttp3/Cookie;->YEAR_PATTERN:Ljava/util/regex/Pattern;
  32. const-string v0, "(?i)(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec).*"
  33. invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
  34. move-result-object v0
  35. sput-object v0, Lokhttp3/Cookie;->MONTH_PATTERN:Ljava/util/regex/Pattern;
  36. const-string v0, "(\\d{1,2})[^\\d]*"
  37. invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
  38. move-result-object v0
  39. sput-object v0, Lokhttp3/Cookie;->DAY_OF_MONTH_PATTERN:Ljava/util/regex/Pattern;
  40. const-string v0, "(\\d{1,2}):(\\d{1,2}):(\\d{1,2})[^\\d]*"
  41. invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
  42. move-result-object v0
  43. sput-object v0, Lokhttp3/Cookie;->TIME_PATTERN:Ljava/util/regex/Pattern;
  44. return-void
  45. .end method
  46. .method private constructor <init>(Ljava/lang/String;Ljava/lang/String;JLjava/lang/String;Ljava/lang/String;ZZZZ)V
  47. .locals 0
  48. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  49. iput-object p1, p0, Lokhttp3/Cookie;->name:Ljava/lang/String;
  50. iput-object p2, p0, Lokhttp3/Cookie;->value:Ljava/lang/String;
  51. iput-wide p3, p0, Lokhttp3/Cookie;->expiresAt:J
  52. iput-object p5, p0, Lokhttp3/Cookie;->domain:Ljava/lang/String;
  53. iput-object p6, p0, Lokhttp3/Cookie;->path:Ljava/lang/String;
  54. iput-boolean p7, p0, Lokhttp3/Cookie;->secure:Z
  55. iput-boolean p8, p0, Lokhttp3/Cookie;->httpOnly:Z
  56. iput-boolean p9, p0, Lokhttp3/Cookie;->hostOnly:Z
  57. iput-boolean p10, p0, Lokhttp3/Cookie;->persistent:Z
  58. return-void
  59. .end method
  60. .method constructor <init>(Lokhttp3/Cookie$Builder;)V
  61. .locals 3
  62. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  63. iget-object v0, p1, Lokhttp3/Cookie$Builder;->name:Ljava/lang/String;
  64. if-eqz v0, :cond_2
  65. iget-object v1, p1, Lokhttp3/Cookie$Builder;->value:Ljava/lang/String;
  66. if-eqz v1, :cond_1
  67. iget-object v2, p1, Lokhttp3/Cookie$Builder;->domain:Ljava/lang/String;
  68. if-eqz v2, :cond_0
  69. iput-object v0, p0, Lokhttp3/Cookie;->name:Ljava/lang/String;
  70. iput-object v1, p0, Lokhttp3/Cookie;->value:Ljava/lang/String;
  71. iget-wide v0, p1, Lokhttp3/Cookie$Builder;->expiresAt:J
  72. iput-wide v0, p0, Lokhttp3/Cookie;->expiresAt:J
  73. iput-object v2, p0, Lokhttp3/Cookie;->domain:Ljava/lang/String;
  74. iget-object v0, p1, Lokhttp3/Cookie$Builder;->path:Ljava/lang/String;
  75. iput-object v0, p0, Lokhttp3/Cookie;->path:Ljava/lang/String;
  76. iget-boolean v0, p1, Lokhttp3/Cookie$Builder;->secure:Z
  77. iput-boolean v0, p0, Lokhttp3/Cookie;->secure:Z
  78. iget-boolean v0, p1, Lokhttp3/Cookie$Builder;->httpOnly:Z
  79. iput-boolean v0, p0, Lokhttp3/Cookie;->httpOnly:Z
  80. iget-boolean v0, p1, Lokhttp3/Cookie$Builder;->persistent:Z
  81. iput-boolean v0, p0, Lokhttp3/Cookie;->persistent:Z
  82. iget-boolean p1, p1, Lokhttp3/Cookie$Builder;->hostOnly:Z
  83. iput-boolean p1, p0, Lokhttp3/Cookie;->hostOnly:Z
  84. return-void
  85. :cond_0
  86. new-instance p1, Ljava/lang/NullPointerException;
  87. const-string v0, "builder.domain == null"
  88. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  89. throw p1
  90. :cond_1
  91. new-instance p1, Ljava/lang/NullPointerException;
  92. const-string v0, "builder.value == null"
  93. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  94. throw p1
  95. :cond_2
  96. new-instance p1, Ljava/lang/NullPointerException;
  97. const-string v0, "builder.name == null"
  98. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  99. throw p1
  100. .end method
  101. .method private static dateCharacterOffset(Ljava/lang/String;IIZ)I
  102. .locals 3
  103. :goto_0
  104. if-ge p1, p2, :cond_7
  105. invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
  106. move-result v0
  107. const/16 v1, 0x20
  108. const/4 v2, 0x1
  109. if-ge v0, v1, :cond_0
  110. const/16 v1, 0x9
  111. if-ne v0, v1, :cond_5
  112. :cond_0
  113. const/16 v1, 0x7f
  114. if-ge v0, v1, :cond_5
  115. const/16 v1, 0x30
  116. if-lt v0, v1, :cond_1
  117. const/16 v1, 0x39
  118. if-le v0, v1, :cond_5
  119. :cond_1
  120. const/16 v1, 0x61
  121. if-lt v0, v1, :cond_2
  122. const/16 v1, 0x7a
  123. if-le v0, v1, :cond_5
  124. :cond_2
  125. const/16 v1, 0x41
  126. if-lt v0, v1, :cond_3
  127. const/16 v1, 0x5a
  128. if-le v0, v1, :cond_5
  129. :cond_3
  130. const/16 v1, 0x3a
  131. if-ne v0, v1, :cond_4
  132. goto :goto_1
  133. :cond_4
  134. const/4 v0, 0x0
  135. goto :goto_2
  136. :cond_5
  137. :goto_1
  138. const/4 v0, 0x1
  139. :goto_2
  140. xor-int/lit8 v1, p3, 0x1
  141. if-ne v0, v1, :cond_6
  142. return p1
  143. :cond_6
  144. add-int/lit8 p1, p1, 0x1
  145. goto :goto_0
  146. :cond_7
  147. return p2
  148. .end method
  149. .method private static domainMatch(Ljava/lang/String;Ljava/lang/String;)Z
  150. .locals 2
  151. invoke-virtual {p0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  152. move-result v0
  153. const/4 v1, 0x1
  154. if-eqz v0, :cond_0
  155. return v1
  156. :cond_0
  157. invoke-virtual {p0, p1}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z
  158. move-result v0
  159. if-eqz v0, :cond_1
  160. invoke-virtual {p0}, Ljava/lang/String;->length()I
  161. move-result v0
  162. invoke-virtual {p1}, Ljava/lang/String;->length()I
  163. move-result p1
  164. sub-int/2addr v0, p1
  165. sub-int/2addr v0, v1
  166. invoke-virtual {p0, v0}, Ljava/lang/String;->charAt(I)C
  167. move-result p1
  168. const/16 v0, 0x2e
  169. if-ne p1, v0, :cond_1
  170. invoke-static {p0}, Lokhttp3/internal/Util;->verifyAsIpAddress(Ljava/lang/String;)Z
  171. move-result p0
  172. if-nez p0, :cond_1
  173. return v1
  174. :cond_1
  175. const/4 p0, 0x0
  176. return p0
  177. .end method
  178. .method static parse(JLokhttp3/HttpUrl;Ljava/lang/String;)Lokhttp3/Cookie;
  179. .locals 24
  180. move-object/from16 v0, p3
  181. invoke-virtual/range {p3 .. p3}, Ljava/lang/String;->length()I
  182. move-result v1
  183. const/16 v2, 0x3b
  184. const/4 v3, 0x0
  185. invoke-static {v0, v3, v1, v2}, Lokhttp3/internal/Util;->delimiterOffset(Ljava/lang/String;IIC)I
  186. move-result v4
  187. const/16 v5, 0x3d
  188. invoke-static {v0, v3, v4, v5}, Lokhttp3/internal/Util;->delimiterOffset(Ljava/lang/String;IIC)I
  189. move-result v6
  190. const/4 v7, 0x0
  191. if-ne v6, v4, :cond_0
  192. return-object v7
  193. :cond_0
  194. invoke-static {v0, v3, v6}, Lokhttp3/internal/Util;->trimSubstring(Ljava/lang/String;II)Ljava/lang/String;
  195. move-result-object v9
  196. invoke-virtual {v9}, Ljava/lang/String;->isEmpty()Z
  197. move-result v8
  198. if-nez v8, :cond_16
  199. invoke-static {v9}, Lokhttp3/internal/Util;->indexOfControlOrNonAscii(Ljava/lang/String;)I
  200. move-result v8
  201. const/4 v10, -0x1
  202. if-eq v8, v10, :cond_1
  203. goto/16 :goto_9
  204. :cond_1
  205. const/4 v8, 0x1
  206. add-int/2addr v6, v8
  207. invoke-static {v0, v6, v4}, Lokhttp3/internal/Util;->trimSubstring(Ljava/lang/String;II)Ljava/lang/String;
  208. move-result-object v6
  209. invoke-static {v6}, Lokhttp3/internal/Util;->indexOfControlOrNonAscii(Ljava/lang/String;)I
  210. move-result v11
  211. if-eq v11, v10, :cond_2
  212. return-object v7
  213. :cond_2
  214. add-int/2addr v4, v8
  215. const-wide/16 v10, -0x1
  216. const-wide v12, 0xe677d21fdbffL
  217. move-object v8, v7
  218. move-object/from16 v19, v8
  219. move-wide v14, v10
  220. move-wide/from16 v21, v12
  221. const/16 v17, 0x0
  222. const/16 v18, 0x0
  223. const/16 v20, 0x1
  224. const/16 v23, 0x0
  225. :goto_0
  226. if-ge v4, v1, :cond_a
  227. invoke-static {v0, v4, v1, v2}, Lokhttp3/internal/Util;->delimiterOffset(Ljava/lang/String;IIC)I
  228. move-result v7
  229. invoke-static {v0, v4, v7, v5}, Lokhttp3/internal/Util;->delimiterOffset(Ljava/lang/String;IIC)I
  230. move-result v2
  231. invoke-static {v0, v4, v2}, Lokhttp3/internal/Util;->trimSubstring(Ljava/lang/String;II)Ljava/lang/String;
  232. move-result-object v4
  233. if-ge v2, v7, :cond_3
  234. add-int/lit8 v2, v2, 0x1
  235. invoke-static {v0, v2, v7}, Lokhttp3/internal/Util;->trimSubstring(Ljava/lang/String;II)Ljava/lang/String;
  236. move-result-object v2
  237. goto :goto_1
  238. :cond_3
  239. const-string v2, ""
  240. :goto_1
  241. const-string v5, "expires"
  242. invoke-virtual {v4, v5}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
  243. move-result v5
  244. if-eqz v5, :cond_4
  245. :try_start_0
  246. invoke-virtual {v2}, Ljava/lang/String;->length()I
  247. move-result v4
  248. invoke-static {v2, v3, v4}, Lokhttp3/Cookie;->parseExpires(Ljava/lang/String;II)J
  249. move-result-wide v4
  250. :try_end_0
  251. .catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
  252. move-wide/from16 v21, v4
  253. goto :goto_2
  254. :cond_4
  255. const-string v5, "max-age"
  256. invoke-virtual {v4, v5}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
  257. move-result v5
  258. if-eqz v5, :cond_5
  259. :try_start_1
  260. invoke-static {v2}, Lokhttp3/Cookie;->parseMaxAge(Ljava/lang/String;)J
  261. move-result-wide v4
  262. :try_end_1
  263. .catch Ljava/lang/NumberFormatException; {:try_start_1 .. :try_end_1} :catch_0
  264. move-wide v14, v4
  265. :goto_2
  266. const/16 v23, 0x1
  267. goto :goto_3
  268. :cond_5
  269. const-string v5, "domain"
  270. invoke-virtual {v4, v5}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
  271. move-result v5
  272. if-eqz v5, :cond_6
  273. :try_start_2
  274. invoke-static {v2}, Lokhttp3/Cookie;->parseDomain(Ljava/lang/String;)Ljava/lang/String;
  275. move-result-object v2
  276. :try_end_2
  277. .catch Ljava/lang/IllegalArgumentException; {:try_start_2 .. :try_end_2} :catch_0
  278. move-object v8, v2
  279. const/16 v20, 0x0
  280. goto :goto_3
  281. :cond_6
  282. const-string v5, "path"
  283. invoke-virtual {v4, v5}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
  284. move-result v5
  285. if-eqz v5, :cond_7
  286. move-object/from16 v19, v2
  287. goto :goto_3
  288. :cond_7
  289. const-string v2, "secure"
  290. invoke-virtual {v4, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
  291. move-result v2
  292. if-eqz v2, :cond_8
  293. const/16 v17, 0x1
  294. goto :goto_3
  295. :cond_8
  296. const-string v2, "httponly"
  297. invoke-virtual {v4, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
  298. move-result v2
  299. if-eqz v2, :cond_9
  300. const/16 v18, 0x1
  301. :catch_0
  302. :cond_9
  303. :goto_3
  304. add-int/lit8 v4, v7, 0x1
  305. const/16 v2, 0x3b
  306. const/16 v5, 0x3d
  307. const/4 v7, 0x0
  308. goto :goto_0
  309. :cond_a
  310. const-wide/high16 v0, -0x8000000000000000L
  311. cmp-long v2, v14, v0
  312. if-nez v2, :cond_c
  313. :cond_b
  314. move-wide v11, v0
  315. goto :goto_5
  316. :cond_c
  317. cmp-long v0, v14, v10
  318. if-eqz v0, :cond_f
  319. const-wide v0, 0x20c49ba5e353f7L
  320. cmp-long v2, v14, v0
  321. if-gtz v2, :cond_d
  322. const-wide/16 v0, 0x3e8
  323. mul-long v14, v14, v0
  324. goto :goto_4
  325. :cond_d
  326. const-wide v14, 0x7fffffffffffffffL
  327. :goto_4
  328. add-long v0, p0, v14
  329. cmp-long v2, v0, p0
  330. if-ltz v2, :cond_e
  331. cmp-long v2, v0, v12
  332. if-lez v2, :cond_b
  333. :cond_e
  334. move-wide v11, v12
  335. goto :goto_5
  336. :cond_f
  337. move-wide/from16 v11, v21
  338. :goto_5
  339. invoke-virtual/range {p2 .. p2}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
  340. move-result-object v0
  341. if-nez v8, :cond_10
  342. move-object v13, v0
  343. const/4 v1, 0x0
  344. goto :goto_6
  345. :cond_10
  346. invoke-static {v0, v8}, Lokhttp3/Cookie;->domainMatch(Ljava/lang/String;Ljava/lang/String;)Z
  347. move-result v1
  348. if-nez v1, :cond_11
  349. const/4 v1, 0x0
  350. return-object v1
  351. :cond_11
  352. const/4 v1, 0x0
  353. move-object v13, v8
  354. :goto_6
  355. invoke-virtual {v0}, Ljava/lang/String;->length()I
  356. move-result v0
  357. invoke-virtual {v13}, Ljava/lang/String;->length()I
  358. move-result v2
  359. if-eq v0, v2, :cond_12
  360. invoke-static {}, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->get()Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;
  361. move-result-object v0
  362. invoke-virtual {v0, v13}, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->getEffectiveTldPlusOne(Ljava/lang/String;)Ljava/lang/String;
  363. move-result-object v0
  364. if-nez v0, :cond_12
  365. return-object v1
  366. :cond_12
  367. const-string v0, "/"
  368. move-object/from16 v7, v19
  369. if-eqz v7, :cond_14
  370. invoke-virtual {v7, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
  371. move-result v1
  372. if-nez v1, :cond_13
  373. goto :goto_7
  374. :cond_13
  375. move-object v14, v7
  376. goto :goto_8
  377. :cond_14
  378. :goto_7
  379. invoke-virtual/range {p2 .. p2}, Lokhttp3/HttpUrl;->encodedPath()Ljava/lang/String;
  380. move-result-object v1
  381. const/16 v2, 0x2f
  382. invoke-virtual {v1, v2}, Ljava/lang/String;->lastIndexOf(I)I
  383. move-result v2
  384. if-eqz v2, :cond_15
  385. invoke-virtual {v1, v3, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;
  386. move-result-object v0
  387. :cond_15
  388. move-object v14, v0
  389. :goto_8
  390. new-instance v0, Lokhttp3/Cookie;
  391. move-object v8, v0
  392. move-object v10, v6
  393. move/from16 v15, v17
  394. move/from16 v16, v18
  395. move/from16 v17, v20
  396. move/from16 v18, v23
  397. invoke-direct/range {v8 .. v18}, Lokhttp3/Cookie;-><init>(Ljava/lang/String;Ljava/lang/String;JLjava/lang/String;Ljava/lang/String;ZZZZ)V
  398. return-object v0
  399. :cond_16
  400. :goto_9
  401. move-object v0, v7
  402. return-object v0
  403. .end method
  404. .method public static parse(Lokhttp3/HttpUrl;Ljava/lang/String;)Lokhttp3/Cookie;
  405. .locals 2
  406. invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
  407. move-result-wide v0
  408. invoke-static {v0, v1, p0, p1}, Lokhttp3/Cookie;->parse(JLokhttp3/HttpUrl;Ljava/lang/String;)Lokhttp3/Cookie;
  409. move-result-object p0
  410. return-object p0
  411. .end method
  412. .method public static parseAll(Lokhttp3/HttpUrl;Lokhttp3/Headers;)Ljava/util/List;
  413. .locals 4
  414. .annotation system Ldalvik/annotation/Signature;
  415. value = {
  416. "(",
  417. "Lokhttp3/HttpUrl;",
  418. "Lokhttp3/Headers;",
  419. ")",
  420. "Ljava/util/List<",
  421. "Lokhttp3/Cookie;",
  422. ">;"
  423. }
  424. .end annotation
  425. const-string v0, "Set-Cookie"
  426. invoke-virtual {p1, v0}, Lokhttp3/Headers;->values(Ljava/lang/String;)Ljava/util/List;
  427. move-result-object p1
  428. invoke-interface {p1}, Ljava/util/List;->size()I
  429. move-result v0
  430. const/4 v1, 0x0
  431. const/4 v2, 0x0
  432. :goto_0
  433. if-ge v2, v0, :cond_2
  434. invoke-interface {p1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
  435. move-result-object v3
  436. check-cast v3, Ljava/lang/String;
  437. invoke-static {p0, v3}, Lokhttp3/Cookie;->parse(Lokhttp3/HttpUrl;Ljava/lang/String;)Lokhttp3/Cookie;
  438. move-result-object v3
  439. if-nez v3, :cond_0
  440. goto :goto_1
  441. :cond_0
  442. if-nez v1, :cond_1
  443. new-instance v1, Ljava/util/ArrayList;
  444. invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
  445. :cond_1
  446. invoke-interface {v1, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  447. :goto_1
  448. add-int/lit8 v2, v2, 0x1
  449. goto :goto_0
  450. :cond_2
  451. if-eqz v1, :cond_3
  452. invoke-static {v1}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
  453. move-result-object p0
  454. goto :goto_2
  455. :cond_3
  456. invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;
  457. move-result-object p0
  458. :goto_2
  459. return-object p0
  460. .end method
  461. .method private static parseDomain(Ljava/lang/String;)Ljava/lang/String;
  462. .locals 2
  463. const-string v0, "."
  464. invoke-virtual {p0, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z
  465. move-result v1
  466. if-nez v1, :cond_2
  467. invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
  468. move-result v0
  469. if-eqz v0, :cond_0
  470. const/4 v0, 0x1
  471. invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
  472. move-result-object p0
  473. :cond_0
  474. invoke-static {p0}, Lokhttp3/internal/Util;->canonicalizeHost(Ljava/lang/String;)Ljava/lang/String;
  475. move-result-object p0
  476. if-eqz p0, :cond_1
  477. return-object p0
  478. :cond_1
  479. new-instance p0, Ljava/lang/IllegalArgumentException;
  480. invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
  481. throw p0
  482. :cond_2
  483. new-instance p0, Ljava/lang/IllegalArgumentException;
  484. invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
  485. throw p0
  486. .end method
  487. .method private static parseExpires(Ljava/lang/String;II)J
  488. .locals 12
  489. const/4 v0, 0x0
  490. invoke-static {p0, p1, p2, v0}, Lokhttp3/Cookie;->dateCharacterOffset(Ljava/lang/String;IIZ)I
  491. move-result p1
  492. sget-object v1, Lokhttp3/Cookie;->TIME_PATTERN:Ljava/util/regex/Pattern;
  493. invoke-virtual {v1, p0}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
  494. move-result-object v1
  495. const/4 v2, -0x1
  496. const/4 v3, -0x1
  497. const/4 v4, -0x1
  498. const/4 v5, -0x1
  499. const/4 v6, -0x1
  500. const/4 v7, -0x1
  501. const/4 v8, -0x1
  502. :goto_0
  503. const/4 v9, 0x2
  504. const/4 v10, 0x1
  505. if-ge p1, p2, :cond_4
  506. add-int/lit8 v11, p1, 0x1
  507. invoke-static {p0, v11, p2, v10}, Lokhttp3/Cookie;->dateCharacterOffset(Ljava/lang/String;IIZ)I
  508. move-result v11
  509. invoke-virtual {v1, p1, v11}, Ljava/util/regex/Matcher;->region(II)Ljava/util/regex/Matcher;
  510. if-ne v4, v2, :cond_0
  511. sget-object p1, Lokhttp3/Cookie;->TIME_PATTERN:Ljava/util/regex/Pattern;
  512. invoke-virtual {v1, p1}, Ljava/util/regex/Matcher;->usePattern(Ljava/util/regex/Pattern;)Ljava/util/regex/Matcher;
  513. move-result-object p1
  514. invoke-virtual {p1}, Ljava/util/regex/Matcher;->matches()Z
  515. move-result p1
  516. if-eqz p1, :cond_0
  517. invoke-virtual {v1, v10}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
  518. move-result-object p1
  519. invoke-static {p1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
  520. move-result p1
  521. invoke-virtual {v1, v9}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
  522. move-result-object v4
  523. invoke-static {v4}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
  524. move-result v4
  525. const/4 v7, 0x3
  526. invoke-virtual {v1, v7}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
  527. move-result-object v7
  528. invoke-static {v7}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
  529. move-result v7
  530. move v8, v7
  531. move v7, v4
  532. move v4, p1
  533. goto :goto_1
  534. :cond_0
  535. if-ne v5, v2, :cond_1
  536. sget-object p1, Lokhttp3/Cookie;->DAY_OF_MONTH_PATTERN:Ljava/util/regex/Pattern;
  537. invoke-virtual {v1, p1}, Ljava/util/regex/Matcher;->usePattern(Ljava/util/regex/Pattern;)Ljava/util/regex/Matcher;
  538. move-result-object p1
  539. invoke-virtual {p1}, Ljava/util/regex/Matcher;->matches()Z
  540. move-result p1
  541. if-eqz p1, :cond_1
  542. invoke-virtual {v1, v10}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
  543. move-result-object p1
  544. invoke-static {p1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
  545. move-result p1
  546. move v5, p1
  547. goto :goto_1
  548. :cond_1
  549. if-ne v6, v2, :cond_2
  550. sget-object p1, Lokhttp3/Cookie;->MONTH_PATTERN:Ljava/util/regex/Pattern;
  551. invoke-virtual {v1, p1}, Ljava/util/regex/Matcher;->usePattern(Ljava/util/regex/Pattern;)Ljava/util/regex/Matcher;
  552. move-result-object p1
  553. invoke-virtual {p1}, Ljava/util/regex/Matcher;->matches()Z
  554. move-result p1
  555. if-eqz p1, :cond_2
  556. invoke-virtual {v1, v10}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
  557. move-result-object p1
  558. sget-object v6, Ljava/util/Locale;->US:Ljava/util/Locale;
  559. invoke-virtual {p1, v6}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
  560. move-result-object p1
  561. sget-object v6, Lokhttp3/Cookie;->MONTH_PATTERN:Ljava/util/regex/Pattern;
  562. invoke-virtual {v6}, Ljava/util/regex/Pattern;->pattern()Ljava/lang/String;
  563. move-result-object v6
  564. invoke-virtual {v6, p1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I
  565. move-result p1
  566. div-int/lit8 p1, p1, 0x4
  567. move v6, p1
  568. goto :goto_1
  569. :cond_2
  570. if-ne v3, v2, :cond_3
  571. sget-object p1, Lokhttp3/Cookie;->YEAR_PATTERN:Ljava/util/regex/Pattern;
  572. invoke-virtual {v1, p1}, Ljava/util/regex/Matcher;->usePattern(Ljava/util/regex/Pattern;)Ljava/util/regex/Matcher;
  573. move-result-object p1
  574. invoke-virtual {p1}, Ljava/util/regex/Matcher;->matches()Z
  575. move-result p1
  576. if-eqz p1, :cond_3
  577. invoke-virtual {v1, v10}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
  578. move-result-object p1
  579. invoke-static {p1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
  580. move-result p1
  581. move v3, p1
  582. :cond_3
  583. :goto_1
  584. add-int/lit8 v11, v11, 0x1
  585. invoke-static {p0, v11, p2, v0}, Lokhttp3/Cookie;->dateCharacterOffset(Ljava/lang/String;IIZ)I
  586. move-result p1
  587. goto/16 :goto_0
  588. :cond_4
  589. const/16 p0, 0x46
  590. if-lt v3, p0, :cond_5
  591. const/16 p0, 0x63
  592. if-gt v3, p0, :cond_5
  593. add-int/lit16 v3, v3, 0x76c
  594. :cond_5
  595. if-ltz v3, :cond_6
  596. const/16 p0, 0x45
  597. if-gt v3, p0, :cond_6
  598. add-int/lit16 v3, v3, 0x7d0
  599. :cond_6
  600. const/16 p0, 0x641
  601. if-lt v3, p0, :cond_c
  602. if-eq v6, v2, :cond_b
  603. if-lt v5, v10, :cond_a
  604. const/16 p0, 0x1f
  605. if-gt v5, p0, :cond_a
  606. if-ltz v4, :cond_9
  607. const/16 p0, 0x17
  608. if-gt v4, p0, :cond_9
  609. if-ltz v7, :cond_8
  610. const/16 p0, 0x3b
  611. if-gt v7, p0, :cond_8
  612. if-ltz v8, :cond_7
  613. if-gt v8, p0, :cond_7
  614. new-instance p0, Ljava/util/GregorianCalendar;
  615. sget-object p1, Lokhttp3/internal/Util;->UTC:Ljava/util/TimeZone;
  616. invoke-direct {p0, p1}, Ljava/util/GregorianCalendar;-><init>(Ljava/util/TimeZone;)V
  617. invoke-virtual {p0, v0}, Ljava/util/Calendar;->setLenient(Z)V
  618. invoke-virtual {p0, v10, v3}, Ljava/util/Calendar;->set(II)V
  619. sub-int/2addr v6, v10
  620. invoke-virtual {p0, v9, v6}, Ljava/util/Calendar;->set(II)V
  621. const/4 p1, 0x5
  622. invoke-virtual {p0, p1, v5}, Ljava/util/Calendar;->set(II)V
  623. const/16 p1, 0xb
  624. invoke-virtual {p0, p1, v4}, Ljava/util/Calendar;->set(II)V
  625. const/16 p1, 0xc
  626. invoke-virtual {p0, p1, v7}, Ljava/util/Calendar;->set(II)V
  627. const/16 p1, 0xd
  628. invoke-virtual {p0, p1, v8}, Ljava/util/Calendar;->set(II)V
  629. const/16 p1, 0xe
  630. invoke-virtual {p0, p1, v0}, Ljava/util/Calendar;->set(II)V
  631. invoke-virtual {p0}, Ljava/util/Calendar;->getTimeInMillis()J
  632. move-result-wide p0
  633. return-wide p0
  634. :cond_7
  635. new-instance p0, Ljava/lang/IllegalArgumentException;
  636. invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
  637. throw p0
  638. :cond_8
  639. new-instance p0, Ljava/lang/IllegalArgumentException;
  640. invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
  641. throw p0
  642. :cond_9
  643. new-instance p0, Ljava/lang/IllegalArgumentException;
  644. invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
  645. throw p0
  646. :cond_a
  647. new-instance p0, Ljava/lang/IllegalArgumentException;
  648. invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
  649. throw p0
  650. :cond_b
  651. new-instance p0, Ljava/lang/IllegalArgumentException;
  652. invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
  653. throw p0
  654. :cond_c
  655. new-instance p0, Ljava/lang/IllegalArgumentException;
  656. invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
  657. goto :goto_3
  658. :goto_2
  659. throw p0
  660. :goto_3
  661. goto :goto_2
  662. .end method
  663. .method private static parseMaxAge(Ljava/lang/String;)J
  664. .locals 6
  665. const-wide/high16 v0, -0x8000000000000000L
  666. :try_start_0
  667. invoke-static {p0}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
  668. move-result-wide v2
  669. :try_end_0
  670. .catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
  671. const-wide/16 v4, 0x0
  672. cmp-long p0, v2, v4
  673. if-gtz p0, :cond_0
  674. goto :goto_0
  675. :cond_0
  676. move-wide v0, v2
  677. :goto_0
  678. return-wide v0
  679. :catch_0
  680. move-exception v2
  681. const-string v3, "-?\\d+"
  682. invoke-virtual {p0, v3}, Ljava/lang/String;->matches(Ljava/lang/String;)Z
  683. move-result v3
  684. if-eqz v3, :cond_2
  685. const-string v2, "-"
  686. invoke-virtual {p0, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
  687. move-result p0
  688. if-eqz p0, :cond_1
  689. goto :goto_1
  690. :cond_1
  691. const-wide v0, 0x7fffffffffffffffL
  692. :goto_1
  693. return-wide v0
  694. :cond_2
  695. throw v2
  696. .end method
  697. .method private static pathMatch(Lokhttp3/HttpUrl;Ljava/lang/String;)Z
  698. .locals 2
  699. invoke-virtual {p0}, Lokhttp3/HttpUrl;->encodedPath()Ljava/lang/String;
  700. move-result-object p0
  701. invoke-virtual {p0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  702. move-result v0
  703. const/4 v1, 0x1
  704. if-eqz v0, :cond_0
  705. return v1
  706. :cond_0
  707. invoke-virtual {p0, p1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
  708. move-result v0
  709. if-eqz v0, :cond_2
  710. const-string v0, "/"
  711. invoke-virtual {p1, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z
  712. move-result v0
  713. if-eqz v0, :cond_1
  714. return v1
  715. :cond_1
  716. invoke-virtual {p1}, Ljava/lang/String;->length()I
  717. move-result p1
  718. invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
  719. move-result p0
  720. const/16 p1, 0x2f
  721. if-ne p0, p1, :cond_2
  722. return v1
  723. :cond_2
  724. const/4 p0, 0x0
  725. return p0
  726. .end method
  727. # virtual methods
  728. .method public domain()Ljava/lang/String;
  729. .locals 1
  730. iget-object v0, p0, Lokhttp3/Cookie;->domain:Ljava/lang/String;
  731. return-object v0
  732. .end method
  733. .method public equals(Ljava/lang/Object;)Z
  734. .locals 6
  735. instance-of v0, p1, Lokhttp3/Cookie;
  736. const/4 v1, 0x0
  737. if-nez v0, :cond_0
  738. return v1
  739. :cond_0
  740. check-cast p1, Lokhttp3/Cookie;
  741. iget-object v0, p1, Lokhttp3/Cookie;->name:Ljava/lang/String;
  742. iget-object v2, p0, Lokhttp3/Cookie;->name:Ljava/lang/String;
  743. invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  744. move-result v0
  745. if-eqz v0, :cond_1
  746. iget-object v0, p1, Lokhttp3/Cookie;->value:Ljava/lang/String;
  747. iget-object v2, p0, Lokhttp3/Cookie;->value:Ljava/lang/String;
  748. invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  749. move-result v0
  750. if-eqz v0, :cond_1
  751. iget-object v0, p1, Lokhttp3/Cookie;->domain:Ljava/lang/String;
  752. iget-object v2, p0, Lokhttp3/Cookie;->domain:Ljava/lang/String;
  753. invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  754. move-result v0
  755. if-eqz v0, :cond_1
  756. iget-object v0, p1, Lokhttp3/Cookie;->path:Ljava/lang/String;
  757. iget-object v2, p0, Lokhttp3/Cookie;->path:Ljava/lang/String;
  758. invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  759. move-result v0
  760. if-eqz v0, :cond_1
  761. iget-wide v2, p1, Lokhttp3/Cookie;->expiresAt:J
  762. iget-wide v4, p0, Lokhttp3/Cookie;->expiresAt:J
  763. cmp-long v0, v2, v4
  764. if-nez v0, :cond_1
  765. iget-boolean v0, p1, Lokhttp3/Cookie;->secure:Z
  766. iget-boolean v2, p0, Lokhttp3/Cookie;->secure:Z
  767. if-ne v0, v2, :cond_1
  768. iget-boolean v0, p1, Lokhttp3/Cookie;->httpOnly:Z
  769. iget-boolean v2, p0, Lokhttp3/Cookie;->httpOnly:Z
  770. if-ne v0, v2, :cond_1
  771. iget-boolean v0, p1, Lokhttp3/Cookie;->persistent:Z
  772. iget-boolean v2, p0, Lokhttp3/Cookie;->persistent:Z
  773. if-ne v0, v2, :cond_1
  774. iget-boolean p1, p1, Lokhttp3/Cookie;->hostOnly:Z
  775. iget-boolean v0, p0, Lokhttp3/Cookie;->hostOnly:Z
  776. if-ne p1, v0, :cond_1
  777. const/4 v1, 0x1
  778. :cond_1
  779. return v1
  780. .end method
  781. .method public expiresAt()J
  782. .locals 2
  783. iget-wide v0, p0, Lokhttp3/Cookie;->expiresAt:J
  784. return-wide v0
  785. .end method
  786. .method public hashCode()I
  787. .locals 6
  788. iget-object v0, p0, Lokhttp3/Cookie;->name:Ljava/lang/String;
  789. invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
  790. move-result v0
  791. const/16 v1, 0x20f
  792. add-int/2addr v1, v0
  793. mul-int/lit8 v1, v1, 0x1f
  794. iget-object v0, p0, Lokhttp3/Cookie;->value:Ljava/lang/String;
  795. invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
  796. move-result v0
  797. add-int/2addr v1, v0
  798. mul-int/lit8 v1, v1, 0x1f
  799. iget-object v0, p0, Lokhttp3/Cookie;->domain:Ljava/lang/String;
  800. invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
  801. move-result v0
  802. add-int/2addr v1, v0
  803. mul-int/lit8 v1, v1, 0x1f
  804. iget-object v0, p0, Lokhttp3/Cookie;->path:Ljava/lang/String;
  805. invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
  806. move-result v0
  807. add-int/2addr v1, v0
  808. mul-int/lit8 v1, v1, 0x1f
  809. iget-wide v2, p0, Lokhttp3/Cookie;->expiresAt:J
  810. const/16 v0, 0x20
  811. ushr-long v4, v2, v0
  812. xor-long/2addr v2, v4
  813. long-to-int v0, v2
  814. add-int/2addr v1, v0
  815. mul-int/lit8 v1, v1, 0x1f
  816. iget-boolean v0, p0, Lokhttp3/Cookie;->secure:Z
  817. xor-int/lit8 v0, v0, 0x1
  818. add-int/2addr v1, v0
  819. mul-int/lit8 v1, v1, 0x1f
  820. iget-boolean v0, p0, Lokhttp3/Cookie;->httpOnly:Z
  821. xor-int/lit8 v0, v0, 0x1
  822. add-int/2addr v1, v0
  823. mul-int/lit8 v1, v1, 0x1f
  824. iget-boolean v0, p0, Lokhttp3/Cookie;->persistent:Z
  825. xor-int/lit8 v0, v0, 0x1
  826. add-int/2addr v1, v0
  827. mul-int/lit8 v1, v1, 0x1f
  828. iget-boolean v0, p0, Lokhttp3/Cookie;->hostOnly:Z
  829. xor-int/lit8 v0, v0, 0x1
  830. add-int/2addr v1, v0
  831. return v1
  832. .end method
  833. .method public hostOnly()Z
  834. .locals 1
  835. iget-boolean v0, p0, Lokhttp3/Cookie;->hostOnly:Z
  836. return v0
  837. .end method
  838. .method public httpOnly()Z
  839. .locals 1
  840. iget-boolean v0, p0, Lokhttp3/Cookie;->httpOnly:Z
  841. return v0
  842. .end method
  843. .method public matches(Lokhttp3/HttpUrl;)Z
  844. .locals 2
  845. iget-boolean v0, p0, Lokhttp3/Cookie;->hostOnly:Z
  846. if-eqz v0, :cond_0
  847. invoke-virtual {p1}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
  848. move-result-object v0
  849. iget-object v1, p0, Lokhttp3/Cookie;->domain:Ljava/lang/String;
  850. invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  851. move-result v0
  852. goto :goto_0
  853. :cond_0
  854. invoke-virtual {p1}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
  855. move-result-object v0
  856. iget-object v1, p0, Lokhttp3/Cookie;->domain:Ljava/lang/String;
  857. invoke-static {v0, v1}, Lokhttp3/Cookie;->domainMatch(Ljava/lang/String;Ljava/lang/String;)Z
  858. move-result v0
  859. :goto_0
  860. const/4 v1, 0x0
  861. if-nez v0, :cond_1
  862. return v1
  863. :cond_1
  864. iget-object v0, p0, Lokhttp3/Cookie;->path:Ljava/lang/String;
  865. invoke-static {p1, v0}, Lokhttp3/Cookie;->pathMatch(Lokhttp3/HttpUrl;Ljava/lang/String;)Z
  866. move-result v0
  867. if-nez v0, :cond_2
  868. return v1
  869. :cond_2
  870. iget-boolean v0, p0, Lokhttp3/Cookie;->secure:Z
  871. if-eqz v0, :cond_3
  872. invoke-virtual {p1}, Lokhttp3/HttpUrl;->isHttps()Z
  873. move-result p1
  874. if-nez p1, :cond_3
  875. return v1
  876. :cond_3
  877. const/4 p1, 0x1
  878. return p1
  879. .end method
  880. .method public name()Ljava/lang/String;
  881. .locals 1
  882. iget-object v0, p0, Lokhttp3/Cookie;->name:Ljava/lang/String;
  883. return-object v0
  884. .end method
  885. .method public path()Ljava/lang/String;
  886. .locals 1
  887. iget-object v0, p0, Lokhttp3/Cookie;->path:Ljava/lang/String;
  888. return-object v0
  889. .end method
  890. .method public persistent()Z
  891. .locals 1
  892. iget-boolean v0, p0, Lokhttp3/Cookie;->persistent:Z
  893. return v0
  894. .end method
  895. .method public secure()Z
  896. .locals 1
  897. iget-boolean v0, p0, Lokhttp3/Cookie;->secure:Z
  898. return v0
  899. .end method
  900. .method public toString()Ljava/lang/String;
  901. .locals 1
  902. const/4 v0, 0x0
  903. invoke-virtual {p0, v0}, Lokhttp3/Cookie;->toString(Z)Ljava/lang/String;
  904. move-result-object v0
  905. return-object v0
  906. .end method
  907. .method toString(Z)Ljava/lang/String;
  908. .locals 6
  909. new-instance v0, Ljava/lang/StringBuilder;
  910. invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
  911. iget-object v1, p0, Lokhttp3/Cookie;->name:Ljava/lang/String;
  912. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  913. const/16 v1, 0x3d
  914. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
  915. iget-object v1, p0, Lokhttp3/Cookie;->value:Ljava/lang/String;
  916. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  917. iget-boolean v1, p0, Lokhttp3/Cookie;->persistent:Z
  918. if-eqz v1, :cond_1
  919. iget-wide v1, p0, Lokhttp3/Cookie;->expiresAt:J
  920. const-wide/high16 v3, -0x8000000000000000L
  921. cmp-long v5, v1, v3
  922. if-nez v5, :cond_0
  923. const-string v1, "; max-age=0"
  924. goto :goto_0
  925. :cond_0
  926. const-string v1, "; expires="
  927. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  928. new-instance v1, Ljava/util/Date;
  929. iget-wide v2, p0, Lokhttp3/Cookie;->expiresAt:J
  930. invoke-direct {v1, v2, v3}, Ljava/util/Date;-><init>(J)V
  931. invoke-static {v1}, Lokhttp3/internal/http/HttpDate;->format(Ljava/util/Date;)Ljava/lang/String;
  932. move-result-object v1
  933. :goto_0
  934. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  935. :cond_1
  936. iget-boolean v1, p0, Lokhttp3/Cookie;->hostOnly:Z
  937. if-nez v1, :cond_3
  938. const-string v1, "; domain="
  939. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  940. if-eqz p1, :cond_2
  941. const-string p1, "."
  942. invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  943. :cond_2
  944. iget-object p1, p0, Lokhttp3/Cookie;->domain:Ljava/lang/String;
  945. invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  946. :cond_3
  947. const-string p1, "; path="
  948. invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  949. iget-object p1, p0, Lokhttp3/Cookie;->path:Ljava/lang/String;
  950. invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  951. iget-boolean p1, p0, Lokhttp3/Cookie;->secure:Z
  952. if-eqz p1, :cond_4
  953. const-string p1, "; secure"
  954. invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  955. :cond_4
  956. iget-boolean p1, p0, Lokhttp3/Cookie;->httpOnly:Z
  957. if-eqz p1, :cond_5
  958. const-string p1, "; httponly"
  959. invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  960. :cond_5
  961. invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  962. move-result-object p1
  963. return-object p1
  964. .end method
  965. .method public value()Ljava/lang/String;
  966. .locals 1
  967. iget-object v0, p0, Lokhttp3/Cookie;->value:Ljava/lang/String;
  968. return-object v0
  969. .end method