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

Commit b1079691 authored by Eric Biggers's avatar Eric Biggers Committed by Android (Google) Code Review
Browse files

Merge "Don't clear calling identity before setCeStorageProtection()" into main

parents 6a7316ba 4c021972
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -2163,13 +2163,11 @@ public class LockSettingsService extends ILockSettings.Stub {

    private void setCeStorageProtection(@UserIdInt int userId, SyntheticPassword sp) {
        final byte[] secret = sp.deriveFileBasedEncryptionKey();
        final long callingId = Binder.clearCallingIdentity();
        try {
            mStorageManagerInternal.setCeStorageProtection(userId, secret);
        } catch (RuntimeException e) {
            throw new IllegalStateException("Failed to protect CE key for user " + userId, e);
        } finally {
            Binder.restoreCallingIdentity(callingId);
            ArrayUtils.zeroize(secret);
        }
    }