Updater: Assume older Android version to be incompatible
* Issue happens when both 15.1 and 16.0 are built. Change-Id: I0cb7c834824056f450129524a7aec8091c9d3dc7
This commit is contained in:
@@ -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");
|
||||
|
Reference in New Issue
Block a user