From dcd42454bd5f87dddd720534f6120c4ef90063a3 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Sun, 14 Sep 2025 21:11:15 +0400 Subject: [PATCH] fix(Spotify): Remove broken `Spoof client` patch (#5833) --- .../spotify/layout/theme/CustomThemePatch.kt | 13 +++++++++---- .../patches/spotify/misc/fix/SpoofClientPatch.kt | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/patches/src/main/kotlin/app/revanced/patches/spotify/layout/theme/CustomThemePatch.kt b/patches/src/main/kotlin/app/revanced/patches/spotify/layout/theme/CustomThemePatch.kt index 4546d80f47..55325bc4d9 100644 --- a/patches/src/main/kotlin/app/revanced/patches/spotify/layout/theme/CustomThemePatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/spotify/layout/theme/CustomThemePatch.kt @@ -187,11 +187,16 @@ val customThemePatch = resourcePatch( } // Login screen gradient. - document("res/drawable/start_screen_gradient.xml").use { document -> - val gradientNode = document.getElementsByTagName("gradient").item(0) as Element + try { + document("res/drawable/start_screen_gradient.xml").use { document -> + val gradientNode = document.getElementsByTagName("gradient").item(0) as Element - gradientNode.setAttribute("android:startColor", "@color/gray_7") - gradientNode.setAttribute("android:endColor", "@color/gray_7") + gradientNode.setAttribute("android:startColor", "@color/gray_7") + gradientNode.setAttribute("android:endColor", "@color/gray_7") + } + } catch (_: Exception) { + // Fails for 9.0.66+ + // printWarn("Failed to locate start_screen_gradient.xml, skipping modification.") } } } diff --git a/patches/src/main/kotlin/app/revanced/patches/spotify/misc/fix/SpoofClientPatch.kt b/patches/src/main/kotlin/app/revanced/patches/spotify/misc/fix/SpoofClientPatch.kt index b5d5bf22cb..d57370b3f4 100644 --- a/patches/src/main/kotlin/app/revanced/patches/spotify/misc/fix/SpoofClientPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/spotify/misc/fix/SpoofClientPatch.kt @@ -12,9 +12,9 @@ import app.revanced.util.returnEarly internal const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/spotify/misc/fix/SpoofClientPatch;" +@Deprecated("Patch no longer functions") @Suppress("unused") val spoofClientPatch = bytecodePatch( - name = "Spoof client", description = "Spoofs the client to fix various functions of the app.", ) { val requestListenerPort by intOption(