From c0bf32c09728aa74561b2cca316f14ec7b1f63a9 Mon Sep 17 00:00:00 2001 From: Gabriele M Date: Sat, 8 Jul 2017 21:39:10 +0200 Subject: [PATCH] Don't allow to install older builds In some cases, installing an update older than the one currently installed requires a data wipe, so don't allow it. However, allow to verify old updates if not verified yet (e.g. when imported). --- src/org/lineageos/updater/UpdatesListAdapter.java | 11 ++++++----- src/org/lineageos/updater/misc/Utils.java | 4 +++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/org/lineageos/updater/UpdatesListAdapter.java b/src/org/lineageos/updater/UpdatesListAdapter.java index a6905343..23cbd57a 100644 --- a/src/org/lineageos/updater/UpdatesListAdapter.java +++ b/src/org/lineageos/updater/UpdatesListAdapter.java @@ -116,20 +116,21 @@ public class UpdatesListAdapter extends RecyclerView.Adapter SystemProperties.getLong(Constants.PROP_BUILD_DATE, 0) && + update.getVersion().equalsIgnoreCase( + SystemProperties.get(Constants.PROP_BUILD_VERSION)); } public static List parseJson(File file, boolean compatibleOnly)