mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-02 23:54:33 +02:00
cleanup
This commit is contained in:
parent
4ee2f85b27
commit
4c0d11cf76
@ -44,7 +44,8 @@ class HideCastButtonPatch : BytecodePatch(
|
||||
* Hide cast button
|
||||
*/
|
||||
MediaRouteButtonFingerprint.result?.let {
|
||||
val setVisibilityMethod = it.mutableClass.methods.find { method -> method.name == "setVisibility" }
|
||||
val setVisibilityMethod =
|
||||
it.mutableClass.methods.find { method -> method.name == "setVisibility" }
|
||||
|
||||
setVisibilityMethod?.apply {
|
||||
addInstructions(
|
||||
|
@ -29,12 +29,14 @@ class OverrideQualityHookPatch : BytecodePatch(
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
VideoQualityListFingerprint.result?.let {
|
||||
val constructorMethod = it.mutableClass.methods.first { method -> MethodUtil.isConstructor(method) }
|
||||
val overrideMethod = it.mutableClass.methods.find { method -> method.parameterTypes.first() == "I" }
|
||||
val constructorMethod =
|
||||
it.mutableClass.methods.first { method -> MethodUtil.isConstructor(method) }
|
||||
val overrideMethod =
|
||||
it.mutableClass.methods.find { method -> method.parameterTypes.first() == "I" }
|
||||
|
||||
QUALITY_CLASS = it.method.definingClass
|
||||
QUALITY_METHOD = overrideMethod?.name
|
||||
?:throw PatchException("Failed to find hook method")
|
||||
?: throw PatchException("Failed to find hook method")
|
||||
|
||||
constructorMethod.apply {
|
||||
addInstruction(
|
||||
|
@ -10,7 +10,6 @@ object SettingsHeadersFragmentFingerprint : MethodFingerprint(
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT
|
||||
|
||||
),
|
||||
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("/SettingsHeadersFragment;") && methodDef.name == "onCreate" }
|
||||
)
|
@ -50,7 +50,8 @@ class AppendTimeStampInformationPatch : BytecodePatch(
|
||||
) {
|
||||
setTextIndex = textViewIndex + 2
|
||||
val setTextRegister = getInstruction<Instruction35c>(setTextIndex).registerC
|
||||
val textViewRegister = getInstruction<Instruction35c>(textViewIndex).registerC
|
||||
val textViewRegister =
|
||||
getInstruction<Instruction35c>(textViewIndex).registerC
|
||||
|
||||
addInstructions(
|
||||
setTextIndex, """
|
||||
|
@ -33,12 +33,14 @@ class OverrideQualityHookPatch : BytecodePatch(
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
VideoQualityListFingerprint.result?.let {
|
||||
val constructorMethod = it.mutableClass.methods.first { method -> MethodUtil.isConstructor(method) }
|
||||
val overrideMethod = it.mutableClass.methods.find { method -> method.parameterTypes.first() == "I" }
|
||||
val constructorMethod =
|
||||
it.mutableClass.methods.first { method -> MethodUtil.isConstructor(method) }
|
||||
val overrideMethod =
|
||||
it.mutableClass.methods.find { method -> method.parameterTypes.first() == "I" }
|
||||
|
||||
QUALITY_CLASS = it.method.definingClass
|
||||
QUALITY_METHOD = overrideMethod?.name
|
||||
?:throw PatchException("Failed to find hook method")
|
||||
?: throw PatchException("Failed to find hook method")
|
||||
|
||||
constructorMethod.apply {
|
||||
addInstruction(
|
||||
|
@ -64,7 +64,8 @@ class VideoQualityPatch : BytecodePatch(
|
||||
} ?: throw NewFlyoutPanelOnClickListenerFingerprint.exception
|
||||
|
||||
VideoQualitySetterFingerprint.result?.let {
|
||||
val onItemClickMethod = it.mutableClass.methods.find { method -> method.name == "onItemClick" }
|
||||
val onItemClickMethod =
|
||||
it.mutableClass.methods.find { method -> method.name == "onItemClick" }
|
||||
|
||||
onItemClickMethod?.apply {
|
||||
val listItemIndexParameter = 3
|
||||
|
Loading…
x
Reference in New Issue
Block a user