mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-05-20 20:27:05 +02:00
fix: Fix SMALI compilation on devices with RTL language (#242)
This commit is contained in:
parent
e882af74ee
commit
356f1f1553
@ -1,4 +1,4 @@
|
|||||||
@file:Suppress("MemberVisibilityCanBePrivate", "UNUSED_PARAMETER")
|
@file:Suppress("MemberVisibilityCanBePrivate")
|
||||||
|
|
||||||
package app.revanced.patcher.patch
|
package app.revanced.patcher.patch
|
||||||
|
|
||||||
|
@ -6,5 +6,4 @@ package app.revanced.patcher.patch
|
|||||||
* @param patch The [Patch] that was executed.
|
* @param patch The [Patch] that was executed.
|
||||||
* @param exception The [PatchException] thrown, if any.
|
* @param exception The [PatchException] thrown, if any.
|
||||||
*/
|
*/
|
||||||
@Suppress("MemberVisibilityCanBePrivate")
|
|
||||||
class PatchResult internal constructor(val patch: Patch<*>, val exception: PatchException? = null)
|
class PatchResult internal constructor(val patch: Patch<*>, val exception: PatchException? = null)
|
@ -13,6 +13,7 @@ import com.android.tools.smali.smali.smaliFlexLexer
|
|||||||
import com.android.tools.smali.smali.smaliParser
|
import com.android.tools.smali.smali.smaliParser
|
||||||
import com.android.tools.smali.smali.smaliTreeWalker
|
import com.android.tools.smali.smali.smaliTreeWalker
|
||||||
import java.io.InputStreamReader
|
import java.io.InputStreamReader
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
private const val METHOD_TEMPLATE = """
|
private const val METHOD_TEMPLATE = """
|
||||||
.class LInlineCompiler;
|
.class LInlineCompiler;
|
||||||
@ -33,7 +34,7 @@ class InlineSmaliCompiler {
|
|||||||
fun compile(
|
fun compile(
|
||||||
instructions: String, parameters: String, registers: Int, forStaticMethod: Boolean
|
instructions: String, parameters: String, registers: Int, forStaticMethod: Boolean
|
||||||
): List<BuilderInstruction> {
|
): List<BuilderInstruction> {
|
||||||
val input = METHOD_TEMPLATE.format(
|
val input = METHOD_TEMPLATE.format(Locale.ENGLISH,
|
||||||
if (forStaticMethod) {
|
if (forStaticMethod) {
|
||||||
"static"
|
"static"
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user