apkfuckery/com.discord/smali/com/franmontiel/persistentcookiejar/PersistentCookieJar.smali

272 lines
6.3 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class public Lcom/franmontiel/persistentcookiejar/PersistentCookieJar;
.super Ljava/lang/Object;
.source "PersistentCookieJar.java"
# interfaces
.implements Lcom/franmontiel/persistentcookiejar/ClearableCookieJar;
# instance fields
2019-07-29 20:14:17 +00:00
.field private Zb:Lcom/franmontiel/persistentcookiejar/cache/CookieCache;
2019-07-24 11:27:29 +00:00
2019-07-29 20:14:17 +00:00
.field private Zc:Lcom/franmontiel/persistentcookiejar/persistence/CookiePersistor;
2019-07-24 11:27:29 +00:00
# direct methods
.method public constructor <init>(Lcom/franmontiel/persistentcookiejar/cache/CookieCache;Lcom/franmontiel/persistentcookiejar/persistence/CookiePersistor;)V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
2019-07-29 20:14:17 +00:00
iput-object p1, p0, Lcom/franmontiel/persistentcookiejar/PersistentCookieJar;->Zb:Lcom/franmontiel/persistentcookiejar/cache/CookieCache;
2019-07-24 11:27:29 +00:00
2019-07-29 20:14:17 +00:00
iput-object p2, p0, Lcom/franmontiel/persistentcookiejar/PersistentCookieJar;->Zc:Lcom/franmontiel/persistentcookiejar/persistence/CookiePersistor;
2019-07-24 11:27:29 +00:00
2019-07-29 20:14:17 +00:00
iget-object p1, p0, Lcom/franmontiel/persistentcookiejar/PersistentCookieJar;->Zb:Lcom/franmontiel/persistentcookiejar/cache/CookieCache;
2019-07-24 11:27:29 +00:00
2019-07-29 20:14:17 +00:00
invoke-interface {p2}, Lcom/franmontiel/persistentcookiejar/persistence/CookiePersistor;->kl()Ljava/util/List;
2019-07-24 11:27:29 +00:00
move-result-object p2
invoke-interface {p1, p2}, Lcom/franmontiel/persistentcookiejar/cache/CookieCache;->addAll(Ljava/util/Collection;)V
return-void
.end method
# virtual methods
.method public final declared-synchronized a(Lokhttp3/s;)Ljava/util/List;
.locals 11
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lokhttp3/s;",
")",
"Ljava/util/List<",
"Lokhttp3/l;",
">;"
}
.end annotation
monitor-enter p0
:try_start_0
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
2019-07-29 20:14:17 +00:00
iget-object v2, p0, Lcom/franmontiel/persistentcookiejar/PersistentCookieJar;->Zb:Lcom/franmontiel/persistentcookiejar/cache/CookieCache;
2019-07-24 11:27:29 +00:00
invoke-interface {v2}, Lcom/franmontiel/persistentcookiejar/cache/CookieCache;->iterator()Ljava/util/Iterator;
move-result-object v2
:cond_0
:goto_0
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_7
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Lokhttp3/l;
2019-07-29 20:14:17 +00:00
iget-wide v4, v3, Lokhttp3/l;->bru:J
2019-07-24 11:27:29 +00:00
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v6
const/4 v8, 0x1
const/4 v9, 0x0
cmp-long v10, v4, v6
if-gez v10, :cond_1
const/4 v4, 0x1
goto :goto_1
:cond_1
const/4 v4, 0x0
:goto_1
if-eqz v4, :cond_2
invoke-interface {v0, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
invoke-interface {v2}, Ljava/util/Iterator;->remove()V
goto :goto_0
:cond_2
2019-07-29 20:14:17 +00:00
iget-boolean v4, v3, Lokhttp3/l;->brz:Z
2019-07-24 11:27:29 +00:00
if-eqz v4, :cond_3
2019-07-29 20:14:17 +00:00
iget-object v4, p1, Lokhttp3/s;->brX:Ljava/lang/String;
2019-07-24 11:27:29 +00:00
2019-07-29 20:14:17 +00:00
iget-object v5, v3, Lokhttp3/l;->brv:Ljava/lang/String;
2019-07-24 11:27:29 +00:00
invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
goto :goto_2
:cond_3
2019-07-29 20:14:17 +00:00
iget-object v4, p1, Lokhttp3/s;->brX:Ljava/lang/String;
2019-07-24 11:27:29 +00:00
2019-07-29 20:14:17 +00:00
iget-object v5, v3, Lokhttp3/l;->brv:Ljava/lang/String;
2019-07-24 11:27:29 +00:00
invoke-static {v4, v5}, Lokhttp3/l;->domainMatch(Ljava/lang/String;Ljava/lang/String;)Z
move-result v4
:goto_2
if-nez v4, :cond_4
goto :goto_3
:cond_4
iget-object v4, v3, Lokhttp3/l;->path:Ljava/lang/String;
invoke-static {p1, v4}, Lokhttp3/l;->a(Lokhttp3/s;Ljava/lang/String;)Z
move-result v4
if-nez v4, :cond_5
goto :goto_3
:cond_5
2019-07-29 20:14:17 +00:00
iget-boolean v4, v3, Lokhttp3/l;->brw:Z
2019-07-24 11:27:29 +00:00
if-eqz v4, :cond_6
2019-07-29 20:14:17 +00:00
invoke-virtual {p1}, Lokhttp3/s;->Gr()Z
2019-07-24 11:27:29 +00:00
move-result v4
if-nez v4, :cond_6
goto :goto_3
:cond_6
const/4 v9, 0x1
:goto_3
if-eqz v9, :cond_0
invoke-interface {v1, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_0
:cond_7
2019-07-29 20:14:17 +00:00
iget-object p1, p0, Lcom/franmontiel/persistentcookiejar/PersistentCookieJar;->Zc:Lcom/franmontiel/persistentcookiejar/persistence/CookiePersistor;
2019-07-24 11:27:29 +00:00
invoke-interface {p1, v0}, Lcom/franmontiel/persistentcookiejar/persistence/CookiePersistor;->e(Ljava/util/Collection;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-object v1
:catchall_0
move-exception p1
monitor-exit p0
goto :goto_5
:goto_4
throw p1
:goto_5
goto :goto_4
.end method
.method public final declared-synchronized o(Ljava/util/List;)V
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Lokhttp3/l;",
">;)V"
}
.end annotation
monitor-enter p0
:try_start_0
2019-07-29 20:14:17 +00:00
iget-object v0, p0, Lcom/franmontiel/persistentcookiejar/PersistentCookieJar;->Zb:Lcom/franmontiel/persistentcookiejar/cache/CookieCache;
2019-07-24 11:27:29 +00:00
invoke-interface {v0, p1}, Lcom/franmontiel/persistentcookiejar/cache/CookieCache;->addAll(Ljava/util/Collection;)V
2019-07-29 20:14:17 +00:00
iget-object v0, p0, Lcom/franmontiel/persistentcookiejar/PersistentCookieJar;->Zc:Lcom/franmontiel/persistentcookiejar/persistence/CookiePersistor;
2019-07-24 11:27:29 +00:00
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object p1
:cond_0
:goto_0
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_1
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lokhttp3/l;
2019-07-29 20:14:17 +00:00
iget-boolean v3, v2, Lokhttp3/l;->bry:Z
2019-07-24 11:27:29 +00:00
if-eqz v3, :cond_0
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_0
:cond_1
invoke-interface {v0, v1}, Lcom/franmontiel/persistentcookiejar/persistence/CookiePersistor;->d(Ljava/util/Collection;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
goto :goto_2
:goto_1
throw p1
:goto_2
goto :goto_1
.end method