mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-13 13:47:42 +02:00
refactor: remove unused imports and merge packages together (#136)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints.methodone
|
||||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@ -7,6 +7,7 @@ import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMetho
|
||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.reels.annotations.HideReelsCompatibility
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
@ -15,7 +16,7 @@ import org.jf.dexlib2.Opcode
|
||||
"Ljkg;", "i"
|
||||
)
|
||||
@DirectPatternScanMethod
|
||||
@HideReelsCompatibility
|
||||
@WideSearchbarCompatibility
|
||||
@Version("0.0.1")
|
||||
|
||||
/*
|
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints.methodone
|
||||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@ -7,6 +7,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||
import app.revanced.patches.youtube.layout.reels.annotations.HideReelsCompatibility
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
|
||||
@Name("wide-searchbar-methodone-parent-fingerprint")
|
||||
@ -14,7 +15,7 @@ import org.jf.dexlib2.AccessFlags
|
||||
"Ljkg;", "l"
|
||||
)
|
||||
@FuzzyPatternScanMethod(3)
|
||||
@HideReelsCompatibility
|
||||
@WideSearchbarCompatibility
|
||||
@Version("0.0.1")
|
||||
|
||||
/*
|
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints.methodtwo
|
||||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@ -7,6 +7,7 @@ import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMetho
|
||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.reels.annotations.HideReelsCompatibility
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
@ -15,7 +16,7 @@ import org.jf.dexlib2.Opcode
|
||||
"Lkrf;", "h"
|
||||
)
|
||||
@DirectPatternScanMethod
|
||||
@HideReelsCompatibility
|
||||
@WideSearchbarCompatibility
|
||||
@Version("0.0.1")
|
||||
|
||||
/*
|
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints.methodtwo
|
||||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@ -7,6 +7,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||
import app.revanced.patches.youtube.layout.reels.annotations.HideReelsCompatibility
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
|
||||
@Name("wide-searchbar-methodtwo-parent-fingerprint")
|
||||
@ -14,7 +15,7 @@ import org.jf.dexlib2.AccessFlags
|
||||
"Lkrf;", "i"
|
||||
)
|
||||
@FuzzyPatternScanMethod(3)
|
||||
@HideReelsCompatibility
|
||||
@WideSearchbarCompatibility
|
||||
@Version("0.0.1")
|
||||
|
||||
/*
|
@ -14,10 +14,10 @@ import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.methodone.WideSearchbarOneFingerprint
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.methodone.WideSearchbarOneParentFingerprint
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.methodtwo.WideSearchbarTwoFingerprint
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.methodtwo.WideSearchbarTwoParentFingerprint
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.WideSearchbarOneFingerprint
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.WideSearchbarOneParentFingerprint
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.WideSearchbarTwoFingerprint
|
||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.WideSearchbarTwoParentFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
|
||||
@Patch(include = false)
|
||||
@ -39,7 +39,7 @@ class WideSearchbarPatch : BytecodePatch(
|
||||
|
||||
//This should be the method aF in class fbn
|
||||
val targetMethodOne =
|
||||
data.toMethodWalker(resultOne!!.method).nextMethod(resultOne!!.patternScanResult!!.endIndex, true).getMethod() as MutableMethod
|
||||
data.toMethodWalker(resultOne!!.method).nextMethod(resultOne.patternScanResult!!.endIndex, true).getMethod() as MutableMethod
|
||||
|
||||
//Since both methods have the same smali code, inject instructions using a method.
|
||||
addInstructions(targetMethodOne)
|
||||
@ -48,7 +48,7 @@ class WideSearchbarPatch : BytecodePatch(
|
||||
|
||||
//This should be the method aB in class fbn
|
||||
val targetMethodTwo =
|
||||
data.toMethodWalker(resultTwo!!.method).nextMethod(resultTwo!!.patternScanResult!!.startIndex, true).getMethod() as MutableMethod
|
||||
data.toMethodWalker(resultTwo!!.method).nextMethod(resultTwo.patternScanResult!!.startIndex, true).getMethod() as MutableMethod
|
||||
|
||||
//Since both methods have the same smali code, inject instructions using a method.
|
||||
addInstructions(targetMethodTwo)
|
||||
|
Reference in New Issue
Block a user