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

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

Merge "Call setGenerationId inside generateAndLoadKey to simplify the code just a little"

parents 328f0b84 7013bec1
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -146,7 +146,6 @@ public class PlatformKeyManager {
    public void regenerate() throws NoSuchAlgorithmException, KeyStoreException {
    public void regenerate() throws NoSuchAlgorithmException, KeyStoreException {
        int nextId = getGenerationId() + 1;
        int nextId = getGenerationId() + 1;
        generateAndLoadKey(nextId);
        generateAndLoadKey(nextId);
        setGenerationId(nextId);
    }
    }


    /**
    /**
@@ -219,7 +218,6 @@ public class PlatformKeyManager {
        }
        }


        generateAndLoadKey(generationId);
        generateAndLoadKey(generationId);
        mDatabase.setPlatformKeyGenerationId(mUserId, generationId);
    }
    }


    /**
    /**
@@ -301,6 +299,8 @@ public class PlatformKeyManager {
                    .setBoundToSpecificSecureUserId(mUserId)
                    .setBoundToSpecificSecureUserId(mUserId)
                    .build());
                    .build());


        setGenerationId(generationId);

        try {
        try {
            secretKey.destroy();
            secretKey.destroy();
        } catch (DestroyFailedException e) {
        } catch (DestroyFailedException e) {