mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-08 10:34:33 +02:00
cleanup
This commit is contained in:
parent
eb8126ff42
commit
ea1c99b3ee
@ -56,8 +56,10 @@ class ReplaceCastButtonPatch : BytecodePatch(
|
||||
val freeRegister = getInstruction<OneRegisterInstruction>(freeIndex).registerA
|
||||
|
||||
val getActivityIndex = freeIndex - 4
|
||||
val getActivityRegister = getInstruction<TwoRegisterInstruction>(getActivityIndex).registerB
|
||||
val getActivityReference = getInstruction<ReferenceInstruction>(getActivityIndex).reference
|
||||
val getActivityRegister =
|
||||
getInstruction<TwoRegisterInstruction>(getActivityIndex).registerB
|
||||
val getActivityReference =
|
||||
getInstruction<ReferenceInstruction>(getActivityIndex).reference
|
||||
|
||||
for (index in freeIndex + 20 downTo freeIndex) {
|
||||
if (getInstruction(index).opcode != Opcode.INVOKE_VIRTUAL)
|
||||
|
@ -26,7 +26,8 @@ class VideoTypeHookPatch : BytecodePatch(
|
||||
}.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val videoTypeIndex = it.scanResult.patternScanResult!!.endIndex
|
||||
val videoTypeRegister = getInstruction<OneRegisterInstruction>(videoTypeIndex).registerA
|
||||
val videoTypeRegister =
|
||||
getInstruction<OneRegisterInstruction>(videoTypeIndex).registerA
|
||||
|
||||
addInstructions(
|
||||
videoTypeIndex + 1, """
|
||||
|
@ -9,8 +9,8 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.utils.fingerprints.QualityMenuViewInflateFingerprint
|
||||
import app.revanced.patches.youtube.utils.annotations.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.utils.fingerprints.QualityMenuViewInflateFingerprint
|
||||
import app.revanced.patches.youtube.utils.fingerprints.RecyclerViewTreeObserverFingerprint
|
||||
import app.revanced.patches.youtube.utils.litho.patch.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.utils.resourceid.patch.SharedResourceIdPatch
|
||||
|
@ -10,10 +10,10 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.utils.fingerprints.QualityMenuViewInflateFingerprint
|
||||
import app.revanced.patches.youtube.flyoutpanel.player.fingerprints.AdvancedQualityBottomSheetFingerprint
|
||||
import app.revanced.patches.youtube.flyoutpanel.player.fingerprints.CaptionsBottomSheetFingerprint
|
||||
import app.revanced.patches.youtube.utils.annotations.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.utils.fingerprints.QualityMenuViewInflateFingerprint
|
||||
import app.revanced.patches.youtube.utils.litho.patch.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.youtube.utils.resourceid.patch.SharedResourceIdPatch.Companion.BottomSheetFooterText
|
||||
@ -67,12 +67,14 @@ class PlayerFlyoutPanelPatch : BytecodePatch(
|
||||
SettingsPatch.updatePatchStatus("hide-player-flyout-panel")
|
||||
|
||||
}
|
||||
|
||||
private companion object {
|
||||
fun MethodFingerprint.injectCall(descriptor: String) {
|
||||
result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val insertIndex = getWideLiteralIndex(BottomSheetFooterText) + 3
|
||||
val insertRegister = getInstruction<OneRegisterInstruction>(insertIndex).registerA
|
||||
val insertRegister =
|
||||
getInstruction<OneRegisterInstruction>(insertIndex).registerA
|
||||
|
||||
addInstruction(
|
||||
insertIndex,
|
||||
|
Loading…
x
Reference in New Issue
Block a user