124 lines
3.8 KiB
Smali
124 lines
3.8 KiB
Smali
.class final Lcom/discord/widgets/auth/WidgetOauth2Authorize$authorizeApplication$2;
|
|
.super Lkotlin/jvm/internal/l;
|
|
.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 = 0x18
|
|
name = null
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/internal/l;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Lcom/discord/restapi/RestAPIParams$OAuth2Authorize$ResponsePost;",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field final synthetic this$0:Lcom/discord/widgets/auth/WidgetOauth2Authorize;
|
|
|
|
|
|
# direct methods
|
|
.method 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}, Lkotlin/jvm/internal/l;-><init>(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final 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;->bmo: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}, Lkotlin/jvm/internal/k;->h(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;->wM:Lcom/discord/app/AppLog;
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "Redirect OAuth flow to: "
|
|
|
|
invoke-virtual {v2, v1}, Ljava/lang/String;->concat(Ljava/lang/String;)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
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/auth/WidgetOauth2Authorize$authorizeApplication$2;->this$0:Lcom/discord/widgets/auth/WidgetOauth2Authorize;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/auth/WidgetOauth2Authorize;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
new-instance v1, Landroid/content/Intent;
|
|
|
|
const-string v2, "android.intent.action.VIEW"
|
|
|
|
invoke-direct {v1, v2, p1}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/app/AppActivity;->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/widgets/auth/WidgetOauth2Authorize;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/app/AppActivity;->onBackPressed()V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|