t.smali

.class public final Lcom/imo/android/imoim/webview/t;
.super Ljava/lang/Object;
.source "SourceFile"


# static fields
.field public static final a:Lcom/imo/android/imoim/webview/t;


# instance fields
.field b:Z

.field c:Z

.field d:Z

.field e:Z

.field f:Z

.field g:Ljava/lang/String;

.field h:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field i:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field j:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field


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

    .line 1027
    new-instance v0, Lcom/imo/android/imoim/webview/t;

    invoke-direct {v0}, Lcom/imo/android/imoim/webview/t;-><init>()V

    const/4 v1, 0x1

    .line 1028
    iput-boolean v1, v0, Lcom/imo/android/imoim/webview/t;->b:Z

    .line 1029
    iput-boolean v1, v0, Lcom/imo/android/imoim/webview/t;->c:Z

    .line 1030
    iput-boolean v1, v0, Lcom/imo/android/imoim/webview/t;->d:Z

    const-string v1, "https://static-imo.sdonlyn.net/as/indigo/assets/assets-list.json.html"

    .line 1031
    iput-object v1, v0, Lcom/imo/android/imoim/webview/t;->g:Ljava/lang/String;

    const/4 v1, 0x0

    .line 1032
    iput-object v1, v0, Lcom/imo/android/imoim/webview/t;->h:Ljava/util/List;

    const-string v1, "imoim.app"

    const-string v2, "imo.im"

    const-string v3, "bigo.tv"

    const-string v4, "imoim.net"

    const-string v5, "onelink.me"

    .line 1033
    filled-new-array {v1, v2, v3, v4, v5}, [Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;

    move-result-object v1

    iput-object v1, v0, Lcom/imo/android/imoim/webview/t;->i:Ljava/util/List;

    const/4 v1, 0x0

    .line 1034
    iput-boolean v1, v0, Lcom/imo/android/imoim/webview/t;->e:Z

    .line 24
    sput-object v0, Lcom/imo/android/imoim/webview/t;->a:Lcom/imo/android/imoim/webview/t;

    return-void
.end method

.method private constructor <init>()V
    .registers 2

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

    const/4 v0, 0x0

    .line 44
    iput-boolean v0, p0, Lcom/imo/android/imoim/webview/t;->e:Z

    const/4 v0, 0x1

    .line 45
    iput-boolean v0, p0, Lcom/imo/android/imoim/webview/t;->f:Z

    .line 47
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/imo/android/imoim/webview/t;->h:Ljava/util/List;

    .line 48
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/imo/android/imoim/webview/t;->i:Ljava/util/List;

    .line 49
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/imo/android/imoim/webview/t;->j:Ljava/util/List;

    return-void
.end method

.method static a(ZZLjava/lang/String;Ljava/util/List;)Lcom/imo/android/imoim/webview/t;
    .registers 7
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(ZZ",
            "Ljava/lang/String;",
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;)",
            "Lcom/imo/android/imoim/webview/t;"
        }
    .end annotation

    .line 53
    invoke-static {p2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    const/4 v1, 0x0

    if-eqz v0, :cond_8

    return-object v1

    .line 56
    :cond_8
    new-instance v0, Lcom/imo/android/imoim/webview/t;

    invoke-direct {v0}, Lcom/imo/android/imoim/webview/t;-><init>()V

    .line 58
    :try_start_d
    new-instance v2, Lorg/json/JSONObject;

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

    .line 59
    iput-boolean p0, v0, Lcom/imo/android/imoim/webview/t;->e:Z

    .line 60
    iput-boolean p1, v0, Lcom/imo/android/imoim/webview/t;->f:Z

    const-string p0, "all_switch"

    .line 61
    invoke-virtual {v2, p0}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;)Z

    move-result p0

    iput-boolean p0, v0, Lcom/imo/android/imoim/webview/t;->b:Z

    const-string p0, "enable_replace_domain"

    .line 62
    invoke-virtual {v2, p0}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;)Z

    move-result p0

    iput-boolean p0, v0, Lcom/imo/android/imoim/webview/t;->c:Z

    const-string p0, "enable_cache"

    .line 63
    invoke-virtual {v2, p0}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;)Z

    move-result p0

    iput-boolean p0, v0, Lcom/imo/android/imoim/webview/t;->d:Z

    const-string p0, "cache_config_url"

    .line 64
    invoke-virtual {v2, p0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p0

    iput-object p0, v0, Lcom/imo/android/imoim/webview/t;->g:Ljava/lang/String;

    const-string p0, "preload_urls"

    .line 65
    invoke-virtual {v2, p0}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object p0

    if-eqz p0, :cond_4d

    .line 67
    invoke-static {p0}, Lcom/imo/android/imoim/webview/t;->a(Lorg/json/JSONArray;)Ljava/util/List;

    move-result-object p0

    .line 68
    invoke-static {p0}, Lsg/bigo/common/o;->a(Ljava/util/Collection;)Z

    move-result p1

    if-nez p1, :cond_4d

    .line 69
    iget-object p1, v0, Lcom/imo/android/imoim/webview/t;->h:Ljava/util/List;

    invoke-interface {p1, p0}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    :cond_4d
    const-string p0, "white_urls"

    .line 72
    invoke-virtual {v2, p0}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object p0

    if-eqz p0, :cond_5b

    .line 74
    invoke-static {p0}, Lcom/imo/android/imoim/webview/t;->a(Lorg/json/JSONArray;)Ljava/util/List;

    move-result-object p0

    iput-object p0, v0, Lcom/imo/android/imoim/webview/t;->i:Ljava/util/List;

    .line 77
    :cond_5b
    invoke-static {p3}, Lsg/bigo/common/o;->a(Ljava/util/Collection;)Z

    move-result p0

    if-nez p0, :cond_66

    .line 78
    iget-object p0, v0, Lcom/imo/android/imoim/webview/t;->j:Ljava/util/List;

    invoke-interface {p0, p3}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
    :try_end_66
    .catch Ljava/lang/Exception; {:try_start_d .. :try_end_66} :catch_67

    :cond_66
    return-object v0

    :catch_67
    move-exception p0

    .line 84
    invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p0

    const-string p1, "SDKConfig parse: e = "

    invoke-virtual {p1, p0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p0

    const-string p1, "DDAI_WebViewSDKConfig"

    invoke-static {p1, p0}, Lsg/bigo/log/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    return-object v1
.end method

.method private static a(Lorg/json/JSONArray;)Ljava/util/List;
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Ljava/lang/Object;",
            ">(",
            "Lorg/json/JSONArray;",
            ")",
            "Ljava/util/List<",
            "TT;>;"
        }
    .end annotation

    .line 112
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    const/4 v1, 0x0

    .line 113
    :goto_6
    invoke-virtual {p0}, Lorg/json/JSONArray;->length()I

    move-result v2

    if-ge v1, v2, :cond_1d

    .line 115
    :try_start_c
    invoke-virtual {p0, v1}, Lorg/json/JSONArray;->get(I)Ljava/lang/Object;

    move-result-object v2

    invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_13
    .catch Lorg/json/JSONException; {:try_start_c .. :try_end_13} :catch_16

    add-int/lit8 v1, v1, 0x1

    goto :goto_6

    :catch_16
    move-exception p0

    .line 117
    new-instance v0, Ljava/lang/RuntimeException;

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

    throw v0

    :cond_1d
    return-object v0
.end method

.method private static a(Ljava/util/List;)Lorg/json/JSONArray;
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Ljava/lang/Object;",
            ">(",
            "Ljava/util/List<",
            "TT;>;)",
            "Lorg/json/JSONArray;"
        }
    .end annotation

    .line 124
    new-instance v0, Lorg/json/JSONArray;

    invoke-direct {v0}, Lorg/json/JSONArray;-><init>()V

    .line 125
    invoke-interface {p0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p0

    :goto_9
    invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_17

    invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    .line 126
    invoke-virtual {v0, v1}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;

    goto :goto_9

    :cond_17
    return-object v0
.end method


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

    .line 91
    new-instance v0, Lorg/json/JSONObject;

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

    :try_start_5
    const-string v1, "all_switch"

    .line 93
    iget-boolean v2, p0, Lcom/imo/android/imoim/webview/t;->b:Z

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject;

    const-string v1, "enable_replace_domain"

    .line 94
    iget-boolean v2, p0, Lcom/imo/android/imoim/webview/t;->c:Z

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject;

    const-string v1, "enable_cache"

    .line 95
    iget-boolean v2, p0, Lcom/imo/android/imoim/webview/t;->c:Z

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject;

    const-string v1, "cache_config_url"

    .line 96
    iget-object v2, p0, Lcom/imo/android/imoim/webview/t;->g:Ljava/lang/String;

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 97
    iget-object v1, p0, Lcom/imo/android/imoim/webview/t;->h:Ljava/util/List;

    invoke-static {v1}, Lsg/bigo/common/o;->a(Ljava/util/Collection;)Z

    move-result v1

    if-nez v1, :cond_34

    const-string v1, "preload_urls"

    .line 98
    iget-object v2, p0, Lcom/imo/android/imoim/webview/t;->h:Ljava/util/List;

    invoke-static {v2}, Lcom/imo/android/imoim/webview/t;->a(Ljava/util/List;)Lorg/json/JSONArray;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 101
    :cond_34
    iget-object v1, p0, Lcom/imo/android/imoim/webview/t;->i:Ljava/util/List;

    invoke-static {v1}, Lsg/bigo/common/o;->a(Ljava/util/Collection;)Z

    move-result v1

    if-nez v1, :cond_47

    const-string v1, "white_urls"

    .line 102
    iget-object v2, p0, Lcom/imo/android/imoim/webview/t;->i:Ljava/util/List;

    invoke-static {v2}, Lcom/imo/android/imoim/webview/t;->a(Ljava/util/List;)Lorg/json/JSONArray;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_47
    .catch Lorg/json/JSONException; {:try_start_5 .. :try_end_47} :catch_4c

    .line 108
    :cond_47
    invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0

    :catch_4c
    const/4 v0, 0x0

    return-object v0
.end method

.method public final toString()Ljava/lang/String;
    .registers 3

    .line 133
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "WebViewSDKConfig{allSwitch="

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

    iget-boolean v1, p0, Lcom/imo/android/imoim/webview/t;->b:Z

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

    const-string v1, ", enableReplaceDomain="

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

    iget-boolean v1, p0, Lcom/imo/android/imoim/webview/t;->c:Z

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

    const-string v1, ", enableCache="

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

    iget-boolean v1, p0, Lcom/imo/android/imoim/webview/t;->d:Z

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

    const-string v1, ", preloadSwitch="

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

    iget-boolean v1, p0, Lcom/imo/android/imoim/webview/t;->e:Z

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

    const-string v1, ", cacheConfigUrl=\'"

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

    iget-object v1, p0, Lcom/imo/android/imoim/webview/t;->g:Ljava/lang/String;

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

    const/16 v1, 0x27

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

    const-string v1, ", preloadUrls="

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

    iget-object v1, p0, Lcom/imo/android/imoim/webview/t;->h:Ljava/util/List;

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

    const-string v1, ", whiteHosts="

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

    iget-object v1, p0, Lcom/imo/android/imoim/webview/t;->i:Ljava/util/List;

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

    const/16 v1, 0x7d

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

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

    move-result-object v0

    return-object v0
.end method