From 3d331a70fbb042dddacc96ad02663f2eaf36b71d Mon Sep 17 00:00:00 2001
From: inotia00 <108592928+inotia00@users.noreply.github.com>
Date: Sat, 7 Sep 2024 03:36:21 +0900
Subject: [PATCH] feat(YouTube Music): rename `Enable Cairo splash animation`
to `Disable Cairo splash animation`
https://github.com/inotia00/ReVanced_Extended/issues/2366
---
.../music/misc/splash/CairoSplashAnimationPatch.kt | 13 ++++++-------
.../music/settings/host/values/strings.xml | 4 ++--
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/main/kotlin/app/revanced/patches/music/misc/splash/CairoSplashAnimationPatch.kt b/src/main/kotlin/app/revanced/patches/music/misc/splash/CairoSplashAnimationPatch.kt
index 4a5cec5bc2..a5df7926a4 100644
--- a/src/main/kotlin/app/revanced/patches/music/misc/splash/CairoSplashAnimationPatch.kt
+++ b/src/main/kotlin/app/revanced/patches/music/misc/splash/CairoSplashAnimationPatch.kt
@@ -2,7 +2,6 @@ package app.revanced.patches.music.misc.splash
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch
-import app.revanced.patcher.patch.PatchException
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.music.misc.splash.fingerprints.CairoSplashAnimationConfigFingerprint
@@ -12,14 +11,14 @@ import app.revanced.patches.music.utils.settings.SettingsPatch
import app.revanced.util.literalInstructionBooleanHook
@Patch(
- name = "Enable Cairo splash animation",
- description = "Adds an option to enable Cairo splash animation.",
+ name = "Disable Cairo splash animation",
+ description = "Adds an option to disable Cairo splash animation.",
dependencies = [SettingsPatch::class],
compatiblePackages = [
CompatiblePackage(
"com.google.android.apps.youtube.music",
[
- "7.08.54",
+ "7.06.54",
"7.17.51",
]
)
@@ -34,17 +33,17 @@ object CairoSplashAnimationPatch : BytecodePatch(
CairoSplashAnimationConfigFingerprint.result?.let {
CairoSplashAnimationConfigFingerprint.literalInstructionBooleanHook(
45635386,
- "$MISC_PATH/CairoSplashAnimationPatch;->enableCairoSplashAnimation()Z"
+ "$MISC_PATH/CairoSplashAnimationPatch;->disableCairoSplashAnimation(Z)Z"
)
SettingsPatch.addSwitchPreference(
CategoryType.MISC,
- "revanced_enable_cairo_splash_animation",
+ "revanced_disable_cairo_splash_animation",
"false"
)
}
- ?: throw PatchException("WARNING: This patch is not supported in this version. Use YouTube Music 7.08.54 or later.")
+ ?: println("WARNING: This patch is not supported in this version. Use YouTube Music 7.06.54 or later.")
}
}
diff --git a/src/main/resources/music/settings/host/values/strings.xml b/src/main/resources/music/settings/host/values/strings.xml
index 6145609b89..51e591a927 100644
--- a/src/main/resources/music/settings/host/values/strings.xml
+++ b/src/main/resources/music/settings/host/values/strings.xml
@@ -378,8 +378,8 @@ Some features may not work properly in the old player layout."
Replaces the domain that is blocked in some regions so that playlist thumbnails, channel avatars, etc. can be received.
Change share sheet
Change from in-app share sheet to system share sheet.
- Enable Cairo splash animation
- Enables Cairo splash animation when the app starts up.
+ Disable Cairo splash animation
+ Disables Cairo splash animation when the app starts up.
Enable debug logging
Prints the debug log.
Enable debug buffer logging