aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriele M <moto.falcon.git@gmail.com>2018-07-14 18:00:45 +0200
committerGabriele M <moto.falcon.git@gmail.com>2018-07-14 18:33:07 +0200
commit74d7a3e78ba55830b4a40e9bf17777fc397e900d (patch)
treec44da408bf5a61b67cd93adf276fe3da64918c4c
parent460cb8751030f260474f37b2caf9010b05e73978 (diff)
downloadandroid_packages_apps_Updater-74d7a3e78ba55830b4a40e9bf17777fc397e900d.tar.gz
android_packages_apps_Updater-74d7a3e78ba55830b4a40e9bf17777fc397e900d.tar.bz2
android_packages_apps_Updater-74d7a3e78ba55830b4a40e9bf17777fc397e900d.zip
Don't treat the current build as compatible
Even if technically it is compatible. Change-Id: I72d39c761ad02b851c5ec7cfae664e886931f852
-rw-r--r--src/org/lineageos/updater/misc/Utils.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/lineageos/updater/misc/Utils.java b/src/org/lineageos/updater/misc/Utils.java
index 3eb256e..171c2cc 100644
--- a/src/org/lineageos/updater/misc/Utils.java
+++ b/src/org/lineageos/updater/misc/Utils.java
@@ -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));
}