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

Commit 23bc5388 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:...

Merge "NIAP: Make sure that call getOrCreateSecretKey once at a time" am: a5c7c45b am: 067d0968 am: bdf4dbd2 am: de564bd8

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

Change-Id: I95d2df185435c0572bb2cba33618694e35ce1845
parents b1b285a2 de564bd8
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();