For user (unrooted) builds, remove the access mode preference because it
is always disabled and misleading to the user.
Change-Id: I8be16109f98cc7c4230e936d9e7580d2d5c27f07
Signed-off-by: Roman Birg <roman@cyngn.com>
((Boolean)FileManagerSettings.SETTINGS_FIRST_USE.getDefaultValue()).booleanValue());
//Display the welcome message?
- if (firstUse) {
+ if (firstUse && !FileManagerApplication.isDeviceRooted()) {
// open navigation drawer to show user that it exists
mDrawerLayout.openDrawer(mDrawer);
boolean restrictedAccess = AndroidHelper.isSecondaryUser(context) &&
FileManagerApplication.isRestrictSecondaryUsersAccess(context);
this.mAccessMode.setEnabled(FileManagerApplication.isDeviceRooted() && !restrictedAccess);
+ if (!FileManagerApplication.isDeviceRooted()) {
+ PreferenceCategory category = (PreferenceCategory) findPreference(
+ "general_advanced_settings");
+ category.removePreference(mAccessMode);
+ }
}
/**