From 10594c398b1d26f04127fa5980c416d12a6ce754 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 25 Jul 2016 08:17:39 +0200 Subject: [PATCH] Revert "Remove IAB debug code" This reverts commit 4d85a059a9637b3c98a7b757dcdb2074475e3ab3. --- app/src/main/java/eu/faircode/netguard/IAB.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/eu/faircode/netguard/IAB.java b/app/src/main/java/eu/faircode/netguard/IAB.java index 7374f3a9..56b35249 100644 --- a/app/src/main/java/eu/faircode/netguard/IAB.java +++ b/app/src/main/java/eu/faircode/netguard/IAB.java @@ -175,12 +175,18 @@ public class IAB implements ServiceConnection { if (ActivityPro.SKU_SUPPORT1.equals(sku) || ActivityPro.SKU_SUPPORT2.equals(sku)) return prefs.getBoolean(sku, false); + if (Util.isDebuggable(context) || Util.getSelfVersionName(context).contains("beta")) + return true; + return (prefs.getBoolean(sku, false) || prefs.getBoolean(ActivityPro.SKU_PRO1, false) || prefs.getBoolean(ActivityPro.SKU_DONATION, false)); } public static boolean isPurchasedAny(Context context) { + if (Util.isDebuggable(context)) + return true; + SharedPreferences prefs = context.getSharedPreferences("IAB", Context.MODE_PRIVATE); for (String key : prefs.getAll().keySet()) if (prefs.getBoolean(key, false))