forked from inotia00/revanced-patches
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(YouTube Music/Disable Cairo splash animation): some versions are …
…recognized as unpatchable even though they can be patched
- Loading branch information
Showing
4 changed files
with
81 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 18 additions & 3 deletions
21
.../revanced/patches/music/misc/splash/fingerprints/CairoSplashAnimationConfigFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
package app.revanced.patches.music.misc.splash.fingerprints | ||
|
||
import app.revanced.util.fingerprint.LiteralValueFingerprint | ||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.MainActivityLaunchAnimation | ||
import app.revanced.patches.music.utils.settings.SettingsPatch | ||
import app.revanced.util.indexOfFirstWideLiteralInstructionValue | ||
|
||
/** | ||
* This fingerprint is compatible with YouTube Music v7.06.53+ | ||
*/ | ||
internal object CairoSplashAnimationConfigFingerprint : LiteralValueFingerprint( | ||
literalSupplier = { 45635386 } | ||
internal object CairoSplashAnimationConfigFingerprint : MethodFingerprint( | ||
returnType = "V", | ||
customFingerprint = handler@{ methodDef, _ -> | ||
if (methodDef.definingClass != "Lcom/google/android/apps/youtube/music/activities/MusicActivity;") | ||
return@handler false | ||
if (methodDef.name != "onCreate") | ||
return@handler false | ||
|
||
if (SettingsPatch.upward0720) { | ||
methodDef.indexOfFirstWideLiteralInstructionValue(MainActivityLaunchAnimation) >= 0 | ||
} else { | ||
methodDef.indexOfFirstWideLiteralInstructionValue(45635386) >= 0 | ||
} | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters