89 lines
2.2 KiB
Smali
89 lines
2.2 KiB
Smali
.class public final Lcom/discord/utilities/receiver/spotify/SpotifyMetadataReceiver;
|
|
.super Landroid/content/BroadcastReceiver;
|
|
.source "SpotifyMetadataReceiver.kt"
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
|
|
.locals 7
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "id"
|
|
|
|
invoke-virtual {p2, p1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
:try_start_0
|
|
sget-object p2, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/stores/StoreStream$Companion;->getSpotify()Lcom/discord/stores/StoreSpotify;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, ":"
|
|
|
|
filled-new-array {v0}, [Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x6
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-static {p1, v0, v2, v2, v1}, Ly/b0/u;->split$default(Ljava/lang/CharSequence;[Ljava/lang/String;ZII)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Ly/q/m;->last(Ljava/util/List;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/String;
|
|
|
|
invoke-virtual {p2, v0}, Lcom/discord/stores/StoreSpotify;->setCurrentTrackId(Ljava/lang/String;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
sget-object v1, Lcom/discord/app/AppLog;->c:Lcom/discord/app/AppLog;
|
|
|
|
const-string p2, "Error parsing spotify track id: "
|
|
|
|
invoke-static {p2, p1}, Lf/e/b/a/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x6
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-static/range {v1 .. v6}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|