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

271 lines
6.2 KiB
Smali
Raw Normal View History

2020-05-11 18:18:42 +00:00
.class public final Le/a/g/b;
.super Lx/s/h/a/h;
2020-04-08 16:24:01 +00:00
.source "SamsungConnect.kt"
# interfaces
.implements Lkotlin/jvm/functions/Function2;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
2020-05-11 18:18:42 +00:00
"Lx/s/h/a/h;",
2020-04-08 16:24:01 +00:00
"Lkotlin/jvm/functions/Function2<",
"Lkotlinx/coroutines/CoroutineScope;",
"Lkotlin/coroutines/Continuation<",
"-",
"Landroid/net/Uri;",
">;",
"Ljava/lang/Object;",
">;"
}
.end annotation
2020-05-11 18:18:42 +00:00
.annotation runtime Lx/s/h/a/d;
2020-04-08 16:24:01 +00:00
c = "com.discord.samsung.SamsungConnect$getSamsungAuthorizeCallback$2"
f = "SamsungConnect.kt"
l = {}
m = "invokeSuspend"
.end annotation
# instance fields
2020-05-11 18:18:42 +00:00
.field public final synthetic $okHttpClient:Lb0/v;
2020-04-08 16:24:01 +00:00
.field public final synthetic $url:Ljava/lang/String;
.field public label:I
.field public p$:Lkotlinx/coroutines/CoroutineScope;
# direct methods
2020-05-11 18:18:42 +00:00
.method public constructor <init>(Ljava/lang/String;Lb0/v;Lkotlin/coroutines/Continuation;)V
2020-04-08 16:24:01 +00:00
.locals 0
2020-05-11 18:18:42 +00:00
iput-object p1, p0, Le/a/g/b;->$url:Ljava/lang/String;
2020-04-08 16:24:01 +00:00
2020-05-11 18:18:42 +00:00
iput-object p2, p0, Le/a/g/b;->$okHttpClient:Lb0/v;
2020-04-08 16:24:01 +00:00
const/4 p1, 0x2
2020-05-11 18:18:42 +00:00
invoke-direct {p0, p1, p3}, Lx/s/h/a/h;-><init>(ILkotlin/coroutines/Continuation;)V
2020-04-08 16:24:01 +00:00
return-void
.end method
# virtual methods
.method public final create(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"Lkotlin/coroutines/Continuation<",
"*>;)",
"Lkotlin/coroutines/Continuation<",
"Lkotlin/Unit;",
">;"
}
.end annotation
if-eqz p2, :cond_0
2020-05-11 18:18:42 +00:00
new-instance v0, Le/a/g/b;
2020-04-08 16:24:01 +00:00
2020-05-11 18:18:42 +00:00
iget-object v1, p0, Le/a/g/b;->$url:Ljava/lang/String;
2020-04-08 16:24:01 +00:00
2020-05-11 18:18:42 +00:00
iget-object v2, p0, Le/a/g/b;->$okHttpClient:Lb0/v;
2020-04-08 16:24:01 +00:00
2020-05-11 18:18:42 +00:00
invoke-direct {v0, v1, v2, p2}, Le/a/g/b;-><init>(Ljava/lang/String;Lb0/v;Lkotlin/coroutines/Continuation;)V
2020-04-08 16:24:01 +00:00
check-cast p1, Lkotlinx/coroutines/CoroutineScope;
2020-05-11 18:18:42 +00:00
iput-object p1, v0, Le/a/g/b;->p$:Lkotlinx/coroutines/CoroutineScope;
2020-04-08 16:24:01 +00:00
return-object v0
:cond_0
const-string p1, "completion"
2020-05-11 18:18:42 +00:00
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
2020-04-08 16:24:01 +00:00
const/4 p1, 0x0
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-05-11 18:18:42 +00:00
invoke-virtual {p0, p1, p2}, Le/a/g/b;->create(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
2020-04-08 16:24:01 +00:00
move-result-object p1
2020-05-11 18:18:42 +00:00
check-cast p1, Le/a/g/b;
2020-04-08 16:24:01 +00:00
sget-object p2, Lkotlin/Unit;->a:Lkotlin/Unit;
2020-05-11 18:18:42 +00:00
invoke-virtual {p1, p2}, Le/a/g/b;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
2020-04-08 16:24:01 +00:00
move-result-object p1
return-object p1
.end method
.method public final invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
.locals 6
2020-05-11 18:18:42 +00:00
sget-object v0, Lx/s/g/a;->d:Lx/s/g/a;
2020-04-08 16:24:01 +00:00
2020-05-11 18:18:42 +00:00
iget v0, p0, Le/a/g/b;->label:I
2020-04-08 16:24:01 +00:00
if-nez v0, :cond_6
2020-05-11 18:18:42 +00:00
invoke-static {p1}, Le/o/a/j/a;->throwOnFailure(Ljava/lang/Object;)V
2020-04-08 16:24:01 +00:00
2020-05-11 18:18:42 +00:00
new-instance p1, Lb0/y$a;
2020-04-08 16:24:01 +00:00
2020-05-11 18:18:42 +00:00
invoke-direct {p1}, Lb0/y$a;-><init>()V
2020-04-08 16:24:01 +00:00
const/4 v0, 0x0
const-string v1, "GET"
2020-05-11 18:18:42 +00:00
invoke-virtual {p1, v1, v0}, Lb0/y$a;->a(Ljava/lang/String;Lokhttp3/RequestBody;)Lb0/y$a;
2020-04-08 16:24:01 +00:00
2020-05-11 18:18:42 +00:00
iget-object v1, p0, Le/a/g/b;->$url:Ljava/lang/String;
2020-04-08 16:24:01 +00:00
2020-05-11 18:18:42 +00:00
invoke-virtual {p1, v1}, Lb0/y$a;->b(Ljava/lang/String;)Lb0/y$a;
2020-04-08 16:24:01 +00:00
2020-05-11 18:18:42 +00:00
invoke-virtual {p1}, Lb0/y$a;->a()Lb0/y;
2020-04-08 16:24:01 +00:00
move-result-object p1
2020-05-11 18:18:42 +00:00
iget-object v1, p0, Le/a/g/b;->$okHttpClient:Lb0/v;
2020-04-08 16:24:01 +00:00
2020-05-11 18:18:42 +00:00
invoke-virtual {v1, p1}, Lb0/v;->a(Lb0/y;)Lb0/e;
2020-04-08 16:24:01 +00:00
move-result-object p1
2020-05-11 18:18:42 +00:00
check-cast p1, Lb0/x;
2020-04-08 16:24:01 +00:00
2020-05-11 18:18:42 +00:00
invoke-virtual {p1}, Lb0/x;->b()Lokhttp3/Response;
2020-04-08 16:24:01 +00:00
move-result-object p1
const/4 v1, 0x2
const-string v2, "Location"
invoke-static {p1, v2, v0, v1}, Lokhttp3/Response;->a(Lokhttp3/Response;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;
move-result-object v2
if-eqz v2, :cond_0
invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v2
goto :goto_0
:cond_0
move-object v2, v0
:goto_0
const-string v3, "error"
const/4 v4, 0x0
if-eqz v2, :cond_1
invoke-virtual {v2}, Landroid/net/Uri;->getQuery()Ljava/lang/String;
move-result-object v5
if-eqz v5, :cond_1
2020-05-11 18:18:42 +00:00
invoke-static {v5, v3, v4, v1}, Lx/a0/u;->contains$default(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZI)Z
2020-04-08 16:24:01 +00:00
move-result v4
:cond_1
if-nez v4, :cond_3
invoke-virtual {p1}, Lokhttp3/Response;->h()Z
move-result v1
if-nez v1, :cond_2
invoke-virtual {p1}, Lokhttp3/Response;->g()Z
move-result v1
if-eqz v1, :cond_3
:cond_2
return-object v2
:cond_3
2020-05-11 18:18:42 +00:00
new-instance v1, Le/a/g/a;
2020-04-08 16:24:01 +00:00
if-eqz v2, :cond_4
invoke-virtual {v2, v3}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
if-eqz v3, :cond_4
goto :goto_1
:cond_4
const-string v3, "unknown"
:goto_1
if-eqz v2, :cond_5
const-string v0, "error_description"
invoke-virtual {v2, v0}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
:cond_5
2020-05-11 18:18:42 +00:00
invoke-direct {v1, v3, v0}, Le/a/g/a;-><init>(Ljava/lang/String;Ljava/lang/String;)V
2020-04-08 16:24:01 +00:00
sget-object v0, 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, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-virtual {v0, p1, v1}, Lcom/discord/app/AppLog;->w(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
:cond_6
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