summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2017-01-08 17:06:36 +0100
committerArne Schwabe <arne@rfc2549.org>2017-01-08 17:06:36 +0100
commit02c96933fc3eb9a603726b1febc819c187930772 (patch)
tree0836c824d21866701e9c5e208d4d8a8b74e092fe /main/src
parentdb3fa686e93cfd2dd1d25a3afb9f9cbb10e9536a (diff)
Workaround the save set bug
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/api/ExternalAppDatabase.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/api/ExternalAppDatabase.java b/main/src/main/java/de/blinkt/openvpn/api/ExternalAppDatabase.java
index f569abf2..967d7728 100644
--- a/main/src/main/java/de/blinkt/openvpn/api/ExternalAppDatabase.java
+++ b/main/src/main/java/de/blinkt/openvpn/api/ExternalAppDatabase.java
@@ -22,7 +22,7 @@ public class ExternalAppDatabase {
mContext =c;
}
- private final String PREFERENCES_KEY = "PREFERENCES_KEY";
+ private final String PREFERENCES_KEY = "allowed_apps";
boolean isAllowed(String packagename) {
Set<String> allowedapps = getExtAppList();
@@ -46,7 +46,11 @@ public class ExternalAppDatabase {
private void saveExtAppList( Set<String> allowedapps) {
SharedPreferences prefs = Preferences.getDefaultSharedPreferences(mContext);
Editor prefedit = prefs.edit();
+
+ // Workaround for bug
prefedit.putStringSet(PREFERENCES_KEY, allowedapps);
+ int counter = prefs.getInt("counter", 0);
+ prefedit.putInt("counter", counter + 1);
prefedit.apply();
}