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

Commit a5c7c45b authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "NIAP: Make sure that call getOrCreateSecretKey once at a time"

parents c8ec673f 95399441
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -797,7 +797,8 @@ public class BluetoothKeystoreService {
        return keyStore;
    }

    private SecretKey getOrCreateSecretKey() {
    // The getOrGenerate semantic on keystore is not thread safe, need to synchronized it.
    private synchronized SecretKey getOrCreateSecretKey() {
        SecretKey secretKey = null;
        try {
            KeyStore keyStore = getKeyStore();