Update check module update

This commit is contained in:
topjohnwu
2016-09-23 17:12:29 +08:00
parent 8a8aaf3297
commit 8a7df954e5
6 changed files with 44 additions and 274 deletions
@@ -5,6 +5,7 @@ import android.content.SharedPreferences;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.topjohnwu.magisk.ModulesFragment;
import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.magisk.utils.WebRequest;
@@ -78,6 +79,12 @@ public class RepoHelper {
}
}
public static void checkUpdate() {
for (Module module : ModulesFragment.listModules) {
module.checkUpdate();
}
}
public static List<Repo> getSortedList() {
ArrayList<Repo> list = new ArrayList<>(repoMap.values());
Collections.sort(list, new Utils.ModuleComparator());