From 356f1f155348347a8f318a2e024716ebf4fec99b Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Fri, 29 Sep 2023 17:15:14 +0400 Subject: [PATCH] fix: Fix SMALI compilation on devices with RTL language (#242) --- .../src/main/kotlin/app/revanced/patcher/patch/Patch.kt | 2 +- .../src/main/kotlin/app/revanced/patcher/patch/PatchResult.kt | 1 - .../app/revanced/patcher/util/smali/InlineSmaliCompiler.kt | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/revanced-patcher/src/main/kotlin/app/revanced/patcher/patch/Patch.kt b/revanced-patcher/src/main/kotlin/app/revanced/patcher/patch/Patch.kt index c177704..2f56807 100644 --- a/revanced-patcher/src/main/kotlin/app/revanced/patcher/patch/Patch.kt +++ b/revanced-patcher/src/main/kotlin/app/revanced/patcher/patch/Patch.kt @@ -1,4 +1,4 @@ -@file:Suppress("MemberVisibilityCanBePrivate", "UNUSED_PARAMETER") +@file:Suppress("MemberVisibilityCanBePrivate") package app.revanced.patcher.patch diff --git a/revanced-patcher/src/main/kotlin/app/revanced/patcher/patch/PatchResult.kt b/revanced-patcher/src/main/kotlin/app/revanced/patcher/patch/PatchResult.kt index 71d40b7..cf25fbe 100644 --- a/revanced-patcher/src/main/kotlin/app/revanced/patcher/patch/PatchResult.kt +++ b/revanced-patcher/src/main/kotlin/app/revanced/patcher/patch/PatchResult.kt @@ -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) \ No newline at end of file diff --git a/revanced-patcher/src/main/kotlin/app/revanced/patcher/util/smali/InlineSmaliCompiler.kt b/revanced-patcher/src/main/kotlin/app/revanced/patcher/util/smali/InlineSmaliCompiler.kt index c1931c0..23cd1ec 100644 --- a/revanced-patcher/src/main/kotlin/app/revanced/patcher/util/smali/InlineSmaliCompiler.kt +++ b/revanced-patcher/src/main/kotlin/app/revanced/patcher/util/smali/InlineSmaliCompiler.kt @@ -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 { - val input = METHOD_TEMPLATE.format( + val input = METHOD_TEMPLATE.format(Locale.ENGLISH, if (forStaticMethod) { "static" } else {