Treat major upgrades as a special case

Major upgrades are compatible, but shouldn't be allowed since they
require some manual extra steps.
This commit is contained in:
Gabriele M
2017-07-02 22:21:27 +02:00
parent 13edaf4690
commit c30940649c
2 changed files with 5 additions and 5 deletions

View File

@@ -73,13 +73,13 @@ public class Utils {
Log.d(TAG, update.getName() + " has type " + update.getType());
return false;
}
if (!update.getVersion().equalsIgnoreCase(SystemProperties.get("ro.cm.build.version"))) {
Log.d(TAG, update.getName() + " has version " + update.getVersion());
return false;
}
return true;
}
public static boolean canInstall(Update update) {
return update.getVersion().equalsIgnoreCase(SystemProperties.get("ro.cm.build.version"));
}
public static List<UpdateDownload> parseJson(File file, boolean compatibleOnly)
throws IOException, JSONException {
List<UpdateDownload> updates = new ArrayList<>();