2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/utilities/fcm/NotificationActions;
|
|
|
|
.super Landroid/content/BroadcastReceiver;
|
|
|
|
.source "NotificationActions.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/utilities/fcm/NotificationActions$Companion;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final Companion:Lcom/discord/utilities/fcm/NotificationActions$Companion;
|
|
|
|
|
|
|
|
.field public static final NOTIFICATION_CHANNEL_ID:Ljava/lang/String; = "com.discord.NOTIFICATION_DELETED_CHANNEL_ID"
|
|
|
|
|
|
|
|
.field public static final NOTIFICATION_ID:Ljava/lang/String; = "com.discord.NOTIFICATION_ID"
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static constructor <clinit>()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/utilities/fcm/NotificationActions$Companion;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/utilities/fcm/NotificationActions$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/utilities/fcm/NotificationActions;->Companion:Lcom/discord/utilities/fcm/NotificationActions$Companion;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final enqueueAckMessage(Landroid/content/Context;Landroid/content/Intent;)V
|
2020-09-09 19:21:20 +00:00
|
|
|
.locals 8
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroid/content/Intent;->getData()Landroid/net/Uri;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz p2, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v0, "intent.data ?: return"
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v0, "channelId"
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz v0, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {v0}, Lk0/t/j;->toLongOrNull(Ljava/lang/String;)Ljava/lang/Long;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz v0, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-wide v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v0, "messageId"
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz p2, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {p2}, Lk0/t/j;->toLongOrNull(Ljava/lang/String;)Ljava/lang/Long;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz p2, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-wide v0
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const-string p2, "context"
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance p2, Landroidx/work/Data$Builder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p2}, Landroidx/work/Data$Builder;-><init>()V
|
|
|
|
|
|
|
|
const/4 v4, 0x2
|
|
|
|
|
|
|
|
new-array v4, v4, [Lkotlin/Pair;
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
move-result-object v5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
new-instance v6, Lkotlin/Pair;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const-string v7, "com.discord.intent.extra.EXTRA_CHANNEL_ID"
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-direct {v6, v7, v5}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
aput-object v6, v4, v5
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
const/4 v5, 0x1
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Lkotlin/Pair;
|
|
|
|
|
|
|
|
const-string v6, "com.discord.intent.extra.EXTRA_MESSAGE_ID"
|
|
|
|
|
|
|
|
invoke-direct {v1, v6, v0}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
aput-object v1, v4, v5
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {v4}, Lf/h/a/f/e/n/f;->mapOf([Lkotlin/Pair;)Ljava/util/Map;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, 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 v0, "Data.Builder()\n \u2026 )\n .build()"
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
new-instance v0, Landroidx/work/OneTimeWorkRequest$Builder;
|
|
|
|
|
|
|
|
const-class v1, Lcom/discord/workers/MessageAckWorker;
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Landroidx/work/OneTimeWorkRequest$Builder;-><init>(Ljava/lang/Class;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, p2}, Landroidx/work/WorkRequest$Builder;->setInputData(Landroidx/work/Data;)Landroidx/work/WorkRequest$Builder;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest$Builder;
|
|
|
|
|
|
|
|
sget-object v0, Landroidx/work/BackoffPolicy;->LINEAR:Landroidx/work/BackoffPolicy;
|
|
|
|
|
|
|
|
const-wide/16 v4, 0x1
|
|
|
|
|
|
|
|
sget-object v1, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0, v4, v5, v1}, Landroidx/work/WorkRequest$Builder;->setBackoffCriteria(Landroidx/work/BackoffPolicy;JLjava/util/concurrent/TimeUnit;)Landroidx/work/WorkRequest$Builder;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest$Builder;
|
|
|
|
|
|
|
|
const-string v0, "message"
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, 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 v0, "ack"
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, 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 v0, Landroidx/work/Constraints$Builder;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Landroidx/work/Constraints$Builder;-><init>()V
|
|
|
|
|
|
|
|
sget-object v1, Landroidx/work/NetworkType;->CONNECTED:Landroidx/work/NetworkType;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/work/Constraints$Builder;->setRequiredNetworkType(Landroidx/work/NetworkType;)Landroidx/work/Constraints$Builder;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroidx/work/Constraints$Builder;->build()Landroidx/work/Constraints;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, 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 v0, "OneTimeWorkRequestBuilde\u2026 )\n .build()"
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest;
|
|
|
|
|
|
|
|
invoke-static {p1}, Landroidx/work/WorkManager;->getInstance(Landroid/content/Context;)Landroidx/work/WorkManager;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0, p2}, Landroidx/work/WorkManager;->enqueue(Landroidx/work/WorkRequest;)Landroidx/work/Operation;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/utilities/fcm/NotificationClient;->INSTANCE:Lcom/discord/utilities/fcm/NotificationClient;
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x4
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v7, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-object v4, p1
|
|
|
|
|
|
|
|
invoke-static/range {v1 .. v7}, Lcom/discord/utilities/fcm/NotificationClient;->clear$default(Lcom/discord/utilities/fcm/NotificationClient;JLandroid/content/Context;ZILjava/lang/Object;)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final enqueueDirectReply(Landroid/content/Context;Landroid/content/Intent;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
.locals 10
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroid/content/Intent;->getData()Landroid/net/Uri;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz v0, :cond_3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v1, "channelId"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz v0, :cond_3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {v0}, Lk0/t/j;->toLongOrNull(Ljava/lang/String;)Ljava/lang/Long;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz v0, :cond_3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-wide v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v0, "com.discord.intent.extra.EXTRA_CHANNEL_NAME"
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, Landroid/content/Intent;->getCharSequenceExtra(Ljava/lang/String;)Ljava/lang/CharSequence;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-static {p2}, Landroidx/core/app/RemoteInput;->getResultsFromIntent(Landroid/content/Intent;)Landroid/os/Bundle;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz p2, :cond_2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v4, "discord_notif_text_input"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p2, v4}, Landroid/os/Bundle;->getCharSequence(Ljava/lang/String;)Ljava/lang/CharSequence;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz p2, :cond_2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v4, "it"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p2, v4}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {p2}, Lk0/t/k;->isBlank(Ljava/lang/CharSequence;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result v4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v5, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
xor-int/2addr v4, v5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
if-eqz v4, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object p2, v6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_0
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz p2, :cond_2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object p2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz p2, :cond_2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object v4, Lcom/discord/utilities/fcm/NotificationCache;->INSTANCE:Lcom/discord/utilities/fcm/NotificationCache;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v4, v2, v3, v5}, Lcom/discord/utilities/fcm/NotificationCache;->setIgnoreNextClearForAck(JZ)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const-string v4, "context"
|
|
|
|
|
|
|
|
invoke-static {p1, v4}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
const-string v4, "message"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p2, v4}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
new-instance v7, Landroidx/work/Data$Builder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-direct {v7}, Landroidx/work/Data$Builder;-><init>()V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const/4 v8, 0x5
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
new-array v8, v8, [Lkotlin/Pair;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
new-instance v3, Lkotlin/Pair;
|
|
|
|
|
|
|
|
const-string v9, "com.discord.intent.extra.EXTRA_CHANNEL_ID"
|
|
|
|
|
|
|
|
invoke-direct {v3, v9, v2}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
aput-object v3, v8, v2
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
goto :goto_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_1
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object v1, v6
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
new-instance v2, Lkotlin/Pair;
|
|
|
|
|
|
|
|
invoke-direct {v2, v0, v1}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
aput-object v2, v8, v5
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
const/4 v0, 0x2
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/models/domain/ModelMessage;
|
|
|
|
|
|
|
|
invoke-direct {v1}, Lcom/discord/models/domain/ModelMessage;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelMessage;->getNonce()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
new-instance v2, Lkotlin/Pair;
|
|
|
|
|
|
|
|
const-string v3, "com.discord.intent.extra.EXTRA_MESSAGE_ID"
|
|
|
|
|
|
|
|
invoke-direct {v2, v3, v1}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
aput-object v2, v8, v0
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
const/4 v0, 0x3
|
|
|
|
|
|
|
|
new-instance v1, Lkotlin/Pair;
|
|
|
|
|
|
|
|
const-string v2, "MESSAGE_CONTENT"
|
|
|
|
|
|
|
|
invoke-direct {v1, v2, p2}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
aput-object v1, v8, v0
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
const/4 p2, 0x4
|
|
|
|
|
|
|
|
new-instance v0, Lkotlin/Pair;
|
|
|
|
|
2020-09-14 18:37:20 +00:00
|
|
|
const-string v1, "com.discord.intent.extra.EXTRA_STICKER_ID"
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
invoke-direct {v0, v1, v6}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
aput-object v0, v8, p2
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {v8}, Lf/h/a/f/e/n/f;->mapOf([Lkotlin/Pair;)Ljava/util/Map;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-virtual {v7, p2}, Landroidx/work/Data$Builder;->putAll(Ljava/util/Map;)Landroidx/work/Data$Builder;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroidx/work/Data$Builder;->build()Landroidx/work/Data;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
const-string v0, "Data.Builder()\n \u2026 )\n .build()"
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
new-instance v0, Landroidx/work/OneTimeWorkRequest$Builder;
|
|
|
|
|
|
|
|
const-class v1, Lcom/discord/workers/MessageSendWorker;
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Landroidx/work/OneTimeWorkRequest$Builder;-><init>(Ljava/lang/Class;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, p2}, Landroidx/work/WorkRequest$Builder;->setInputData(Landroidx/work/Data;)Landroidx/work/WorkRequest$Builder;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest$Builder;
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-virtual {p2, v4}, Landroidx/work/WorkRequest$Builder;->addTag(Ljava/lang/String;)Landroidx/work/WorkRequest$Builder;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest$Builder;
|
|
|
|
|
|
|
|
const-string v0, "send"
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, 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 v0, Landroidx/work/Constraints$Builder;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Landroidx/work/Constraints$Builder;-><init>()V
|
|
|
|
|
|
|
|
sget-object v1, Landroidx/work/NetworkType;->CONNECTED:Landroidx/work/NetworkType;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/work/Constraints$Builder;->setRequiredNetworkType(Landroidx/work/NetworkType;)Landroidx/work/Constraints$Builder;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroidx/work/Constraints$Builder;->build()Landroidx/work/Constraints;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, 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 v0, "OneTimeWorkRequestBuilde\u2026 )\n .build()"
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
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_2
|
2020-05-17 12:40:10 +00:00
|
|
|
sget-object v1, Lcom/discord/utilities/fcm/NotificationClient;->INSTANCE:Lcom/discord/utilities/fcm/NotificationClient;
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x4
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
move-object v4, p1
|
|
|
|
|
|
|
|
invoke-static/range {v1 .. v7}, Lcom/discord/utilities/fcm/NotificationClient;->clear$default(Lcom/discord/utilities/fcm/NotificationClient;JLandroid/content/Context;ZILjava/lang/Object;)V
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
:cond_3
|
2020-05-17 12:40:10 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final enqueueTimedMute(Landroid/content/Context;Landroid/content/Intent;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
.locals 10
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroid/content/Intent;->getData()Landroid/net/Uri;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz p2, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v0, "intent.data ?: return"
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v0, "guildId"
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz v0, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {v0}, Lk0/t/j;->toLongOrNull(Ljava/lang/String;)Ljava/lang/Long;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz v0, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-wide v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v2, "channelId"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p2, v2}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz v2, :cond_0
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {v2}, Lk0/t/j;->toLongOrNull(Ljava/lang/String;)Ljava/lang/Long;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz v2, :cond_0
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v4
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const-string/jumbo v2, "until"
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
invoke-virtual {p2, v2}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz p2, :cond_0
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {p2}, Lk0/t/j;->toLongOrNull(Ljava/lang/String;)Ljava/lang/Long;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz p2, :cond_0
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const-string p2, "context"
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
new-instance p2, Landroidx/work/Data$Builder;
|
|
|
|
|
|
|
|
invoke-direct {p2}, Landroidx/work/Data$Builder;-><init>()V
|
|
|
|
|
|
|
|
const/4 v6, 0x3
|
|
|
|
|
|
|
|
new-array v6, v6, [Lkotlin/Pair;
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance v1, Lkotlin/Pair;
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const-string v7, "com.discord.intent.extra.EXTRA_GUILD_ID"
|
|
|
|
|
|
|
|
invoke-direct {v1, v7, v0}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const/4 v0, 0x0
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
aput-object v1, v6, v0
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
new-instance v7, Lkotlin/Pair;
|
|
|
|
|
|
|
|
const-string v8, "com.discord.intent.extra.EXTRA_CHANNEL_ID"
|
|
|
|
|
|
|
|
invoke-direct {v7, v8, v1}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
aput-object v7, v6, v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v0, 0x2
|
|
|
|
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
new-instance v2, Lkotlin/Pair;
|
|
|
|
|
|
|
|
const-string v3, "com.discord.intent.extra.EXTRA_UNTIL_TIMESTAMP_MS"
|
|
|
|
|
|
|
|
invoke-direct {v2, v3, v1}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
aput-object v2, v6, v0
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {v6}, Lf/h/a/f/e/n/f;->mapOf([Lkotlin/Pair;)Ljava/util/Map;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p2, v0}, Landroidx/work/Data$Builder;->putAll(Ljava/util/Map;)Landroidx/work/Data$Builder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroidx/work/Data$Builder;->build()Landroidx/work/Data;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object p2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v0, "Data.Builder()\n \u2026 )\n .build()"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
new-instance v0, Landroidx/work/OneTimeWorkRequest$Builder;
|
|
|
|
|
|
|
|
const-class v1, Lcom/discord/workers/TimedMuteWorker;
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Landroidx/work/OneTimeWorkRequest$Builder;-><init>(Ljava/lang/Class;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, p2}, Landroidx/work/WorkRequest$Builder;->setInputData(Landroidx/work/Data;)Landroidx/work/WorkRequest$Builder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest$Builder;
|
|
|
|
|
|
|
|
sget-object v0, Landroidx/work/BackoffPolicy;->LINEAR:Landroidx/work/BackoffPolicy;
|
|
|
|
|
|
|
|
const-wide/16 v1, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object v3, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0, v1, v2, v3}, Landroidx/work/WorkRequest$Builder;->setBackoffCriteria(Landroidx/work/BackoffPolicy;JLjava/util/concurrent/TimeUnit;)Landroidx/work/WorkRequest$Builder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest$Builder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v0, "channel"
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, Landroidx/work/WorkRequest$Builder;->addTag(Ljava/lang/String;)Landroidx/work/WorkRequest$Builder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest$Builder;
|
|
|
|
|
|
|
|
const-string v0, "mute"
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, 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 v0, Landroidx/work/Constraints$Builder;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Landroidx/work/Constraints$Builder;-><init>()V
|
|
|
|
|
|
|
|
sget-object v1, Landroidx/work/NetworkType;->CONNECTED:Landroidx/work/NetworkType;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/work/Constraints$Builder;->setRequiredNetworkType(Landroidx/work/NetworkType;)Landroidx/work/Constraints$Builder;
|
|
|
|
|
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0}, Landroidx/work/Constraints$Builder;->build()Landroidx/work/Constraints;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p2, v0}, Landroidx/work/WorkRequest$Builder;->setConstraints(Landroidx/work/Constraints;)Landroidx/work/WorkRequest$Builder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object p2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest$Builder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p2}, Landroidx/work/WorkRequest$Builder;->build()Landroidx/work/WorkRequest;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object p2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v0, "OneTimeWorkRequestBuilde\u2026 )\n .build()"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {p1}, Landroidx/work/WorkManager;->getInstance(Landroid/content/Context;)Landroidx/work/WorkManager;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0, p2}, Landroidx/work/WorkManager;->enqueue(Landroidx/work/WorkRequest;)Landroidx/work/Operation;
|
|
|
|
|
|
|
|
sget-object v3, Lcom/discord/utilities/fcm/NotificationClient;->INSTANCE:Lcom/discord/utilities/fcm/NotificationClient;
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
const/4 v8, 0x4
|
|
|
|
|
|
|
|
const/4 v9, 0x0
|
|
|
|
|
|
|
|
move-object v6, p1
|
|
|
|
|
|
|
|
invoke-static/range {v3 .. v9}, Lcom/discord/utilities/fcm/NotificationClient;->clear$default(Lcom/discord/utilities/fcm/NotificationClient;JLandroid/content/Context;ZILjava/lang/Object;)V
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final executeCallAction(Landroid/content/Context;Landroid/content/Intent;Z)V
|
2020-07-08 16:44:49 +00:00
|
|
|
.locals 8
|
|
|
|
.annotation build Landroidx/annotation/RequiresApi;
|
|
|
|
value = 0x18
|
|
|
|
.end annotation
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroid/content/Intent;->getData()Landroid/net/Uri;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz p2, :cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v0, "intent.data ?: return"
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v0, "channelId"
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz v0, :cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {v0}, Lk0/t/j;->toLongOrNull(Ljava/lang/String;)Ljava/lang/Long;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz v0, :cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-wide v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v0, "messageId"
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz p2, :cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {p2}, Lk0/t/j;->toLongOrNull(Ljava/lang/String;)Ljava/lang/Long;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz p2, :cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-wide v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
|
|
|
|
sget-object p2, Lcom/discord/app/DiscordConnectService;->d:Lcom/discord/app/DiscordConnectService$a;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p2, p1, v2, v3}, Lcom/discord/app/DiscordConnectService$a;->b(Landroid/content/Context;J)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
goto/16 :goto_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_0
|
2020-09-09 19:21:20 +00:00
|
|
|
const-string p2, "context"
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
new-instance p2, Landroidx/work/Data$Builder;
|
|
|
|
|
|
|
|
invoke-direct {p2}, Landroidx/work/Data$Builder;-><init>()V
|
|
|
|
|
|
|
|
const/4 p3, 0x2
|
|
|
|
|
|
|
|
new-array p3, p3, [Lkotlin/Pair;
|
|
|
|
|
2020-09-08 08:16:32 +00:00
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
move-result-object v4
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
new-instance v5, Lkotlin/Pair;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const-string v6, "com.discord.intent.extra.EXTRA_CHANNEL_ID"
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-direct {v5, v6, v4}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
aput-object v5, p3, v4
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
const/4 v4, 0x1
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Lkotlin/Pair;
|
|
|
|
|
|
|
|
const-string v5, "com.discord.intent.extra.EXTRA_MESSAGE_ID"
|
|
|
|
|
|
|
|
invoke-direct {v1, v5, v0}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
aput-object v1, p3, v4
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p3}, Lf/h/a/f/e/n/f;->mapOf([Lkotlin/Pair;)Ljava/util/Map;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
invoke-virtual {p2, p3}, 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()"
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p2, p3}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
new-instance p3, Landroidx/work/OneTimeWorkRequest$Builder;
|
|
|
|
|
|
|
|
const-class v0, Lcom/discord/workers/CallActionWorker;
|
|
|
|
|
|
|
|
invoke-direct {p3, v0}, 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;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest$Builder;
|
|
|
|
|
|
|
|
sget-object p3, Landroidx/work/BackoffPolicy;->LINEAR:Landroidx/work/BackoffPolicy;
|
|
|
|
|
|
|
|
const-wide/16 v0, 0x1
|
|
|
|
|
|
|
|
sget-object v4, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
|
|
|
|
invoke-virtual {p2, p3, v0, v1, v4}, Landroidx/work/WorkRequest$Builder;->setBackoffCriteria(Landroidx/work/BackoffPolicy;JLjava/util/concurrent/TimeUnit;)Landroidx/work/WorkRequest$Builder;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest$Builder;
|
|
|
|
|
|
|
|
const-string p3, "call"
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
const-string p3, "decline"
|
|
|
|
|
|
|
|
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 v0, Landroidx/work/NetworkType;->CONNECTED:Landroidx/work/NetworkType;
|
|
|
|
|
|
|
|
invoke-virtual {p3, v0}, Landroidx/work/Constraints$Builder;->setRequiredNetworkType(Landroidx/work/NetworkType;)Landroidx/work/Constraints$Builder;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
const-wide/16 v0, 0xa
|
|
|
|
|
|
|
|
sget-object v4, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p3, v0, v1, v4}, Landroidx/work/Constraints$Builder;->setTriggerContentMaxDelay(JLjava/util/concurrent/TimeUnit;)Landroidx/work/Constraints$Builder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
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()"
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p2, p3}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
check-cast p2, Landroidx/work/OneTimeWorkRequest;
|
|
|
|
|
|
|
|
invoke-static {p1}, Landroidx/work/WorkManager;->getInstance(Landroid/content/Context;)Landroidx/work/WorkManager;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
invoke-virtual {p3, p2}, Landroidx/work/WorkManager;->enqueue(Landroidx/work/WorkRequest;)Landroidx/work/Operation;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_0
|
|
|
|
sget-object v1, Lcom/discord/utilities/fcm/NotificationClient;->INSTANCE:Lcom/discord/utilities/fcm/NotificationClient;
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x4
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v7, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-object v4, p1
|
|
|
|
|
|
|
|
invoke-static/range {v1 .. v7}, Lcom/discord/utilities/fcm/NotificationClient;->clear$default(Lcom/discord/utilities/fcm/NotificationClient;JLandroid/content/Context;ZILjava/lang/Object;)V
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final enqueue(Landroid/content/Context;Landroid/content/Intent;)V
|
|
|
|
.locals 4
|
2020-07-08 16:44:49 +00:00
|
|
|
.annotation build Landroidx/annotation/RequiresApi;
|
|
|
|
value = 0x18
|
|
|
|
.end annotation
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const-string v0, "context"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const-string v0, "intent"
|
|
|
|
|
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroid/content/Intent;->getData()Landroid/net/Uri;
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
move-result-object v0
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-virtual {v0}, Landroid/net/Uri;->getAuthority()Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2020-09-09 19:21:20 +00:00
|
|
|
move-object v2, v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_0
|
|
|
|
const-string v3, "action"
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {v2, v3}, Lk0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
2020-09-09 19:21:20 +00:00
|
|
|
move-object v0, v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_1
|
2020-09-09 19:21:20 +00:00
|
|
|
if-eqz v0, :cond_4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v2, "intent.data.takeIf { it?\u2026y == \"action\" } ?: return"
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {v0, v2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-virtual {v0}, Landroid/net/Uri;->getPath()Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
if-nez v2, :cond_2
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-virtual {v2}, Ljava/lang/String;->hashCode()I
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
sparse-switch v3, :sswitch_data_0
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:sswitch_0
|
|
|
|
const-string v3, "/channel/call/decline"
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Lcom/discord/utilities/fcm/NotificationActions;->executeCallAction(Landroid/content/Context;Landroid/content/Intent;Z)V
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:sswitch_1
|
|
|
|
const-string v3, "/message/ack"
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/utilities/fcm/NotificationActions;->enqueueAckMessage(Landroid/content/Context;Landroid/content/Intent;)V
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:sswitch_2
|
|
|
|
const-string v3, "/channel/call/accept"
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Lcom/discord/utilities/fcm/NotificationActions;->executeCallAction(Landroid/content/Context;Landroid/content/Intent;Z)V
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:sswitch_3
|
|
|
|
const-string v3, "/message/reply"
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/utilities/fcm/NotificationActions;->enqueueDirectReply(Landroid/content/Context;Landroid/content/Intent;)V
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:sswitch_4
|
|
|
|
const-string v3, "/channel/mute"
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/utilities/fcm/NotificationActions;->enqueueTimedMute(Landroid/content/Context;Landroid/content/Intent;)V
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
:goto_2
|
2020-07-31 02:11:25 +00:00
|
|
|
sget-object p1, Lcom/discord/app/AppLog;->d:Lcom/discord/app/AppLog;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string p2, "Unknown work action "
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p2}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-virtual {v0}, Landroid/net/Uri;->getPath()Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const/4 v0, 0x2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p1, p2, v1, v0, v1}, Lcom/discord/utilities/logging/Logger;->w$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_4
|
|
|
|
:goto_3
|
|
|
|
return-void
|
|
|
|
|
|
|
|
nop
|
|
|
|
|
|
|
|
:sswitch_data_0
|
|
|
|
.sparse-switch
|
|
|
|
-0x3d6efeac -> :sswitch_4
|
|
|
|
-0x22a784ed -> :sswitch_3
|
|
|
|
0xf241e3e -> :sswitch_2
|
|
|
|
0x3581d6f2 -> :sswitch_1
|
|
|
|
0x777f2080 -> :sswitch_0
|
|
|
|
.end sparse-switch
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
|
|
|
|
.locals 8
|
2020-07-08 16:44:49 +00:00
|
|
|
.annotation build Landroidx/annotation/RequiresApi;
|
|
|
|
value = 0x18
|
|
|
|
.end annotation
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const-string v0, "context"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-09-02 04:07:20 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const-string v0, "intent"
|
|
|
|
|
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
const-string v1, "Got notification action: "
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {v0}, Lcom/discord/app/AppLog;->i(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
goto/16 :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
const v2, -0x5f5bfd47
|
|
|
|
|
|
|
|
if-eq v1, v2, :cond_4
|
|
|
|
|
|
|
|
const v2, -0x50851c66
|
|
|
|
|
|
|
|
if-eq v1, v2, :cond_2
|
|
|
|
|
|
|
|
const v2, -0x19ac103
|
|
|
|
|
|
|
|
if-eq v1, v2, :cond_1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-string v1, "com.discord.intent.action.ENQUEUE_WORK"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/utilities/fcm/NotificationActions;->enqueue(Landroid/content/Context;Landroid/content/Intent;)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const-string v1, "com.discord.intent.action.NOTIFICATION_DELETED"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
const-string v1, "Got notification deleted: "
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {v0}, Lcom/discord/app/AppLog;->i(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
|
|
|
|
const-string v0, "com.discord.NOTIFICATION_DELETED_CHANNEL_ID"
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, Landroid/os/Bundle;->getLong(Ljava/lang/String;)J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/utilities/fcm/NotificationClient;->INSTANCE:Lcom/discord/utilities/fcm/NotificationClient;
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x4
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
move-object v4, p1
|
|
|
|
|
|
|
|
invoke-static/range {v1 .. v7}, Lcom/discord/utilities/fcm/NotificationClient;->clear$default(Lcom/discord/utilities/fcm/NotificationClient;JLandroid/content/Context;ZILjava/lang/Object;)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
const-string v1, "com.discord.intent.action.NOTIFICATION_CANCEL"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
const-string v1, "Got notification cancel: "
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {v0}, Lcom/discord/app/AppLog;->i(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
if-eqz p2, :cond_5
|
|
|
|
|
|
|
|
const-string v0, "com.discord.NOTIFICATION_ID"
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
invoke-static {p1}, Landroidx/core/app/NotificationManagerCompat;->from(Landroid/content/Context;)Landroidx/core/app/NotificationManagerCompat;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Landroidx/core/app/NotificationManagerCompat;->cancel(I)V
|
|
|
|
|
|
|
|
nop
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
:goto_0
|
|
|
|
return-void
|
|
|
|
.end method
|