mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-14 13:27:17 +02:00
clean up
This commit is contained in:
parent
f5e3e94c21
commit
3e8b68438f
@ -9,16 +9,6 @@ object WatchWhileActivityWithOutFlagsFingerprint : MethodFingerprint(
|
|||||||
returnType = "V",
|
returnType = "V",
|
||||||
parameters = listOf("Landroid/os/Bundle;"),
|
parameters = listOf("Landroid/os/Bundle;"),
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT,
|
|
||||||
Opcode.CONST_4,
|
|
||||||
Opcode.CONST_4,
|
|
||||||
Opcode.IF_NE, // target
|
|
||||||
Opcode.IGET_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT,
|
|
||||||
Opcode.INVOKE_STATIC,
|
|
||||||
Opcode.MOVE_RESULT,
|
|
||||||
Opcode.IF_EQZ, // target
|
Opcode.IF_EQZ, // target
|
||||||
Opcode.IGET_OBJECT,
|
Opcode.IGET_OBJECT,
|
||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
@ -63,18 +63,31 @@ class NewSplashAnimationPatch : BytecodePatch(
|
|||||||
*/
|
*/
|
||||||
WatchWhileActivityWithOutFlagsFingerprint.result?.let {
|
WatchWhileActivityWithOutFlagsFingerprint.result?.let {
|
||||||
it.mutableMethod.apply {
|
it.mutableMethod.apply {
|
||||||
for (index in getWideLiteralIndex(DarkSplashAnimation) - 1 downTo 0) {
|
var startIndex = getWideLiteralIndex(DarkSplashAnimation) - 1
|
||||||
|
val endIndex = startIndex - 30
|
||||||
|
|
||||||
|
for (index in startIndex downTo endIndex) {
|
||||||
if (getInstruction(index).opcode != Opcode.IF_EQZ)
|
if (getInstruction(index).opcode != Opcode.IF_EQZ)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
startIndex = index - 8
|
||||||
|
|
||||||
arrayOf(
|
arrayOf(
|
||||||
index,
|
index,
|
||||||
index - 8,
|
index - 8
|
||||||
index - 14
|
|
||||||
).forEach { insertIndex -> inject(insertIndex) }
|
).forEach { insertIndex -> inject(insertIndex) }
|
||||||
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (index in startIndex downTo endIndex) {
|
||||||
|
if (getInstruction(index).opcode != Opcode.IF_NE)
|
||||||
|
continue
|
||||||
|
|
||||||
|
inject(index)
|
||||||
|
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,8 @@ class HideFilmstripOverlayPatch : BytecodePatch(
|
|||||||
if (SettingsPatch.upward1828) {
|
if (SettingsPatch.upward1828) {
|
||||||
val insertIndex = it.scanResult.patternScanResult!!.startIndex + 2
|
val insertIndex = it.scanResult.patternScanResult!!.startIndex + 2
|
||||||
val replaceInstruction = getInstruction<TwoRegisterInstruction>(insertIndex)
|
val replaceInstruction = getInstruction<TwoRegisterInstruction>(insertIndex)
|
||||||
val replaceReference = getInstruction<ReferenceInstruction>(insertIndex).reference
|
val replaceReference =
|
||||||
|
getInstruction<ReferenceInstruction>(insertIndex).reference
|
||||||
|
|
||||||
addComponentUpward1828(insertIndex, initialIndex)
|
addComponentUpward1828(insertIndex, initialIndex)
|
||||||
|
|
||||||
@ -89,7 +90,8 @@ class HideFilmstripOverlayPatch : BytecodePatch(
|
|||||||
removeInstruction(insertIndex)
|
removeInstruction(insertIndex)
|
||||||
} else {
|
} else {
|
||||||
val insertIndex = getIndex("bringChildToFront") + 1
|
val insertIndex = getIndex("bringChildToFront") + 1
|
||||||
val insertRegister = getInstruction<TwoRegisterInstruction>(insertIndex).registerA
|
val insertRegister =
|
||||||
|
getInstruction<TwoRegisterInstruction>(insertIndex).registerA
|
||||||
|
|
||||||
addComponentBelow1828(insertIndex, initialIndex)
|
addComponentBelow1828(insertIndex, initialIndex)
|
||||||
|
|
||||||
@ -175,6 +177,7 @@ class HideFilmstripOverlayPatch : BytecodePatch(
|
|||||||
const v$register, $value
|
const v$register, $value
|
||||||
|
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
|
|
||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package app.revanced.patches.youtube.player.suggestactions.patch
|
package app.revanced.patches.youtube.player.suggestactions.patch
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.extensions.injectHideCall
|
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
@ -9,8 +9,8 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
|||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.youtube.utils.fingerprints.ThumbnailPreviewConfigFingerprint
|
|
||||||
import app.revanced.patches.youtube.utils.annotations.YouTubeCompatibility
|
import app.revanced.patches.youtube.utils.annotations.YouTubeCompatibility
|
||||||
|
import app.revanced.patches.youtube.utils.fingerprints.ThumbnailPreviewConfigFingerprint
|
||||||
import app.revanced.patches.youtube.utils.settings.resource.patch.SettingsPatch
|
import app.revanced.patches.youtube.utils.settings.resource.patch.SettingsPatch
|
||||||
import app.revanced.util.integrations.Constants.SEEKBAR
|
import app.revanced.util.integrations.Constants.SEEKBAR
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
@ -9,7 +9,11 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchException
|
import app.revanced.patcher.patch.PatchException
|
||||||
import app.revanced.patches.youtube.utils.fingerprints.OnBackPressedFingerprint
|
import app.revanced.patches.youtube.utils.fingerprints.OnBackPressedFingerprint
|
||||||
import app.revanced.patches.youtube.utils.navbarindex.fingerprints.*
|
import app.revanced.patches.youtube.utils.navbarindex.fingerprints.MobileTopBarButtonOnClickFingerprint
|
||||||
|
import app.revanced.patches.youtube.utils.navbarindex.fingerprints.NavButtonOnClickFingerprint
|
||||||
|
import app.revanced.patches.youtube.utils.navbarindex.fingerprints.NavButtonOnClickLegacyFingerprint
|
||||||
|
import app.revanced.patches.youtube.utils.navbarindex.fingerprints.OnResumeFragmentsFingerprints
|
||||||
|
import app.revanced.patches.youtube.utils.navbarindex.fingerprints.SettingsActivityOnBackPressedFingerprint
|
||||||
import app.revanced.util.integrations.Constants.UTILS_PATH
|
import app.revanced.util.integrations.Constants.UTILS_PATH
|
||||||
import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction35c
|
import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction35c
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
Loading…
x
Reference in New Issue
Block a user