|
|
@ -54,8 +54,9 @@ public class BackgroundUpdateChecker extends Worker {
|
|
|
|
|
|
|
|
|
|
|
|
static void doCheck(Context context) {
|
|
|
|
static void doCheck(Context context) {
|
|
|
|
Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
|
|
|
|
Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
|
|
|
|
|
|
|
|
ModuleManager.getINSTANCE().scanAsync();
|
|
|
|
RepoManager.getINSTANCE().update(null);
|
|
|
|
RepoManager.getINSTANCE().update(null);
|
|
|
|
ModuleManager.getINSTANCE().scan();
|
|
|
|
ModuleManager.getINSTANCE().runAfterScan(() -> {
|
|
|
|
int moduleUpdateCount = 0;
|
|
|
|
int moduleUpdateCount = 0;
|
|
|
|
HashMap<String, RepoModule> repoModules =
|
|
|
|
HashMap<String, RepoModule> repoModules =
|
|
|
|
RepoManager.getINSTANCE().getModules();
|
|
|
|
RepoManager.getINSTANCE().getModules();
|
|
|
@ -76,6 +77,7 @@ public class BackgroundUpdateChecker extends Worker {
|
|
|
|
if (moduleUpdateCount != 0) {
|
|
|
|
if (moduleUpdateCount != 0) {
|
|
|
|
postNotification(context, moduleUpdateCount);
|
|
|
|
postNotification(context, moduleUpdateCount);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void postNotification(Context context, int updateCount) {
|
|
|
|
public static void postNotification(Context context, int updateCount) {
|
|
|
|