a.smali
.class public final Lcom/singbox/component/account/a;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field static final synthetic a:[Lkotlin/k/g;
.field public static final b:Landroidx/lifecycle/MutableLiveData;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/lifecycle/MutableLiveData<",
"Ljava/lang/Boolean;",
">;"
}
.end annotation
.end field
.field public static final c:Lcom/singbox/component/account/a;
.field private static final d:Lkotlin/f;
.field private static final e:Landroidx/lifecycle/LiveData;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/lifecycle/LiveData<",
"Ljava/lang/Boolean;",
">;"
}
.end annotation
.end field
.field private static final f:Landroidx/lifecycle/MutableLiveData;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/lifecycle/MutableLiveData<",
"Lcom/singbox/component/backend/model/userinfo/UserInfo;",
">;"
}
.end annotation
.end field
.field private static final g:Landroidx/lifecycle/LiveData;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/lifecycle/LiveData<",
"Lcom/singbox/component/backend/model/userinfo/UserInfo;",
">;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 9
const-string v0, "log-app-user"
const-string v1, "AccountManager"
const/4 v2, 0x1
new-array v2, v2, [Lkotlin/k/g;
new-instance v3, Lkotlin/f/b/z;
const-class v4, Lcom/singbox/component/account/a;
invoke-static {v4}, Lkotlin/f/b/ab;->a(Ljava/lang/Class;)Lkotlin/k/b;
move-result-object v4
const-string v5, "userDate"
const-string v6, "getUserDate()Lcom/singbox/component/account/UserData;"
invoke-direct {v3, v4, v5, v6}, Lkotlin/f/b/z;-><init>(Lkotlin/k/c;Ljava/lang/String;Ljava/lang/String;)V
invoke-static {v3}, Lkotlin/f/b/ab;->a(Lkotlin/f/b/y;)Lkotlin/k/j;
move-result-object v3
check-cast v3, Lkotlin/k/g;
const/4 v4, 0x0
aput-object v3, v2, v4
sput-object v2, Lcom/singbox/component/account/a;->a:[Lkotlin/k/g;
.line 22
new-instance v2, Lcom/singbox/component/account/a;
invoke-direct {v2}, Lcom/singbox/component/account/a;-><init>()V
sput-object v2, Lcom/singbox/component/account/a;->c:Lcom/singbox/component/account/a;
.line 24
sget-object v2, Lcom/singbox/component/account/a$b;->a:Lcom/singbox/component/account/a$b;
check-cast v2, Lkotlin/f/a/a;
invoke-static {v2}, Lkotlin/g;->a(Lkotlin/f/a/a;)Lkotlin/f;
move-result-object v2
sput-object v2, Lcom/singbox/component/account/a;->d:Lkotlin/f;
.line 25
new-instance v2, Landroidx/lifecycle/MutableLiveData;
invoke-direct {v2}, Landroidx/lifecycle/MutableLiveData;-><init>()V
.line 26
sput-object v2, Lcom/singbox/component/account/a;->b:Landroidx/lifecycle/MutableLiveData;
check-cast v2, Landroidx/lifecycle/LiveData;
.line 137
invoke-static {v2}, Landroidx/lifecycle/Transformations;->distinctUntilChanged(Landroidx/lifecycle/LiveData;)Landroidx/lifecycle/LiveData;
move-result-object v2
const-string v3, "Transformations.distinctUntilChanged(this)"
invoke-static {v2, v3}, Lkotlin/f/b/o;->a(Ljava/lang/Object;Ljava/lang/String;)V
sput-object v2, Lcom/singbox/component/account/a;->e:Landroidx/lifecycle/LiveData;
const/16 v2, 0x18
.line 30
:try_start_48
invoke-static {}, Lcom/singbox/util/h;->a()Lcom/google/gson/f;
move-result-object v4
sget-object v5, Lcom/singbox/component/storage/b/i;->k:Lcom/singbox/component/storage/b/i;
.line 1000
sget-object v6, Lcom/singbox/component/storage/b/i;->f:Lcom/singbox/component/storage/b/g;
sget-object v7, Lcom/singbox/component/storage/b/i;->a:[Lkotlin/k/g;
const/4 v8, 0x7
aget-object v7, v7, v8
invoke-virtual {v6, v5, v7}, Lcom/singbox/component/storage/b/g;->a(Ljava/lang/Object;Lkotlin/k/g;)Ljava/lang/Object;
move-result-object v5
check-cast v5, Ljava/lang/String;
.line 30
const-class v6, Lcom/singbox/component/backend/model/userinfo/UserInfo;
invoke-virtual {v4, v5, v6}, Lcom/google/gson/f;->a(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
move-result-object v4
check-cast v4, Lcom/singbox/component/backend/model/userinfo/UserInfo;
:try_end_63
.catch Lcom/google/gson/JsonSyntaxException; {:try_start_48 .. :try_end_63} :catch_64
goto :goto_6d
:catch_64
move-exception v4
.line 32
check-cast v4, Ljava/lang/Throwable;
const-string v5, "parse myUserInfo fail."
invoke-static {v1, v5, v4, v2}, Lcom/singbox/util/v;->c(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;I)V
const/4 v4, 0x0
.line 28
:goto_6d
new-instance v5, Landroidx/lifecycle/MutableLiveData;
invoke-direct {v5, v4}, Landroidx/lifecycle/MutableLiveData;-><init>(Ljava/lang/Object;)V
.line 36
sput-object v5, Lcom/singbox/component/account/a;->f:Landroidx/lifecycle/MutableLiveData;
check-cast v5, Landroidx/lifecycle/LiveData;
.line 138
invoke-static {v5}, Landroidx/lifecycle/Transformations;->distinctUntilChanged(Landroidx/lifecycle/LiveData;)Landroidx/lifecycle/LiveData;
move-result-object v4
invoke-static {v4, v3}, Lkotlin/f/b/o;->a(Ljava/lang/Object;Ljava/lang/String;)V
sput-object v4, Lcom/singbox/component/account/a;->g:Landroidx/lifecycle/LiveData;
.line 40
:try_start_7f
invoke-static {}, Lcom/singbox/component/account/a;->a()Lcom/singbox/component/account/UserData;
move-result-object v3
const-string v4, "load call"
.line 1043
invoke-static {v4, v0}, Lcom/singbox/util/w;->b(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
.line 1044
iget-object v4, v3, Lcom/singbox/component/account/UserData;->a:Ljava/io/File;
invoke-virtual {v4}, Ljava/io/File;->exists()Z
move-result v4
if-eqz v4, :cond_b5
.line 1047
iget-object v4, v3, Lcom/singbox/component/account/UserData;->a:Ljava/io/File;
invoke-static {v4}, Lkotlin/io/d;->a(Ljava/io/File;)[B
move-result-object v4
.line 1048
sget-object v5, Lcom/singbox/component/account/b;->a:Lcom/singbox/component/account/b;
invoke-static {v4}, Lcom/singbox/component/account/b;->b([B)[B
move-result-object v4
if-eqz v4, :cond_b5
.line 1049
sget-object v5, Lcom/singbox/util/q;->a:Lcom/singbox/util/q;
invoke-static {v4}, Lcom/singbox/util/q;->a([B)Ljava/lang/Object;
move-result-object v4
check-cast v4, Lcom/singbox/component/account/UserData;
invoke-virtual {v3, v4}, Lcom/singbox/component/account/UserData;->a(Lcom/singbox/component/account/UserData;)V
const-string v3, "load succ"
.line 1050
invoke-static {v3, v0}, Lcom/singbox/util/w;->b(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
:try_end_ae
.catchall {:try_start_7f .. :try_end_ae} :catchall_af
goto :goto_b5
:catchall_af
move-exception v0
const-string v3, "loadFailed"
.line 42
invoke-static {v1, v3, v0, v2}, Lcom/singbox/util/v;->c(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;I)V
.line 44
:cond_b5
:goto_b5
sget-object v0, Lcom/singbox/component/account/a;->e:Landroidx/lifecycle/LiveData;
sget-object v1, Lcom/singbox/component/account/a$1;->a:Lcom/singbox/component/account/a$1;
check-cast v1, Landroidx/lifecycle/Observer;
invoke-virtual {v0, v1}, Landroidx/lifecycle/LiveData;->observeForever(Landroidx/lifecycle/Observer;)V
.line 47
sget-object v0, Lcom/singbox/component/account/a;->b:Landroidx/lifecycle/MutableLiveData;
invoke-static {}, Lcom/singbox/component/account/a;->c()Z
move-result v1
invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v1
invoke-virtual {v0, v1}, Landroidx/lifecycle/MutableLiveData;->setValue(Ljava/lang/Object;)V
return-void
.end method
.method private constructor <init>()V
.registers 1
.line 22
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static a()Lcom/singbox/component/account/UserData;
.registers 1
sget-object v0, Lcom/singbox/component/account/a;->d:Lkotlin/f;
invoke-interface {v0}, Lkotlin/f;->getValue()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/singbox/component/account/UserData;
return-object v0
.end method
.method public static b()Landroidx/lifecycle/LiveData;
.registers 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Landroidx/lifecycle/LiveData<",
"Ljava/lang/Boolean;",
">;"
}
.end annotation
.line 26
sget-object v0, Lcom/singbox/component/account/a;->e:Landroidx/lifecycle/LiveData;
return-object v0
.end method
.method public static c()Z
.registers 1
.line 51
invoke-static {}, Lcom/singbox/component/account/a;->a()Lcom/singbox/component/account/UserData;
move-result-object v0
.line 2036
iget-object v0, v0, Lcom/singbox/component/account/UserData;->c:Lcom/singbox/component/account/Token;
.line 51
invoke-virtual {v0}, Lcom/singbox/component/account/Token;->b()Z
move-result v0
return v0
.end method
.method public static d()V
.registers 2
.line 72
invoke-static {}, Lcom/singbox/component/account/a;->c()Z
move-result v0
if-eqz v0, :cond_f
.line 73
sget-object v0, Lcom/singbox/feats/api/l;->a:Lcom/singbox/feats/api/l;
invoke-static {}, Lcom/singbox/component/account/a;->a()Lcom/singbox/component/account/UserData;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/singbox/feats/api/l;->a(Lcom/singbox/component/account/UserData;)V
:cond_f
return-void
.end method
.method public static e()V
.registers 3
.line 79
invoke-static {}, Lcom/singbox/component/account/a;->a()Lcom/singbox/component/account/UserData;
move-result-object v0
const-string v1, "clear call"
const-string v2, "log-app-user"
.line 2071
invoke-static {v1, v2}, Lcom/singbox/util/w;->b(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
.line 2072
sget-object v1, Lcom/singbox/component/account/Token;->a:Lcom/singbox/component/account/Token;
iput-object v1, v0, Lcom/singbox/component/account/UserData;->c:Lcom/singbox/component/account/Token;
const-wide/16 v1, 0x0
.line 2073
iput-wide v1, v0, Lcom/singbox/component/account/UserData;->b:J
const-string v1, ""
.line 2074
iput-object v1, v0, Lcom/singbox/component/account/UserData;->d:Ljava/lang/String;
.line 80
invoke-static {}, Lcom/singbox/component/account/a;->a()Lcom/singbox/component/account/UserData;
move-result-object v0
invoke-virtual {v0}, Lcom/singbox/component/account/UserData;->b()Z
.line 81
sget-object v0, Lcom/singbox/feats/api/l;->a:Lcom/singbox/feats/api/l;
.line 2123
sget-object v0, Lcom/singbox/component/account/a;->b:Landroidx/lifecycle/MutableLiveData;
sget-object v2, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
invoke-virtual {v0, v2}, Landroidx/lifecycle/MutableLiveData;->setValue(Ljava/lang/Object;)V
.line 2124
sget-object v0, Lcom/singbox/component/storage/b/a;->i:Lcom/singbox/component/storage/b/a;
invoke-virtual {v0, v1}, Lcom/singbox/component/storage/b/a;->a(Ljava/lang/String;)V
.line 2125
sget-object v0, Lcom/singbox/process/provider/b;->j:Lcom/singbox/process/provider/b;
invoke-static {}, Lcom/singbox/component/account/a;->a()Lcom/singbox/component/account/UserData;
move-result-object v1
invoke-virtual {v1}, Lcom/singbox/component/account/UserData;->a()J
move-result-wide v1
invoke-virtual {v0, v1, v2}, Lcom/singbox/process/provider/b;->a(J)V
return-void
.end method
.method public static f()V
.registers 4
.line 92
invoke-static {}, Lsg/bigo/c/a/a;->b()Lkotlinx/coroutines/aa;
move-result-object v0
check-cast v0, Lkotlin/c/e;
invoke-static {v0}, Lkotlinx/coroutines/ag;->a(Lkotlin/c/e;)Lkotlinx/coroutines/af;
move-result-object v0
new-instance v1, Lcom/singbox/component/account/a$a;
const/4 v2, 0x0
invoke-direct {v1, v2}, Lcom/singbox/component/account/a$a;-><init>(Lkotlin/c/c;)V
check-cast v1, Lkotlin/f/a/m;
const/4 v3, 0x3
invoke-static {v0, v2, v2, v1, v3}, Lkotlinx/coroutines/e;->a(Lkotlinx/coroutines/af;Lkotlin/c/e;Lkotlinx/coroutines/ah;Lkotlin/f/a/m;I)Lkotlinx/coroutines/br;
return-void
.end method
.method public static final synthetic g()Landroidx/lifecycle/MutableLiveData;
.registers 1
.line 22
sget-object v0, Lcom/singbox/component/account/a;->f:Landroidx/lifecycle/MutableLiveData;
return-object v0
.end method