apkfuckery/com.discord/smali/e/a/g/c.smali

430 lines
10 KiB
Smali
Raw Normal View History

2020-04-27 20:53:11 +00:00
.class public final Le/a/g/c;
.super Lx/s/h/a/h;
2020-04-08 16:24:01 +00:00
.source "SamsungConnect.kt"
2019-12-06 03:29:40 +00:00
# interfaces
2020-04-21 02:16:59 +00:00
.implements Lkotlin/jvm/functions/Function2;
2020-01-22 01:17:22 +00:00
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
2020-04-27 20:53:11 +00:00
"Lx/s/h/a/h;",
2020-04-21 02:16:59 +00:00
"Lkotlin/jvm/functions/Function2<",
"Lkotlinx/coroutines/CoroutineScope;",
"Lkotlin/coroutines/Continuation<",
"-",
"Landroid/net/Uri;",
">;",
2020-03-19 04:19:10 +00:00
"Ljava/lang/Object;",
2020-04-21 02:16:59 +00:00
">;"
2020-01-22 01:17:22 +00:00
}
.end annotation
2019-12-06 03:29:40 +00:00
2020-04-27 20:53:11 +00:00
.annotation runtime Lx/s/h/a/d;
2020-04-21 02:16:59 +00:00
c = "com.discord.samsung.SamsungConnect$postSamsungAuthorizeCallback$2"
f = "SamsungConnect.kt"
l = {}
m = "invokeSuspend"
.end annotation
2019-12-06 03:29:40 +00:00
2020-04-21 02:16:59 +00:00
# instance fields
2020-04-27 20:53:11 +00:00
.field public final synthetic $okHttpClient:Lb0/v;
2019-12-06 03:29:40 +00:00
2020-04-21 02:16:59 +00:00
.field public final synthetic $samsungAuthCode:Ljava/lang/String;
2019-12-06 03:29:40 +00:00
2020-04-21 02:16:59 +00:00
.field public final synthetic $state:Ljava/lang/String;
2019-12-06 03:29:40 +00:00
2020-04-21 02:16:59 +00:00
.field public final synthetic $url:Ljava/lang/String;
2020-01-22 01:17:22 +00:00
2020-04-21 02:16:59 +00:00
.field public label:I
2020-03-19 04:19:10 +00:00
2020-04-21 02:16:59 +00:00
.field public p$:Lkotlinx/coroutines/CoroutineScope;
2020-03-19 04:19:10 +00:00
2020-04-21 02:16:59 +00:00
# direct methods
2020-04-27 20:53:11 +00:00
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lb0/v;Lkotlin/coroutines/Continuation;)V
2020-03-19 04:19:10 +00:00
.locals 0
2020-04-27 20:53:11 +00:00
iput-object p1, p0, Le/a/g/c;->$state:Ljava/lang/String;
2020-04-21 02:16:59 +00:00
2020-04-27 20:53:11 +00:00
iput-object p2, p0, Le/a/g/c;->$samsungAuthCode:Ljava/lang/String;
2020-04-21 02:16:59 +00:00
2020-04-27 20:53:11 +00:00
iput-object p3, p0, Le/a/g/c;->$url:Ljava/lang/String;
2020-04-21 02:16:59 +00:00
2020-04-27 20:53:11 +00:00
iput-object p4, p0, Le/a/g/c;->$okHttpClient:Lb0/v;
2020-04-21 02:16:59 +00:00
const/4 p1, 0x2
2020-04-27 20:53:11 +00:00
invoke-direct {p0, p1, p5}, Lx/s/h/a/h;-><init>(ILkotlin/coroutines/Continuation;)V
2019-12-06 03:29:40 +00:00
2020-01-28 00:59:01 +00:00
return-void
2020-01-22 01:17:22 +00:00
.end method
2019-12-06 03:29:40 +00:00
2020-01-28 00:59:01 +00:00
# virtual methods
2020-04-21 02:16:59 +00:00
.method public final create(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
.locals 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"Lkotlin/coroutines/Continuation<",
"*>;)",
"Lkotlin/coroutines/Continuation<",
"Lkotlin/Unit;",
">;"
}
.end annotation
2019-12-06 03:29:40 +00:00
2020-04-21 02:16:59 +00:00
if-eqz p2, :cond_0
2019-12-06 03:29:40 +00:00
2020-04-27 20:53:11 +00:00
new-instance v6, Le/a/g/c;
2019-12-06 03:29:40 +00:00
2020-04-27 20:53:11 +00:00
iget-object v1, p0, Le/a/g/c;->$state:Ljava/lang/String;
2019-12-06 03:29:40 +00:00
2020-04-27 20:53:11 +00:00
iget-object v2, p0, Le/a/g/c;->$samsungAuthCode:Ljava/lang/String;
2019-12-06 03:29:40 +00:00
2020-04-27 20:53:11 +00:00
iget-object v3, p0, Le/a/g/c;->$url:Ljava/lang/String;
2020-04-21 02:16:59 +00:00
2020-04-27 20:53:11 +00:00
iget-object v4, p0, Le/a/g/c;->$okHttpClient:Lb0/v;
2020-04-21 02:16:59 +00:00
move-object v0, v6
move-object v5, p2
2020-04-27 20:53:11 +00:00
invoke-direct/range {v0 .. v5}, Le/a/g/c;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lb0/v;Lkotlin/coroutines/Continuation;)V
2020-04-21 02:16:59 +00:00
check-cast p1, Lkotlinx/coroutines/CoroutineScope;
2020-04-27 20:53:11 +00:00
iput-object p1, v6, Le/a/g/c;->p$:Lkotlinx/coroutines/CoroutineScope;
2020-04-21 02:16:59 +00:00
return-object v6
2020-04-08 16:24:01 +00:00
:cond_0
2020-04-21 02:16:59 +00:00
const-string p1, "completion"
2020-04-27 20:53:11 +00:00
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
2020-04-21 02:16:59 +00:00
2020-04-08 16:24:01 +00:00
const/4 p1, 0x0
2020-04-21 02:16:59 +00:00
throw p1
.end method
.method public final invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.locals 0
check-cast p2, Lkotlin/coroutines/Continuation;
2020-04-27 20:53:11 +00:00
invoke-virtual {p0, p1, p2}, Le/a/g/c;->create(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
2020-04-21 02:16:59 +00:00
move-result-object p1
2020-04-27 20:53:11 +00:00
check-cast p1, Le/a/g/c;
2020-04-21 02:16:59 +00:00
sget-object p2, Lkotlin/Unit;->a:Lkotlin/Unit;
2020-04-27 20:53:11 +00:00
invoke-virtual {p1, p2}, Le/a/g/c;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
2019-12-06 03:29:40 +00:00
2020-03-19 04:19:10 +00:00
move-result-object p1
2019-12-06 03:29:40 +00:00
2020-03-19 04:19:10 +00:00
return-object p1
2019-12-06 03:29:40 +00:00
.end method
2020-04-21 02:16:59 +00:00
.method public final invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
.locals 10
2020-04-27 20:53:11 +00:00
sget-object v0, Lx/s/g/a;->d:Lx/s/g/a;
2020-04-21 02:16:59 +00:00
2020-04-27 20:53:11 +00:00
iget v0, p0, Le/a/g/c;->label:I
2020-04-21 02:16:59 +00:00
if-nez v0, :cond_8
2020-05-07 21:13:23 +00:00
invoke-static {p1}, Le/n/a/j/a;->throwOnFailure(Ljava/lang/Object;)V
2020-04-21 02:16:59 +00:00
const/4 p1, 0x2
new-array v0, p1, [Lkotlin/Pair;
2020-04-27 20:53:11 +00:00
iget-object v1, p0, Le/a/g/c;->$state:Ljava/lang/String;
2020-04-21 02:16:59 +00:00
new-instance v2, Lkotlin/Pair;
const-string v3, "state"
invoke-direct {v2, v3, v1}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
const/4 v1, 0x0
aput-object v2, v0, v1
const/4 v2, 0x1
const-string v3, "{\"code\":\""
2020-04-27 20:53:11 +00:00
invoke-static {v3}, Le/e/b/a/a;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
2020-04-21 02:16:59 +00:00
move-result-object v3
2020-04-27 20:53:11 +00:00
iget-object v4, p0, Le/a/g/c;->$samsungAuthCode:Ljava/lang/String;
2020-04-21 02:16:59 +00:00
const-string v5, "\"}"
2020-04-27 20:53:11 +00:00
invoke-static {v3, v4, v5}, Le/e/b/a/a;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
2020-04-21 02:16:59 +00:00
move-result-object v3
new-instance v4, Lkotlin/Pair;
const-string v5, "code"
invoke-direct {v4, v5, v3}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
aput-object v4, v0, v2
2020-04-27 20:53:11 +00:00
invoke-static {v0}, Lx/q/l;->mapOf([Lkotlin/Pair;)Ljava/util/Map;
2020-04-21 02:16:59 +00:00
move-result-object v0
new-instance v2, Ljava/util/ArrayList;
invoke-interface {v0}, Ljava/util/Map;->size()I
move-result v3
invoke-direct {v2, v3}, Ljava/util/ArrayList;-><init>(I)V
invoke-interface {v0}, Ljava/util/Map;->entrySet()Ljava/util/Set;
move-result-object v0
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_0
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Ljava/util/Map$Entry;
invoke-interface {v3}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v4
check-cast v4, Ljava/lang/String;
invoke-interface {v3}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v3
check-cast v3, Ljava/lang/String;
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v5, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const/16 v4, 0x3d
invoke-virtual {v5, v4}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-interface {v2, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
goto :goto_0
:cond_0
const/4 v4, 0x0
const/4 v5, 0x0
const/4 v6, 0x0
const/4 v7, 0x0
const/4 v8, 0x0
const/16 v9, 0x3e
const-string v3, "&"
2020-04-27 20:53:11 +00:00
invoke-static/range {v2 .. v9}, Lx/q/l;->joinToString$default(Ljava/lang/Iterable;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;I)Ljava/lang/String;
2020-04-21 02:16:59 +00:00
move-result-object v0
sget-object v2, Lokhttp3/RequestBody;->Companion:Lokhttp3/RequestBody$Companion;
sget-object v3, Lokhttp3/MediaType;->g:Lokhttp3/MediaType$a;
const-string v4, "application/x-www-form-urlencoded"
invoke-virtual {v3, v4}, Lokhttp3/MediaType$a;->a(Ljava/lang/String;)Lokhttp3/MediaType;
move-result-object v3
invoke-virtual {v2, v0, v3}, Lokhttp3/RequestBody$Companion;->a(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;
move-result-object v0
2020-04-27 20:53:11 +00:00
new-instance v2, Lb0/y$a;
2020-04-21 02:16:59 +00:00
2020-04-27 20:53:11 +00:00
invoke-direct {v2}, Lb0/y$a;-><init>()V
2020-04-21 02:16:59 +00:00
const/4 v3, 0x0
if-eqz v0, :cond_7
const-string v4, "POST"
2020-04-27 20:53:11 +00:00
invoke-virtual {v2, v4, v0}, Lb0/y$a;->a(Ljava/lang/String;Lokhttp3/RequestBody;)Lb0/y$a;
2020-04-21 02:16:59 +00:00
2020-04-27 20:53:11 +00:00
iget-object v0, p0, Le/a/g/c;->$url:Ljava/lang/String;
2020-04-21 02:16:59 +00:00
2020-04-27 20:53:11 +00:00
invoke-virtual {v2, v0}, Lb0/y$a;->b(Ljava/lang/String;)Lb0/y$a;
2020-04-21 02:16:59 +00:00
2020-04-27 20:53:11 +00:00
invoke-virtual {v2}, Lb0/y$a;->a()Lb0/y;
2020-04-21 02:16:59 +00:00
move-result-object v0
2020-04-27 20:53:11 +00:00
iget-object v2, p0, Le/a/g/c;->$okHttpClient:Lb0/v;
2020-04-21 02:16:59 +00:00
2020-04-27 20:53:11 +00:00
invoke-virtual {v2, v0}, Lb0/v;->a(Lb0/y;)Lb0/e;
2020-04-21 02:16:59 +00:00
move-result-object v0
2020-04-27 20:53:11 +00:00
check-cast v0, Lb0/x;
2020-04-21 02:16:59 +00:00
2020-04-27 20:53:11 +00:00
invoke-virtual {v0}, Lb0/x;->b()Lokhttp3/Response;
2020-04-21 02:16:59 +00:00
move-result-object v0
const-string v2, "Location"
invoke-static {v0, v2, v3, p1}, Lokhttp3/Response;->a(Lokhttp3/Response;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;
move-result-object v2
if-eqz v2, :cond_1
invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v2
goto :goto_1
:cond_1
move-object v2, v3
:goto_1
const-string v4, "error"
if-eqz v2, :cond_2
invoke-virtual {v2}, Landroid/net/Uri;->getQuery()Ljava/lang/String;
move-result-object v5
if-eqz v5, :cond_2
2020-04-27 20:53:11 +00:00
invoke-static {v5, v4, v1, p1}, Lx/a0/u;->contains$default(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZI)Z
2020-04-21 02:16:59 +00:00
move-result v1
:cond_2
if-nez v1, :cond_4
invoke-virtual {v0}, Lokhttp3/Response;->h()Z
move-result p1
if-nez p1, :cond_3
invoke-virtual {v0}, Lokhttp3/Response;->g()Z
move-result p1
if-eqz p1, :cond_4
:cond_3
return-object v2
:cond_4
2020-04-27 20:53:11 +00:00
new-instance p1, Le/a/g/a;
2020-04-21 02:16:59 +00:00
if-eqz v2, :cond_5
invoke-virtual {v2, v4}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
if-eqz v1, :cond_5
goto :goto_2
:cond_5
const-string v1, "unknown"
:goto_2
if-eqz v2, :cond_6
const-string v3, "error_description"
invoke-virtual {v2, v3}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
:cond_6
2020-04-27 20:53:11 +00:00
invoke-direct {p1, v1, v3}, Le/a/g/a;-><init>(Ljava/lang/String;Ljava/lang/String;)V
2020-04-21 02:16:59 +00:00
sget-object v1, Lcom/discord/app/AppLog;->c:Lcom/discord/app/AppLog;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Samsung handleSamsungCallback error: "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v0, p1}, Lcom/discord/app/AppLog;->w(Ljava/lang/String;Ljava/lang/Throwable;)V
throw p1
:cond_7
const-string p1, "body"
2020-04-27 20:53:11 +00:00
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
2020-04-21 02:16:59 +00:00
throw v3
:cond_8
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "call to \'resume\' before \'invoke\' with coroutine"
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method