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

Commit 00496c40 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix a deadlock in LockSettingsService" into oc-dev

parents 1ab1da3f 04a4e1de
Loading
Loading
Loading
Loading
+15 −14
Original line number Diff line number Diff line
@@ -134,6 +134,7 @@ public class LockSettingsService extends ILockSettings.Stub {
    private static final int PROFILE_KEY_IV_SIZE = 12;
    private static final String SEPARATE_PROFILE_CHALLENGE_KEY = "lockscreen.profilechallenge";

    // Order of holding lock: mSeparateChallengeLock -> mSpManager -> this
    private final Object mSeparateChallengeLock = new Object();

    private final Injector mInjector;
@@ -2184,7 +2185,6 @@ public class LockSettingsService extends ILockSettings.Stub {
    protected void dump(FileDescriptor fd, PrintWriter pw, String[] args){
        if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;

        synchronized (this) {
        pw.println("Current lock settings service state:");
        pw.println(String.format("SP Enabled = %b",
                mLockPatternUtils.isSyntheticPasswordEnabled()));
@@ -2193,8 +2193,10 @@ public class LockSettingsService extends ILockSettings.Stub {
        for (int user = 0; user < users.size(); user++) {
            final int userId = users.get(user).id;
            pw.println("    User " + userId);
            synchronized (mSpManager) {
                pw.println(String.format("        SP Handle = %x",
                        getSyntheticPasswordHandleLocked(userId)));
            }
            try {
                pw.println(String.format("        SID = %x",
                        getGateKeeperService().getSecureUserId(userId)));
@@ -2203,7 +2205,6 @@ public class LockSettingsService extends ILockSettings.Stub {
            }
        }
    }
    }

    private void disableEscrowTokenOnNonManagedDevicesIfNeeded(int userId) {
        long ident = Binder.clearCallingIdentity();