187 lines
4.7 KiB
Smali
187 lines
4.7 KiB
Smali
.class public final Lcom/discord/widgets/auth/WidgetOauth2Authorize$Companion;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetOauth2Authorize.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/auth/WidgetOauth2Authorize;
|
|
.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/WidgetOauth2Authorize$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/content/Context;Landroid/net/Uri;)V
|
|
.locals 4
|
|
|
|
const-string v0, "context"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "requestUri"
|
|
|
|
invoke-static {p2, 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, p2
|
|
|
|
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 {p2, v1}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string v1, "requestUri.getQueryParam\u2026er(\"client_id\") ?: return"
|
|
|
|
invoke-static {p2, v1}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v1, Lcom/discord/utilities/analytics/AnalyticsTracker;->INSTANCE:Lcom/discord/utilities/analytics/AnalyticsTracker;
|
|
|
|
invoke-static {p2}, Lkotlin/text/l;->dQ(Ljava/lang/String;)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const-wide/16 v2, 0x0
|
|
|
|
:goto_0
|
|
invoke-virtual {v1, v2, v3}, Lcom/discord/utilities/analytics/AnalyticsTracker;->oauth2AuthorizedViewed(J)V
|
|
|
|
sget-object v1, Lcom/discord/samsung/a;->Cl:Lcom/discord/samsung/a;
|
|
|
|
const-string v1, "clientId"
|
|
|
|
invoke-static {p2, v1}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v1, "591317049637339146"
|
|
|
|
invoke-static {p2, v1}, Lkotlin/jvm/internal/k;->n(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
invoke-static {}, Lcom/discord/samsung/a;->eC()Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
const/4 p2, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 p2, 0x0
|
|
|
|
:goto_1
|
|
if-eqz p2, :cond_3
|
|
|
|
const-class p2, Lcom/discord/widgets/auth/WidgetOauth2AuthorizeSamsung;
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
const-class p2, Lcom/discord/widgets/auth/WidgetOauth2Authorize;
|
|
|
|
:goto_2
|
|
invoke-static {p1, p2, v0}, Lcom/discord/app/f;->a(Landroid/content/Context;Ljava/lang/Class;Landroid/content/Intent;)V
|
|
|
|
return-void
|
|
.end method
|