Loading src/org/lineageos/updater/misc/Utils.java +13 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,19 @@ public class Utils { } public static boolean isCompatible(UpdateBaseInfo update) { if (update.getVersion().compareTo("0.10") == 0){ Log.d(TAG, update.getName() + " version update is special"); if (!SystemProperties.getBoolean(Constants.PROP_UPDATER_ALLOW_DOWNGRADING, false) && update.getTimestamp() <= SystemProperties.getLong(Constants.PROP_BUILD_DATE, 0)) { Log.d(TAG, update.getName() + " is older than/equal to the current build"); return false; } if (!update.getType().equalsIgnoreCase(SystemProperties.get(Constants.PROP_RELEASE_TYPE))) { Log.d(TAG, update.getName() + " has type " + update.getType()); return false; } return true; } if (update.getVersion().compareTo(SystemProperties.get(Constants.PROP_BUILD_VERSION)) < 0) { Log.d(TAG, update.getName() + " is older than current Android version"); return false; Loading Loading
src/org/lineageos/updater/misc/Utils.java +13 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,19 @@ public class Utils { } public static boolean isCompatible(UpdateBaseInfo update) { if (update.getVersion().compareTo("0.10") == 0){ Log.d(TAG, update.getName() + " version update is special"); if (!SystemProperties.getBoolean(Constants.PROP_UPDATER_ALLOW_DOWNGRADING, false) && update.getTimestamp() <= SystemProperties.getLong(Constants.PROP_BUILD_DATE, 0)) { Log.d(TAG, update.getName() + " is older than/equal to the current build"); return false; } if (!update.getType().equalsIgnoreCase(SystemProperties.get(Constants.PROP_RELEASE_TYPE))) { Log.d(TAG, update.getName() + " has type " + update.getType()); return false; } return true; } if (update.getVersion().compareTo(SystemProperties.get(Constants.PROP_BUILD_VERSION)) < 0) { Log.d(TAG, update.getName() + " is older than current Android version"); return false; Loading