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

Commit 57414d2a authored by Eric Biggers's avatar Eric Biggers
Browse files

Throw exception if SP cannot be unwrapped during migration

Ignoring failures here leaves the device unusable, due to leaving the CE
key not encrypted by the SP.  Therefore, throw an exception to cause the
upgrade to fail.

Bug: 376481713
Flag: EXEMPT bugfix
Test: build
Change-Id: I7235994c712cc9fe79eccb5f32679bee435bd63d
parent 7d00da34
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1221,8 +1221,8 @@ public class LockSettingsService extends ILockSettings.Stub {
                Slog.i(TAG, "Synthetic password is already not protected by Weaver");
            }
        } else if (sp == null) {
            Slogf.wtf(TAG, "Failed to unwrap synthetic password for unsecured user %d", userId);
            return;
            throw new IllegalStateException(
                    "Failed to unwrap synthetic password for unsecured user " + userId);
        }

        // Call setCeStorageProtection(), to re-encrypt the CE key with the SP if it's currently