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

Commit 46223db6 authored by Sooraj S's avatar Sooraj S 👽
Browse files

0.10 is special, treat it as special!

parent 98facaf8
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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;