[core] public loadModule (#1059)

This commit is contained in:
vvb2060 2021-09-05 16:29:30 +08:00 committed by GitHub
parent 6cb3eacea8
commit 6e036f49da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -40,7 +40,7 @@ import java.util.List;
import java.util.Map;
import java.util.zip.ZipFile;
class ConfigFileManager {
public class ConfigFileManager {
static final Path basePath = Paths.get("/data/adb/lspd");
static final File managerApkPath = basePath.resolve("manager.apk").toFile();
private static final Path lockPath = basePath.resolve("lock");
@ -64,6 +64,9 @@ class ConfigFileManager {
}
}
private ConfigFileManager() {
}
static void deleteFolderIfExists(Path target) throws IOException {
if (Files.notExists(target)) return;
Files.walkFileTree(target, new SimpleFileVisitor<>() {
@ -169,7 +172,7 @@ class ConfigFileManager {
}
@Nullable
static PreLoadedApk loadModule(String path) {
public static PreLoadedApk loadModule(String path) {
if (path == null) return null;
var file = new PreLoadedApk();
var preLoadedDexes = new ArrayList<SharedMemory>();