finish merge

This commit is contained in:
LisoUseInAIKyrios 2025-09-28 16:37:48 +04:00
parent 934947a257
commit 2d49d76e82
8 changed files with 89 additions and 178 deletions

View file

@ -5,9 +5,11 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.patch.bytecodePatch
import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.shared.layout.branding.baseCustomBrandingPatch
import app.revanced.patches.shared.misc.mapping.get
import app.revanced.patches.shared.misc.mapping.ResourceType
import app.revanced.patches.shared.misc.mapping.getResourceId
import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
import app.revanced.patches.shared.misc.mapping.resourceMappings
import app.revanced.util.getReference
import app.revanced.util.indexOfFirstInstructionOrThrow
import app.revanced.util.indexOfFirstInstructionReversed
@ -28,14 +30,13 @@ private val disableSplashAnimationPatch = bytecodePatch {
// but the animation is not always the same size as the launch screen and it's still
// barely shown. Instead turn off the animation entirely (app will also launch a little faster).
cairoSplashAnimationConfigFingerprint.method.apply {
val mainActivityLaunchAnimation = resourceMappings["layout", "main_activity_launch_animation"]
val literalIndex = indexOfFirstLiteralInstructionOrThrow(
mainActivityLaunchAnimation
)
val insertIndex = indexOfFirstInstructionReversed(literalIndex) {
val insertIndex = indexOfFirstInstructionReversed(
cairoSplashAnimationConfigFingerprint.instructionMatches.first().index
) {
this.opcode == Opcode.INVOKE_VIRTUAL &&
getReference<MethodReference>()?.name == "setContentView"
} + 1
val jumpIndex = indexOfFirstInstructionOrThrow(insertIndex) {
opcode == Opcode.INVOKE_VIRTUAL &&
getReference<MethodReference>()?.parameterTypes?.firstOrNull() == "Ljava/lang/Runnable;"

View file

@ -2,10 +2,15 @@ package app.revanced.patches.music.layout.branding
import app.revanced.patcher.fingerprint
import app.revanced.patches.music.shared.YOUTUBE_MUSIC_MAIN_ACTIVITY_CLASS_TYPE
import app.revanced.patches.shared.misc.mapping.ResourceType
import app.revanced.patches.shared.misc.mapping.resourceLiteral
internal val cairoSplashAnimationConfigFingerprint = fingerprint {
internal val cairoSplashAnimationConfigFingerprint by fingerprint {
returns("V")
parameters("Landroid/os/Bundle;")
instructions(
resourceLiteral(ResourceType.LAYOUT, "main_activity_launch_animation")
)
custom { method, classDef ->
method.name == "onCreate" && method.definingClass == YOUTUBE_MUSIC_MAIN_ACTIVITY_CLASS_TYPE
}

View file

@ -2,7 +2,7 @@ package app.revanced.patches.music.utils.fix.fileprovider
import app.revanced.patcher.fingerprint
internal val fileProviderResolverFingerprint = fingerprint {
internal val fileProviderResolverFingerprint by fingerprint {
returns("L")
strings(
"android.support.FILE_PROVIDER_PATHS",

View file

@ -2,7 +2,7 @@ package app.revanced.patches.viber.misc.navbar
import app.revanced.patcher.fingerprint
import app.revanced.patcher.patch.BytecodePatchContext
internal val tabIdClassFingerprint = fingerprint {
internal val tabIdClassFingerprint by fingerprint {
strings("shouldShowTabId")
}

View file

@ -48,8 +48,8 @@ val hideNavigationButtonsPatch = bytecodePatch(
.map { it.key.buildAllowInstruction() }
.joinToString("\n") + instructionsFooter
shouldShowTabIdMethodFingerprint
.method
val shouldShowTabIdMethodFingerprint by shouldShowTabIdMethodFingerprint
shouldShowTabIdMethodFingerprint.method
.addInstructionsWithLabels(0, injectionInstructions)
}
}

View file

@ -14,7 +14,7 @@ private val youtubeIconResourceFileNames_19_34 = mapOf(
@Suppress("unused")
val customBrandingPatch = baseCustomBrandingPatch(
defaultAppName = APP_NAME,
appNameValues = arrayOf(
appNameValues = mapOf(
"YouTube ReVanced" to APP_NAME,
"YT ReVanced" to "YT ReVanced",
"YT" to "YT",

View file

@ -50,7 +50,7 @@ internal val layoutVideoFingerprint by fingerprint {
literal { layoutVideo }
}
internal val showEndscreenCardsFingerprint = fingerprint {
internal val showEndscreenCardsFingerprint by fingerprint {
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
returns("V")
parameters("L")