.class public abstract Lu2/a;
.super Lu2/b;
.source ""


# instance fields
.field public v:Ljava/lang/String;

.field public w:Z


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

    invoke-direct {p0}, Lu2/b;-><init>()V

    return-void
.end method


# virtual methods
.method public A(Lw2/i;Ljava/lang/String;Lorg/xml/sax/Attributes;)V
    .registers 12

    const/4 p2, 0x0

    iput-object p2, p0, Lu2/a;->v:Ljava/lang/String;

    const-string v0, "optional"

    invoke-interface {p3, v0}, Lorg/xml/sax/Attributes;->getValue(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x0

    const/4 v2, 0x1

    if-nez v0, :cond_e

    goto :goto_21

    .line 1
    :cond_e
    invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    const-string v3, "true"

    invoke-virtual {v3, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_1c

    move v0, v2

    goto :goto_22

    :cond_1c
    const-string v3, "false"

    invoke-virtual {v3, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    :goto_21
    move v0, v1

    .line 2
    :goto_22
    iput-boolean v0, p0, Lu2/a;->w:Z

    const-string v0, "file"

    .line 3
    invoke-interface {p3, v0}, Lorg/xml/sax/Attributes;->getValue(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    const-string v4, "url"

    invoke-interface {p3, v4}, Lorg/xml/sax/Attributes;->getValue(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    const-string v6, "resource"

    invoke-interface {p3, v6}, Lorg/xml/sax/Attributes;->getValue(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    invoke-static {v3}, Le/c;->h(Ljava/lang/String;)Z

    move-result v3

    xor-int/2addr v3, v2

    invoke-static {v5}, Le/c;->h(Ljava/lang/String;)Z

    move-result v5

    if-nez v5, :cond_43

    add-int/lit8 v3, v3, 0x1

    :cond_43
    invoke-static {v7}, Le/c;->h(Ljava/lang/String;)Z

    move-result v5

    if-nez v5, :cond_4b

    add-int/lit8 v3, v3, 0x1

    :cond_4b
    const/4 v5, 0x2

    const/4 v7, 0x3

    if-nez v3, :cond_5e

    new-array v3, v7, [Ljava/lang/Object;

    aput-object v0, v3, v1

    aput-object v6, v3, v2

    aput-object v4, v3, v5

    const-string v0, "One of \"%1$s\", \"%2$s\" or \"%3$s\" attributes must be set."

    invoke-static {v0, v3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    goto :goto_6e

    :cond_5e
    if-le v3, v2, :cond_72

    new-array v3, v7, [Ljava/lang/Object;

    aput-object v0, v3, v1

    aput-object v6, v3, v2

    aput-object v4, v3, v5

    const-string v0, "Only one of \"%1$s\", \"%2$s\" or \"%3$s\" attributes should be set."

    invoke-static {v0, v3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    :goto_6e
    invoke-virtual {p0, v0, p2}, Lu2/a;->F(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_75

    :cond_72
    if-ne v3, v2, :cond_96

    move v1, v2

    :goto_75
    if-nez v1, :cond_78

    return-void

    .line 4
    :cond_78
    :try_start_78
    invoke-virtual {p0, p1, p3}, Lu2/a;->E(Lw2/i;Lorg/xml/sax/Attributes;)Ljava/net/URL;

    move-result-object p2

    if-eqz p2, :cond_95

    invoke-virtual {p0, p1, p2}, Lu2/a;->G(Lw2/i;Ljava/net/URL;)V
    :try_end_81
    .catch Lw2/k; {:try_start_78 .. :try_end_81} :catch_82

    goto :goto_95

    :catch_82
    move-exception p1

    const-string p2, "Error while parsing "

    invoke-static {p2}, Landroidx/activity/c;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object p2

    iget-object p3, p0, Lu2/a;->v:Ljava/lang/String;

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

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

    move-result-object p2

    invoke-virtual {p0, p2, p1}, Lu2/a;->F(Ljava/lang/String;Ljava/lang/Exception;)V

    :cond_95
    :goto_95
    return-void

    .line 5
    :cond_96
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string p2, "Count value ["

    const-string p3, "] is not expected"

    invoke-static {p2, v3, p3}, Lo/a;->a(Ljava/lang/String;ILjava/lang/String;)Ljava/lang/String;

    move-result-object p2

    invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public C(Lw2/i;Ljava/lang/String;)V
    .registers 3

    return-void
.end method

.method public final E(Lw2/i;Lorg/xml/sax/Attributes;)Ljava/net/URL;
    .registers 8

    const-string v0, "file"

    invoke-interface {p2, v0}, Lorg/xml/sax/Attributes;->getValue(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    const-string v1, "url"

    invoke-interface {p2, v1}, Lorg/xml/sax/Attributes;->getValue(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    const-string v2, "resource"

    invoke-interface {p2, v2}, Lorg/xml/sax/Attributes;->getValue(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p2

    invoke-static {v0}, Le/c;->h(Ljava/lang/String;)Z

    move-result v2

    const-string v3, "]"

    const/4 v4, 0x0

    if-nez v2, :cond_54

    invoke-virtual {p1, v0}, Lw2/i;->E(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Lu2/a;->v:Ljava/lang/String;

    .line 1
    new-instance p2, Ljava/io/File;

    invoke-direct {p2, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {p2}, Ljava/io/File;->exists()Z

    move-result v0

    if-eqz v0, :cond_41

    invoke-virtual {p2}, Ljava/io/File;->isFile()Z

    move-result v0

    if-nez v0, :cond_33

    goto :goto_41

    :cond_33
    invoke-virtual {p2}, Ljava/io/File;->toURI()Ljava/net/URI;

    move-result-object p1

    :try_start_37
    invoke-virtual {p1}, Ljava/net/URI;->toURL()Ljava/net/URL;

    move-result-object v4
    :try_end_3b
    .catch Ljava/net/MalformedURLException; {:try_start_37 .. :try_end_3b} :catch_3c

    goto :goto_53

    :catch_3c
    move-exception p1

    invoke-virtual {p1}, Ljava/net/MalformedURLException;->printStackTrace()V

    goto :goto_53

    :cond_41
    :goto_41
    iget-boolean p2, p0, Lu2/a;->w:Z

    if-nez p2, :cond_53

    const-string p2, "File does not exist ["

    invoke-static {p2, p1, v3}, Le/b;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p2

    new-instance v0, Ljava/io/FileNotFoundException;

    invoke-direct {v0, p1}, Ljava/io/FileNotFoundException;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0, p2, v0}, Lu2/a;->F(Ljava/lang/String;Ljava/lang/Exception;)V

    :cond_53
    :goto_53
    return-object v4

    .line 2
    :cond_54
    invoke-static {v1}, Le/c;->h(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_92

    invoke-virtual {p1, v1}, Lw2/i;->E(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Lu2/a;->v:Ljava/lang/String;

    const-string p2, "URL ["

    .line 3
    :try_start_62
    new-instance v0, Ljava/net/URL;

    invoke-direct {v0, p1}, Ljava/net/URL;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/net/URL;->openStream()Ljava/io/InputStream;

    move-result-object v1

    invoke-virtual {v1}, Ljava/io/InputStream;->close()V
    :try_end_6e
    .catch Ljava/net/MalformedURLException; {:try_start_62 .. :try_end_6e} :catch_7c
    .catch Ljava/io/IOException; {:try_start_62 .. :try_end_6e} :catch_70

    move-object v4, v0

    goto :goto_91

    :catch_70
    move-exception v0

    iget-boolean v1, p0, Lu2/a;->w:Z

    if-nez v1, :cond_91

    invoke-static {p2, p1}, Le/k;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object p1

    const-string p2, "] cannot be opened."

    goto :goto_87

    :catch_7c
    move-exception v0

    iget-boolean v1, p0, Lu2/a;->w:Z

    if-nez v1, :cond_91

    invoke-static {p2, p1}, Le/k;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object p1

    const-string p2, "] is not well formed."

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

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

    move-result-object p1

    invoke-virtual {p0, p1, v0}, Lu2/a;->F(Ljava/lang/String;Ljava/lang/Exception;)V

    :cond_91
    :goto_91
    return-object v4

    .line 4
    :cond_92
    invoke-static {p2}, Le/c;->h(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_c2

    invoke-virtual {p1, p2}, Lw2/i;->E(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Lu2/a;->v:Ljava/lang/String;

    .line 5
    invoke-static {p1}, Lf3/g;->b(Ljava/lang/String;)Ljava/net/URL;

    move-result-object p2

    if-nez p2, :cond_c0

    iget-boolean p2, p0, Lu2/a;->w:Z

    if-nez p2, :cond_c1

    new-instance p2, Ljava/lang/StringBuilder;

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

    const-string v0, "Could not find resource corresponding to ["

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

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

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

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

    move-result-object p1

    invoke-virtual {p0, p1, v4}, Lu2/a;->F(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_c1

    :cond_c0
    move-object v4, p2

    :cond_c1
    :goto_c1
    return-object v4

    .line 6
    :cond_c2
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string p2, "A URL stream should have been returned"

    invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public F(Ljava/lang/String;Ljava/lang/Exception;)V
    .registers 3

    invoke-virtual {p0, p1, p2}, Lc3/d;->g(Ljava/lang/String;Ljava/lang/Throwable;)V

    return-void
.end method

.method public abstract G(Lw2/i;Ljava/net/URL;)V
.end method
