Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0cd1eeb authored by cretin45's avatar cretin45
Browse files

CMFileManager: Don't show access mode pref on unrooted devices

Issue-id: CYNGNOS-2072

Change-Id: I582e21dea5afbdf4a7676de8acd6cba23b5288bf
parent 37755d7f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -267,7 +267,8 @@ public class GeneralPreferenceFragment extends TitlePreferenceFragment {
        boolean restrictedAccess = AndroidHelper.isSecondaryUser(context) &&
                FileManagerApplication.isRestrictSecondaryUsersAccess(context);
        this.mAccessMode.setEnabled(FileManagerApplication.hasShellCommands() && !restrictedAccess);
        if (!FileManagerApplication.hasShellCommands()) {
        if (!FileManagerApplication.hasShellCommands() ||
                !FileManagerApplication.isDeviceRooted()) {
            PreferenceCategory category = (PreferenceCategory) findPreference(
                    "general_advanced_settings");
            category.removePreference(mAccessMode);