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

Commit 7e9c600a authored by weichinweng's avatar weichinweng
Browse files

common Criteria mode: Get all bonded devices key after keystore callback init.

Bug: 181293964
Test: atest BluetoothInstrumentationTests
Tag: #feature
Change-Id: I25c70363d7651c27a6c15b60db9402eee359d804
parent 8cd854f8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@

#include <btif_common.h>
#include <btif_keystore.h>
#include "btif_storage.h"

#include <base/bind.h>
#include <base/location.h>
@@ -43,6 +44,9 @@ class BluetoothKeystoreInterfaceImpl
  void init(BluetoothKeystoreCallbacks* callbacks) override {
    VLOG(2) << __func__;
    this->callbacks = callbacks;
    // Get bonded devices number to get all bonded devices key.
    do_in_jni_thread(
        FROM_HERE, base::Bind([]() { btif_storage_get_num_bonded_devices(); }));
  }

  void set_encrypt_key_or_remove_key(std::string prefix,