Fix embeded module extraction target updated

This commit is contained in:
LoveSy 2021-07-02 18:44:40 +08:00
parent bc7826ba62
commit 34000e3ece
1 changed files with 2 additions and 1 deletions

View File

@ -186,9 +186,10 @@ public class LSPApplication extends ApplicationServiceClient {
HashSet<String> embedded_modules = new HashSet<>(); HashSet<String> embedded_modules = new HashSet<>();
HashSet<String> disabled_modules = new HashSet<>(); HashSet<String> disabled_modules = new HashSet<>();
try { try {
var lastInstalledTime = new File(context.getApplicationInfo().sourceDir).lastModified();
for (var name : context.getAssets().list("modules")) { for (var name : context.getAssets().list("modules")) {
var target = new File(cacheDir, name + ".apk"); var target = new File(cacheDir, name + ".apk");
if (target.exists()) { if (target.lastModified() > lastInstalledTime) {
embedded_modules.add(name); embedded_modules.add(name);
LSPApplication.modules.put(name, target.getAbsolutePath()); LSPApplication.modules.put(name, target.getAbsolutePath());
continue; continue;