From acfa47bfbac682113eb588128c52586f66e53c24 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 31 Jan 2014 12:59:54 +0100 Subject: [PATCH] Enable on demand restricting for new applications only Closes #1208 --- CHANGELOG.md | 1 + src/biz/bokhorst/xprivacy/PackageChange.java | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cc7d15e3..88fea7b8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ Test and beta releases will have experimental functions enabled by default. * Restrict isolated processes (since JellyBean) * Disabled [largeHeap](http://developer.android.com/reference/android/R.attr.html#largeHeap) to conserve memory * Disabled [allowBackup](http://developer.android.com/reference/android/R.attr.html#allowBackup) for more privacy +* Enable on demand restricting for new applications only ([issue](https://github.com/M66B/XPrivacy/issues/1208)) * Updated Dutch translation * Updated Lithuanian translation diff --git a/src/biz/bokhorst/xprivacy/PackageChange.java b/src/biz/bokhorst/xprivacy/PackageChange.java index 3b08164f4..91a4c0cd2 100644 --- a/src/biz/bokhorst/xprivacy/PackageChange.java +++ b/src/biz/bokhorst/xprivacy/PackageChange.java @@ -54,10 +54,11 @@ public void onReceive(final Context context, Intent intent) { Integer.toString(ActivityMain.STATE_ATTENTION)); // Enable on demand - if (PrivacyManager.getSettingBool(null, 0, PrivacyManager.cSettingExperimental, - PrivacyManager.cTestVersion, false)) - PrivacyManager.setSetting(null, uid, PrivacyManager.cSettingOnDemand, - Boolean.toString(true)); + if (!replacing) + if (PrivacyManager.getSettingBool(null, 0, PrivacyManager.cSettingExperimental, + PrivacyManager.cTestVersion, false)) + PrivacyManager.setSetting(null, uid, PrivacyManager.cSettingOnDemand, + Boolean.toString(true)); } // New/update notification