fix: Fix SMALI compilation on devices with RTL language (#242)

This commit is contained in:
LisoUseInAIKyrios 2023-09-29 17:15:14 +04:00 committed by GitHub
parent e882af74ee
commit 356f1f1553
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -1,4 +1,4 @@
@file:Suppress("MemberVisibilityCanBePrivate", "UNUSED_PARAMETER")
@file:Suppress("MemberVisibilityCanBePrivate")
package app.revanced.patcher.patch

View file

@ -6,5 +6,4 @@ package app.revanced.patcher.patch
* @param patch The [Patch] that was executed.
* @param exception The [PatchException] thrown, if any.
*/
@Suppress("MemberVisibilityCanBePrivate")
class PatchResult internal constructor(val patch: Patch<*>, val exception: PatchException? = null)

View file

@ -13,6 +13,7 @@ import com.android.tools.smali.smali.smaliFlexLexer
import com.android.tools.smali.smali.smaliParser
import com.android.tools.smali.smali.smaliTreeWalker
import java.io.InputStreamReader
import java.util.Locale
private const val METHOD_TEMPLATE = """
.class LInlineCompiler;
@ -33,7 +34,7 @@ class InlineSmaliCompiler {
fun compile(
instructions: String, parameters: String, registers: Int, forStaticMethod: Boolean
): List<BuilderInstruction> {
val input = METHOD_TEMPLATE.format(
val input = METHOD_TEMPLATE.format(Locale.ENGLISH,
if (forStaticMethod) {
"static"
} else {