mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 13:17:46 +02:00
cleanup
This commit is contained in:
@ -4,6 +4,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object SwipeControlsHostActivityFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.definingClass == "Lapp/revanced/integrations/swipecontrols/SwipeControlsHostActivity;" && methodDef.name == "<init>"
|
||||
methodDef.definingClass == "Lapp/revanced/integrations/swipecontrols/SwipeControlsHostActivity;"
|
||||
&& methodDef.name == "<init>"
|
||||
}
|
||||
)
|
||||
|
@ -4,6 +4,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object WatchWhileActivityFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.definingClass.endsWith("WatchWhileActivity;") && methodDef.name == "<init>"
|
||||
methodDef.definingClass.endsWith("WatchWhileActivity;")
|
||||
&& methodDef.name == "<init>"
|
||||
}
|
||||
)
|
||||
|
@ -9,11 +9,11 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.util.TypeUtil.traverseClassHierarchy
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
|
||||
import app.revanced.patches.youtube.misc.hdrbrightness.bytecode.patch.HDRBrightnessBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
||||
import app.revanced.patches.youtube.swipe.swipecontrols.bytecode.fingerprints.SwipeControlsHostActivityFingerprint
|
||||
import app.revanced.patches.youtube.swipe.swipecontrols.bytecode.fingerprints.WatchWhileActivityFingerprint
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.extensions.toErrorResult
|
||||
import app.revanced.shared.extensions.transformMethods
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.immutable.ImmutableMethod
|
||||
@ -23,7 +23,6 @@ import org.jf.dexlib2.immutable.ImmutableMethod
|
||||
@Version("0.0.3")
|
||||
@DependsOn(
|
||||
[
|
||||
HDRBrightnessBytecodePatch::class,
|
||||
PlayerTypeHookPatch::class
|
||||
]
|
||||
)
|
||||
@ -34,8 +33,8 @@ class SwipeControlsBytecodePatch : BytecodePatch(
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val wrapperClass = SwipeControlsHostActivityFingerprint.result!!.mutableClass
|
||||
val targetClass = WatchWhileActivityFingerprint.result!!.mutableClass
|
||||
val wrapperClass = SwipeControlsHostActivityFingerprint.result?.mutableClass ?: return SwipeControlsHostActivityFingerprint.toErrorResult()
|
||||
val targetClass = WatchWhileActivityFingerprint.result?.mutableClass ?: return WatchWhileActivityFingerprint.toErrorResult()
|
||||
|
||||
// inject the wrapper class from integrations into the class hierarchy of WatchWhileActivity
|
||||
wrapperClass.setSuperClass(targetClass.superclass)
|
||||
|
@ -10,6 +10,7 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patches.youtube.swipe.swipecontrols.bytecode.patch.SwipeControlsBytecodePatch
|
||||
import app.revanced.patches.youtube.swipe.swipebrightnessinhdr.bytecode.patch.SwipeGestureBrightnessInHDRPatch
|
||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
||||
import app.revanced.shared.util.resources.ResourceHelper
|
||||
@ -22,7 +23,8 @@ import app.revanced.shared.util.resources.ResourceUtils.copyResources
|
||||
@DependsOn(
|
||||
[
|
||||
SettingsPatch::class,
|
||||
SwipeControlsBytecodePatch::class
|
||||
SwipeControlsBytecodePatch::class,
|
||||
SwipeGestureBrightnessInHDRPatch::class
|
||||
]
|
||||
)
|
||||
@YouTubeCompatibility
|
||||
|
Reference in New Issue
Block a user