[app] Try to get scope list from repo

This commit is contained in:
tehcneko 2021-02-10 11:46:58 +08:00
parent 1ba29cd32a
commit ddd082e17d
1 changed files with 9 additions and 0 deletions

View File

@ -22,6 +22,8 @@ import java.util.concurrent.CopyOnWriteArrayList;
import io.github.lsposed.manager.App;
import io.github.lsposed.manager.Constants;
import io.github.lsposed.manager.adapters.AppHelper;
import io.github.lsposed.manager.repo.RepoLoader;
import io.github.lsposed.manager.repo.model.OnlineModule;
public final class ModuleUtil {
// xposedminversion below this
@ -273,6 +275,13 @@ public final class ModuleUtil {
} catch (Exception e) {
e.printStackTrace();
}
RepoLoader repoLoader = RepoLoader.getInstance();
if (scopeList == null && repoLoader.isRepoLoaded()) {
OnlineModule module = repoLoader.getOnlineModule(packageName);
if (module != null && module.getScope() != null) {
scopeList = module.getScope();
}
}
}
return scopeList;
}