Skip to content

Commit ddc42cd

Browse files
committed
Spotify - UnlockPremiumPatch: Erasure stubbed types
1 parent 06c580e commit ddc42cd

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

app/src/main/java/io/github/chsbuffer/revancedxposed/spotify/SpotifyHook.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import android.content.Context
66
import app.revanced.extension.shared.Logger
77
import app.revanced.extension.shared.Utils
88
import app.revanced.extension.spotify.misc.UnlockPremiumPatch
9-
import com.spotify.remoteconfig.internal.AccountAttribute
109
import de.robv.android.xposed.XC_MethodHook
1110
import de.robv.android.xposed.XC_MethodReplacement
1211
import de.robv.android.xposed.XposedBridge
@@ -90,7 +89,7 @@ fun SpotifyHook.UnlockPremium() {
9089
val field = getDexField("attributesMapField").toField()
9190
override fun beforeHookedMethod(param: MethodHookParam) {
9291
Logger.printDebug { field.get(param.thisObject)!!.toString() }
93-
UnlockPremiumPatch.overrideAttributes(field.get(param.thisObject) as Map<String, AccountAttribute>)
92+
UnlockPremiumPatch.overrideAttributes(field.get(param.thisObject) as Map<String, *>)
9493
}
9594
})
9695

@@ -216,7 +215,7 @@ fun SpotifyHook.UnlockPremium() {
216215
val sections = param.result
217216
// Set sections mutable
218217
sections.javaClass.findFirstFieldByExactType(Boolean::class.java).set(sections, true)
219-
UnlockPremiumPatch.removeHomeSections(param.result as MutableList<com.spotify.home.evopage.homeapi.proto.Section>)
218+
UnlockPremiumPatch.removeHomeSections(param.result as MutableList<*>)
220219
}
221220
})
222221
// Remove ads sections from browser.
@@ -227,7 +226,7 @@ fun SpotifyHook.UnlockPremium() {
227226
val sections = param.result
228227
// Set sections mutable
229228
sections.javaClass.findFirstFieldByExactType(Boolean::class.java).set(sections, true)
230-
UnlockPremiumPatch.removeBrowseSections(param.result as MutableList<com.spotify.browsita.v1.resolved.Section>)
229+
UnlockPremiumPatch.removeBrowseSections(param.result as MutableList<*>)
231230
}
232231
})
233232

0 commit comments

Comments
 (0)