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

Commit bd61a8e6 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

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

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Bluetooth/+/1355677

Change-Id: Ie417feff681142dca2e9d89e12856d677a4f5669
parents a9f332b0 0a84c179
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();