From c50871c0dc634facf5dd1d3c13956f675625637e Mon Sep 17 00:00:00 2001 From: Gabriele M Date: Thu, 31 Aug 2017 17:29:48 +0200 Subject: [PATCH] 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 --- src/org/lineageos/updater/misc/Utils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/lineageos/updater/misc/Utils.java b/src/org/lineageos/updater/misc/Utils.java index f15be50d..77139931 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());