Add some of file managers in root apps list

This commit is contained in:
frknkrc44 2025-08-29 05:50:06 +03:00
commit 9775516480
No known key found for this signature in database
GPG key ID: 784AE1CC0DCFD34F
3 changed files with 21 additions and 4 deletions

View file

@ -24,7 +24,7 @@ object ConfigManager {
runCatching {
config = JsonConfig.parse(configFile.readText())
val configVersion = config.configVersion
if (configVersion < 65) throw RuntimeException("Config version too old")
if (configVersion < BuildConfig.MIN_BACKUP_VERSION) throw RuntimeException("Config version too old")
config.configVersion = BuildConfig.CONFIG_VERSION
saveConfig()
}.onFailure {

View file

@ -191,7 +191,7 @@ class AppSettingsFragment : Fragment(R.layout.fragment_settings) {
)
return@map if (id != 0) { getString(id) } else { name }
} catch (ignore: Throwable) {}
} catch (_: Throwable) {}
name
}
@ -225,7 +225,7 @@ class AppSettingsFragment : Fragment(R.layout.fragment_settings) {
)
return@map if (id != 0) { getString(id) } else { name }
} catch (ignore: Throwable) {}
} catch (_: Throwable) {}
name
}

View file

@ -33,6 +33,8 @@ class RootAppsPreset() : BasePreset("root_apps") {
"org.nuntius35.wrongpinshutdown",
"ru.nsu.bobrofon.easysshfs",
"x1125io.initdlight",
"com.lonelycatgames.Xplore",
"com.mixplorer",
// kernel managers
"flar2.exkernelmanager",
@ -45,10 +47,25 @@ class RootAppsPreset() : BasePreset("root_apps") {
override fun canBeAddedIntoPreset(appInfo: ApplicationInfo): Boolean {
val packageName = appInfo.packageName
if (packageNames.contains(packageName)) {
if (containsPackage(packageName)) {
return false
}
// TotalCommander and its plugins
if (packageName.startsWith("com.ghisler.")) {
return true
}
// ZDevs apps (ZArchiver etc.)
if (packageName.startsWith("ru.zdevs.")) {
return true
}
// MiXplorer Silver and its plugins
if (packageName.startsWith("com.mixplorer.")) {
return true
}
// LSPosed and LSPatch
if (packageName.startsWith("org.lsposed")) {
return true