652 lines
19 KiB
Smali
652 lines
19 KiB
Smali
.class public final Lcom/discord/app/DiscordConnectService;
|
|
.super Landroid/app/Service;
|
|
.source "DiscordConnectService.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/app/DiscordConnectService$a;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final d:Lcom/discord/app/DiscordConnectService$a;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lcom/discord/app/DiscordConnectService$a;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/app/DiscordConnectService$a;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/app/DiscordConnectService;->d:Lcom/discord/app/DiscordConnectService$a;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Landroid/app/Service;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onBind(Landroid/content/Intent;)Landroid/os/IBinder;
|
|
.locals 1
|
|
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v0, "All my bases are belong to me!"
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public onCreate()V
|
|
.locals 6
|
|
|
|
invoke-super {p0}, Landroid/app/Service;->onCreate()V
|
|
|
|
sget-object v0, Lcom/discord/app/AppLog;->d:Lcom/discord/app/AppLog;
|
|
|
|
const-class v1, Lcom/discord/app/DiscordConnectService;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "DiscordConnectService::class.java.simpleName"
|
|
|
|
invoke-static {v1, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const-string v2, "onCreate"
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/utilities/logging/Logger;->i$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
|
|
|
|
sget-object v0, Lf/a/b/m;->c:Lf/a/b/m;
|
|
|
|
invoke-virtual {v0, p0}, Lf/a/b/m;->a(Ljava/lang/Object;)V
|
|
|
|
new-instance v0, Landroidx/core/app/NotificationCompat$Builder;
|
|
|
|
const-string v1, "Social"
|
|
|
|
invoke-direct {v0, p0, v1}, Landroidx/core/app/NotificationCompat$Builder;-><init>(Landroid/content/Context;Ljava/lang/String;)V
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/core/app/NotificationCompat$Builder;->setAutoCancel(Z)Landroidx/core/app/NotificationCompat$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/core/app/NotificationCompat$Builder;->setOnlyAlertOnce(Z)Landroidx/core/app/NotificationCompat$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/core/app/NotificationCompat$Builder;->setLocalOnly(Z)Landroidx/core/app/NotificationCompat$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
const v1, 0x7f080365
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/core/app/NotificationCompat$Builder;->setSmallIcon(I)Landroidx/core/app/NotificationCompat$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
const v1, 0x7f060052
|
|
|
|
invoke-static {p0, v1}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/content/Context;I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/core/app/NotificationCompat$Builder;->setColor(I)Landroidx/core/app/NotificationCompat$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
const v1, 0x7f1204a0
|
|
|
|
invoke-virtual {p0, v1}, Landroid/app/Service;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/core/app/NotificationCompat$Builder;->setContentTitle(Ljava/lang/CharSequence;)Landroidx/core/app/NotificationCompat$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
const v1, 0x7f1204a7
|
|
|
|
invoke-virtual {p0, v1}, Landroid/app/Service;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/core/app/NotificationCompat$Builder;->setContentText(Ljava/lang/CharSequence;)Landroidx/core/app/NotificationCompat$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroidx/core/app/NotificationCompat$Builder;->build()Landroid/app/Notification;
|
|
|
|
move-result-object v0
|
|
|
|
const/16 v1, 0x64
|
|
|
|
invoke-virtual {p0, v1, v0}, Landroid/app/Service;->startForeground(ILandroid/app/Notification;)V
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {p0}, Landroid/app/Service;->getApplication()Landroid/app/Application;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "application"
|
|
|
|
invoke-static {v1, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/StoreStream$Companion;->initialize(Landroid/app/Application;)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/analytics/AnalyticsUtils;->INSTANCE:Lcom/discord/utilities/analytics/AnalyticsUtils;
|
|
|
|
invoke-virtual {p0}, Landroid/app/Service;->getApplication()Landroid/app/Application;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/analytics/AnalyticsUtils;->initAppOpen(Landroid/app/Application;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onDestroy()V
|
|
.locals 6
|
|
|
|
sget-object v0, Lcom/discord/app/AppLog;->d:Lcom/discord/app/AppLog;
|
|
|
|
const-class v1, Lcom/discord/app/DiscordConnectService;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "DiscordConnectService::class.java.simpleName"
|
|
|
|
invoke-static {v1, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const-string v2, "onDestroy"
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/utilities/logging/Logger;->i$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
|
|
|
|
sget-object v0, Lf/a/b/m;->c:Lf/a/b/m;
|
|
|
|
invoke-virtual {v0, p0}, Lf/a/b/m;->b(Ljava/lang/Object;)V
|
|
|
|
invoke-super {p0}, Landroid/app/Service;->onDestroy()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onStartCommand(Landroid/content/Intent;II)I
|
|
.locals 18
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move/from16 v1, p3
|
|
|
|
const-string v2, "onStartCommand: "
|
|
|
|
invoke-static {v2, v1}, Lf/e/b/a/a;->h(Ljava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
sget-object v3, Lcom/discord/app/AppLog;->d:Lcom/discord/app/AppLog;
|
|
|
|
const-class v2, Lcom/discord/app/DiscordConnectService;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v2, "DiscordConnectService::class.java.simpleName"
|
|
|
|
invoke-static {v4, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x4
|
|
|
|
const/4 v8, 0x0
|
|
|
|
invoke-static/range {v3 .. v8}, Lcom/discord/utilities/logging/Logger;->i$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual/range {p1 .. p1}, Landroid/content/Intent;->getData()Landroid/net/Uri;
|
|
|
|
move-result-object v4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v4, v3
|
|
|
|
:goto_0
|
|
const/4 v5, 0x1
|
|
|
|
if-eqz v4, :cond_b
|
|
|
|
sget-object v6, Lcom/discord/utilities/intent/IntentUtils;->INSTANCE:Lcom/discord/utilities/intent/IntentUtils;
|
|
|
|
invoke-virtual {v6, v4}, Lcom/discord/utilities/intent/IntentUtils;->isDiscordAppUri(Landroid/net/Uri;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_b
|
|
|
|
sget-object v6, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v6}, Lcom/discord/stores/StoreStream$Companion;->getAuthentication()Lcom/discord/stores/StoreAuthentication;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Lcom/discord/stores/StoreAuthentication;->getAuthToken$app_productionDiscordExternalRelease()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
const/4 v7, 0x0
|
|
|
|
if-eqz v6, :cond_2
|
|
|
|
invoke-static {v6}, Lj0/t/k;->isBlank(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 v6, 0x0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
:goto_1
|
|
const/4 v6, 0x1
|
|
|
|
:goto_2
|
|
const/16 v8, 0xc
|
|
|
|
if-eqz v6, :cond_3
|
|
|
|
const v2, 0x7f1210ad
|
|
|
|
invoke-static {v0, v2, v7, v3, v8}, Lf/a/b/n;->j(Landroid/content/Context;IILcom/discord/utilities/view/ToastManager;I)V
|
|
|
|
new-instance v2, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v3, "UNAUTHED"
|
|
|
|
invoke-direct {v2, v3}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-static {v2}, Lrx/Observable;->v(Ljava/lang/Throwable;)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "Observable.error(Illegal\u2026ateException(\"UNAUTHED\"))"
|
|
|
|
invoke-static {v2, v3}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
goto/16 :goto_5
|
|
|
|
:cond_3
|
|
sget-object v6, Lf/a/b/t0/b;->E:Lf/a/b/t0/b;
|
|
|
|
sget-object v6, Lf/a/b/t0/b;->s:Lkotlin/text/Regex;
|
|
|
|
invoke-virtual {v4}, Landroid/net/Uri;->getPath()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
if-eqz v7, :cond_4
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
const-string v7, ""
|
|
|
|
:goto_3
|
|
invoke-virtual {v6, v7}, Lkotlin/text/Regex;->matchEntire(Ljava/lang/CharSequence;)Lkotlin/text/MatchResult;
|
|
|
|
move-result-object v6
|
|
|
|
if-eqz v6, :cond_5
|
|
|
|
invoke-interface {v6}, Lkotlin/text/MatchResult;->getGroupValues()Ljava/util/List;
|
|
|
|
move-result-object v7
|
|
|
|
if-eqz v7, :cond_5
|
|
|
|
invoke-static {v7, v5}, Lj0/i/l;->getOrNull(Ljava/util/List;I)Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Ljava/lang/String;
|
|
|
|
if-eqz v5, :cond_5
|
|
|
|
invoke-static {v5}, Lj0/t/j;->toLongOrNull(Ljava/lang/String;)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
:cond_5
|
|
if-eqz v6, :cond_7
|
|
|
|
sget-object v5, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v5}, Lcom/discord/stores/StoreStream$Companion;->getAnalytics()Lcom/discord/stores/StoreAnalytics;
|
|
|
|
move-result-object v5
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
move-object/from16 v7, p1
|
|
|
|
goto :goto_4
|
|
|
|
:cond_6
|
|
new-instance v7, Landroid/content/Intent;
|
|
|
|
invoke-direct {v7}, Landroid/content/Intent;-><init>()V
|
|
|
|
:goto_4
|
|
new-instance v15, Lcom/discord/utilities/intent/RouteHandlers$AnalyticsMetadata;
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v13, 0x2
|
|
|
|
const/4 v14, 0x0
|
|
|
|
const-string v10, "connect"
|
|
|
|
move-object v9, v15
|
|
|
|
move-object v12, v3
|
|
|
|
invoke-direct/range {v9 .. v14}, Lcom/discord/utilities/intent/RouteHandlers$AnalyticsMetadata;-><init>(Ljava/lang/String;Ljava/lang/Long;Ljava/lang/Long;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
invoke-virtual {v5, v7, v15}, Lcom/discord/stores/StoreAnalytics;->deepLinkReceived(Landroid/content/Intent;Lcom/discord/utilities/intent/RouteHandlers$AnalyticsMetadata;)V
|
|
|
|
:cond_7
|
|
if-eqz v3, :cond_9
|
|
|
|
const-string v4, "android.permission.RECORD_AUDIO"
|
|
|
|
invoke-static {v0, v4}, Landroidx/core/content/ContextCompat;->checkSelfPermission(Landroid/content/Context;Ljava/lang/String;)I
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_8
|
|
|
|
const v2, 0x7f121121
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-static {v0, v2, v4, v3, v8}, Lf/a/b/n;->j(Landroid/content/Context;IILcom/discord/utilities/view/ToastManager;I)V
|
|
|
|
new-instance v2, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v3, "Do not have microphone permissions, go to main app"
|
|
|
|
invoke-direct {v2, v3}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-static {v2}, Lrx/Observable;->v(Ljava/lang/Throwable;)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "Observable.error(\n \u2026to main app\")\n )"
|
|
|
|
invoke-static {v2, v3}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
goto/16 :goto_5
|
|
|
|
:cond_8
|
|
invoke-virtual {v3}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v3
|
|
|
|
sget-object v5, Lcom/discord/app/AppLog;->d:Lcom/discord/app/AppLog;
|
|
|
|
const-class v6, Lcom/discord/app/DiscordConnectService;
|
|
|
|
invoke-virtual {v6}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-static {v6, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x4
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const-string v7, "Try joining voice channel"
|
|
|
|
invoke-static/range {v5 .. v10}, Lcom/discord/utilities/logging/Logger;->i$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
|
|
|
|
sget-object v2, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreStream$Companion;->getVoiceChannelSelected()Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2, v3, v4}, Lcom/discord/stores/StoreVoiceChannelSelected;->set(J)Lrx/Observable;
|
|
|
|
sget-object v2, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreStream$Companion;->getConnectionOpen()Lcom/discord/stores/StoreConnectionOpen;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x1
|
|
|
|
invoke-static {v2, v4, v5, v3}, Lcom/discord/stores/StoreConnectionOpen;->observeConnectionOpen$default(Lcom/discord/stores/StoreConnectionOpen;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v3, Lf/a/b/p0;->d:Lf/a/b/p0;
|
|
|
|
invoke-virtual {v2, v3}, Lrx/Observable;->w(Lr0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v2, "StoreStream\n .get\u2026()\n .filter { it }"
|
|
|
|
invoke-static {v4, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-wide/16 v5, 0x2710
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x2
|
|
|
|
const/4 v9, 0x0
|
|
|
|
invoke-static/range {v4 .. v9}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->takeSingleUntilTimeout$default(Lrx/Observable;JZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v3, Lf/a/b/r0;->d:Lf/a/b/r0;
|
|
|
|
invoke-virtual {v2, v3}, Lrx/Observable;->U(Lr0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "isConnectedObs.switchMap\u2026nnected\n }\n }"
|
|
|
|
invoke-static {v2, v3}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
goto :goto_5
|
|
|
|
:cond_9
|
|
if-eqz v6, :cond_a
|
|
|
|
sget-object v2, Lcom/discord/utilities/voice/DiscordOverlayService;->Companion:Lcom/discord/utilities/voice/DiscordOverlayService$Companion;
|
|
|
|
invoke-virtual {v2, v0}, Lcom/discord/utilities/voice/DiscordOverlayService$Companion;->launchForConnect(Landroid/content/Context;)V
|
|
|
|
sget-object v2, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
new-instance v3, Lr0/l/e/j;
|
|
|
|
invoke-direct {v3, v2}, Lr0/l/e/j;-><init>(Ljava/lang/Object;)V
|
|
|
|
const-string v2, "Observable.just(Unit)"
|
|
|
|
invoke-static {v3, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
goto :goto_6
|
|
|
|
:cond_a
|
|
new-instance v2, Ljava/lang/IllegalArgumentException;
|
|
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v5, "Invalid Request: "
|
|
|
|
invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-direct {v2, v3}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-static {v2}, Lrx/Observable;->v(Ljava/lang/Throwable;)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "Observable.error(Illegal\u2026\"Invalid Request: $uri\"))"
|
|
|
|
invoke-static {v2, v3}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
:goto_5
|
|
move-object v3, v2
|
|
|
|
:goto_6
|
|
const-wide/16 v4, 0x2710
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x2
|
|
|
|
const/4 v8, 0x0
|
|
|
|
invoke-static/range {v3 .. v8}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->takeSingleUntilTimeout$default(Lrx/Observable;JZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v9
|
|
|
|
const-class v10, Lcom/discord/app/DiscordConnectService;
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
sget-object v15, Lcom/discord/app/DiscordConnectService$b;->d:Lcom/discord/app/DiscordConnectService$b;
|
|
|
|
new-instance v14, Lcom/discord/app/DiscordConnectService$c;
|
|
|
|
invoke-direct {v14, v0, v1}, Lcom/discord/app/DiscordConnectService$c;-><init>(Lcom/discord/app/DiscordConnectService;I)V
|
|
|
|
new-instance v13, Lcom/discord/app/DiscordConnectService$d;
|
|
|
|
invoke-direct {v13, v0, v1}, Lcom/discord/app/DiscordConnectService$d;-><init>(Lcom/discord/app/DiscordConnectService;I)V
|
|
|
|
const/16 v16, 0x6
|
|
|
|
const/16 v17, 0x0
|
|
|
|
invoke-static/range {v9 .. v17}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
goto :goto_7
|
|
|
|
:cond_b
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v5, "Invalid request "
|
|
|
|
invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v8
|
|
|
|
sget-object v6, Lcom/discord/app/AppLog;->d:Lcom/discord/app/AppLog;
|
|
|
|
const-class v3, Lcom/discord/app/DiscordConnectService;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-static {v7, v2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x4
|
|
|
|
const/4 v11, 0x0
|
|
|
|
invoke-static/range {v6 .. v11}, Lcom/discord/utilities/logging/Logger;->i$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-virtual {v0, v2}, Landroid/app/Service;->stopForeground(Z)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/app/Service;->stopSelf(I)V
|
|
|
|
:goto_7
|
|
const/4 v1, 0x2
|
|
|
|
return v1
|
|
.end method
|