107 lines
3.8 KiB
Smali
107 lines
3.8 KiB
Smali
.class public final Lcom/discord/utilities/spotify/SpotifyApiClient$refreshSpotifyToken$1;
|
|
.super Lc0/n/c/j;
|
|
.source "SpotifyApiClient.kt"
|
|
|
|
# interfaces
|
|
.implements Lkotlin/jvm/functions/Function1;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/discord/utilities/spotify/SpotifyApiClient;->refreshSpotifyToken()V
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = null
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lc0/n/c/j;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Lcom/discord/models/domain/ModelConnectionAccessToken;",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final synthetic this$0:Lcom/discord/utilities/spotify/SpotifyApiClient;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/utilities/spotify/SpotifyApiClient;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/spotify/SpotifyApiClient$refreshSpotifyToken$1;->this$0:Lcom/discord/utilities/spotify/SpotifyApiClient;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
invoke-direct {p0, p1}, Lc0/n/c/j;-><init>(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public bridge synthetic invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
|
.locals 0
|
|
|
|
check-cast p1, Lcom/discord/models/domain/ModelConnectionAccessToken;
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/utilities/spotify/SpotifyApiClient$refreshSpotifyToken$1;->invoke(Lcom/discord/models/domain/ModelConnectionAccessToken;)V
|
|
|
|
sget-object p1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final invoke(Lcom/discord/models/domain/ModelConnectionAccessToken;)V
|
|
.locals 4
|
|
|
|
new-instance v0, Lcom/discord/utilities/spotify/SpotifyApiClient$refreshSpotifyToken$1$1;
|
|
|
|
invoke-direct {v0, p1}, Lcom/discord/utilities/spotify/SpotifyApiClient$refreshSpotifyToken$1$1;-><init>(Lcom/discord/models/domain/ModelConnectionAccessToken;)V
|
|
|
|
sput-object v0, Lcom/discord/utilities/rest/RestAPI$AppHeadersProvider;->spotifyTokenProvider:Lkotlin/jvm/functions/Function0;
|
|
|
|
iget-object p1, p0, Lcom/discord/utilities/spotify/SpotifyApiClient$refreshSpotifyToken$1;->this$0:Lcom/discord/utilities/spotify/SpotifyApiClient;
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/spotify/SpotifyApiClient;->access$getClock$p(Lcom/discord/utilities/spotify/SpotifyApiClient;)Lcom/discord/utilities/time/Clock;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Lcom/discord/utilities/time/Clock;->currentTimeMillis()J
|
|
|
|
move-result-wide v0
|
|
|
|
const-wide/32 v2, 0x36ee80
|
|
|
|
add-long/2addr v0, v2
|
|
|
|
invoke-static {p1, v0, v1}, Lcom/discord/utilities/spotify/SpotifyApiClient;->access$setTokenExpiresAt(Lcom/discord/utilities/spotify/SpotifyApiClient;J)V
|
|
|
|
iget-object p1, p0, Lcom/discord/utilities/spotify/SpotifyApiClient$refreshSpotifyToken$1;->this$0:Lcom/discord/utilities/spotify/SpotifyApiClient;
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/spotify/SpotifyApiClient;->access$getTrackIdToFetch(Lcom/discord/utilities/spotify/SpotifyApiClient;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/spotify/SpotifyApiClient$refreshSpotifyToken$1;->this$0:Lcom/discord/utilities/spotify/SpotifyApiClient;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/utilities/spotify/SpotifyApiClient;->fetchSpotifyTrack(Ljava/lang/String;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/utilities/spotify/SpotifyApiClient$refreshSpotifyToken$1;->this$0:Lcom/discord/utilities/spotify/SpotifyApiClient;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-static {p1, v0}, Lcom/discord/utilities/spotify/SpotifyApiClient;->access$setTrackIdToFetch(Lcom/discord/utilities/spotify/SpotifyApiClient;Ljava/lang/String;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|