chore: Update legacy ABI and address review feedback
- Add EnableLocationStickerRedesignPatch to patches.api - Rename locationStickerRedesignGateMethod to locationStickerRedesignGateMethodMatch - Replace hardcoded instruction index with dynamic MOVE_RESULT match
This commit is contained in:
parent
bb193c0246
commit
4ac670b2ac
3 changed files with 10 additions and 8 deletions
|
|
@ -365,6 +365,10 @@ public final class app/revanced/patches/instagram/story/flipping/DisableStoryAut
|
|||
public static final fun getDisableStoryAutoFlippingPatch ()Lapp/revanced/patcher/patch/Patch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/instagram/story/locationsticker/EnableLocationStickerRedesignPatchKt {
|
||||
public static final fun getEnableLocationStickerRedesignPatch ()Lapp/revanced/patcher/patch/Patch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/irplus/ad/RemoveAdsPatchKt {
|
||||
public static final fun getRemoveAdsPatch ()Lapp/revanced/patcher/patch/Patch;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package app.revanced.patches.instagram.story.locationsticker
|
||||
|
||||
import app.revanced.patcher.extensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused")
|
||||
val enableLocationStickerRedesignPatch = bytecodePatch(
|
||||
|
|
@ -12,11 +12,9 @@ val enableLocationStickerRedesignPatch = bytecodePatch(
|
|||
compatibleWith("com.instagram.android")
|
||||
|
||||
apply {
|
||||
locationStickerRedesignGateMethod.method.apply {
|
||||
// The gate method reads a MobileConfig boolean flag and returns it directly (6 instructions total).
|
||||
// Replacing the move-result at index 4 with a hardcoded true skips the flag check entirely,
|
||||
// enabling the redesigned sticker styles regardless of server configuration.
|
||||
replaceInstruction(4, "const/4 v0, 0x1")
|
||||
}
|
||||
// The gate method reads a MobileConfig boolean flag and returns it directly.
|
||||
// Returning early with true bypasses the flag check entirely,
|
||||
// enabling the redesigned sticker styles regardless of server configuration.
|
||||
locationStickerRedesignGateMethodMatch.method.returnEarly(true)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
// app updates as MobileConfig keys are server-assigned constants.
|
||||
private const val LOCATION_STICKER_REDESIGN_CONFIG_KEY = 0x8105a100041e0dL
|
||||
|
||||
internal val BytecodePatchContext.locationStickerRedesignGateMethod
|
||||
internal val BytecodePatchContext.locationStickerRedesignGateMethodMatch
|
||||
by composingFirstMethod {
|
||||
instructions(LOCATION_STICKER_REDESIGN_CONFIG_KEY())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue