Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b44a770 authored by Gabriele M's avatar Gabriele M
Browse files

Don't treat the current build as compatible

Even if technically it is compatible.

Change-Id: I72d39c761ad02b851c5ec7cfae664e886931f852
parent eaf1fa8f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -95,8 +95,8 @@ public class Utils {

    public static boolean isCompatible(UpdateBaseInfo update) {
        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 current build");
                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))) {
@@ -108,7 +108,7 @@ public class Utils {

    public static boolean canInstall(UpdateBaseInfo update) {
        return (SystemProperties.getBoolean(Constants.PROP_UPDATER_ALLOW_DOWNGRADING, false) ||
                update.getTimestamp() >= SystemProperties.getLong(Constants.PROP_BUILD_DATE, 0)) &&
                update.getTimestamp() > SystemProperties.getLong(Constants.PROP_BUILD_DATE, 0)) &&
                update.getVersion().equalsIgnoreCase(
                        SystemProperties.get(Constants.PROP_BUILD_VERSION));
    }