RouteDatabase.smali
.class public final Lokhttp3/internal/connection/RouteDatabase;
.super Ljava/lang/Object;
.source "SourceFile"
# instance fields
.field private final failedRoutes:Ljava/util/Set;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Set<",
"Lokhttp3/Route;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>()V
.registers 2
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
new-instance v0, Ljava/util/LinkedHashSet;
invoke-direct {v0}, Ljava/util/LinkedHashSet;-><init>()V
iput-object v0, p0, Lokhttp3/internal/connection/RouteDatabase;->failedRoutes:Ljava/util/Set;
return-void
.end method
.method public static INVOKEVIRTUAL_okhttp3_internal_connection_RouteDatabase_com_shopee_app_asm_fix_printstack_PrintStackTraceShieldFix_printStackTrace(Ljava/lang/Exception;)V
.registers 1
return-void
.end method
# virtual methods
.method public declared-synchronized connected(Lokhttp3/Route;)V
.registers 3
monitor-enter p0
.line 1
:try_start_1
iget-object v0, p0, Lokhttp3/internal/connection/RouteDatabase;->failedRoutes:Ljava/util/Set;
invoke-interface {v0, p1}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z
:try_end_6
.catchall {:try_start_1 .. :try_end_6} :catchall_24
.line 2
:try_start_6
invoke-virtual {p1}, Lokhttp3/Route;->socketAddress()Ljava/net/InetSocketAddress;
move-result-object p1
invoke-virtual {p1}, Ljava/net/InetSocketAddress;->getAddress()Ljava/net/InetAddress;
move-result-object p1
:try_end_e
.catch Ljava/lang/Exception; {:try_start_6 .. :try_end_e} :catch_1e
.catchall {:try_start_6 .. :try_end_e} :catchall_24
if-nez p1, :cond_12
.line 3
monitor-exit p0
return-void
.line 4
:cond_12
:try_start_12
invoke-static {}, Lokhttp3/utils/ShpOKHttpContext;->get()Lokhttp3/utils/ShpOKHttpContext;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/utils/ShpOKHttpContext;->getConfig()Lokhttp3/utils/ShpOKHttpConfig;
move-result-object v0
invoke-virtual {v0, p1}, Lokhttp3/utils/ShpOKHttpConfig;->removeFromBlackList(Ljava/net/InetAddress;)V
:try_end_1d
.catch Ljava/lang/Exception; {:try_start_12 .. :try_end_1d} :catch_1e
.catchall {:try_start_12 .. :try_end_1d} :catchall_24
goto :goto_22
:catch_1e
move-exception p1
.line 5
:try_start_1f
invoke-static {p1}, Lokhttp3/internal/connection/RouteDatabase;->INVOKEVIRTUAL_okhttp3_internal_connection_RouteDatabase_com_shopee_app_asm_fix_printstack_PrintStackTraceShieldFix_printStackTrace(Ljava/lang/Exception;)V
:try_end_22
.catchall {:try_start_1f .. :try_end_22} :catchall_24
.line 6
:goto_22
monitor-exit p0
return-void
:catchall_24
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized failed(Lokhttp3/Route;)V
.registers 3
monitor-enter p0
.line 1
:try_start_1
iget-object v0, p0, Lokhttp3/internal/connection/RouteDatabase;->failedRoutes:Ljava/util/Set;
invoke-interface {v0, p1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
:try_end_6
.catchall {:try_start_1 .. :try_end_6} :catchall_24
.line 2
:try_start_6
invoke-virtual {p1}, Lokhttp3/Route;->socketAddress()Ljava/net/InetSocketAddress;
move-result-object p1
invoke-virtual {p1}, Ljava/net/InetSocketAddress;->getAddress()Ljava/net/InetAddress;
move-result-object p1
:try_end_e
.catch Ljava/lang/Exception; {:try_start_6 .. :try_end_e} :catch_1e
.catchall {:try_start_6 .. :try_end_e} :catchall_24
if-nez p1, :cond_12
.line 3
monitor-exit p0
return-void
.line 4
:cond_12
:try_start_12
invoke-static {}, Lokhttp3/utils/ShpOKHttpContext;->get()Lokhttp3/utils/ShpOKHttpContext;
move-result-object v0
invoke-virtual {v0}, Lokhttp3/utils/ShpOKHttpContext;->getConfig()Lokhttp3/utils/ShpOKHttpConfig;
move-result-object v0
invoke-virtual {v0, p1}, Lokhttp3/utils/ShpOKHttpConfig;->addToBlackList(Ljava/net/InetAddress;)V
:try_end_1d
.catch Ljava/lang/Exception; {:try_start_12 .. :try_end_1d} :catch_1e
.catchall {:try_start_12 .. :try_end_1d} :catchall_24
goto :goto_22
:catch_1e
move-exception p1
.line 5
:try_start_1f
invoke-static {p1}, Lokhttp3/internal/connection/RouteDatabase;->INVOKEVIRTUAL_okhttp3_internal_connection_RouteDatabase_com_shopee_app_asm_fix_printstack_PrintStackTraceShieldFix_printStackTrace(Ljava/lang/Exception;)V
:try_end_22
.catchall {:try_start_1f .. :try_end_22} :catchall_24
.line 6
:goto_22
monitor-exit p0
return-void
:catchall_24
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized shouldPostpone(Lokhttp3/Route;)Z
.registers 3
monitor-enter p0
:try_start_1
iget-object v0, p0, Lokhttp3/internal/connection/RouteDatabase;->failedRoutes:Ljava/util/Set;
invoke-interface {v0, p1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
move-result p1
:try_end_7
.catchall {:try_start_1 .. :try_end_7} :catchall_9
monitor-exit p0
return p1
:catchall_9
move-exception p1
monitor-exit p0
throw p1
.end method