SecuredEditor.smali

.class public Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/content/SharedPreferences$Editor;


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

.field private b:Lcom/github/kovmarci86/android/secure/preferences/encryption/EncryptionHelper;


# direct methods
.method public constructor <init>(Lcom/github/kovmarci86/android/secure/preferences/encryption/EncryptionHelper;Landroid/content/SharedPreferences$Editor;)V
    .registers 3

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

    iput-object p1, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->b:Lcom/github/kovmarci86/android/secure/preferences/encryption/EncryptionHelper;

    iput-object p2, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->a:Landroid/content/SharedPreferences$Editor;

    return-void
.end method

.method public static b(Landroid/content/SharedPreferences$Editor;)V
    .registers 3

    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0xb

    if-lt v0, v1, :cond_a

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

    goto :goto_11

    :cond_a
    const-class v0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;

    monitor-enter v0

    :try_start_d
    invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->commit()Z

    monitor-exit v0

    :goto_11
    return-void

    :catchall_12
    move-exception p0

    monitor-exit v0
    :try_end_14
    .catchall {:try_start_d .. :try_end_14} :catchall_12

    throw p0
.end method


# virtual methods
.method public a()Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;
    .registers 2

    iget-object v0, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->a:Landroid/content/SharedPreferences$Editor;

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

    return-object p0
.end method

.method public apply()V
    .registers 2

    iget-object v0, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->a:Landroid/content/SharedPreferences$Editor;

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

    return-void
.end method

.method public c(Ljava/lang/String;Z)Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;
    .registers 5

    iget-object v0, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->a:Landroid/content/SharedPreferences$Editor;

    iget-object v1, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->b:Lcom/github/kovmarci86/android/secure/preferences/encryption/EncryptionHelper;

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

    move-result-object p2

    invoke-virtual {v1, p2}, Lcom/github/kovmarci86/android/secure/preferences/encryption/EncryptionHelper;->b(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p2

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

    return-object p0
.end method

.method public bridge synthetic clear()Landroid/content/SharedPreferences$Editor;
    .registers 1

    invoke-virtual {p0}, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->a()Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;

    return-object p0
.end method

.method public commit()Z
    .registers 2

    iget-object v0, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->a:Landroid/content/SharedPreferences$Editor;

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

    move-result v0

    return v0
.end method

.method public d(Ljava/lang/String;F)Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;
    .registers 5

    iget-object v0, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->a:Landroid/content/SharedPreferences$Editor;

    iget-object v1, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->b:Lcom/github/kovmarci86/android/secure/preferences/encryption/EncryptionHelper;

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

    move-result-object p2

    invoke-virtual {v1, p2}, Lcom/github/kovmarci86/android/secure/preferences/encryption/EncryptionHelper;->b(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p2

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

    return-object p0
.end method

.method public e(Ljava/lang/String;I)Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;
    .registers 5

    iget-object v0, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->a:Landroid/content/SharedPreferences$Editor;

    iget-object v1, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->b:Lcom/github/kovmarci86/android/secure/preferences/encryption/EncryptionHelper;

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

    move-result-object p2

    invoke-virtual {v1, p2}, Lcom/github/kovmarci86/android/secure/preferences/encryption/EncryptionHelper;->b(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p2

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

    return-object p0
.end method

.method public f(Ljava/lang/String;J)Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;
    .registers 6

    iget-object v0, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->a:Landroid/content/SharedPreferences$Editor;

    iget-object v1, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->b:Lcom/github/kovmarci86/android/secure/preferences/encryption/EncryptionHelper;

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

    move-result-object p2

    invoke-virtual {v1, p2}, Lcom/github/kovmarci86/android/secure/preferences/encryption/EncryptionHelper;->b(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p2

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

    return-object p0
.end method

.method public g(Ljava/lang/String;Ljava/lang/String;)Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;
    .registers 5

    iget-object v0, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->a:Landroid/content/SharedPreferences$Editor;

    iget-object v1, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->b:Lcom/github/kovmarci86/android/secure/preferences/encryption/EncryptionHelper;

    invoke-virtual {v1, p2}, Lcom/github/kovmarci86/android/secure/preferences/encryption/EncryptionHelper;->b(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p2

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

    return-object p0
.end method

.method public h(Ljava/lang/String;Ljava/util/Set;)Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Ljava/util/Set<",
            "Ljava/lang/String;",
            ">;)",
            "Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;"
        }
    .end annotation

    iget-object v0, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->a:Landroid/content/SharedPreferences$Editor;

    iget-object v1, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->b:Lcom/github/kovmarci86/android/secure/preferences/encryption/EncryptionHelper;

    invoke-virtual {v1, p2}, Lcom/github/kovmarci86/android/secure/preferences/encryption/EncryptionHelper;->b(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p2

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

    return-object p0
.end method

.method public i(Ljava/lang/String;)Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;
    .registers 3

    iget-object v0, p0, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->a:Landroid/content/SharedPreferences$Editor;

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

    return-object p0
.end method

.method public j()V
    .registers 1

    invoke-static {p0}, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->b(Landroid/content/SharedPreferences$Editor;)V

    return-void
.end method

.method public bridge synthetic putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;
    .registers 3

    invoke-virtual {p0, p1, p2}, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->c(Ljava/lang/String;Z)Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;

    return-object p0
.end method

.method public bridge synthetic putFloat(Ljava/lang/String;F)Landroid/content/SharedPreferences$Editor;
    .registers 3

    invoke-virtual {p0, p1, p2}, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->d(Ljava/lang/String;F)Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;

    return-object p0
.end method

.method public bridge synthetic putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
    .registers 3

    invoke-virtual {p0, p1, p2}, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->e(Ljava/lang/String;I)Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;

    return-object p0
.end method

.method public bridge synthetic putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;
    .registers 4

    invoke-virtual {p0, p1, p2, p3}, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->f(Ljava/lang/String;J)Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;

    return-object p0
.end method

.method public bridge synthetic putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
    .registers 3

    invoke-virtual {p0, p1, p2}, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->g(Ljava/lang/String;Ljava/lang/String;)Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;

    return-object p0
.end method

.method public bridge synthetic putStringSet(Ljava/lang/String;Ljava/util/Set;)Landroid/content/SharedPreferences$Editor;
    .registers 3

    invoke-virtual {p0, p1, p2}, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->h(Ljava/lang/String;Ljava/util/Set;)Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;

    return-object p0
.end method

.method public bridge synthetic remove(Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
    .registers 2

    invoke-virtual {p0, p1}, Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;->i(Ljava/lang/String;)Lcom/github/kovmarci86/android/secure/preferences/SecuredEditor;

    return-object p0
.end method