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

Commit 80ae4b3c authored by Tetiana Meronyk's avatar Tetiana Meronyk
Browse files

Disable multiuser toggle om COPE device and add explanation dialog

Bug: 304359233
Test: set up device in COPE mode and check toggle in Settings -> System -> Multiple Users

Change-Id: I0edd58651f94c9f9a51349025a29e33a1e1a9c14
parent b75a956c
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -57,11 +57,10 @@ public class MultiUserSwitchBarController implements SwitchWidgetController.OnSw
            mSwitchBar.setDisabledByAdmin(RestrictedLockUtilsInternal
                    .checkIfRestrictionEnforced(mContext, UserManager.DISALLOW_USER_SWITCH,
                            UserHandle.myUserId()));

        } else if (mUserCapabilities.mDisallowAddUser) {
            onSwitchToggled(false);
            mSwitchBar.setDisabledByAdmin(RestrictedLockUtilsInternal
                    .checkIfRestrictionEnforced(mContext, UserManager.DISALLOW_ADD_USER,
                            UserHandle.myUserId()));
                    .checkIfAddUserDisallowed(mContext, UserHandle.myUserId()));
        } else {
            mSwitchBar.setEnabled(!mUserCapabilities.mDisallowSwitchUser
                    && !mUserCapabilities.mIsGuest && mUserCapabilities.isAdmin());