151 lines
4.7 KiB
Smali
151 lines
4.7 KiB
Smali
|
.class public final Lcom/discord/widgets/auth/WidgetOauth2Authorize$authorizeApplication$2;
|
||
|
.super Lz/n/c/k;
|
||
|
.source "WidgetOauth2Authorize.kt"
|
||
|
|
||
|
# interfaces
|
||
|
.implements Lkotlin/jvm/functions/Function1;
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
||
|
value = Lcom/discord/widgets/auth/WidgetOauth2Authorize;->authorizeApplication(Ljava/lang/String;)V
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/InnerClass;
|
||
|
accessFlags = 0x19
|
||
|
name = null
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"Lz/n/c/k;",
|
||
|
"Lkotlin/jvm/functions/Function1<",
|
||
|
"Lcom/discord/restapi/RestAPIParams$OAuth2Authorize$ResponsePost;",
|
||
|
"Lkotlin/Unit;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field public final synthetic this$0:Lcom/discord/widgets/auth/WidgetOauth2Authorize;
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method public constructor <init>(Lcom/discord/widgets/auth/WidgetOauth2Authorize;)V
|
||
|
.locals 0
|
||
|
|
||
|
iput-object p1, p0, Lcom/discord/widgets/auth/WidgetOauth2Authorize$authorizeApplication$2;->this$0:Lcom/discord/widgets/auth/WidgetOauth2Authorize;
|
||
|
|
||
|
const/4 p1, 0x1
|
||
|
|
||
|
invoke-direct {p0, p1}, Lz/n/c/k;-><init>(I)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public bridge synthetic invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
.locals 0
|
||
|
|
||
|
check-cast p1, Lcom/discord/restapi/RestAPIParams$OAuth2Authorize$ResponsePost;
|
||
|
|
||
|
invoke-virtual {p0, p1}, Lcom/discord/widgets/auth/WidgetOauth2Authorize$authorizeApplication$2;->invoke(Lcom/discord/restapi/RestAPIParams$OAuth2Authorize$ResponsePost;)V
|
||
|
|
||
|
sget-object p1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
||
|
|
||
|
return-object p1
|
||
|
.end method
|
||
|
|
||
|
.method public final invoke(Lcom/discord/restapi/RestAPIParams$OAuth2Authorize$ResponsePost;)V
|
||
|
.locals 4
|
||
|
|
||
|
const-string v0, "it"
|
||
|
|
||
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
invoke-virtual {p1}, Lcom/discord/restapi/RestAPIParams$OAuth2Authorize$ResponsePost;->getLocation()Ljava/lang/String;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-static {p1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
sget-object v0, Lcom/discord/app/AppLog;->e:Lcom/discord/app/AppLog;
|
||
|
|
||
|
new-instance v1, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v2, "Redirect OAuth flow to: "
|
||
|
|
||
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
const/4 v2, 0x0
|
||
|
|
||
|
const/4 v3, 0x2
|
||
|
|
||
|
invoke-static {v0, v1, v2, v3, v2}, Lcom/discord/utilities/logging/Logger;->d$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
|
||
|
|
||
|
new-instance v0, Landroid/content/Intent;
|
||
|
|
||
|
const-string v1, "android.intent.action.VIEW"
|
||
|
|
||
|
invoke-direct {v0, v1, p1}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
|
||
|
|
||
|
const/high16 p1, 0x10000000
|
||
|
|
||
|
invoke-virtual {v0, p1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
const-string v0, "Intent(Intent.ACTION_VIE\u2026t.FLAG_ACTIVITY_NEW_TASK)"
|
||
|
|
||
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
iget-object v0, p0, Lcom/discord/widgets/auth/WidgetOauth2Authorize$authorizeApplication$2;->this$0:Lcom/discord/widgets/auth/WidgetOauth2Authorize;
|
||
|
|
||
|
invoke-virtual {v0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
invoke-virtual {v0, p1}, Landroid/app/Activity;->startActivity(Landroid/content/Intent;)V
|
||
|
|
||
|
:cond_0
|
||
|
iget-object p1, p0, Lcom/discord/widgets/auth/WidgetOauth2Authorize$authorizeApplication$2;->this$0:Lcom/discord/widgets/auth/WidgetOauth2Authorize;
|
||
|
|
||
|
invoke-virtual {p1}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
if-eqz p1, :cond_1
|
||
|
|
||
|
const/4 v0, -0x1
|
||
|
|
||
|
invoke-virtual {p1, v0}, Landroid/app/Activity;->setResult(I)V
|
||
|
|
||
|
:cond_1
|
||
|
iget-object p1, p0, Lcom/discord/widgets/auth/WidgetOauth2Authorize$authorizeApplication$2;->this$0:Lcom/discord/widgets/auth/WidgetOauth2Authorize;
|
||
|
|
||
|
invoke-virtual {p1}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
if-eqz p1, :cond_2
|
||
|
|
||
|
invoke-virtual {p1}, Lf/a/b/f;->onBackPressed()V
|
||
|
|
||
|
:cond_2
|
||
|
return-void
|
||
|
.end method
|