d.smali

.class public final Lcom/masala/share/utils/d/d;
.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 58
    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 191
    instance-of p3, p2, Ljava/util/Set;

    if-eqz p3, :cond_1c

    goto :goto_22

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

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

    throw p0

    .line 195
    :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 182
    :cond_28
    instance-of p3, p2, Ljava/lang/Boolean;

    if-eqz p3, :cond_36

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

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

    move-result p2

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

    return-void

    .line 185
    :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 174
    instance-of p3, p2, Ljava/lang/String;

    if-eqz p3, :cond_43

    goto :goto_49

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

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

    throw p0

    .line 178
    :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 165
    :cond_4f
    instance-of p3, p2, Ljava/lang/Number;

    if-eqz p3, :cond_5d

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

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

    move-result p2

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

    return-void

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

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

    throw p0

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

    if-eqz p3, :cond_71

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

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

    move-result-wide p2

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

    return-void

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

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

    throw p0

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

    if-eqz p3, :cond_85

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

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

    move-result p2

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

    return-void

    .line 150
    :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 1113
    invoke-static {v0, p0, p1, p2}, Lcom/masala/share/utils/d/d;->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 126
    :try_start_0
    invoke-static {p0}, Lcom/masala/share/utils/d/d;->b(Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object p0

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

    .line 1209
    invoke-static {}, Lcom/masala/share/utils/d/f$a;->a()Lcom/masala/share/utils/d/f$a;

    .line 2049
    invoke-static {p0}, Lcom/masala/share/utils/d/f$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 130
    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 86
    :try_start_0
    invoke-static {p0}, Lcom/masala/share/utils/d/d;->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 88
    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 4
    .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 2234
    invoke-static {v0, p0, p1, p2}, Lcom/masala/share/utils/d/d;->b(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;I)Ljava/lang/Object;

    move-result-object p0

    return-object p0
.end method

.method public static b(Ljava/lang/String;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;",
            "Ljava/lang/String;",
            "TT;I)",
            "Ljava/lang/Object;"
        }
    .end annotation

    .line 246
    invoke-static {p0}, Lcom/masala/share/utils/d/d;->a(Ljava/lang/String;)Landroid/content/SharedPreferences;

    move-result-object p0

    if-eqz p0, :cond_a5

    if-eqz p3, :cond_8c

    const/4 v0, 0x1

    if-eq p3, v0, :cond_73

    const/4 v0, 0x2

    if-eq p3, v0, :cond_5a

    const/4 v0, 0x3

    if-eq p3, v0, :cond_46

    const/4 v0, 0x4

    if-eq p3, v0, :cond_2d

    const/4 v0, 0x5

    if-eq p3, v0, :cond_19

    goto/16 :goto_a5

    :cond_19
    if-eqz p2, :cond_26

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

    if-eqz p3, :cond_20

    goto :goto_26

    .line 291
    :cond_20
    new-instance p0, Ljava/lang/ClassCastException;

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

    throw p0

    .line 294
    :cond_26
    :goto_26
    check-cast p2, Ljava/util/Set;

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

    move-result-object p0

    return-object p0

    .line 282
    :cond_2d
    instance-of p3, p2, Ljava/lang/Boolean;

    if-eqz p3, :cond_40

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

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

    move-result p2

    .line 287
    invoke-interface {p0, p1, p2}, 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 285
    :cond_40
    new-instance p0, Ljava/lang/ClassCastException;

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

    throw p0

    :cond_46
    if-eqz p2, :cond_53

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

    if-eqz p3, :cond_4d

    goto :goto_53

    .line 276
    :cond_4d
    new-instance p0, Ljava/lang/ClassCastException;

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

    throw p0

    .line 279
    :cond_53
    :goto_53
    check-cast p2, Ljava/lang/String;

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

    move-result-object p0

    return-object p0

    .line 267
    :cond_5a
    instance-of p3, p2, Ljava/lang/Number;

    if-eqz p3, :cond_6d

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

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

    move-result p2

    .line 272
    invoke-interface {p0, p1, p2}, 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 270
    :cond_6d
    new-instance p0, Ljava/lang/NumberFormatException;

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

    throw p0

    .line 259
    :cond_73
    instance-of p3, p2, Ljava/lang/Number;

    if-eqz p3, :cond_86

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

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

    move-result-wide p2

    .line 264
    invoke-interface {p0, p1, p2, p3}, 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 262
    :cond_86
    new-instance p0, Ljava/lang/NumberFormatException;

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

    throw p0

    .line 251
    :cond_8c
    instance-of p3, p2, Ljava/lang/Number;

    if-eqz p3, :cond_9f

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

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

    move-result p2

    .line 256
    invoke-interface {p0, p1, p2}, 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 254
    :cond_9f
    new-instance p0, Ljava/lang/NumberFormatException;

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

    throw p0

    :cond_a5
    :goto_a5
    const/4 p0, 0x0

    return-object p0
.end method