fix: migrate to breaking changes from patcher
This commit is contained in:
@@ -25,13 +25,13 @@ class CodecsUnlockPatch : BytecodePatch(
|
||||
)
|
||||
) {
|
||||
override fun execute(data: BytecodeData): PatchResult {
|
||||
var result = signatures.first().result!!
|
||||
var result = CodecsLockSignature.result!!
|
||||
|
||||
val implementation = result.method.implementation!!
|
||||
|
||||
val instructionIndex = result.scanResult.startIndex
|
||||
|
||||
result = signatures.last().result!!
|
||||
result = AllCodecsReferenceSignature.result!!
|
||||
val codecMethod =
|
||||
data.toMethodWalker(result.immutableMethod).nextMethod(result.scanResult.startIndex).getMethod()
|
||||
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ class ExclusiveAudioPatch : BytecodePatch(
|
||||
)
|
||||
) {
|
||||
override fun execute(data: BytecodeData): PatchResult {
|
||||
val result = signatures.first().result!!.findParentMethod(@Name("audio-only-enabler-method") @MatchingMethod(
|
||||
val result = ExclusiveAudioSignature.result!!.findParentMethod(@Name("audio-only-enabler-method") @MatchingMethod(
|
||||
"Lgmd;",
|
||||
"d"
|
||||
) @DirectPatternScanMethod @ExclusiveAudioCompatibility @Version(
|
||||
|
||||
+4
-6
@@ -25,20 +25,18 @@ class RemoveTasteBuilderPatch : BytecodePatch(
|
||||
)
|
||||
) {
|
||||
override fun execute(data: BytecodeData): PatchResult {
|
||||
val result = signatures.first().result!!
|
||||
val result = TasteBuilderConstructorSignature.result!!
|
||||
val implementation = result.method.implementation!!
|
||||
|
||||
val insertIndex = result.scanResult.endIndex - 8
|
||||
|
||||
val register = (implementation.instructions[insertIndex] as Instruction22c).registerA
|
||||
|
||||
val instructionList = """
|
||||
result.method.addInstructions(
|
||||
insertIndex, """
|
||||
const/16 v1, 0x8
|
||||
invoke-virtual {v${register}, v1}, Landroid/view/View;->setVisibility(I)V
|
||||
""".trimIndent().toInstructions().toMutableList()
|
||||
|
||||
implementation.addInstructions(
|
||||
insertIndex, instructionList
|
||||
"""
|
||||
)
|
||||
|
||||
return PatchResultSuccess()
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ class RemoveUpgradeButtonPatch : BytecodePatch(
|
||||
)
|
||||
) {
|
||||
override fun execute(data: BytecodeData): PatchResult {
|
||||
val result = signatures.first().result!!
|
||||
val result = PivotBarConstructorSignature.result!!
|
||||
val implementation = result.method.implementation!!
|
||||
|
||||
val pivotBarElementFieldRef =
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ class BackgroundPlayPatch : BytecodePatch(
|
||||
)
|
||||
) {
|
||||
override fun execute(data: BytecodeData): PatchResult {
|
||||
signatures.first().result!!.method.implementation!!.addInstructions(
|
||||
BackgroundPlaybackDisableSignature.result!!.method.implementation!!.addInstructions(
|
||||
0,
|
||||
"""
|
||||
const/4 v0, 0x1
|
||||
|
||||
Reference in New Issue
Block a user