178 lines
4.6 KiB
Smali
178 lines
4.6 KiB
Smali
.class public final Lcom/discord/widgets/auth/WidgetOauthAuthorize$Companion;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetOauthAuthorize.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/auth/WidgetOauthAuthorize;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Companion"
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/auth/WidgetOauthAuthorize$Companion;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final getNoticeName(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
const-string v0, "clientId"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "OAUTH_REQUEST:"
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final getQueryParameterOrThrow(Landroid/net/Uri;Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
const-string v0, "$this$getQueryParameterOrThrow"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "parameterName"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1, p2}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final launch(Landroid/net/Uri;)V
|
|
.locals 4
|
|
|
|
const-string v0, "requestUri"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-string v1, "android.intent.action.VIEW"
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
move-object v1, p1
|
|
|
|
check-cast v1, Landroid/os/Parcelable;
|
|
|
|
const-string v2, "REQ_URI"
|
|
|
|
invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
|
|
|
|
const-string v1, "client_id"
|
|
|
|
invoke-virtual {p1, v1}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
sget-object v1, Lcom/discord/samsung/a;->zP:Lcom/discord/samsung/a;
|
|
|
|
const-string v1, "clientId"
|
|
|
|
invoke-static {p1, v1}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v1, "591317049637339146"
|
|
|
|
invoke-static {p1, v1}, Lkotlin/jvm/internal/k;->n(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-static {}, Lcom/discord/samsung/a;->eo()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v1, :cond_2
|
|
|
|
const-class v1, Lcom/discord/widgets/auth/WidgetOauthAuthorizeSamsung;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const-class v1, Lcom/discord/widgets/auth/WidgetOauthAuthorize;
|
|
|
|
:goto_1
|
|
sget-object v2, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreStream$Companion;->getNavigation()Lcom/discord/stores/StoreNavigation;
|
|
|
|
move-result-object v2
|
|
|
|
move-object v3, p0
|
|
|
|
check-cast v3, Lcom/discord/widgets/auth/WidgetOauthAuthorize$Companion;
|
|
|
|
invoke-virtual {v3, p1}, Lcom/discord/widgets/auth/WidgetOauthAuthorize$Companion;->getNoticeName(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v3, Lcom/discord/widgets/auth/WidgetOauthAuthorize$Companion$launch$1;
|
|
|
|
invoke-direct {v3, v1, v0}, Lcom/discord/widgets/auth/WidgetOauthAuthorize$Companion$launch$1;-><init>(Ljava/lang/Class;Landroid/content/Intent;)V
|
|
|
|
check-cast v3, Lkotlin/jvm/functions/Function1;
|
|
|
|
invoke-virtual {v2, p1, v3}, Lcom/discord/stores/StoreNavigation;->launchNotice(Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
|
|
|
|
return-void
|
|
.end method
|