mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -49,6 +49,7 @@ object RhinoClassShutter : ClassShutter {
|
||||
"java.security.AccessController",
|
||||
"java.nio.file.Paths",
|
||||
"java.nio.file.Files",
|
||||
"io.legado.app.data.AppDatabase",
|
||||
"io.legado.app.data.AppDatabaseKt",
|
||||
"io.legado.app.utils.ContextExtensionsKt",
|
||||
"android.content.Intent",
|
||||
|
||||
@@ -52,7 +52,13 @@ object RhinoWrapFactory : WrapFactory() {
|
||||
): Scriptable? {
|
||||
val classShutter = RhinoClassShutter
|
||||
return when (javaObject) {
|
||||
is ClassLoader, is Class<*>, is Member, is android.content.Context -> null
|
||||
is ClassLoader,
|
||||
is Class<*>,
|
||||
is Member,
|
||||
is android.content.Context -> {
|
||||
null
|
||||
}
|
||||
|
||||
else -> {
|
||||
val name = javaObject.javaClass.name
|
||||
if (classShutter.visibleToScripts(name)) {
|
||||
|
||||
Reference in New Issue
Block a user