feat: Use an extension property to create new exception when failing to resolve a fingerprint
This commit adds the extension property to the public API
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
package app.revanced.patches.music.interaction.permanentrepeat.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@@ -31,6 +31,6 @@ class PermanentRepeatPatch : BytecodePatch(
|
||||
ExternalLabel("repeat", getInstruction(repeatIndex))
|
||||
)
|
||||
}
|
||||
} ?: throw RepeatTrackFingerprint.toErrorResult()
|
||||
} ?: throw RepeatTrackFingerprint.exception
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package app.revanced.patches.music.interaction.permanentshuffle.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@@ -20,6 +20,6 @@ class PermanentShuffleTogglePatch : BytecodePatch(
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
DisableShuffleFingerprint.result?.mutableMethod?.addInstruction(0, "return-void")
|
||||
?: throw DisableShuffleFingerprint.toErrorResult()
|
||||
?: throw DisableShuffleFingerprint.exception
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package app.revanced.patches.music.misc.androidauto.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@@ -25,6 +25,6 @@ class BypassCertificateChecksPatch : BytecodePatch(
|
||||
return v0
|
||||
"""
|
||||
)
|
||||
} ?: throw CheckCertificateFingerprint.toErrorResult()
|
||||
} ?: throw CheckCertificateFingerprint.exception
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user