You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Fixed language won't change in certain views unless app restarts
This commit is contained in:
@@ -11,6 +11,12 @@ import android.provider.OpenableColumns
|
||||
import com.topjohnwu.magisk.App
|
||||
import java.io.FileNotFoundException
|
||||
|
||||
val packageName: String
|
||||
get() {
|
||||
val app: App by inject()
|
||||
return app.packageName
|
||||
}
|
||||
|
||||
val PackageInfo.processes
|
||||
get() = activities?.processNames.orEmpty() +
|
||||
services?.processNames.orEmpty() +
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.topjohnwu.magisk.utils
|
||||
|
||||
import android.content.res.Resources
|
||||
|
||||
val specialChars = arrayOf('!', '@', '#', '$', '%', '&', '?')
|
||||
|
||||
fun String.replaceRandomWithSpecial(): String {
|
||||
@@ -8,4 +10,9 @@ fun String.replaceRandomWithSpecial(): String {
|
||||
random = random()
|
||||
} while (random == '.')
|
||||
return replace(random, specialChars.random())
|
||||
}
|
||||
|
||||
fun Int.res(vararg args: Any): String {
|
||||
val resources: Resources by inject()
|
||||
return resources.getString(this, *args)
|
||||
}
|
||||
Reference in New Issue
Block a user