Remove Limited users category if empty
If there are no users under limited category, in a secondary user, remove the subheading completely. Change-Id: I0397b6198c8cfc147e9e7dc30a92a7cb2f5860e3
This commit is contained in:
@@ -501,6 +501,12 @@ public class UserSettings extends SettingsPreferenceFragment
|
||||
boolean moreUsers = mUserManager.getMaxSupportedUsers() > users.size();
|
||||
mAddRestrictedUser.setEnabled(moreUsers);
|
||||
mAddTrustedUser.setEnabled(moreUsers);
|
||||
// Remove the limited users category if there aren't other limited users.
|
||||
if (!mIsOwner) {
|
||||
if (mLimitedUserListCategory.getPreferenceCount() == 0) {
|
||||
removePreference(KEY_LIMITED_USER_LIST);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void loadIconsAsync(List<Integer> missingIcons) {
|
||||
|
Reference in New Issue
Block a user