diff --git a/src/org/lineageos/updater/misc/Utils.java b/src/org/lineageos/updater/misc/Utils.java index 6ca7f9410d2b8eb09db023c99b3ad1dc598df681..9299114d2591747c4c7443fcd35e5eeaa7aacfc6 100644 --- a/src/org/lineageos/updater/misc/Utils.java +++ b/src/org/lineageos/updater/misc/Utils.java @@ -95,6 +95,10 @@ public class Utils { } public static boolean isCompatible(UpdateBaseInfo update) { + if (update.getVersion().compareTo(SystemProperties.get(Constants.PROP_BUILD_VERSION)) < 0) { + Log.d(TAG, update.getName() + " is older than current Android version"); + return false; + } 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");