aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriele M <moto.falcon.git@gmail.com>2017-08-31 17:29:48 +0200
committerGabriele M <moto.falcon.git@gmail.com>2017-08-31 17:29:48 +0200
commitc50871c0dc634facf5dd1d3c13956f675625637e (patch)
tree758c8eda7fd65aae95a2464c2a15b2abced41e66
parent17f35382d72ec1dc5753bd97ee635ff32171912e (diff)
downloadandroid_packages_apps_Updater-c50871c0dc634facf5dd1d3c13956f675625637e.tar.gz
android_packages_apps_Updater-c50871c0dc634facf5dd1d3c13956f675625637e.tar.bz2
android_packages_apps_Updater-c50871c0dc634facf5dd1d3c13956f675625637e.zip
Allow to keep incompatible updates when parsing jsons
The condition was wrong and incompatible updates were always discarded regardless of the flag passed. Change-Id: Iefc2d64b841921eb77a9f73cf374b63b477d2588
-rw-r--r--src/org/lineageos/updater/misc/Utils.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/lineageos/updater/misc/Utils.java b/src/org/lineageos/updater/misc/Utils.java
index f15be50..7713993 100644
--- a/src/org/lineageos/updater/misc/Utils.java
+++ b/src/org/lineageos/updater/misc/Utils.java
@@ -130,7 +130,7 @@ public class Utils {
}
try {
UpdateInfo update = parseJsonUpdate(updatesList.getJSONObject(i));
- if (compatibleOnly && isCompatible(update)) {
+ if (!compatibleOnly || isCompatible(update)) {
updates.add(update);
} else {
Log.d(TAG, "Ignoring incompatible update " + update.getName());