From ae0240c69ba71c643a1b7a25528a9fad0c4459d2 Mon Sep 17 00:00:00 2001 From: Pun Butrach Date: Mon, 12 Jan 2026 14:58:21 +0700 Subject: [PATCH] refactor(music): VersionCheckPatch --- .../patches/music/playservice/VersionCheckPatch.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/patches/src/main/kotlin/app/revanced/patches/music/playservice/VersionCheckPatch.kt b/patches/src/main/kotlin/app/revanced/patches/music/playservice/VersionCheckPatch.kt index e5b8ba0d0..a4339a3df 100644 --- a/patches/src/main/kotlin/app/revanced/patches/music/playservice/VersionCheckPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/music/playservice/VersionCheckPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.music.playservice -import app.revanced.patcher.patch.resourcePatch +import app.revanced.patcher.patch.creatingResourcePatch import app.revanced.util.findPlayStoreServicesVersion import kotlin.properties.Delegates @@ -21,12 +21,14 @@ var is_8_11_or_greater: Boolean by Delegates.notNull() var is_8_15_or_greater: Boolean by Delegates.notNull() private set -val versionCheckPatch = resourcePatch( - description = "Uses the Play Store service version to find the major/minor version of the YouTube Music target app.", +@Suppress("unused", "ObjectPropertyName") +val `Version check` by creatingResourcePatch( + description = "Uses the Play Store service version to find the major/minor version of the YouTube Music target app." ) { apply { // The app version is missing from the decompiled manifest, // so instead use the Google Play services version and compare against specific releases. + // This requires ResourcePatchContext, which creatingResourcePatch provides. val playStoreServicesVersion = findPlayStoreServicesVersion() // All bug fix releases always seem to use the same play store version as the minor version.