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