131 lines
3.7 KiB
Smali
131 lines
3.7 KiB
Smali
.class public Lcom/moji/newliveview/search/controller/DraftPrefer;
|
|
.super Ljava/lang/Object;
|
|
.source "DraftPrefer.java"
|
|
|
|
|
|
# static fields
|
|
.field private static volatile c:Lcom/moji/newliveview/search/controller/DraftPrefer;
|
|
|
|
|
|
# instance fields
|
|
.field protected a:Landroid/content/SharedPreferences$Editor;
|
|
|
|
.field private b:Landroid/content/SharedPreferences;
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>(Landroid/content/Context;)V
|
|
.locals 2
|
|
|
|
.line 22
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const-string v0, "draft_perfer"
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 23
|
|
invoke-virtual {p1, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/moji/newliveview/search/controller/DraftPrefer;->b:Landroid/content/SharedPreferences;
|
|
|
|
.line 24
|
|
iget-object p1, p0, Lcom/moji/newliveview/search/controller/DraftPrefer;->b:Landroid/content/SharedPreferences;
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/moji/newliveview/search/controller/DraftPrefer;->a:Landroid/content/SharedPreferences$Editor;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a()Lcom/moji/newliveview/search/controller/DraftPrefer;
|
|
.locals 3
|
|
|
|
.line 28
|
|
sget-object v0, Lcom/moji/newliveview/search/controller/DraftPrefer;->c:Lcom/moji/newliveview/search/controller/DraftPrefer;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 29
|
|
const-class v0, Lcom/moji/newliveview/search/controller/DraftPrefer;
|
|
|
|
monitor-enter v0
|
|
|
|
.line 30
|
|
:try_start_0
|
|
sget-object v1, Lcom/moji/newliveview/search/controller/DraftPrefer;->c:Lcom/moji/newliveview/search/controller/DraftPrefer;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 31
|
|
new-instance v1, Lcom/moji/newliveview/search/controller/DraftPrefer;
|
|
|
|
invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {v1, v2}, Lcom/moji/newliveview/search/controller/DraftPrefer;-><init>(Landroid/content/Context;)V
|
|
|
|
sput-object v1, Lcom/moji/newliveview/search/controller/DraftPrefer;->c:Lcom/moji/newliveview/search/controller/DraftPrefer;
|
|
|
|
.line 33
|
|
:cond_0
|
|
monitor-exit v0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v1
|
|
|
|
.line 35
|
|
:cond_1
|
|
:goto_0
|
|
sget-object v0, Lcom/moji/newliveview/search/controller/DraftPrefer;->c:Lcom/moji/newliveview/search/controller/DraftPrefer;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 68
|
|
iget-object v0, p0, Lcom/moji/newliveview/search/controller/DraftPrefer;->b:Landroid/content/SharedPreferences;
|
|
|
|
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
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public a(Ljava/lang/String;Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
.line 76
|
|
iget-object v0, p0, Lcom/moji/newliveview/search/controller/DraftPrefer;->a: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 77
|
|
iget-object p1, p0, Lcom/moji/newliveview/search/controller/DraftPrefer;->a:Landroid/content/SharedPreferences$Editor;
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
|
|
|
|
return-void
|
|
.end method
|