From 906ae730e994c288083976749b00d0b4e60491c6 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Tue, 18 Oct 2016 21:45:35 +0800 Subject: [PATCH] Add version detection for certain settings --- app/src/main/java/com/topjohnwu/magisk/SettingsActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/SettingsActivity.java b/app/src/main/java/com/topjohnwu/magisk/SettingsActivity.java index cf1df057c..ae3cf054e 100644 --- a/app/src/main/java/com/topjohnwu/magisk/SettingsActivity.java +++ b/app/src/main/java/com/topjohnwu/magisk/SettingsActivity.java @@ -88,9 +88,10 @@ public class SettingsActivity extends AppCompatActivity { themePreference.setSummary(themePreference.getValue()); - if (MagiskFragment.magiskVersion == -1) { - busyboxPreference.setEnabled(false); + if (MagiskFragment.magiskVersion < 8) { magiskhidePreference.setEnabled(false); + } else if (MagiskFragment.magiskVersion < 7) { + busyboxPreference.setEnabled(false); } else { busyboxPreference.setEnabled(true); magiskhidePreference.setEnabled(true);