mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 01:51:27 +01:00
fix splash screen changes not working and remove obsolete debugging code (issue was caused by bad merge of main branch)
This commit is contained in:
@@ -102,16 +102,6 @@ public final class SeekbarColorPatch {
|
||||
return customSeekbarColor;
|
||||
}
|
||||
|
||||
/**
|
||||
* injection point.
|
||||
*/
|
||||
public static boolean useLotteLaunchSplashScreen(boolean original) {
|
||||
// This method is only used for development purposes to force the old style launch screen.
|
||||
// Forcing this off on some devices can cause unexplained startup crashes,
|
||||
// where the lottie animation is still used even though this condition appears to bypass it.
|
||||
return original; // false = drawable style, true = lottie style.
|
||||
}
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
* Modern Lottie style animation.
|
||||
|
||||
@@ -106,25 +106,6 @@ internal val playerLinearGradientLegacyFingerprint = fingerprint {
|
||||
)
|
||||
}
|
||||
|
||||
internal const val launchScreenLayoutTypeLotteFeatureLegacyFlag = 268507948L
|
||||
internal const val launchScreenLayoutTypeLotteFeatureFlag = 1073814316L
|
||||
|
||||
internal val launchScreenLayoutTypeFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||
instructions(
|
||||
anyInstruction(
|
||||
literal(launchScreenLayoutTypeLotteFeatureLegacyFlag),
|
||||
literal(launchScreenLayoutTypeLotteFeatureFlag)
|
||||
)
|
||||
)
|
||||
custom { method, _ ->
|
||||
val firstParameter = method.parameterTypes.firstOrNull()
|
||||
// 19.25 - 19.45
|
||||
firstParameter == YOUTUBE_MAIN_ACTIVITY_CLASS_TYPE
|
||||
|| firstParameter == "Landroid/app/Activity;" // 19.46+
|
||||
}
|
||||
}
|
||||
|
||||
internal const val LOTTIE_ANIMATION_VIEW_CLASS_TYPE = "Lcom/airbnb/lottie/LottieAnimationView;"
|
||||
|
||||
internal val lottieAnimationViewSetAnimationIntFingerprint = fingerprint {
|
||||
|
||||
@@ -154,21 +154,6 @@ val seekbarColorPatch = bytecodePatch(
|
||||
return@execute // 19.25 does not have a cairo launch animation.
|
||||
}
|
||||
|
||||
// Add development hook to force old drawable splash animation.
|
||||
arrayOf(
|
||||
launchScreenLayoutTypeFingerprint,
|
||||
mainActivityOnCreateFingerprint
|
||||
).forEach { fingerprint ->
|
||||
fingerprint.method.insertLiteralOverride(
|
||||
if (is_20_30_or_greater) {
|
||||
launchScreenLayoutTypeLotteFeatureFlag
|
||||
} else {
|
||||
launchScreenLayoutTypeLotteFeatureLegacyFlag
|
||||
},
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->useLotteLaunchSplashScreen(Z)Z"
|
||||
)
|
||||
}
|
||||
|
||||
// Hook the splash animation to set the a seekbar color.
|
||||
mainActivityOnCreateFingerprint.method.apply {
|
||||
val setAnimationIntMethodName =
|
||||
|
||||
Reference in New Issue
Block a user