c.smali

.class public final Lzk/c;
.super Ljava/lang/Object;
.source "PaymentSelectWebViewPool.kt"


# annotations
.annotation runtime Lkotlin/Metadata;
    bv = {
        0x1,
        0x0,
        0x3
    }
    d1 = {
        "\u0000.\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\u0008\u0003\u0008\u00c6\u0002\u0018\u00002\u00020\u0001B\u0007\u0008\u0002\u00a2\u0006\u0002\u0010\u0002J\u0012\u0010\u0007\u001a\u0004\u0018\u00010\u00062\u0006\u0010\u0008\u001a\u00020\tH\u0007J\u0008\u0010\n\u001a\u00020\u000bH\u0007J\u0008\u0010\u000c\u001a\u00020\rH\u0007J\u0010\u0010\u000e\u001a\u00020\u000b2\u0006\u0010\u000f\u001a\u00020\u0006H\u0007R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082T\u00a2\u0006\u0002\n\u0000R\u0010\u0010\u0005\u001a\u0004\u0018\u00010\u0006X\u0082\u000e\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u0010"
    }
    d2 = {
        "Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebViewPool;",
        "",
        "()V",
        "TAG",
        "",
        "cacheWebView",
        "Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebView;",
        "acquire",
        "context",
        "Landroid/content/Context;",
        "clear",
        "",
        "isEmpty",
        "",
        "release",
        "instance",
        "driver_indonesiaRelease"
    }
    k = 0x1
    mv = {
        0x1,
        0x1,
        0x10
    }
.end annotation


# static fields
.field public static a:Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebView;

.field public static final b:Lzk/c;


# direct methods
.method public static constructor <clinit>()V
    .registers 1

    new-instance v0, Lzk/c;

    invoke-direct {v0}, Lzk/c;-><init>()V

    sput-object v0, Lzk/c;->b:Lzk/c;

    return-void
.end method

.method public constructor <init>()V
    .registers 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static final synthetic a(Lzk/c;)Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebView;
    .registers 1

    sget-object p0, Lzk/c;->a:Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebView;

    return-object p0
.end method


# virtual methods
.method public final a(Landroid/content/Context;)Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebView;
    .registers 6
    .annotation build Landroidx/annotation/MainThread;
    .end annotation

    sget-object v0, Lqa/d;->e:Lqa/d$a;

    sget-object v1, Lzk/c$a;->a:Lzk/c$a;

    const-string v2, "spm.PaymentSelectWebViewPool"

    invoke-virtual {v0, v2, v1}, Lqa/d$a;->c(Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V

    sget-object v0, Lzk/c;->a:Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebView;

    const/4 v1, 0x0

    if-eqz v0, :cond_2b

    invoke-virtual {v0}, Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebView;->getState()Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebView$State;

    move-result-object v2

    sget-object v3, Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebView$State;->ERROR:Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebView$State;

    if-ne v2, v3, :cond_1a

    invoke-virtual {v0}, Landroid/webkit/WebView;->destroy()V

    goto :goto_2b

    :cond_1a
    invoke-virtual {v0}, Landroid/webkit/WebView;->getContext()Landroid/content/Context;

    move-result-object v2

    instance-of v3, v2, Landroid/content/MutableContextWrapper;

    if-nez v3, :cond_23

    move-object v2, v1

    :cond_23
    check-cast v2, Landroid/content/MutableContextWrapper;

    if-eqz v2, :cond_2c

    invoke-virtual {v2, p1}, Landroid/content/MutableContextWrapper;->setBaseContext(Landroid/content/Context;)V

    goto :goto_2c

    :cond_2b
    :goto_2b
    move-object v0, v1

    :cond_2c
    :goto_2c
    sput-object v1, Lzk/c;->a:Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebView;

    return-object v0
.end method

.method public final a()V
    .registers 4
    .annotation build Landroidx/annotation/MainThread;
    .end annotation

    sget-object v0, Lqa/d;->e:Lqa/d$a;

    sget-object v1, Lzk/c$b;->a:Lzk/c$b;

    const-string v2, "spm.PaymentSelectWebViewPool"

    invoke-virtual {v0, v2, v1}, Lqa/d$a;->c(Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V

    sget-object v0, Lzk/c;->a:Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebView;

    if-eqz v0, :cond_10

    invoke-virtual {v0}, Landroid/webkit/WebView;->destroy()V

    :cond_10
    const/4 v0, 0x0

    sput-object v0, Lzk/c;->a:Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebView;

    return-void
.end method

.method public final a(Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebView;)V
    .registers 5
    .annotation build Landroidx/annotation/MainThread;
    .end annotation

    sget-object v0, Lzk/c;->a:Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebView;

    const-string v1, "spm.PaymentSelectWebViewPool"

    if-nez v0, :cond_2a

    invoke-virtual {p1}, Landroid/webkit/WebView;->getContext()Landroid/content/Context;

    move-result-object v0

    instance-of v2, v0, Landroid/content/MutableContextWrapper;

    if-nez v2, :cond_f

    const/4 v0, 0x0

    :cond_f
    check-cast v0, Landroid/content/MutableContextWrapper;

    if-eqz v0, :cond_20

    sget-object v2, Ljd/b;->c:Ljd/b$a;

    invoke-virtual {v2}, Ljd/b$a;->a()Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v2}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/content/MutableContextWrapper;->setBaseContext(Landroid/content/Context;)V

    :cond_20
    sput-object p1, Lzk/c;->a:Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebView;

    sget-object p1, Lqa/d;->e:Lqa/d$a;

    sget-object v0, Lzk/c$c;->a:Lzk/c$c;

    invoke-virtual {p1, v1, v0}, Lqa/d$a;->c(Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V

    goto :goto_34

    :cond_2a
    invoke-virtual {p1}, Landroid/webkit/WebView;->destroy()V

    sget-object p1, Lqa/d;->e:Lqa/d$a;

    sget-object v0, Lzk/c$d;->a:Lzk/c$d;

    invoke-virtual {p1, v1, v0}, Lqa/d$a;->e(Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V

    :goto_34
    return-void
.end method

.method public final b()Z
    .registers 2
    .annotation build Landroidx/annotation/MainThread;
    .end annotation

    sget-object v0, Lzk/c;->a:Lcom/shopee/foody/driver/wallet/spm/PaymentSelectWebView;

    if-nez v0, :cond_6

    const/4 v0, 0x1

    goto :goto_7

    :cond_6
    const/4 v0, 0x0

    :goto_7
    return v0
.end method