Proper handle policy changes

This commit is contained in:
topjohnwu
2017-06-20 18:25:18 +08:00
parent dd3b716d85
commit 1eb571b787
4 changed files with 30 additions and 17 deletions

View File

@@ -89,7 +89,6 @@ public class MagiskManager extends Application {
public void onCreate() {
super.onCreate();
prefs = PreferenceManager.getDefaultSharedPreferences(this);
suDB = new SuDatabaseHelper(this);
}
public void toast(String msg, int duration) {
@@ -146,6 +145,7 @@ public class MagiskManager extends Application {
}
public void initSUConfig() {
suDB = new SuDatabaseHelper(this);
suRequestTimeout = Utils.getPrefsInt(prefs, "su_request_timeout", 10);
suResponseType = Utils.getPrefsInt(prefs, "su_auto_response", 0);
suNotificationType = Utils.getPrefsInt(prefs, "su_notification", 1);