remove imports

This commit is contained in:
oSumAtrIX
2026-01-25 20:16:22 +01:00
parent 3a3fe5ed9b
commit c82691380c
24 changed files with 4 additions and 49 deletions

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.music.ad.video
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.opcodes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.strings
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.showVideoAdsParentMethod by gettingFirstMethodDeclaratively {

View File

@@ -3,7 +3,6 @@ package app.revanced.patches.music.misc.extension.hooks
import app.revanced.patcher.name
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.returnType
import app.revanced.patcher.strings
import app.revanced.patches.music.shared.YOUTUBE_MUSIC_MAIN_ACTIVITY_CLASS_TYPE
import app.revanced.patches.shared.misc.extension.activityOnCreateExtensionHook
import app.revanced.patches.shared.misc.extension.extensionHook

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.interaction.dialog
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.methodCall
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType

View File

@@ -1,7 +1,6 @@
package app.revanced.patches.youtube.interaction.downloads
import app.revanced.patcher.accessFlags
import app.revanced.patcher.addString
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.parameterTypes

View File

@@ -6,7 +6,6 @@ import app.revanced.patcher.afterAtMost
import app.revanced.patcher.allOf
import app.revanced.patcher.custom
import app.revanced.patcher.field
import app.revanced.patcher.fieldAccess
import app.revanced.patcher.firstMethodComposite
import app.revanced.patcher.firstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
@@ -14,10 +13,7 @@ import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.method
import app.revanced.patcher.methodCall
import app.revanced.patcher.name
import app.revanced.patcher.newInstance
import app.revanced.patcher.opcode
import app.revanced.patcher.opcodes
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext

View File

@@ -6,7 +6,6 @@ import app.revanced.patcher.firstMethodComposite
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.methodCall
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType

View File

@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.formfactor
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.getInstruction
import app.revanced.patcher.fieldAccess
import app.revanced.patcher.instructions
import app.revanced.patcher.patch.creatingBytecodePatch
import app.revanced.patches.all.misc.resources.addResources

View File

@@ -2,15 +2,12 @@ package app.revanced.patches.youtube.layout.hide.general
import app.revanced.patcher.StringComparisonType
import app.revanced.patcher.accessFlags
import app.revanced.patcher.addString
import app.revanced.patcher.after
import app.revanced.patcher.afterAtMost
import app.revanced.patcher.checkCast
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.methodCall
import app.revanced.patcher.opcode
import app.revanced.patcher.opcodes
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext

View File

@@ -1,14 +1,11 @@
package app.revanced.patches.youtube.layout.hide.shorts
import app.revanced.patcher.accessFlags
import app.revanced.patcher.addString
import app.revanced.patcher.after
import app.revanced.patcher.at
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.methodCall
import app.revanced.patcher.opcode
import app.revanced.patcher.opcodes
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext

View File

@@ -3,14 +3,11 @@
package app.revanced.patches.youtube.layout.miniplayer
import app.revanced.patcher.accessFlags
import app.revanced.patcher.addString
import app.revanced.patcher.afterAtMost
import app.revanced.patcher.checkCast
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.methodCall
import app.revanced.patcher.opcode
import app.revanced.patcher.opcodes
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext

View File

@@ -1,7 +1,6 @@
package app.revanced.patches.youtube.layout.returnyoutubedislike
import app.revanced.patcher.accessFlags
import app.revanced.patcher.addString
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke

View File

@@ -1,7 +1,6 @@
package app.revanced.patches.youtube.layout.seekbar
import app.revanced.patcher.accessFlags
import app.revanced.patcher.addString
import app.revanced.patcher.afterAtMost
import app.revanced.patcher.anyInstruction
import app.revanced.patcher.custom
@@ -11,8 +10,6 @@ import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.literal
import app.revanced.patcher.method
import app.revanced.patcher.methodCall
import app.revanced.patcher.opcode
import app.revanced.patcher.opcodes
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext

View File

@@ -8,8 +8,6 @@ import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.method
import app.revanced.patcher.methodCall
import app.revanced.patcher.opcode
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType

View File

@@ -1,7 +1,5 @@
package app.revanced.patches.youtube.layout.startpage
import app.revanced.patcher.addString
import app.revanced.patcher.fieldAccess
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke

View File

@@ -2,13 +2,10 @@ package app.revanced.patches.youtube.layout.startupshortsreset
import app.revanced.patcher.StringComparisonType
import app.revanced.patcher.accessFlags
import app.revanced.patcher.addString
import app.revanced.patcher.checkCast
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.methodCall
import app.revanced.patcher.opcode
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType

View File

@@ -1,6 +1,5 @@
package app.revanced.patches.youtube.misc.dimensions.spoof
import app.revanced.patcher.addString
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.patch.BytecodePatchContext

View File

@@ -7,7 +7,6 @@ import app.revanced.patcher.firstMethodComposite
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.literal
import app.revanced.patcher.methodCall
import app.revanced.patcher.opcodes
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.returnType

View File

@@ -3,8 +3,6 @@ package app.revanced.patches.youtube.misc.gms
import app.revanced.patcher.accessFlags
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.methodCall
import app.revanced.patcher.opcode
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType

View File

@@ -1,7 +1,6 @@
package app.revanced.patches.youtube.misc.imageurlhook
import app.revanced.patcher.accessFlags
import app.revanced.patcher.addString
import app.revanced.patcher.anyInstruction
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions

View File

@@ -2,11 +2,9 @@ package app.revanced.patches.youtube.misc.links
import app.revanced.patcher.StringComparisonType
import app.revanced.patcher.accessFlags
import app.revanced.patcher.addString
import app.revanced.patcher.firstMethodComposite
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.methodCall
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags

View File

@@ -71,14 +71,13 @@ internal val customPlaybackSpeedPatch = bytecodePatch(
}
// Override the min/max speeds that can be used.
(if (is_20_34_or_greater) speedLimiterMethod else speedLimiterLegacyMethod).method.apply {
(if (is_20_34_or_greater) speedLimiterMethod else speedLimiterLegacyMethod).apply {
val limitMinIndex = indexOfFirstLiteralInstructionOrThrow(0.25f)
// Older unsupported targets use 2.0f and not 4.0f
val limitMaxIndex = indexOfFirstLiteralInstructionOrThrow(4.0f)
val limitMinRegister = getInstruction<OneRegisterInstruction>(limitMinIndex).registerA
val limitMaxRegister = getInstruction<OneRegisterInstruction>(limitMaxIndex).registerA
replaceInstruction(limitMinIndex, "const/high16 v$limitMinRegister, 0.0f")
replaceInstruction(limitMaxIndex, "const/high16 v$limitMaxRegister, 8.0f")
}

View File

@@ -1,14 +1,10 @@
package app.revanced.patches.youtube.video.speed.custom
import app.revanced.patcher.accessFlags
import app.revanced.patcher.addString
import app.revanced.patcher.fieldAccess
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.methodCall
import app.revanced.patcher.newInstance
import app.revanced.patcher.opcode
import app.revanced.patcher.opcodes
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
@@ -57,7 +53,7 @@ internal val BytecodePatchContext.speedArrayGeneratorMethod by gettingFirstMetho
/**
* 20.34+
*/
internal val BytecodePatchContext.speedLimiterMethod by gettingFirstMethodDeclaratively {
internal val BytecodePatchContext.speedLimiterMethod by gettingFirstMutableMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
returnType("V")
parameterTypes("F", "Lcom/google/android/libraries/youtube/innertube/model/media/PlayerConfigModel;")
@@ -70,7 +66,7 @@ internal val BytecodePatchContext.speedLimiterMethod by gettingFirstMethodDeclar
/**
* 20.33 and lower.
*/
internal val BytecodePatchContext.speedLimiterLegacyMethod by gettingFirstMethodDeclaratively {
internal val BytecodePatchContext.speedLimiterLegacyMethod by gettingFirstMutableMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
returnType("V")
parameterTypes("F")

View File

@@ -1,6 +1,5 @@
package app.revanced.patches.youtube.video.speed.remember
import app.revanced.patcher.addString
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.parameterTypes

View File

@@ -4,8 +4,6 @@ import app.revanced.patcher.accessFlags
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.methodCall
import app.revanced.patcher.opcode
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType