a.smali

.class public final Lcom/live/share64/utils/a/a;
.super Ljava/lang/Object;
.source "SourceFile"


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

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

    return-void
.end method

.method public static a(Ljava/lang/String;)Landroid/content/SharedPreferences;
    .registers 3

    .line 61
    invoke-static {}, Lsg/bigo/common/a;->d()Landroid/content/Context;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {v0, p0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object p0

    return-object p0
.end method

.method private static a(Landroid/content/SharedPreferences$Editor;Ljava/lang/String;Ljava/lang/Object;I)V
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Ljava/lang/Object;",
            ">(",
            "Landroid/content/SharedPreferences$Editor;",
            "Ljava/lang/String;",
            "TT;I)V"
        }
    .end annotation

    if-eqz p0, :cond_8b

    if-eqz p3, :cond_77

    const/4 v0, 0x1

    if-eq p3, v0, :cond_63

    const/4 v0, 0x2

    if-eq p3, v0, :cond_4f

    const/4 v0, 0x3

    if-eq p3, v0, :cond_3c

    const/4 v0, 0x4

    if-eq p3, v0, :cond_28

    const/4 v0, 0x5

    if-eq p3, v0, :cond_15

    goto/16 :goto_8b

    :cond_15
    if-eqz p2, :cond_22

    .line 200
    instance-of p3, p2, Ljava/util/Set;

    if-eqz p3, :cond_1c

    goto :goto_22

    .line 201
    :cond_1c
    new-instance p0, Ljava/lang/ClassCastException;

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

    throw p0

    .line 204
    :cond_22
    :goto_22
    check-cast p2, Ljava/util/Set;

    invoke-interface {p0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putStringSet(Ljava/lang/String;Ljava/util/Set;)Landroid/content/SharedPreferences$Editor;

    goto :goto_8b

    .line 191
    :cond_28
    instance-of p3, p2, Ljava/lang/Boolean;

    if-eqz p3, :cond_36

    .line 192
    check-cast p2, Ljava/lang/Boolean;

    invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z

    move-result p2

    .line 196
    invoke-interface {p0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    return-void

    .line 194
    :cond_36
    new-instance p0, Ljava/lang/ClassCastException;

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

    throw p0

    :cond_3c
    if-eqz p2, :cond_49

    .line 183
    instance-of p3, p2, Ljava/lang/String;

    if-eqz p3, :cond_43

    goto :goto_49

    .line 184
    :cond_43
    new-instance p0, Ljava/lang/ClassCastException;

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

    throw p0

    .line 187
    :cond_49
    :goto_49
    check-cast p2, Ljava/lang/String;

    invoke-interface {p0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    return-void

    .line 174
    :cond_4f
    instance-of p3, p2, Ljava/lang/Number;

    if-eqz p3, :cond_5d

    .line 175
    check-cast p2, Ljava/lang/Number;

    invoke-virtual {p2}, Ljava/lang/Number;->floatValue()F

    move-result p2

    .line 179
    invoke-interface {p0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putFloat(Ljava/lang/String;F)Landroid/content/SharedPreferences$Editor;

    return-void

    .line 177
    :cond_5d
    new-instance p0, Ljava/lang/NumberFormatException;

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

    throw p0

    .line 165
    :cond_63
    instance-of p3, p2, Ljava/lang/Number;

    if-eqz p3, :cond_71

    .line 166
    check-cast p2, Ljava/lang/Number;

    invoke-virtual {p2}, Ljava/lang/Number;->longValue()J

    move-result-wide p2

    .line 170
    invoke-interface {p0, p1, p2, p3}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;

    return-void

    .line 168
    :cond_71
    new-instance p0, Ljava/lang/NumberFormatException;

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

    throw p0

    .line 156
    :cond_77
    instance-of p3, p2, Ljava/lang/Number;

    if-eqz p3, :cond_85

    .line 157
    check-cast p2, Ljava/lang/Number;

    invoke-virtual {p2}, Ljava/lang/Number;->intValue()I

    move-result p2

    .line 161
    invoke-interface {p0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    return-void

    .line 159
    :cond_85
    new-instance p0, Ljava/lang/NumberFormatException;

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

    throw p0

    :cond_8b
    :goto_8b
    return-void
.end method

.method public static a(Ljava/lang/String;Ljava/lang/Object;I)V
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Ljava/lang/Object;",
            ">(",
            "Ljava/lang/String;",
            "TT;I)V"
        }
    .end annotation

    const-string v0, "v_app_status"

    .line 1120
    invoke-static {v0, p0, p1, p2}, Lcom/live/share64/utils/a/a;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;I)V

    return-void
.end method

.method public static a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;I)V
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Ljava/lang/Object;",
            ">(",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            "TT;I)V"
        }
    .end annotation

    .line 134
    :try_start_0
    invoke-static {p0}, Lcom/live/share64/utils/a/a;->b(Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object p0

    .line 135
    invoke-static {p0, p1, p2, p3}, Lcom/live/share64/utils/a/a;->a(Landroid/content/SharedPreferences$Editor;Ljava/lang/String;Ljava/lang/Object;I)V

    .line 1219
    invoke-static {}, Lcom/live/share64/utils/a/c$a;->a()Lcom/live/share64/utils/a/c$a;

    .line 2049
    invoke-static {p0}, Lcom/live/share64/utils/a/c$a$a;->a(Landroid/content/SharedPreferences$Editor;)V
    :try_end_d
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_d} :catch_e

    return-void

    :catch_e
    move-exception p0

    const-string p1, "SharedPreferenceManager"

    const-string p2, "catch an exception when put to sp."

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

    return-void
.end method

.method private static b(Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
    .registers 3

    .line 92
    :try_start_0
    invoke-static {p0}, Lcom/live/share64/utils/a/a;->a(Ljava/lang/String;)Landroid/content/SharedPreferences;

    move-result-object p0

    invoke-interface {p0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object p0
    :try_end_8
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_8} :catch_9

    return-object p0

    :catch_9
    move-exception p0

    const-string v0, "SharedPreferenceManager"

    const-string v1, "getEditor() catch an exception."

    .line 94
    invoke-static {v0, v1, p0}, Lsg/bigo/log/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    const/4 p0, 0x0

    return-object p0
.end method

.method public static b(Ljava/lang/String;Ljava/lang/Object;I)Ljava/lang/Object;
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Ljava/lang/Object;",
            ">(",
            "Ljava/lang/String;",
            "TT;I)",
            "Ljava/lang/Object;"
        }
    .end annotation

    const-string v0, "v_app_status"

    .line 2259
    invoke-static {v0}, Lcom/live/share64/utils/a/a;->a(Ljava/lang/String;)Landroid/content/SharedPreferences;

    move-result-object v0

    if-eqz v0, :cond_a7

    if-eqz p2, :cond_8e

    const/4 v1, 0x1

    if-eq p2, v1, :cond_75

    const/4 v1, 0x2

    if-eq p2, v1, :cond_5c

    const/4 v1, 0x3

    if-eq p2, v1, :cond_48

    const/4 v1, 0x4

    if-eq p2, v1, :cond_2f

    const/4 v1, 0x5

    if-eq p2, v1, :cond_1b

    goto/16 :goto_a7

    :cond_1b
    if-eqz p1, :cond_28

    .line 2303
    instance-of p2, p1, Ljava/util/Set;

    if-eqz p2, :cond_22

    goto :goto_28

    .line 2304
    :cond_22
    new-instance p0, Ljava/lang/ClassCastException;

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

    throw p0

    .line 2307
    :cond_28
    :goto_28
    check-cast p1, Ljava/util/Set;

    invoke-interface {v0, p0, p1}, Landroid/content/SharedPreferences;->getStringSet(Ljava/lang/String;Ljava/util/Set;)Ljava/util/Set;

    move-result-object p0

    return-object p0

    .line 2295
    :cond_2f
    instance-of p2, p1, Ljava/lang/Boolean;

    if-eqz p2, :cond_42

    .line 2296
    check-cast p1, Ljava/lang/Boolean;

    invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result p1

    .line 2300
    invoke-interface {v0, p0, p1}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result p0

    invoke-static {p0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object p0

    return-object p0

    .line 2298
    :cond_42
    new-instance p0, Ljava/lang/ClassCastException;

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

    throw p0

    :cond_48
    if-eqz p1, :cond_55

    .line 2288
    instance-of p2, p1, Ljava/lang/String;

    if-eqz p2, :cond_4f

    goto :goto_55

    .line 2289
    :cond_4f
    new-instance p0, Ljava/lang/ClassCastException;

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

    throw p0

    .line 2292
    :cond_55
    :goto_55
    check-cast p1, Ljava/lang/String;

    invoke-interface {v0, p0, p1}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p0

    return-object p0

    .line 2280
    :cond_5c
    instance-of p2, p1, Ljava/lang/Number;

    if-eqz p2, :cond_6f

    .line 2281
    check-cast p1, Ljava/lang/Number;

    invoke-virtual {p1}, Ljava/lang/Number;->floatValue()F

    move-result p1

    .line 2285
    invoke-interface {v0, p0, p1}, Landroid/content/SharedPreferences;->getFloat(Ljava/lang/String;F)F

    move-result p0

    invoke-static {p0}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;

    move-result-object p0

    return-object p0

    .line 2283
    :cond_6f
    new-instance p0, Ljava/lang/NumberFormatException;

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

    throw p0

    .line 2272
    :cond_75
    instance-of p2, p1, Ljava/lang/Number;

    if-eqz p2, :cond_88

    .line 2273
    check-cast p1, Ljava/lang/Number;

    invoke-virtual {p1}, Ljava/lang/Number;->longValue()J

    move-result-wide p1

    .line 2277
    invoke-interface {v0, p0, p1, p2}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J

    move-result-wide p0

    invoke-static {p0, p1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object p0

    return-object p0

    .line 2275
    :cond_88
    new-instance p0, Ljava/lang/NumberFormatException;

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

    throw p0

    .line 2264
    :cond_8e
    instance-of p2, p1, Ljava/lang/Number;

    if-eqz p2, :cond_a1

    .line 2265
    check-cast p1, Ljava/lang/Number;

    invoke-virtual {p1}, Ljava/lang/Number;->intValue()I

    move-result p1

    .line 2269
    invoke-interface {v0, p0, p1}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result p0

    invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p0

    return-object p0

    .line 2267
    :cond_a1
    new-instance p0, Ljava/lang/NumberFormatException;

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

    throw p0

    :cond_a7
    :goto_a7
    const/4 p0, 0x0

    return-object p0
.end method