fix build error

This commit is contained in:
inotia00 2025-03-24 22:05:49 +09:00
parent 0c5c3a87be
commit 227afa532a
4 changed files with 6 additions and 12 deletions

View File

@ -10,6 +10,7 @@ import app.revanced.patches.youtube.utils.playservice.is_19_17_or_greater
import app.revanced.patches.youtube.utils.playservice.is_19_32_or_greater
import app.revanced.patches.youtube.utils.playservice.is_19_34_or_greater
import app.revanced.patches.youtube.utils.playservice.versionCheckPatch
import app.revanced.patches.youtube.utils.settings.ResourceUtils.restoreOldSplashAnimationIncluded
import app.revanced.patches.youtube.utils.settings.ResourceUtils.updatePatchStatusIcon
import app.revanced.patches.youtube.utils.settings.getBytecodeContext
import app.revanced.patches.youtube.utils.settings.settingsPatch
@ -208,6 +209,8 @@ val customBrandingIconPatch = resourcePatch(
// Change splash screen.
if (restoreOldSplashAnimationOption == true) {
restoreOldSplashAnimationIncluded = true
oldSplashAnimationResourceGroups.let { resourceGroups ->
resourceGroups.forEach {
copyResources("$appIconResourcePath/splash", it)

View File

@ -11,14 +11,12 @@ import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.shared.drawable.addDrawableColorHook
import app.revanced.patches.shared.drawable.drawableColorHookPatch
import app.revanced.patches.shared.mainactivity.onCreateMethod
import app.revanced.patches.youtube.layout.branding.icon.customBrandingIconPatch
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
import app.revanced.patches.youtube.utils.extension.Constants.PATCH_STATUS_CLASS_DESCRIPTOR
import app.revanced.patches.youtube.utils.extension.Constants.PLAYER_CLASS_DESCRIPTOR
import app.revanced.patches.youtube.utils.extension.Constants.PLAYER_PATH
import app.revanced.patches.youtube.utils.flyoutmenu.flyoutMenuHookPatch
import app.revanced.patches.youtube.utils.mainactivity.mainActivityResolvePatch
import app.revanced.patches.youtube.utils.patch.PatchList.CUSTOM_BRANDING_ICON_FOR_YOUTUBE
import app.revanced.patches.youtube.utils.patch.PatchList.SEEKBAR_COMPONENTS
import app.revanced.patches.youtube.utils.playerButtonsResourcesFingerprint
import app.revanced.patches.youtube.utils.playerButtonsVisibilityFingerprint
@ -37,6 +35,7 @@ import app.revanced.patches.youtube.utils.seekbarFingerprint
import app.revanced.patches.youtube.utils.seekbarOnDrawFingerprint
import app.revanced.patches.youtube.utils.settings.ResourceUtils.addPreference
import app.revanced.patches.youtube.utils.settings.ResourceUtils.getContext
import app.revanced.patches.youtube.utils.settings.ResourceUtils.restoreOldSplashAnimationIncluded
import app.revanced.patches.youtube.utils.settings.settingsPatch
import app.revanced.patches.youtube.utils.totalTimeFingerprint
import app.revanced.patches.youtube.video.information.videoInformationPatch
@ -48,7 +47,6 @@ import app.revanced.util.fingerprint.injectLiteralInstructionBooleanCall
import app.revanced.util.fingerprint.matchOrThrow
import app.revanced.util.fingerprint.methodOrThrow
import app.revanced.util.fingerprint.resolvable
import app.revanced.util.getBooleanOptionValue
import app.revanced.util.getReference
import app.revanced.util.getWalkerMethod
import app.revanced.util.indexOfFirstInstructionOrThrow
@ -122,9 +120,6 @@ val seekbarComponentsPatch = bytecodePatch(
execute {
val restoreOldSplashAnimationIncluded = CUSTOM_BRANDING_ICON_FOR_YOUTUBE.included == true &&
customBrandingIconPatch.getBooleanOptionValue("restoreOldSplashAnimation").value == true
var settingArray = arrayOf(
"PREFERENCE_SCREEN: PLAYER",
"SETTINGS: SEEKBAR_COMPONENTS"

View File

@ -1,11 +1,9 @@
package app.revanced.patches.youtube.utils.fix.splash
import app.revanced.patcher.patch.resourcePatch
import app.revanced.patches.youtube.layout.branding.icon.customBrandingIconPatch
import app.revanced.patches.youtube.utils.patch.PatchList.CUSTOM_BRANDING_ICON_FOR_YOUTUBE
import app.revanced.patches.youtube.utils.playservice.is_19_32_or_greater
import app.revanced.patches.youtube.utils.playservice.versionCheckPatch
import app.revanced.util.getBooleanOptionValue
import app.revanced.patches.youtube.utils.settings.ResourceUtils.restoreOldSplashAnimationIncluded
import org.w3c.dom.Element
/**
@ -27,9 +25,6 @@ val darkModeSplashScreenPatch = resourcePatch(
return@finalize
}
val restoreOldSplashAnimationIncluded = CUSTOM_BRANDING_ICON_FOR_YOUTUBE.included == true &&
customBrandingIconPatch.getBooleanOptionValue("restoreOldSplashAnimation").value == true
if (restoreOldSplashAnimationIncluded) {
document("res/values-night/styles.xml").use { document ->
val resourcesNode = document.getElementsByTagName("resources").item(0) as Element

View File

@ -25,6 +25,7 @@ internal object ResourceUtils {
const val RVX_PREFERENCE_PATH = "res/xml/revanced_prefs.xml"
const val YOUTUBE_SETTINGS_PATH = "res/xml/settings_fragment.xml"
var restoreOldSplashAnimationIncluded = false
var youtubeMusicPackageName = YOUTUBE_MUSIC_PACKAGE_NAME
var youtubePackageName = YOUTUBE_PACKAGE_NAME