Don't allow to install older builds
In some cases, installing an update older than the one currently installed requires a data wipe, so don't allow it. However, allow to verify old updates if not verified yet (e.g. when imported).
This commit is contained in:
@@ -85,7 +85,9 @@ public class Utils {
|
||||
}
|
||||
|
||||
public static boolean canInstall(Update update) {
|
||||
return update.getVersion().equalsIgnoreCase(SystemProperties.get(Constants.PROP_BUILD_VERSION));
|
||||
return update.getTimestamp() > SystemProperties.getLong(Constants.PROP_BUILD_DATE, 0) &&
|
||||
update.getVersion().equalsIgnoreCase(
|
||||
SystemProperties.get(Constants.PROP_BUILD_VERSION));
|
||||
}
|
||||
|
||||
public static List<UpdateDownload> parseJson(File file, boolean compatibleOnly)
|
||||
|
Reference in New Issue
Block a user