Restrict root/superuser install options to Experts
These two options are only enabled when Expert Mode is switched on. They're far too incomplete and risky currently, unless you know what you're doing.
This commit is contained in:
parent
3fc53c21d2
commit
9cfa079e46
@ -140,6 +140,16 @@ public class PreferenceFragment
|
||||
} else if (key.equals(Preferences.PREF_EXPERT)) {
|
||||
onoffSummary(key, R.string.expert_on,
|
||||
R.string.expert_off);
|
||||
CheckBoxPreference pref = (CheckBoxPreference) findPreference(key);
|
||||
Preference rinst = findPreference(Preferences.PREF_ROOT_INSTALLER);
|
||||
Preference sinst = findPreference(Preferences.PREF_SYSTEM_INSTALLER);
|
||||
if (pref.isChecked()) {
|
||||
rinst.setEnabled(true);
|
||||
sinst.setEnabled(true);
|
||||
} else {
|
||||
rinst.setEnabled(false);
|
||||
sinst.setEnabled(false);
|
||||
}
|
||||
|
||||
} else if (key.equals(Preferences.PREF_ROOT_INSTALLER)) {
|
||||
onoffSummary(key, R.string.root_installer_on,
|
||||
|
Loading…
x
Reference in New Issue
Block a user