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

Commit bdf4dbd2 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: a5c7c45b am: 067d0968

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

Change-Id: I592fbd0ff27efbb38bc4eb6fd46a905dc76d0142
parents b9a91c8f 067d0968
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();