From 695c46714a3f680e88b861e328c4b0c53336a311 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 5 Feb 2016 21:13:32 +0100 Subject: [PATCH] Reset access on set --- app/src/main/java/eu/faircode/netguard/DatabaseHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/netguard/DatabaseHelper.java b/app/src/main/java/eu/faircode/netguard/DatabaseHelper.java index f24945a8..41f8f1d0 100644 --- a/app/src/main/java/eu/faircode/netguard/DatabaseHelper.java +++ b/app/src/main/java/eu/faircode/netguard/DatabaseHelper.java @@ -408,7 +408,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { ContentValues cv = new ContentValues(); cv.put("block", block); - cv.put("allowed", block < 0 ? -1 : 1 - block); + cv.put("allowed", -1); if (db.update("access", cv, "ID = ?", new String[]{Long.toString(id)}) != 1) Log.e(TAG, "Set access failed");