You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Merge branch 'remote-master' into development
# Conflicts: # app/src/main/java/com/topjohnwu/magisk/di/ViewModelsModule.kt # app/src/main/java/com/topjohnwu/magisk/ui/home/HomeViewModel.kt # app/src/main/java/com/topjohnwu/magisk/utils/XString.kt
This commit is contained in:
@@ -13,6 +13,12 @@ import com.topjohnwu.magisk.App
|
||||
import java.io.File
|
||||
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 {
|
||||
@@ -11,4 +13,9 @@ fun String.replaceRandomWithSpecial(): String {
|
||||
}
|
||||
|
||||
fun StringBuilder.appendIf(condition: Boolean, builder: StringBuilder.() -> Unit) =
|
||||
if (condition) apply(builder) else this
|
||||
if (condition) apply(builder) else this
|
||||
|
||||
fun Int.res(vararg args: Any): String {
|
||||
val resources: Resources by inject()
|
||||
return resources.getString(this, *args)
|
||||
}
|
||||
Reference in New Issue
Block a user