bl.smali
.class public Lcom/xiaomi/push/service/bl;
.super Ljava/lang/Object;
# static fields
.field private static volatile a:Lcom/xiaomi/push/service/bl;
# instance fields
.field private b:Landroid/content/SharedPreferences;
# direct methods
.method private constructor <init>(Landroid/content/Context;)V
.registers 4
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const-string/jumbo v0, "mipush"
const/4 v1, 0x0
invoke-virtual {p1, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
iput-object v0, p0, Lcom/xiaomi/push/service/bl;->b:Landroid/content/SharedPreferences;
return-void
.end method
.method public static a(Landroid/content/Context;)Lcom/xiaomi/push/service/bl;
.registers 3
sget-object v0, Lcom/xiaomi/push/service/bl;->a:Lcom/xiaomi/push/service/bl;
if-nez v0, :cond_13
const-class v1, Lcom/xiaomi/push/service/bl;
monitor-enter v1
:try_start_7
sget-object v0, Lcom/xiaomi/push/service/bl;->a:Lcom/xiaomi/push/service/bl;
if-nez v0, :cond_12
new-instance v0, Lcom/xiaomi/push/service/bl;
invoke-direct {v0, p0}, Lcom/xiaomi/push/service/bl;-><init>(Landroid/content/Context;)V
sput-object v0, Lcom/xiaomi/push/service/bl;->a:Lcom/xiaomi/push/service/bl;
:cond_12
monitor-exit v1
:try_end_13
.catchall {:try_start_7 .. :try_end_13} :catchall_16
:cond_13
sget-object v0, Lcom/xiaomi/push/service/bl;->a:Lcom/xiaomi/push/service/bl;
return-object v0
:catchall_16
move-exception v0
:try_start_17
monitor-exit v1
:try_end_18
.catchall {:try_start_17 .. :try_end_18} :catchall_16
throw v0
.end method
# virtual methods
.method public declared-synchronized a()V
.registers 3
monitor-enter p0
:try_start_1
iget-object v0, p0, Lcom/xiaomi/push/service/bl;->b:Landroid/content/SharedPreferences;
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v0
const-string/jumbo v1, "miid"
invoke-interface {v0, v1}, Landroid/content/SharedPreferences$Editor;->remove(Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z
:try_end_10
.catchall {:try_start_1 .. :try_end_10} :catchall_12
monitor-exit p0
return-void
:catchall_12
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized a(Ljava/lang/String;)V
.registers 4
monitor-enter p0
:try_start_1
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_a
const-string/jumbo p1, "0"
:cond_a
iget-object v0, p0, Lcom/xiaomi/push/service/bl;->b:Landroid/content/SharedPreferences;
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v0
const-string/jumbo v1, "miid"
invoke-interface {v0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z
:try_end_19
.catchall {:try_start_1 .. :try_end_19} :catchall_1b
monitor-exit p0
return-void
:catchall_1b
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized b()Ljava/lang/String;
.registers 4
monitor-enter p0
:try_start_1
iget-object v0, p0, Lcom/xiaomi/push/service/bl;->b:Landroid/content/SharedPreferences;
const-string/jumbo v1, "miid"
const-string/jumbo v2, "0"
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
:try_end_c
.catchall {:try_start_1 .. :try_end_c} :catchall_f
move-result-object v0
monitor-exit p0
return-object v0
:catchall_f
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized c()Z
.registers 3
monitor-enter p0
:try_start_1
const-string/jumbo v0, "0"
invoke-virtual {p0}, Lcom/xiaomi/push/service/bl;->b()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/text/TextUtils;->equals(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z
:try_end_b
.catchall {:try_start_1 .. :try_end_b} :catchall_13
move-result v0
if-nez v0, :cond_11
const/4 v0, 0x1
:goto_f
monitor-exit p0
return v0
:cond_11
const/4 v0, 0x0
goto :goto_f
:catchall_13
move-exception v0
monitor-exit p0
throw v0
.end method