chore(YouTube): replace with a fingerprint that supports a wider range of versions

This commit is contained in:
inotia00
2024-09-19 20:21:09 +09:00
parent d776786867
commit 0f0a48b1d4
4 changed files with 12 additions and 4 deletions

View File

@ -33,6 +33,9 @@ import com.android.tools.smali.dexlib2.util.MethodUtil
const val REGISTER_TEMPLATE_REPLACEMENT: String = "REGISTER_INDEX"
fun MethodFingerprint.deprecatedOrResultOrThrow() =
if (javaClass.annotations[0].toString().contains("Deprecated")) result else resultOrThrow()
fun MethodFingerprint.resultOrThrow() = result ?: throw exception
/**