|
|
|
@ -156,6 +156,7 @@ public final class ModuleHolder implements Comparable<ModuleHolder> {
|
|
|
|
|
if (repoModule != null) {
|
|
|
|
|
remoteVersionCode = String.valueOf(repoModule.moduleInfo.versionCode);
|
|
|
|
|
}
|
|
|
|
|
if (!version.isEmpty()) {
|
|
|
|
|
// now, coerce everything into an int
|
|
|
|
|
int localVersionCode = Integer.parseInt(String.valueOf(moduleInfo.versionCode));
|
|
|
|
|
int remoteVersionCodeInt = Integer.parseInt(remoteVersionCode);
|
|
|
|
@ -178,18 +179,20 @@ public final class ModuleHolder implements Comparable<ModuleHolder> {
|
|
|
|
|
// if it is, we skip it
|
|
|
|
|
ignoreUpdate = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (ignoreUpdate) {
|
|
|
|
|
Timber.d("Module %s has update, but is ignored", this.moduleId);
|
|
|
|
|
return Type.INSTALLABLE;
|
|
|
|
|
} else {
|
|
|
|
|
MainApplication.getINSTANCE().modulesHaveUpdates = true;
|
|
|
|
|
if (!MainApplication.getINSTANCE().updateModules.contains(this.moduleId)) {
|
|
|
|
|
MainApplication.getINSTANCE().updateModules.add(this.moduleId);
|
|
|
|
|
MainApplication.getINSTANCE().updateModuleCount++;
|
|
|
|
|
}
|
|
|
|
|
Timber.d("modulesHaveUpdates = %s, updateModuleCount = %s", MainApplication.getINSTANCE().modulesHaveUpdates, MainApplication.getINSTANCE().updateModuleCount);
|
|
|
|
|
if (ignoreUpdate) {
|
|
|
|
|
Timber.d("Module %s has update, but is ignored", this.moduleId);
|
|
|
|
|
return Type.INSTALLABLE;
|
|
|
|
|
}
|
|
|
|
|
Timber.d("Module %s has update", this.moduleId);
|
|
|
|
|
return Type.UPDATABLE;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return Type.INSTALLED;
|
|
|
|
|
}
|
|
|
|
|