From 61eb1652e5d76c0a0139a49bd2bc8cb66b813327 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 11 Jan 2016 18:33:31 +0100 Subject: [PATCH] Refactoring --- .../main/java/eu/faircode/netguard/ActivityMain.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/eu/faircode/netguard/ActivityMain.java b/app/src/main/java/eu/faircode/netguard/ActivityMain.java index 0fc13da0..610479cf 100644 --- a/app/src/main/java/eu/faircode/netguard/ActivityMain.java +++ b/app/src/main/java/eu/faircode/netguard/ActivityMain.java @@ -122,12 +122,12 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences if (isChecked) { // Check if secondary user - if (android.os.Process.myUid() / 100000 != 0 && - !IAB.isPurchased(ActivityPro.SKU_MULTI, ActivityMain.this)) { - prefs.edit().putBoolean("enabled", false).apply(); - startActivity(new Intent(ActivityMain.this, ActivityPro.class)); - return; - } + if (!IAB.isPurchased(ActivityPro.SKU_MULTI, ActivityMain.this)) + if (android.os.Process.myUid() / 100000 != 0) { + prefs.edit().putBoolean("enabled", false).apply(); + startActivity(new Intent(ActivityMain.this, ActivityPro.class)); + return; + } try { final Intent prepare = VpnService.prepare(ActivityMain.this);