diff --git a/src/org/lineageos/updater/misc/Utils.java b/src/org/lineageos/updater/misc/Utils.java index addc0e8..2d68127 100644 --- a/src/org/lineageos/updater/misc/Utils.java +++ b/src/org/lineageos/updater/misc/Utils.java @@ -126,6 +126,8 @@ public class Utils { public static void triggerUpdate(Context context, UpdateDownload update) throws IOException { if (update.getStatus() == UpdateStatus.VERIFIED) { android.os.RecoverySystem.installPackage(context, update.getFile()); + } else { + throw new IllegalStateException("Update must be verified"); } } }