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

Commit d39d4d7d authored by Rubin Xu's avatar Rubin Xu Committed by android-build-merger
Browse files

Fix boot loop when upgrading direclty from L to N am: bfc7faaf am: 492f5263 am: 873c99c3

am: 5adffe2c

Change-Id: I9ae16f0de5b6f71d8343db369528c27a40d36be4
parents 586bc60a 5adffe2c
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -244,6 +244,17 @@ public class LockSettingsService extends ILockSettings.Stub {
            if (DEBUG) Slog.v(TAG, "Parent does not have a screen lock");
            return;
        }
        // Do not tie when the parent has no SID (but does have a screen lock).
        // This can only happen during an upgrade path where SID is yet to be
        // generated when the user unlocks for the first time.
        try {
            if (getGateKeeperService().getSecureUserId(parentId) == 0) {
                return;
            }
        } catch (RemoteException e) {
            Slog.e(TAG, "Failed to talk to GateKeeper service", e);
            return;
        }
        if (DEBUG) Slog.v(TAG, "Tie managed profile to parent now!");
        byte[] randomLockSeed = new byte[] {};
        try {