fix: Revert previous release
The previous release depends on a version of ReVanced Patcher which prevents usage of resource patches on lower Android versions. To solve this issue temporarily, until a fix is present, the previous release is reverted.
This commit is contained in:
+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", "18.29.38", "18.32.39"))])
|
||||
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
|
||||
@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 com.android.tools.smali.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
|
||||
object SwipeControlsHostActivityFingerprint : MethodFingerprint(
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||
|
||||
+7
-4
@@ -1,13 +1,15 @@
|
||||
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
|
||||
@@ -15,8 +17,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 com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.immutable.ImmutableMethod
|
||||
|
||||
@Patch
|
||||
@Name("Swipe controls")
|
||||
@@ -35,7 +37,7 @@ class SwipeControlsBytecodePatch : BytecodePatch(
|
||||
SwipeControlsHostActivityFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val wrapperClass = SwipeControlsHostActivityFingerprint.result!!.mutableClass
|
||||
val targetClass = WatchWhileActivityFingerprint.result!!.mutableClass
|
||||
|
||||
@@ -59,5 +61,6 @@ class SwipeControlsBytecodePatch : BytecodePatch(
|
||||
).toMutable()
|
||||
}
|
||||
}
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
+4
-1
@@ -1,6 +1,8 @@
|
||||
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.*
|
||||
@@ -10,7 +12,7 @@ import app.revanced.util.resources.ResourceUtils.copyResources
|
||||
|
||||
@DependsOn([SettingsPatch::class])
|
||||
class SwipeControlsResourcePatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext) {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
|
||||
PreferenceScreen(
|
||||
"revanced_swipe_controls_preference_screen",
|
||||
@@ -100,5 +102,6 @@ class SwipeControlsResourcePatch : ResourcePatch {
|
||||
"ic_sc_volume_normal.xml"
|
||||
)
|
||||
)
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user