sys user split: first pass updating Settings
Update various places in Settings to use "admin" ueser flag instead of checking user id "0". This should be no-op in single user mode since the only admin user would be user 0. In split system user mode, this will correctly ACL admin user instead of non-interactive system user. Bug: 19913735 Change-Id: Ida4d59c5f689ea0dc34b3b3ff0822b087fa0afd6
This commit is contained in:
@@ -439,8 +439,7 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
|
||||
result.add(KEY_TOGGLE_NSD);
|
||||
|
||||
final UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE);
|
||||
final int myUserId = UserHandle.myUserId();
|
||||
final boolean isSecondaryUser = myUserId != UserHandle.USER_OWNER;
|
||||
final boolean isSecondaryUser = !um.isAdminUser();
|
||||
final boolean isWimaxEnabled = !isSecondaryUser
|
||||
&& context.getResources().getBoolean(
|
||||
com.android.internal.R.bool.config_wimaxEnabled);
|
||||
|
Reference in New Issue
Block a user