apkfuckery/com.discord/smali/com/discord/utilities/voice/VoiceEngineForegroundService$IntentHandler.smali

277 lines
7.5 KiB
Smali
Raw Normal View History

2019-02-04 20:05:16 +00:00
.class Lcom/discord/utilities/voice/VoiceEngineForegroundService$IntentHandler;
.super Ljava/lang/Object;
2019-02-04 20:29:01 +00:00
.source "VoiceEngineForegroundService.java"
2019-02-04 20:05:16 +00:00
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/discord/utilities/voice/VoiceEngineForegroundService;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
2019-02-04 20:08:30 +00:00
accessFlags = 0x8
2019-02-04 20:05:16 +00:00
name = "IntentHandler"
.end annotation
# instance fields
.field private final intent:Landroid/content/Intent;
.field private final service:Landroid/app/Service;
# direct methods
.method private constructor <init>(Landroid/app/Service;Landroid/content/Intent;)V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$IntentHandler;->service:Landroid/app/Service;
iput-object p2, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$IntentHandler;->intent:Landroid/content/Intent;
return-void
.end method
.method static synthetic access$000(Lcom/discord/utilities/voice/VoiceEngineForegroundService$IntentHandler;)V
.locals 0
invoke-direct {p0}, Lcom/discord/utilities/voice/VoiceEngineForegroundService$IntentHandler;->handle()V
return-void
.end method
.method public static create(Landroid/app/Service;Landroid/content/Intent;)Lcom/discord/utilities/voice/VoiceEngineForegroundService$IntentHandler;
.locals 1
new-instance v0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$IntentHandler;
invoke-direct {v0, p0, p1}, Lcom/discord/utilities/voice/VoiceEngineForegroundService$IntentHandler;-><init>(Landroid/app/Service;Landroid/content/Intent;)V
return-object v0
.end method
.method private handle()V
2019-02-04 20:08:30 +00:00
.locals 4
2019-02-04 20:05:16 +00:00
iget-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$IntentHandler;->intent:Landroid/content/Intent;
if-eqz v0, :cond_1
invoke-virtual {v0}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_1
const-string v0, "DiscordVoiceService"
2019-02-04 20:08:30 +00:00
new-instance v1, Ljava/lang/StringBuilder;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const-string v2, "Received action: "
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
iget-object v2, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$IntentHandler;->intent:Landroid/content/Intent;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
2019-02-04 20:05:16 +00:00
move-result-object v2
2019-02-04 20:08:30 +00:00
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
2019-02-04 20:05:16 +00:00
iget-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$IntentHandler;->intent:Landroid/content/Intent;
invoke-virtual {v0}, Landroid/content/Intent;->getAction()Ljava/lang/String;
2019-02-04 20:08:30 +00:00
move-result-object v0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const/4 v1, -0x1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result v2
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const/4 v3, 0x1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
sparse-switch v2, :sswitch_data_0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
goto :goto_0
2019-02-04 20:05:16 +00:00
:sswitch_0
2019-02-04 20:08:30 +00:00
const-string v2, "com.discord.utilities.voice.action.toggle_muted"
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result v0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
if-eqz v0, :cond_0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const/4 v1, 0x3
2019-02-04 20:05:16 +00:00
goto :goto_0
:sswitch_1
2019-02-04 20:08:30 +00:00
const-string v2, "com.discord.utilities.voice.action.start_foreground"
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result v0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
if-eqz v0, :cond_0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const/4 v1, 0x0
2019-02-04 20:05:16 +00:00
goto :goto_0
:sswitch_2
2019-02-04 20:08:30 +00:00
const-string v2, "com.discord.utilities.voice.action.disconnect"
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result v0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
if-eqz v0, :cond_0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const/4 v1, 0x4
2019-02-04 20:05:16 +00:00
goto :goto_0
:sswitch_3
2019-02-04 20:08:30 +00:00
const-string v2, "com.discord.utilities.voice.action.stop_foreground"
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result v0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
if-eqz v0, :cond_0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const/4 v1, 0x1
2019-02-04 20:05:16 +00:00
goto :goto_0
:sswitch_4
2019-02-04 20:08:30 +00:00
const-string v2, "com.discord.utilities.voice.action.toggle_deafened"
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result v0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
if-eqz v0, :cond_0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const/4 v1, 0x2
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
:cond_0
:goto_0
const/4 v0, 0x0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
packed-switch v1, :pswitch_data_0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
goto :goto_1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
:pswitch_0
invoke-static {}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->access$900()Lrx/functions/Action1;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result-object v1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
if-eqz v1, :cond_1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-static {}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->access$900()Lrx/functions/Action1;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result-object v1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-interface {v1, v0}, Lrx/functions/Action1;->call(Ljava/lang/Object;)V
2019-02-04 20:05:16 +00:00
goto :goto_1
:pswitch_1
2019-02-04 20:08:30 +00:00
invoke-static {}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->access$800()Lrx/functions/Action1;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result-object v1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
if-eqz v1, :cond_1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-static {}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->access$800()Lrx/functions/Action1;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result-object v1
invoke-interface {v1, v0}, Lrx/functions/Action1;->call(Ljava/lang/Object;)V
return-void
2019-02-04 20:05:16 +00:00
:pswitch_2
invoke-static {}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->access$700()Lrx/functions/Action1;
2019-02-04 20:08:30 +00:00
move-result-object v1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
if-eqz v1, :cond_1
2019-02-04 20:05:16 +00:00
invoke-static {}, Lcom/discord/utilities/voice/VoiceEngineForegroundService;->access$700()Lrx/functions/Action1;
2019-02-04 20:08:30 +00:00
move-result-object v1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-interface {v1, v0}, Lrx/functions/Action1;->call(Ljava/lang/Object;)V
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
return-void
2019-02-04 20:05:16 +00:00
:pswitch_3
2019-02-04 20:08:30 +00:00
iget-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$IntentHandler;->service:Landroid/app/Service;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v0, v3}, Landroid/app/Service;->stopForeground(Z)V
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
iget-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$IntentHandler;->service:Landroid/app/Service;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v0}, Landroid/app/Service;->stopSelf()V
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
return-void
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
:pswitch_4
iget-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$IntentHandler;->service:Landroid/app/Service;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const/16 v1, 0x65
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
iget-object v2, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$IntentHandler;->intent:Landroid/content/Intent;
2019-02-04 20:05:16 +00:00
2019-02-04 20:29:01 +00:00
invoke-static {v2, v0}, Lcom/discord/utilities/voice/VoiceEngineForegroundService$NotificationBuilder;->access$500(Landroid/content/Intent;Landroid/content/Context;)Lcom/discord/utilities/voice/VoiceEngineForegroundService$NotificationBuilder;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result-object v2
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-static {v2}, Lcom/discord/utilities/voice/VoiceEngineForegroundService$NotificationBuilder;->access$600(Lcom/discord/utilities/voice/VoiceEngineForegroundService$NotificationBuilder;)Landroid/app/Notification;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result-object v2
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v0, v1, v2}, Landroid/app/Service;->startForeground(ILandroid/app/Notification;)V
2019-02-04 20:05:16 +00:00
2019-02-04 20:29:01 +00:00
return-void
2019-02-04 20:08:30 +00:00
:cond_1
:goto_1
return-void
2019-02-04 20:05:16 +00:00
2019-02-04 20:29:01 +00:00
nop
2019-02-04 20:05:16 +00:00
:sswitch_data_0
.sparse-switch
2019-02-04 20:08:30 +00:00
-0x78b14b10 -> :sswitch_4
-0x4db22a69 -> :sswitch_3
-0x29e659bb -> :sswitch_2
0x20467429 -> :sswitch_1
0x5f84c829 -> :sswitch_0
2019-02-04 20:05:16 +00:00
.end sparse-switch
:pswitch_data_0
.packed-switch 0x0
:pswitch_4
2019-02-04 20:08:30 +00:00
:pswitch_3
:pswitch_2
:pswitch_1
:pswitch_0
2019-02-04 20:05:16 +00:00
.end packed-switch
.end method