400 lines
9.2 KiB
Smali
400 lines
9.2 KiB
Smali
.class public final Lcom/discord/samsung/a;
|
|
.super Ljava/lang/Object;
|
|
.source "SamsungConnect.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/samsung/a$a;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final zP:Lcom/discord/samsung/a;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
new-instance v0, Lcom/discord/samsung/a;
|
|
|
|
invoke-direct {v0}, Lcom/discord/samsung/a;-><init>()V
|
|
|
|
sput-object v0, Lcom/discord/samsung/a;->zP:Lcom/discord/samsung/a;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic a(Lokhttp3/Response;)Landroid/net/Uri;
|
|
.locals 6
|
|
|
|
const-string v0, "Location"
|
|
|
|
invoke-virtual {p0, v0}, Lokhttp3/Response;->dO(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v0, v1
|
|
|
|
:goto_0
|
|
const-string v2, "error"
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {v0}, Landroid/net/Uri;->getQuery()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
check-cast v4, Ljava/lang/CharSequence;
|
|
|
|
move-object v5, v2
|
|
|
|
check-cast v5, Ljava/lang/CharSequence;
|
|
|
|
invoke-static {v4, v5, v3}, Lkotlin/text/l;->a(Ljava/lang/CharSequence;Ljava/lang/CharSequence;Z)Z
|
|
|
|
move-result v3
|
|
|
|
:cond_1
|
|
if-nez v3, :cond_3
|
|
|
|
invoke-virtual {p0}, Lokhttp3/Response;->zX()Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_2
|
|
|
|
invoke-virtual {p0}, Lokhttp3/Response;->isRedirect()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
:cond_2
|
|
return-object v0
|
|
|
|
:cond_3
|
|
new-instance v3, Lcom/discord/samsung/a$a;
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
invoke-virtual {v0, v2}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
if-nez v2, :cond_5
|
|
|
|
:cond_4
|
|
const-string v2, "unknown"
|
|
|
|
:cond_5
|
|
if-eqz v0, :cond_6
|
|
|
|
const-string v1, "error_description"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
:cond_6
|
|
invoke-direct {v3, v2, v1}, Lcom/discord/samsung/a$a;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lcom/discord/app/AppLog;->uC:Lcom/discord/app/AppLog;
|
|
|
|
invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v1, "Samsung handleSamsungCallback error: "
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast v3, Ljava/lang/Throwable;
|
|
|
|
invoke-virtual {v0, p0, v3}, Lcom/discord/app/AppLog;->w(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
throw v3
|
|
.end method
|
|
|
|
.method public static a(Lokhttp3/t;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
|
.locals 8
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lokhttp3/t;",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/String;",
|
|
"Lkotlin/coroutines/Continuation<",
|
|
"-",
|
|
"Landroid/net/Uri;",
|
|
">;)",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-static {}, Lkotlinx/coroutines/ap;->EZ()Lkotlinx/coroutines/y;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lkotlin/coroutines/CoroutineContext;
|
|
|
|
new-instance v7, Lcom/discord/samsung/a$d;
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v1, v7
|
|
|
|
move-object v2, p2
|
|
|
|
move-object v3, p3
|
|
|
|
move-object v4, p1
|
|
|
|
move-object v5, p0
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/discord/samsung/a$d;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lokhttp3/t;Lkotlin/coroutines/Continuation;)V
|
|
|
|
check-cast v7, Lkotlin/jvm/functions/Function2;
|
|
|
|
invoke-static {v0, v7, p4}, Lkotlinx/coroutines/e;->a(Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static a(Lokhttp3/t;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lokhttp3/t;",
|
|
"Ljava/lang/String;",
|
|
"Lkotlin/coroutines/Continuation<",
|
|
"-",
|
|
"Landroid/net/Uri;",
|
|
">;)",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-static {}, Lkotlinx/coroutines/ap;->EZ()Lkotlinx/coroutines/y;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lkotlin/coroutines/CoroutineContext;
|
|
|
|
new-instance v1, Lcom/discord/samsung/a$b;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {v1, p1, p0, v2}, Lcom/discord/samsung/a$b;-><init>(Ljava/lang/String;Lokhttp3/t;Lkotlin/coroutines/Continuation;)V
|
|
|
|
check-cast v1, Lkotlin/jvm/functions/Function2;
|
|
|
|
invoke-static {v0, v1, p2}, Lkotlinx/coroutines/e;->a(Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static ai(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
const-string v0, "authServerUrl"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x2
|
|
|
|
invoke-static {p0, v0}, Lkotlin/text/l;->k(Ljava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
const/16 v1, 0xc6b
|
|
|
|
const-string v2, "https://account.samsung.com"
|
|
|
|
if-eq v0, v1, :cond_2
|
|
|
|
const/16 v1, 0xcb0
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const/16 v1, 0xe9e
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v0, "us"
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_3
|
|
|
|
const-string p0, "https://us.account.samsung.com"
|
|
|
|
return-object p0
|
|
|
|
:cond_1
|
|
const-string v0, "eu"
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_3
|
|
|
|
return-object v2
|
|
|
|
:cond_2
|
|
const-string v0, "cn"
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_3
|
|
|
|
const-string p0, "https://account.samsung.cn"
|
|
|
|
return-object p0
|
|
|
|
:cond_3
|
|
:goto_0
|
|
return-object v2
|
|
.end method
|
|
|
|
.method public static eo()Z
|
|
.locals 2
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x1c
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
sget-object v0, Landroid/os/Build;->MANUFACTURER:Ljava/lang/String;
|
|
|
|
const-string v1, "samsung"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/text/l;->af(Ljava/lang/String;Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public static ep()Lrx/Observable;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/lang/Boolean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getExperiments()Lcom/discord/stores/StoreExperiments;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const-string v2, "2019-samsung_overlay"
|
|
|
|
const/4 v3, 0x2
|
|
|
|
invoke-static {v0, v2, v1, v3, v1}, Lcom/discord/stores/StoreExperiments;->getExperimentAndStaff$default(Lcom/discord/stores/StoreExperiments;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/samsung/a$c;->zQ:Lcom/discord/samsung/a$c;
|
|
|
|
check-cast v1, Lrx/functions/b;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->e(Lrx/functions/b;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "StoreStream\n .g\u2026nabledDevice)\n }"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static eq()Landroid/content/Intent;
|
|
.locals 3
|
|
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-string v1, "com.msc.action.samsungaccount.REQUEST_NEW_THIRD_PARTY_INTEGRATION_WITH_SAMSUNG_ACCOUNT"
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
const-string v1, "client_id"
|
|
|
|
const-string v2, "97t47j218f"
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
const-string v1, "progress_theme"
|
|
|
|
const-string v2, "dark"
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
return-object v0
|
|
.end method
|