feat: Publish as a library (#3356)
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
package app.revanced.patches.tumblr.annoyances.notifications
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.util.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
||||
+1
-1
@@ -6,4 +6,4 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
// It shows whenever you visit a certain blog for the second time and disables itself
|
||||
// if it was shown a total of 3 times (stored in app storage).
|
||||
// This targets the BlogNotifyCtaDialog.isEnabled() method to let it always return false.
|
||||
object IsBlogNotifyEnabledFingerprint : MethodFingerprint(strings = listOf("isEnabled --> ", "blog_notify_enabled"))
|
||||
internal object IsBlogNotifyEnabledFingerprint : MethodFingerprint(strings = listOf("isEnabled --> ", "blog_notify_enabled"))
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package app.revanced.patches.tumblr.annoyances.popups
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.util.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package app.revanced.patches.tumblr.annoyances.popups.fingerprints
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
|
||||
// This method is responsible for loading and displaying the visual Layout of the Gift Message Popup.
|
||||
object ShowGiftMessagePopupFingerprint : MethodFingerprint(
|
||||
internal object ShowGiftMessagePopupFingerprint : MethodFingerprint(
|
||||
strings = listOf("activity", "anchorView"),
|
||||
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("GiftMessagePopup;") }
|
||||
)
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package app.revanced.patches.tumblr.featureflags
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.util.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
// Some features seem to be very old and never removed, though, such as Google Login.
|
||||
// The startIndex of the opcode pattern is at the start of the function after the arg null check.
|
||||
// we want to insert our instructions there.
|
||||
object GetFeatureValueFingerprint : MethodFingerprint(
|
||||
internal object GetFeatureValueFingerprint : MethodFingerprint(
|
||||
strings = listOf("feature"),
|
||||
opcodes = listOf(
|
||||
Opcode.IF_EQZ,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package app.revanced.patches.tumblr.timelinefilter
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.util.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
// This is the constructor of the PostsResponse class.
|
||||
// The same applies here as with the TimelineConstructorFingerprint.
|
||||
object PostsResponseConstructorFingerprint : MethodFingerprint(
|
||||
internal object PostsResponseConstructorFingerprint : MethodFingerprint(
|
||||
accessFlags = AccessFlags.CONSTRUCTOR or AccessFlags.PUBLIC,
|
||||
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("/PostsResponse;") && methodDef.parameters.size == 4 },
|
||||
)
|
||||
+1
-1
@@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
// This is the constructor of the Timeline class.
|
||||
// It receives the List<TimelineObject> as an argument with a @Json annotation, so this should be the first time
|
||||
// that the List<TimelineObject> is exposed in non-library code.
|
||||
object TimelineConstructorFingerprint : MethodFingerprint(
|
||||
internal object TimelineConstructorFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef, _ ->
|
||||
methodDef.definingClass.endsWith("/Timeline;") && methodDef.parameters[0].type == "Ljava/util/List;"
|
||||
}, strings = listOf("timelineObjectsList")
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
// This fingerprints the Integration TimelineFilterPatch.filterTimeline method.
|
||||
// The opcode fingerprint is searching for
|
||||
// if ("BLOCKED_OBJECT_DUMMY".equals(elementType)) iterator.remove();
|
||||
object TimelineFilterIntegrationFingerprint : MethodFingerprint(
|
||||
internal object TimelineFilterIntegrationFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("/TimelineFilterPatch;") },
|
||||
strings = listOf("BLOCKED_OBJECT_DUMMY"),
|
||||
opcodes = listOf(
|
||||
|
||||
Reference in New Issue
Block a user