197 lines
5.4 KiB
Smali
197 lines
5.4 KiB
Smali
.class public final Lcom/discord/workers/MessageSendWorker$a;
|
|
.super Ljava/lang/Object;
|
|
.source "MessageSendWorker.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/workers/MessageSendWorker;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "a"
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Landroid/content/Context;JLjava/lang/CharSequence;Ljava/lang/String;)V
|
|
.locals 6
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
const-string v1, "message"
|
|
|
|
if-eqz p5, :cond_1
|
|
|
|
new-instance v2, Landroidx/work/Data$Builder;
|
|
|
|
invoke-direct {v2}, Landroidx/work/Data$Builder;-><init>()V
|
|
|
|
const/4 v3, 0x4
|
|
|
|
new-array v3, v3, [Lkotlin/Pair;
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-static {p2, p3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p2
|
|
|
|
new-instance p3, Lkotlin/Pair;
|
|
|
|
const-string v5, "com.discord.intent.extra.EXTRA_CHANNEL_ID"
|
|
|
|
invoke-direct {p3, v5, p2}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
aput-object p3, v3, v4
|
|
|
|
const/4 p2, 0x1
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
invoke-virtual {p4}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_0
|
|
new-instance p3, Lkotlin/Pair;
|
|
|
|
const-string p4, "com.discord.intent.extra.EXTRA_CHANNEL_NAME"
|
|
|
|
invoke-direct {p3, p4, v0}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
aput-object p3, v3, p2
|
|
|
|
const/4 p2, 0x2
|
|
|
|
new-instance p3, Lcom/discord/models/domain/ModelMessage;
|
|
|
|
invoke-direct {p3}, Lcom/discord/models/domain/ModelMessage;-><init>()V
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelMessage;->getNonce()Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
new-instance p4, Lkotlin/Pair;
|
|
|
|
const-string v0, "com.discord.intent.extra.EXTRA_MESSAGE_ID"
|
|
|
|
invoke-direct {p4, v0, p3}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
aput-object p4, v3, p2
|
|
|
|
const/4 p2, 0x3
|
|
|
|
new-instance p3, Lkotlin/Pair;
|
|
|
|
const-string p4, "MESSAGE_CONTENT"
|
|
|
|
invoke-direct {p3, p4, p5}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
aput-object p3, v3, p2
|
|
|
|
invoke-static {v3}, Ly/q/l;->mapOf([Lkotlin/Pair;)Ljava/util/Map;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {v2, p2}, Landroidx/work/Data$Builder;->putAll(Ljava/util/Map;)Landroidx/work/Data$Builder;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2}, Landroidx/work/Data$Builder;->build()Landroidx/work/Data;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "Data.Builder()\n \u2026 )\n .build()"
|
|
|
|
invoke-static {p2, p3}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance p3, Landroidx/work/OneTimeWorkRequest$Builder;
|
|
|
|
const-class p4, Lcom/discord/workers/MessageSendWorker;
|
|
|
|
invoke-direct {p3, p4}, Landroidx/work/OneTimeWorkRequest$Builder;-><init>(Ljava/lang/Class;)V
|
|
|
|
invoke-virtual {p3, p2}, Landroidx/work/WorkRequest$Builder;->setInputData(Landroidx/work/Data;)Landroidx/work/WorkRequest$Builder;
|
|
|
|
move-result-object p2
|
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest$Builder;
|
|
|
|
invoke-virtual {p2, v1}, Landroidx/work/WorkRequest$Builder;->addTag(Ljava/lang/String;)Landroidx/work/WorkRequest$Builder;
|
|
|
|
move-result-object p2
|
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest$Builder;
|
|
|
|
const-string p3, "send"
|
|
|
|
invoke-virtual {p2, p3}, Landroidx/work/WorkRequest$Builder;->addTag(Ljava/lang/String;)Landroidx/work/WorkRequest$Builder;
|
|
|
|
move-result-object p2
|
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest$Builder;
|
|
|
|
new-instance p3, Landroidx/work/Constraints$Builder;
|
|
|
|
invoke-direct {p3}, Landroidx/work/Constraints$Builder;-><init>()V
|
|
|
|
sget-object p4, Landroidx/work/NetworkType;->CONNECTED:Landroidx/work/NetworkType;
|
|
|
|
invoke-virtual {p3, p4}, Landroidx/work/Constraints$Builder;->setRequiredNetworkType(Landroidx/work/NetworkType;)Landroidx/work/Constraints$Builder;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p3}, Landroidx/work/Constraints$Builder;->build()Landroidx/work/Constraints;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p2, p3}, Landroidx/work/WorkRequest$Builder;->setConstraints(Landroidx/work/Constraints;)Landroidx/work/WorkRequest$Builder;
|
|
|
|
move-result-object p2
|
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest$Builder;
|
|
|
|
invoke-virtual {p2}, Landroidx/work/WorkRequest$Builder;->build()Landroidx/work/WorkRequest;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "OneTimeWorkRequestBuilde\u2026 )\n .build()"
|
|
|
|
invoke-static {p2, p3}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest;
|
|
|
|
invoke-static {p1}, Landroidx/work/WorkManager;->getInstance(Landroid/content/Context;)Landroidx/work/WorkManager;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, p2}, Landroidx/work/WorkManager;->enqueue(Landroidx/work/WorkRequest;)Landroidx/work/Operation;
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
invoke-static {v1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|