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

Commit d749a1e0 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove flag: get_user_switchability_permission" into main

parents 038937b1 b2c9d5ca
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -348,16 +348,6 @@ flag {
    bug: "338579331"
}

flag {
  name: "get_user_switchability_permission"
  namespace: "multiuser"
  description: "Update permissions for getUserSwitchability"
  bug: "390458180"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
    name: "restrict_quiet_mode_credential_bug_fix_to_managed_profiles"
    namespace: "profile_experiences"
+3 −10
Original line number Diff line number Diff line
@@ -3034,17 +3034,10 @@ public class UserManagerService extends IUserManager.Stub {
     */
    @Override
    public @UserManager.UserSwitchabilityResult int getUserSwitchability(@UserIdInt int userId) {
        if (Flags.getUserSwitchabilityPermission()) {
        if (!hasManageUsersOrPermission(android.Manifest.permission.INTERACT_ACROSS_USERS)) {
                throw new SecurityException(
                        "You need MANAGE_USERS or INTERACT_ACROSS_USERS permission to "
                                + "getUserSwitchability");
            throw new SecurityException("You need MANAGE_USERS or INTERACT_ACROSS_USERS permission "
                    + "to getUserSwitchability");
        }
        } else {
            checkManageOrInteractPermissionIfCallerInOtherProfileGroup(userId,
                    "getUserSwitchability");
        }

        final TimingsTraceAndSlog t = new TimingsTraceAndSlog();
        t.traceBegin("getUserSwitchability-" + userId);