AndroidPlatform$CloseGuard.smali 
.class final Ldc/squareup/okhttp3/internal/platform/AndroidPlatform$CloseGuard;
.super Ljava/lang/Object;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Ldc/squareup/okhttp3/internal/platform/AndroidPlatform;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x18
    name = "CloseGuard"
.end annotation
# instance fields
.field private final getMethod:Ljava/lang/reflect/Method;
.field private final openMethod:Ljava/lang/reflect/Method;
.field private final warnIfOpenMethod:Ljava/lang/reflect/Method;
# direct methods
.method constructor <init>(Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;)V
    .registers 4
    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V
    .line 2
    iput-object p1, p0, Ldc/squareup/okhttp3/internal/platform/AndroidPlatform$CloseGuard;->getMethod:Ljava/lang/reflect/Method;
    .line 3
    iput-object p2, p0, Ldc/squareup/okhttp3/internal/platform/AndroidPlatform$CloseGuard;->openMethod:Ljava/lang/reflect/Method;
    .line 4
    iput-object p3, p0, Ldc/squareup/okhttp3/internal/platform/AndroidPlatform$CloseGuard;->warnIfOpenMethod:Ljava/lang/reflect/Method;
    return-void
.end method
.method static get()Ldc/squareup/okhttp3/internal/platform/AndroidPlatform$CloseGuard;
    .registers 7
    const/4 v0, 0x0
    :try_start_1
    const-string v1, "dalvik.system.CloseGuard"
    .line 1
    invoke-static {v1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
    move-result-object v1
    :try_end_7
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_7} :catch_29
    const-string v2, "get"
    const/4 v3, 0x0
    :try_start_a
    new-array v4, v3, [Ljava/lang/Class;
    .line 2
    invoke-virtual {v1, v2, v4}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
    move-result-object v2
    :try_end_10
    .catch Ljava/lang/Exception; {:try_start_a .. :try_end_10} :catch_29
    const-string v4, "open"
    const/4 v5, 0x1
    :try_start_13
    new-array v5, v5, [Ljava/lang/Class;
    .line 3
    const-class v6, Ljava/lang/String;
    aput-object v6, v5, v3
    invoke-virtual {v1, v4, v5}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
    move-result-object v4
    :try_end_1d
    .catch Ljava/lang/Exception; {:try_start_13 .. :try_end_1d} :catch_29
    const-string/jumbo v5, "warnIfOpen"
    :try_start_20
    new-array v3, v3, [Ljava/lang/Class;
    .line 4
    invoke-virtual {v1, v5, v3}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
    move-result-object v0
    :try_end_26
    .catch Ljava/lang/Exception; {:try_start_20 .. :try_end_26} :catch_29
    move-object v1, v0
    move-object v0, v2
    goto :goto_2b
    :catch_29
    move-object v1, v0
    move-object v4, v1
    .line 10
    :goto_2b
    new-instance v2, Ldc/squareup/okhttp3/internal/platform/AndroidPlatform$CloseGuard;
    invoke-direct {v2, v0, v4, v1}, Ldc/squareup/okhttp3/internal/platform/AndroidPlatform$CloseGuard;-><init>(Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;)V
    return-object v2
.end method
# virtual methods
.method createAndOpen(Ljava/lang/String;)Ljava/lang/Object;
    .registers 7
    .line 1
    iget-object v0, p0, Ldc/squareup/okhttp3/internal/platform/AndroidPlatform$CloseGuard;->getMethod:Ljava/lang/reflect/Method;
    const/4 v1, 0x0
    if-eqz v0, :cond_17
    const/4 v2, 0x0
    :try_start_6
    new-array v3, v2, [Ljava/lang/Object;
    .line 3
    invoke-virtual {v0, v1, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    move-result-object v0
    .line 4
    iget-object v3, p0, Ldc/squareup/okhttp3/internal/platform/AndroidPlatform$CloseGuard;->openMethod:Ljava/lang/reflect/Method;
    const/4 v4, 0x1
    new-array v4, v4, [Ljava/lang/Object;
    aput-object p1, v4, v2
    invoke-virtual {v3, v0, v4}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_16
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_16} :catch_17
    return-object v0
    :catch_17
    :cond_17
    return-object v1
.end method
.method warnIfOpen(Ljava/lang/Object;)Z
    .registers 5
    const/4 v0, 0x0
    if-eqz p1, :cond_b
    .line 1
    :try_start_3
    iget-object v1, p0, Ldc/squareup/okhttp3/internal/platform/AndroidPlatform$CloseGuard;->warnIfOpenMethod:Ljava/lang/reflect/Method;
    new-array v2, v0, [Ljava/lang/Object;
    invoke-virtual {v1, p1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_a
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_a} :catch_b
    const/4 v0, 0x1
    :catch_b
    :cond_b
    return v0
.end method