From 02e09559241c1e37dd912ef6a928e2e71d30abd8 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Tue, 29 Aug 2017 00:37:52 +0800 Subject: [PATCH] Fix settings crash --- .../main/java/com/topjohnwu/magisk/SettingsActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/SettingsActivity.java b/app/src/main/java/com/topjohnwu/magisk/SettingsActivity.java index 8c2df1d05..4dec24ba2 100644 --- a/app/src/main/java/com/topjohnwu/magisk/SettingsActivity.java +++ b/app/src/main/java/com/topjohnwu/magisk/SettingsActivity.java @@ -69,7 +69,7 @@ public class SettingsActivity extends Activity implements Topic.Subscriber { return new Topic[] { getApplicationContext().reloadActivity }; } - public class SettingsFragment extends PreferenceFragment + public static class SettingsFragment extends PreferenceFragment implements SharedPreferences.OnSharedPreferenceChangeListener, Topic.Subscriber { @@ -258,6 +258,10 @@ public class SettingsActivity extends Activity implements Topic.Subscriber { setSummary(); } + private Shell getShell() { + return Shell.getShell(getActivity()); + } + private void setSummary() { suAccess.setSummary(getResources() .getStringArray(R.array.su_access)[magiskManager.suAccessState]);