+1
-1
@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.interaction.copyvideourl.annotation
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class CopyVideoUrlCompatibility
|
||||
+1
-5
@@ -4,8 +4,6 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.interaction.copyvideourl.annotation.CopyVideoUrlCompatibility
|
||||
@@ -31,14 +29,12 @@ class CopyVideoUrlBytecodePatch : BytecodePatch() {
|
||||
)
|
||||
}
|
||||
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
// Initialize buttons and inject visibility control
|
||||
BUTTONS_DESCRIPTORS.forEach { descriptor ->
|
||||
PlayerControlsBytecodePatch.initializeControl("$descriptor->initializeButton(Landroid/view/View;)V")
|
||||
PlayerControlsBytecodePatch.injectVisibilityCheckCall("$descriptor->changeVisibility(Z)V")
|
||||
}
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
+1
-5
@@ -1,8 +1,6 @@
|
||||
package app.revanced.patches.youtube.interaction.copyvideourl.resource.patch
|
||||
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.shared.settings.preference.impl.PreferenceScreen
|
||||
@@ -16,7 +14,7 @@ import app.revanced.util.resources.ResourceUtils.mergeStrings
|
||||
|
||||
@DependsOn([BottomControlsResourcePatch::class, SettingsPatch::class])
|
||||
class CopyVideoUrlResourcePatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
override fun execute(context: ResourceContext) {
|
||||
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
|
||||
PreferenceScreen(
|
||||
"revanced_copy_video_url_preference_screen",
|
||||
@@ -49,7 +47,5 @@ class CopyVideoUrlResourcePatch : ResourcePatch {
|
||||
context.mergeStrings("copyvideourl/host/values/strings.xml")
|
||||
|
||||
BottomControlsResourcePatch.addControls("copyvideourl/host/layout/${BottomControlsResourcePatch.TARGET_RESOURCE_NAME}")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -3,7 +3,7 @@ package app.revanced.patches.youtube.interaction.downloads.annotation
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class ExternalDownloadsCompatibility
|
||||
|
||||
|
||||
+1
-5
@@ -4,8 +4,6 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.interaction.downloads.annotation.ExternalDownloadsCompatibility
|
||||
@@ -23,7 +21,7 @@ class ExternalDownloadsBytecodePatch : BytecodePatch() {
|
||||
const val BUTTON_DESCRIPTOR = "Lapp/revanced/integrations/videoplayer/ExternalDownloadButton;"
|
||||
}
|
||||
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
/*
|
||||
initialize the control
|
||||
*/
|
||||
@@ -37,7 +35,5 @@ class ExternalDownloadsBytecodePatch : BytecodePatch() {
|
||||
|
||||
PlayerControlsBytecodePatch.injectVisibilityCheckCall(
|
||||
"$BUTTON_DESCRIPTOR->changeVisibility(Z)V")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
+3
-7
@@ -1,8 +1,6 @@
|
||||
package app.revanced.patches.youtube.interaction.downloads.resource.patch
|
||||
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.shared.settings.preference.impl.*
|
||||
@@ -15,7 +13,7 @@ import app.revanced.util.resources.ResourceUtils.mergeStrings
|
||||
@DependsOn([BottomControlsResourcePatch::class, SettingsPatch::class])
|
||||
class ExternalDownloadsResourcePatch : ResourcePatch {
|
||||
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
override fun execute(context: ResourceContext) {
|
||||
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
|
||||
PreferenceScreen(
|
||||
"revanced_external_downloader_preference_screen",
|
||||
@@ -30,7 +28,7 @@ class ExternalDownloadsResourcePatch : ResourcePatch {
|
||||
TextPreference(
|
||||
"revanced_external_downloader_name",
|
||||
StringResource("revanced_external_downloader_name_title", "Downloader package name"),
|
||||
StringResource("revanced_external_downloader_name_summary", "Package name of your installed external downloader app, such as NewPipe or PowerTube"),
|
||||
StringResource("revanced_external_downloader_name_summary", "Package name of your installed external downloader app, such as NewPipe or Seal"),
|
||||
InputType.TEXT
|
||||
)
|
||||
),
|
||||
@@ -47,7 +45,5 @@ class ExternalDownloadsResourcePatch : ResourcePatch {
|
||||
|
||||
// Add download button node
|
||||
BottomControlsResourcePatch.addControls("downloads/host/layout/${BottomControlsResourcePatch.TARGET_RESOURCE_NAME}")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package app.revanced.patches.youtube.interaction.seekbar.annotation
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class SeekbarTappingCompatibility
|
||||
|
||||
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
package app.revanced.patches.youtube.interaction.seekbar.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patches.youtube.interaction.seekbar.patch.EnableSeekbarTappingResourcePatch
|
||||
import app.revanced.util.patch.LiteralValueFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
|
||||
object AccessibilityPlayerProgressTimeFingerprint : LiteralValueFingerprint(
|
||||
returnType = "L",
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
literal = EnableSeekbarTappingResourcePatch.accessibilityPlayerProgressTime
|
||||
)
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package app.revanced.patches.youtube.interaction.seekbar.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
@FuzzyPatternScanMethod(3)
|
||||
object OnTouchEventHandlerFingerprint : MethodFingerprint(
|
||||
returnType = "Z",
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.PUBLIC,
|
||||
parameters = listOf("L"),
|
||||
opcodes = listOf(
|
||||
Opcode.INVOKE_VIRTUAL, // oMethodReference
|
||||
Opcode.RETURN,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.IGET_BOOLEAN,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.RETURN,
|
||||
Opcode.INT_TO_FLOAT,
|
||||
Opcode.INT_TO_FLOAT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_NEZ,
|
||||
Opcode.RETURN,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.INVOKE_VIRTUAL, // pMethodReference
|
||||
),
|
||||
customFingerprint = { methodDef, _ -> methodDef.name == "onTouchEvent" }
|
||||
)
|
||||
+3
-3
@@ -2,9 +2,9 @@ package app.revanced.patches.youtube.interaction.seekbar.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.NarrowLiteralInstruction
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.NarrowLiteralInstruction
|
||||
|
||||
|
||||
object SeekbarTappingFingerprint : MethodFingerprint(
|
||||
|
||||
+24
-40
@@ -1,25 +1,25 @@
|
||||
package app.revanced.patches.youtube.interaction.seekbar.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.youtube.interaction.seekbar.annotation.SeekbarTappingCompatibility
|
||||
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.AccessibilityPlayerProgressTimeFingerprint
|
||||
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.OnTouchEventHandlerFingerprint
|
||||
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.SeekbarTappingFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.Method
|
||||
import org.jf.dexlib2.iface.instruction.NarrowLiteralInstruction
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction35c
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.Method
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.NarrowLiteralInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, EnableSeekbarTappingResourcePatch::class])
|
||||
@@ -27,37 +27,23 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction35c
|
||||
@Description("Enables tap-to-seek on the seekbar of the video player.")
|
||||
@SeekbarTappingCompatibility
|
||||
class EnableSeekbarTappingPatch : BytecodePatch(
|
||||
listOf(AccessibilityPlayerProgressTimeFingerprint, SeekbarTappingFingerprint)
|
||||
listOf(OnTouchEventHandlerFingerprint, SeekbarTappingFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
// Find the required methods to tap the seekbar.
|
||||
val seekbarTappingMethods =
|
||||
AccessibilityPlayerProgressTimeFingerprint.result?.classDef?.methods?.let { methods ->
|
||||
buildMap {
|
||||
// find the methods which tap the seekbar
|
||||
methods.forEach { method ->
|
||||
if (method.implementation == null) return@forEach
|
||||
val seekbarTappingMethods = OnTouchEventHandlerFingerprint.result?.let {
|
||||
val patternScanResult = it.scanResult.patternScanResult!!
|
||||
|
||||
val instructions = method.implementation!!.instructions
|
||||
fun getReference(index: Int) = it.mutableMethod.getInstruction<ReferenceInstruction>(index)
|
||||
.reference as MethodReference
|
||||
|
||||
// The method has more than 7 instructions.
|
||||
if (instructions.count() < 7) return@forEach
|
||||
|
||||
// The 7th instruction has the opcode CONST_4.
|
||||
val instruction = instructions.elementAt(6)
|
||||
if (instruction.opcode != Opcode.CONST_4) return@forEach
|
||||
|
||||
// the literal for this instruction has to be either 1 or 2.
|
||||
val literal = (instruction as NarrowLiteralInstruction).narrowLiteral
|
||||
|
||||
// Based on the literal, determine which method is which.
|
||||
if (literal == 1) this["P"] = method
|
||||
if (literal == 2) this["O"] = method
|
||||
}
|
||||
}
|
||||
buildMap {
|
||||
put("O", getReference(patternScanResult.endIndex))
|
||||
put("N", getReference(patternScanResult.startIndex))
|
||||
}
|
||||
}
|
||||
|
||||
seekbarTappingMethods ?: return AccessibilityPlayerProgressTimeFingerprint.toErrorResult()
|
||||
seekbarTappingMethods ?: throw OnTouchEventHandlerFingerprint.exception
|
||||
|
||||
SeekbarTappingFingerprint.result?.let {
|
||||
val insertIndex = it.scanResult.patternScanResult!!.endIndex - 1
|
||||
@@ -68,11 +54,11 @@ class EnableSeekbarTappingPatch : BytecodePatch(
|
||||
val freeRegister = 0
|
||||
val xAxisRegister = 2
|
||||
|
||||
val pMethod = seekbarTappingMethods["P"]!!
|
||||
val oMethod = seekbarTappingMethods["O"]!!
|
||||
val nMethod = seekbarTappingMethods["N"]!!
|
||||
|
||||
fun Method.toInvokeInstructionString() =
|
||||
"invoke-virtual { v$thisInstanceRegister, v$xAxisRegister }, $definingClass->$name(I)V"
|
||||
fun MethodReference.toInvokeInstructionString() =
|
||||
"invoke-virtual { v$thisInstanceRegister, v$xAxisRegister }, $this"
|
||||
|
||||
addInstructionsWithLabels(
|
||||
insertIndex,
|
||||
@@ -81,13 +67,11 @@ class EnableSeekbarTappingPatch : BytecodePatch(
|
||||
move-result v$freeRegister
|
||||
if-eqz v$freeRegister, :disabled
|
||||
${oMethod.toInvokeInstructionString()}
|
||||
${pMethod.toInvokeInstructionString()}
|
||||
${nMethod.toInvokeInstructionString()}
|
||||
""",
|
||||
ExternalLabel("disabled", getInstruction(insertIndex))
|
||||
)
|
||||
}
|
||||
} ?: return SeekbarTappingFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
} ?: throw SeekbarTappingFingerprint.exception
|
||||
}
|
||||
}
|
||||
+2
-16
@@ -1,19 +1,15 @@
|
||||
package app.revanced.patches.youtube.interaction.seekbar.patch
|
||||
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
|
||||
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
|
||||
@DependsOn([SettingsPatch::class])
|
||||
class EnableSeekbarTappingResourcePatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
override fun execute(context: ResourceContext) {
|
||||
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_seekbar_tapping",
|
||||
@@ -22,15 +18,5 @@ class EnableSeekbarTappingResourcePatch : ResourcePatch {
|
||||
StringResource("revanced_seekbar_tapping_summary_off", "Seekbar tapping is disabled")
|
||||
)
|
||||
)
|
||||
|
||||
accessibilityPlayerProgressTime = ResourceMappingPatch.resourceMappings.find {
|
||||
it.name == "accessibility_player_progress_time"
|
||||
}?.id ?: return PatchResultError("Failed to find required resource")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
internal companion object {
|
||||
var accessibilityPlayerProgressTime = -1L
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.interaction.swipecontrols.annotation
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class SwipeControlsCompatibility
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package app.revanced.patches.youtube.interaction.swipecontrols.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
object SwipeControlsHostActivityFingerprint : MethodFingerprint(
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||
|
||||
+4
-7
@@ -1,15 +1,13 @@
|
||||
package app.revanced.patches.youtube.interaction.swipecontrols.patch.bytecode
|
||||
|
||||
import app.revanced.extensions.transformMethods
|
||||
import app.revanced.extensions.traverseClassHierarchy
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.TypeUtil.traverseClassHierarchy
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
|
||||
import app.revanced.patches.shared.fingerprints.WatchWhileActivityFingerprint
|
||||
import app.revanced.patches.youtube.interaction.swipecontrols.annotation.SwipeControlsCompatibility
|
||||
@@ -17,8 +15,8 @@ import app.revanced.patches.youtube.interaction.swipecontrols.fingerprints.Swipe
|
||||
import app.revanced.patches.youtube.interaction.swipecontrols.patch.resource.SwipeControlsResourcePatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.immutable.ImmutableMethod
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
|
||||
|
||||
@Patch
|
||||
@Name("Swipe controls")
|
||||
@@ -37,7 +35,7 @@ class SwipeControlsBytecodePatch : BytecodePatch(
|
||||
SwipeControlsHostActivityFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
val wrapperClass = SwipeControlsHostActivityFingerprint.result!!.mutableClass
|
||||
val targetClass = WatchWhileActivityFingerprint.result!!.mutableClass
|
||||
|
||||
@@ -61,6 +59,5 @@ class SwipeControlsBytecodePatch : BytecodePatch(
|
||||
).toMutable()
|
||||
}
|
||||
}
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
+1
-4
@@ -1,8 +1,6 @@
|
||||
package app.revanced.patches.youtube.interaction.swipecontrols.patch.resource
|
||||
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.shared.settings.preference.impl.*
|
||||
@@ -12,7 +10,7 @@ import app.revanced.util.resources.ResourceUtils.copyResources
|
||||
|
||||
@DependsOn([SettingsPatch::class])
|
||||
class SwipeControlsResourcePatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
override fun execute(context: ResourceContext) {
|
||||
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
|
||||
PreferenceScreen(
|
||||
"revanced_swipe_controls_preference_screen",
|
||||
@@ -102,6 +100,5 @@ class SwipeControlsResourcePatch : ResourcePatch {
|
||||
"ic_sc_volume_normal.xml"
|
||||
)
|
||||
)
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user