.class public final Lz5/ze;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Landroid/webkit/ValueCallback;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Landroid/webkit/ValueCallback<",
        "Ljava/lang/String;",
        ">;"
    }
.end annotation


# instance fields
.field public final synthetic a:Ll5/i;


# direct methods
.method public constructor <init>(Ll5/i;)V
    .registers 2

    iput-object p1, p0, Lz5/ze;->a:Ll5/i;

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

    return-void
.end method


# virtual methods
.method public final a(Ljava/lang/String;)V
    .registers 13

    iget-object v0, p0, Lz5/ze;->a:Ll5/i;

    iget-object v1, v0, Ll5/i;->w:Ljava/lang/Object;

    check-cast v1, Lcom/google/android/gms/internal/ads/n;

    iget-object v2, v0, Ll5/i;->t:Ljava/lang/Object;

    check-cast v2, Lcom/google/android/gms/internal/ads/j;

    iget-object v3, v0, Ll5/i;->u:Ljava/lang/Object;

    check-cast v3, Landroid/webkit/WebView;

    iget-boolean v5, v0, Ll5/i;->v:Z

    invoke-static {v1}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 1
    iget-object v0, v2, Lcom/google/android/gms/internal/ads/j;->g:Ljava/lang/Object;

    monitor-enter v0

    :try_start_16
    iget v4, v2, Lcom/google/android/gms/internal/ads/j;->m:I

    add-int/lit8 v4, v4, -0x1

    iput v4, v2, Lcom/google/android/gms/internal/ads/j;->m:I

    monitor-exit v0
    :try_end_1d
    .catchall {:try_start_16 .. :try_end_1d} :catchall_c3

    .line 2
    :try_start_1d
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    const/4 v10, 0x1

    if-nez v0, :cond_90

    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string p1, "text"

    invoke-virtual {v0, p1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iget-boolean p1, v1, Lcom/google/android/gms/internal/ads/n;->E:Z

    if-nez p1, :cond_7e

    invoke-virtual {v3}, Landroid/webkit/WebView;->getTitle()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result p1

    if-nez p1, :cond_7e

    invoke-virtual {v3}, Landroid/webkit/WebView;->getTitle()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v0

    add-int/2addr v0, v10

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/String;->length()I

    move-result v6

    add-int/2addr v0, v6

    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6, v0}, Ljava/lang/StringBuilder;-><init>(I)V

    invoke-virtual {v6, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, "\n"

    invoke-virtual {v6, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3}, Landroid/webkit/WebView;->getX()F

    move-result v6

    invoke-virtual {v3}, Landroid/webkit/WebView;->getY()F

    move-result v7

    invoke-virtual {v3}, Landroid/webkit/WebView;->getWidth()I

    move-result p1

    int-to-float v8, p1

    invoke-virtual {v3}, Landroid/webkit/WebView;->getHeight()I

    move-result p1

    :goto_78
    int-to-float v9, p1

    move-object v3, v2

    invoke-virtual/range {v3 .. v9}, Lcom/google/android/gms/internal/ads/j;->a(Ljava/lang/String;ZFFFF)V

    goto :goto_90

    :cond_7e
    invoke-virtual {v3}, Landroid/webkit/WebView;->getX()F

    move-result v6

    invoke-virtual {v3}, Landroid/webkit/WebView;->getY()F

    move-result v7

    invoke-virtual {v3}, Landroid/webkit/WebView;->getWidth()I

    move-result p1

    int-to-float v8, p1

    invoke-virtual {v3}, Landroid/webkit/WebView;->getHeight()I

    move-result p1

    goto :goto_78

    .line 3
    :cond_90
    :goto_90
    iget-object p1, v2, Lcom/google/android/gms/internal/ads/j;->g:Ljava/lang/Object;

    monitor-enter p1
    :try_end_93
    .catch Lorg/json/JSONException; {:try_start_1d .. :try_end_93} :catch_bd
    .catchall {:try_start_1d .. :try_end_93} :catchall_a5

    :try_start_93
    iget v0, v2, Lcom/google/android/gms/internal/ads/j;->m:I

    if-nez v0, :cond_98

    goto :goto_99

    :cond_98
    const/4 v10, 0x0

    :goto_99
    monitor-exit p1
    :try_end_9a
    .catchall {:try_start_93 .. :try_end_9a} :catchall_a2

    if-eqz v10, :cond_c2

    .line 4
    :try_start_9c
    iget-object p1, v1, Lcom/google/android/gms/internal/ads/n;->u:Lcom/google/android/gms/internal/ads/k;

    invoke-virtual {p1, v2}, Lcom/google/android/gms/internal/ads/k;->i(Lcom/google/android/gms/internal/ads/j;)Z
    :try_end_a1
    .catch Lorg/json/JSONException; {:try_start_9c .. :try_end_a1} :catch_bd
    .catchall {:try_start_9c .. :try_end_a1} :catchall_a5

    goto :goto_c2

    :catchall_a2
    move-exception v0

    .line 5
    :try_start_a3
    monitor-exit p1
    :try_end_a4
    .catchall {:try_start_a3 .. :try_end_a4} :catchall_a2

    :try_start_a4
    throw v0
    :try_end_a5
    .catch Lorg/json/JSONException; {:try_start_a4 .. :try_end_a5} :catch_bd
    .catchall {:try_start_a4 .. :try_end_a5} :catchall_a5

    :catchall_a5
    move-exception p1

    const-string v0, "Failed to get webview content."

    .line 6
    invoke-static {v0, p1}, Lz5/d50;->zze(Ljava/lang/String;Ljava/lang/Throwable;)V

    invoke-static {}, Lcom/google/android/gms/ads/internal/zzt;->zzg()Lcom/google/android/gms/internal/ads/u1;

    move-result-object v0

    const-string v1, "ContentFetchTask.processWebViewContent"

    .line 7
    iget-object v2, v0, Lcom/google/android/gms/internal/ads/u1;->e:Landroid/content/Context;

    iget-object v0, v0, Lcom/google/android/gms/internal/ads/u1;->f:Lz5/g50;

    invoke-static {v2, v0}, Lcom/google/android/gms/internal/ads/h1;->d(Landroid/content/Context;Lz5/g50;)Lz5/f10;

    move-result-object v0

    invoke-interface {v0, p1, v1}, Lz5/f10;->a(Ljava/lang/Throwable;Ljava/lang/String;)V

    goto :goto_c2

    :catch_bd
    const-string p1, "Json string may be malformed."

    .line 8
    invoke-static {p1}, Lz5/d50;->zzd(Ljava/lang/String;)V

    :cond_c2
    :goto_c2
    return-void

    :catchall_c3
    move-exception p1

    .line 9
    :try_start_c4
    monitor-exit v0
    :try_end_c5
    .catchall {:try_start_c4 .. :try_end_c5} :catchall_c3

    throw p1
.end method

.method public final bridge synthetic onReceiveValue(Ljava/lang/Object;)V
    .registers 2

    check-cast p1, Ljava/lang/String;

    invoke-virtual {p0, p1}, Lz5/ze;->a(Ljava/lang/String;)V

    return-void
.end method
