.class public abstract Lcom/moji/tool/preferences/core/BasePreferences;
.super Ljava/lang/Object;
.source "BasePreferences.java"


# static fields
.field private static b:Ljava/util/concurrent/ConcurrentHashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/concurrent/ConcurrentHashMap<",
            "Ljava/lang/String;",
            "Ljava/util/Collection<",
            "Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;",
            ">;>;"
        }
    .end annotation
.end field


# instance fields
.field private a:Landroid/content/SharedPreferences;

.field protected c:Landroid/content/SharedPreferences$Editor;

.field private d:Landroid/os/Handler;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .line 32
    new-instance v0, Ljava/util/concurrent/ConcurrentHashMap;

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

    sput-object v0, Lcom/moji/tool/preferences/core/BasePreferences;->b:Ljava/util/concurrent/ConcurrentHashMap;

    return-void
.end method

.method protected constructor <init>(Landroid/content/Context;)V
    .locals 3

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

    .line 35
    new-instance v0, Landroid/os/Handler;

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    iput-object v0, p0, Lcom/moji/tool/preferences/core/BasePreferences;->d:Landroid/os/Handler;

    .line 40
    invoke-virtual {p0}, Lcom/moji/tool/preferences/core/BasePreferences;->a()Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x2

    invoke-static {v0, v1}, Lcom/tencent/mmkv/MMKV;->a(Ljava/lang/String;I)Lcom/tencent/mmkv/MMKV;

    move-result-object v0

    const-string v1, "imported_from_shareprefence"

    const/4 v2, 0x0

    .line 43
    invoke-virtual {v0, v1, v2}, Lcom/tencent/mmkv/MMKV;->b(Ljava/lang/String;Z)Z

    move-result v1

    if-nez v1, :cond_0

    .line 44
    invoke-virtual {p0}, Lcom/moji/tool/preferences/core/BasePreferences;->a()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0}, Lcom/moji/tool/preferences/core/BasePreferences;->b()I

    move-result v2

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

    move-result-object p1

    iput-object p1, p0, Lcom/moji/tool/preferences/core/BasePreferences;->a:Landroid/content/SharedPreferences;

    .line 45
    iget-object p1, p0, Lcom/moji/tool/preferences/core/BasePreferences;->a:Landroid/content/SharedPreferences;

    invoke-virtual {v0, p1}, Lcom/tencent/mmkv/MMKV;->a(Landroid/content/SharedPreferences;)I

    const-string p1, "imported_from_shareprefence"

    const/4 v1, 0x1

    .line 46
    invoke-virtual {v0, p1, v1}, Lcom/tencent/mmkv/MMKV;->a(Ljava/lang/String;Z)Z

    .line 50
    :cond_0
    invoke-virtual {v0}, Lcom/tencent/mmkv/MMKV;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object p1

    iput-object p1, p0, Lcom/moji/tool/preferences/core/BasePreferences;->c:Landroid/content/SharedPreferences$Editor;

    .line 51
    iput-object v0, p0, Lcom/moji/tool/preferences/core/BasePreferences;->a:Landroid/content/SharedPreferences;

    return-void
.end method

.method static synthetic a(Lcom/moji/tool/preferences/core/BasePreferences;Ljava/lang/String;)V
    .locals 0

    .line 23
    invoke-direct {p0, p1}, Lcom/moji/tool/preferences/core/BasePreferences;->a(Ljava/lang/String;)V

    return-void
.end method

.method private a(Ljava/lang/String;)V
    .locals 3

    .line 245
    invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;

    move-result-object v0

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v1

    if-ne v0, v1, :cond_0

    .line 248
    const-class v0, Lcom/moji/tool/preferences/core/BasePreferences;

    monitor-enter v0

    .line 249
    :try_start_0
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {p0}, Lcom/moji/tool/preferences/core/BasePreferences;->c()Ljava/util/Collection;

    move-result-object v2

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

    .line 250
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 251
    invoke-interface {v1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;

    move-result-object v0

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

    move-result v1

    if-eqz v1, :cond_1

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

    move-result-object v1

    check-cast v1, Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;

    .line 253
    :try_start_1
    iget-object v2, p0, Lcom/moji/tool/preferences/core/BasePreferences;->a:Landroid/content/SharedPreferences;

    invoke-interface {v1, v2, p1}, Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;->onSharedPreferenceChanged(Landroid/content/SharedPreferences;Ljava/lang/String;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0

    :catch_0
    move-exception v1

    const-string v2, "BasePreferences"

    .line 255
    invoke-static {v2, v1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    goto :goto_0

    :catchall_0
    move-exception p1

    .line 250
    :try_start_2
    monitor-exit v0
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    throw p1

    .line 260
    :cond_0
    iget-object v0, p0, Lcom/moji/tool/preferences/core/BasePreferences;->d:Landroid/os/Handler;

    new-instance v1, Lcom/moji/tool/preferences/core/BasePreferences$1;

    invoke-direct {v1, p0, p1}, Lcom/moji/tool/preferences/core/BasePreferences$1;-><init>(Lcom/moji/tool/preferences/core/BasePreferences;Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    :cond_1
    return-void
.end method

.method private c()Ljava/util/Collection;
    .locals 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/Collection<",
            "Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;",
            ">;"
        }
    .end annotation

    .line 271
    const-class v0, Lcom/moji/tool/preferences/core/BasePreferences;

    monitor-enter v0

    .line 272
    :try_start_0
    sget-object v1, Lcom/moji/tool/preferences/core/BasePreferences;->b:Ljava/util/concurrent/ConcurrentHashMap;

    invoke-virtual {p0}, Lcom/moji/tool/preferences/core/BasePreferences;->a()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/util/concurrent/ConcurrentHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/Collection;

    if-nez v1, :cond_0

    .line 274
    new-instance v1, Ljava/util/ArrayList;

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

    .line 275
    sget-object v2, Lcom/moji/tool/preferences/core/BasePreferences;->b:Ljava/util/concurrent/ConcurrentHashMap;

    invoke-virtual {p0}, Lcom/moji/tool/preferences/core/BasePreferences;->a()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3, v1}, Ljava/util/concurrent/ConcurrentHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 277
    :cond_0
    monitor-exit v0

    return-object v1

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method


# virtual methods
.method public a(Lcom/moji/tool/preferences/core/IPreferKey;I)I
    .locals 0

    .line 99
    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p2

    invoke-virtual {p0, p1, p2}, Lcom/moji/tool/preferences/core/BasePreferences;->b(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Number;)Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result p1

    return p1
.end method

.method public a(Lcom/moji/tool/preferences/core/IPreferKey;J)J
    .locals 2

    .line 138
    iget-object v0, p0, Lcom/moji/tool/preferences/core/BasePreferences;->a:Landroid/content/SharedPreferences;

    invoke-interface {p1}, Lcom/moji/tool/preferences/core/IPreferKey;->name()Ljava/lang/String;

    move-result-object p1

    new-instance v1, Ljava/lang/StringBuilder;

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

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

    const-string p2, ""

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

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

    move-result-object p2

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

    move-result-object p1

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

    move-result-wide p1

    return-wide p1
.end method

.method public a(Ljava/lang/String;J)J
    .locals 1
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .line 127
    iget-object v0, p0, Lcom/moji/tool/preferences/core/BasePreferences;->a:Landroid/content/SharedPreferences;

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

    move-result-wide p1

    return-wide p1
.end method

.method public a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Float;)Ljava/lang/Float;
    .locals 0

    .line 183
    invoke-virtual {p0, p1, p2}, Lcom/moji/tool/preferences/core/BasePreferences;->b(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Number;)Ljava/lang/String;

    move-result-object p1

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

    move-result-object p1

    return-object p1
.end method

.method public abstract a()Ljava/lang/String;
.end method

.method public a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/String;)Ljava/lang/String;
    .locals 1

    .line 107
    iget-object v0, p0, Lcom/moji/tool/preferences/core/BasePreferences;->a:Landroid/content/SharedPreferences;

    invoke-interface {p1}, Lcom/moji/tool/preferences/core/IPreferKey;->name()Ljava/lang/String;

    move-result-object p1

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

    move-result-object p1

    return-object p1
.end method

.method public a(Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;)V
    .locals 2

    .line 283
    const-class v0, Lcom/moji/tool/preferences/core/BasePreferences;

    monitor-enter v0

    .line 284
    :try_start_0
    invoke-direct {p0}, Lcom/moji/tool/preferences/core/BasePreferences;->c()Ljava/util/Collection;

    move-result-object v1

    .line 285
    invoke-interface {v1, p1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z

    .line 286
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method public a(Lcom/moji/tool/preferences/core/IPreferKey;)V
    .locals 2

    .line 225
    iget-object v0, p0, Lcom/moji/tool/preferences/core/BasePreferences;->c:Landroid/content/SharedPreferences$Editor;

    invoke-interface {p1}, Lcom/moji/tool/preferences/core/IPreferKey;->name()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Landroid/content/SharedPreferences$Editor;->remove(Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    .line 226
    iget-object v0, p0, Lcom/moji/tool/preferences/core/BasePreferences;->c:Landroid/content/SharedPreferences$Editor;

    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->apply()V

    .line 227
    invoke-interface {p1}, Lcom/moji/tool/preferences/core/IPreferKey;->name()Ljava/lang/String;

    move-result-object p1

    invoke-direct {p0, p1}, Lcom/moji/tool/preferences/core/BasePreferences;->a(Ljava/lang/String;)V

    return-void
.end method

.method public a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Boolean;)V
    .locals 2

    if-eqz p1, :cond_0

    .line 151
    iget-object v0, p0, Lcom/moji/tool/preferences/core/BasePreferences;->c:Landroid/content/SharedPreferences$Editor;

    invoke-interface {p1}, Lcom/moji/tool/preferences/core/IPreferKey;->name()Ljava/lang/String;

    move-result-object v1

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

    move-result p2

    invoke-interface {v0, v1, p2}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    .line 152
    iget-object p2, p0, Lcom/moji/tool/preferences/core/BasePreferences;->c:Landroid/content/SharedPreferences$Editor;

    invoke-interface {p2}, Landroid/content/SharedPreferences$Editor;->apply()V

    .line 153
    invoke-interface {p1}, Lcom/moji/tool/preferences/core/IPreferKey;->name()Ljava/lang/String;

    move-result-object p1

    invoke-direct {p0, p1}, Lcom/moji/tool/preferences/core/BasePreferences;->a(Ljava/lang/String;)V

    :cond_0
    return-void
.end method

.method public a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Double;)V
    .locals 0

    .line 187
    invoke-virtual {p0, p1, p2}, Lcom/moji/tool/preferences/core/BasePreferences;->a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Number;)V

    .line 188
    invoke-interface {p1}, Lcom/moji/tool/preferences/core/IPreferKey;->name()Ljava/lang/String;

    move-result-object p1

    invoke-direct {p0, p1}, Lcom/moji/tool/preferences/core/BasePreferences;->a(Ljava/lang/String;)V

    return-void
.end method

.method public a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Long;)V
    .locals 0

    .line 142
    invoke-virtual {p0, p1, p2}, Lcom/moji/tool/preferences/core/BasePreferences;->a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Number;)V

    return-void
.end method

.method public a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Number;)V
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<S:",
            "Ljava/lang/Number;",
            ">(",
            "Lcom/moji/tool/preferences/core/IPreferKey;",
            "TS;)V"
        }
    .end annotation

    .line 60
    iget-object v0, p0, Lcom/moji/tool/preferences/core/BasePreferences;->c:Landroid/content/SharedPreferences$Editor;

    invoke-interface {p1}, Lcom/moji/tool/preferences/core/IPreferKey;->name()Ljava/lang/String;

    move-result-object v1

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

    move-result-object p2

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

    .line 61
    iget-object p2, p0, Lcom/moji/tool/preferences/core/BasePreferences;->c:Landroid/content/SharedPreferences$Editor;

    invoke-interface {p2}, Landroid/content/SharedPreferences$Editor;->apply()V

    .line 62
    invoke-interface {p1}, Lcom/moji/tool/preferences/core/IPreferKey;->name()Ljava/lang/String;

    move-result-object p1

    invoke-direct {p0, p1}, Lcom/moji/tool/preferences/core/BasePreferences;->a(Ljava/lang/String;)V

    return-void
.end method

.method public a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Object;)V
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Ljava/lang/Object;",
            ">(",
            "Lcom/moji/tool/preferences/core/IPreferKey;",
            "TT;)V"
        }
    .end annotation

    .line 66
    iget-object v0, p0, Lcom/moji/tool/preferences/core/BasePreferences;->c:Landroid/content/SharedPreferences$Editor;

    invoke-interface {p1}, Lcom/moji/tool/preferences/core/IPreferKey;->name()Ljava/lang/String;

    move-result-object v1

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

    move-result-object p2

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

    .line 67
    iget-object p2, p0, Lcom/moji/tool/preferences/core/BasePreferences;->c:Landroid/content/SharedPreferences$Editor;

    invoke-interface {p2}, Landroid/content/SharedPreferences$Editor;->apply()V

    .line 68
    invoke-interface {p1}, Lcom/moji/tool/preferences/core/IPreferKey;->name()Ljava/lang/String;

    move-result-object p1

    invoke-direct {p0, p1}, Lcom/moji/tool/preferences/core/BasePreferences;->a(Ljava/lang/String;)V

    return-void
.end method

.method public a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/util/List;)V
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Ljava/lang/Object;",
            ">(",
            "Lcom/moji/tool/preferences/core/IPreferKey;",
            "Ljava/util/List<",
            "TT;>;)V"
        }
    .end annotation

    if-eqz p2, :cond_1

    .line 201
    invoke-interface {p2}, Ljava/util/List;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_1

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

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

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

    move-result-object p2

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

    move-result v1

    if-eqz v1, :cond_0

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

    move-result-object v1

    .line 204
    invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

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

    const-string v1, ","

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

    goto :goto_0

    .line 207
    :cond_0
    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p0, p1, p2}, Lcom/moji/tool/preferences/core/BasePreferences;->a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Object;)V

    .line 209
    :cond_1
    invoke-interface {p1}, Lcom/moji/tool/preferences/core/IPreferKey;->name()Ljava/lang/String;

    move-result-object p1

    invoke-direct {p0, p1}, Lcom/moji/tool/preferences/core/BasePreferences;->a(Ljava/lang/String;)V

    return-void
.end method

.method public a(Lcom/moji/tool/preferences/core/IPreferKey;Z)Z
    .locals 1

    .line 146
    iget-object v0, p0, Lcom/moji/tool/preferences/core/BasePreferences;->a:Landroid/content/SharedPreferences;

    invoke-interface {p1}, Lcom/moji/tool/preferences/core/IPreferKey;->name()Ljava/lang/String;

    move-result-object p1

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

    move-result p1

    return p1
.end method

.method public abstract b()I
.end method

.method public b(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Double;)Ljava/lang/Double;
    .locals 0

    .line 192
    invoke-virtual {p0, p1, p2}, Lcom/moji/tool/preferences/core/BasePreferences;->b(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Number;)Ljava/lang/String;

    move-result-object p1

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

    move-result-object p1

    return-object p1
.end method

.method public b(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Object;)Ljava/lang/Object;
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Ljava/lang/Object;",
            ">(",
            "Lcom/moji/tool/preferences/core/IPreferKey;",
            "TT;)TT;"
        }
    .end annotation

    .line 82
    iget-object v0, p0, Lcom/moji/tool/preferences/core/BasePreferences;->a:Landroid/content/SharedPreferences;

    invoke-interface {p1}, Lcom/moji/tool/preferences/core/IPreferKey;->name()Ljava/lang/String;

    move-result-object p1

    const-string v1, ""

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

    move-result-object p1

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

    move-result v0

    if-nez v0, :cond_0

    goto :goto_0

    :cond_0
    move-object p1, p2

    :goto_0
    return-object p1
.end method

.method public b(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Number;)Ljava/lang/String;
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<S:",
            "Ljava/lang/Number;",
            ">(",
            "Lcom/moji/tool/preferences/core/IPreferKey;",
            "TS;)",
            "Ljava/lang/String;"
        }
    .end annotation

    .line 72
    invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object p2

    .line 73
    iget-object v0, p0, Lcom/moji/tool/preferences/core/BasePreferences;->a:Landroid/content/SharedPreferences;

    invoke-interface {p1}, Lcom/moji/tool/preferences/core/IPreferKey;->name()Ljava/lang/String;

    move-result-object p1

    const-string v1, ""

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

    move-result-object p1

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

    move-result v0

    if-nez v0, :cond_0

    goto :goto_0

    :cond_0
    move-object p1, p2

    :goto_0
    return-object p1
.end method

.method public b(Lcom/moji/tool/preferences/core/IPreferKey;I)V
    .locals 0

    .line 103
    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p2

    invoke-virtual {p0, p1, p2}, Lcom/moji/tool/preferences/core/BasePreferences;->a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Number;)V

    return-void
.end method

.method public b(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Float;)V
    .locals 0

    .line 196
    invoke-virtual {p0, p1, p2}, Lcom/moji/tool/preferences/core/BasePreferences;->a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Number;)V

    .line 197
    invoke-interface {p1}, Lcom/moji/tool/preferences/core/IPreferKey;->name()Ljava/lang/String;

    move-result-object p1

    invoke-direct {p0, p1}, Lcom/moji/tool/preferences/core/BasePreferences;->a(Ljava/lang/String;)V

    return-void
.end method

.method public b(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/String;)V
    .locals 0

    .line 111
    invoke-virtual {p0, p1, p2}, Lcom/moji/tool/preferences/core/BasePreferences;->a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/Object;)V

    return-void
.end method

.method public c(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/String;)Ljava/util/List;
    .locals 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/moji/tool/preferences/core/IPreferKey;",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/List<",
            "Ljava/lang/Number;",
            ">;"
        }
    .end annotation

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

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

    .line 214
    iget-object v1, p0, Lcom/moji/tool/preferences/core/BasePreferences;->a:Landroid/content/SharedPreferences;

    invoke-interface {p1}, Lcom/moji/tool/preferences/core/IPreferKey;->name()Ljava/lang/String;

    move-result-object p1

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

    move-result-object p1

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

    move-result p2

    if-nez p2, :cond_0

    const-string p2, ","

    .line 216
    invoke-virtual {p1, p2}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object p1

    .line 217
    array-length p2, p1

    const/4 v1, 0x0

    :goto_0
    if-ge v1, p2, :cond_0

    aget-object v2, p1, v1

    .line 218
    invoke-static {v2}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J

    move-result-wide v2

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

    move-result-object v2

    invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :cond_0
    return-object v0
.end method

.method public e(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .line 116
    iget-object v0, p0, Lcom/moji/tool/preferences/core/BasePreferences;->a:Landroid/content/SharedPreferences;

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

    move-result-object p1

    return-object p1
.end method

.method public f(Ljava/lang/String;Ljava/lang/String;)V
    .locals 1
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .line 121
    iget-object v0, p0, Lcom/moji/tool/preferences/core/BasePreferences;->c:Landroid/content/SharedPreferences$Editor;

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

    .line 122
    iget-object p1, p0, Lcom/moji/tool/preferences/core/BasePreferences;->c:Landroid/content/SharedPreferences$Editor;

    invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V

    return-void
.end method
