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

Commit 2e9de107 authored by Eric Biggers's avatar Eric Biggers Committed by Gerrit Code Review
Browse files

Merge "TrustManagerService: dump deviceLocked for profiles" into main

parents d3a4b7a0 65f53401
Loading
Loading
Loading
Loading
+16 −2
Original line number Original line Diff line number Diff line
@@ -1647,8 +1647,22 @@ public class TrustManagerService extends SystemService {
            fout.printf(" User \"%s\" (id=%d, flags=%#x)",
            fout.printf(" User \"%s\" (id=%d, flags=%#x)",
                    user.name, user.id, user.flags);
                    user.name, user.id, user.flags);
            if (!user.supportsSwitchToByUser()) {
            if (!user.supportsSwitchToByUser()) {
                fout.println("(managed profile)");
                final boolean locked;
                fout.println("   disabled because switching to this user is not possible.");
                if (user.isProfile()) {
                    if (mLockPatternUtils.isSeparateProfileChallengeEnabled(user.id)) {
                        fout.print(" (profile with separate challenge)");
                        locked = isDeviceLockedInner(user.id);
                    } else {
                        fout.print(" (profile with unified challenge)");
                        locked = isDeviceLockedInner(resolveProfileParent(user.id));
                    }
                } else {
                    fout.println(" (user that cannot be switched to)");
                    locked = isDeviceLockedInner(user.id);
                }
                fout.println(": deviceLocked=" + dumpBool(locked));
                fout.println(
                        "   Trust agents disabled because switching to this user is not possible.");
                return;
                return;
            }
            }
            if (isCurrent) {
            if (isCurrent) {