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

Commit 55fb484d authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

gatt: Properly init/free gatt layer am: 9f62b168

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1707206

Change-Id: If0e97d4de7563a0c4c7cd0dd1c98c1fbe4a606b0
parents 2e0a636e 9f62b168
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -167,8 +167,10 @@ void gatt_free(void) {
  }

  gatt_cb.hdl_list_info->clear();
  delete gatt_cb.hdl_list_info;
  gatt_cb.hdl_list_info = nullptr;
  gatt_cb.srv_list_info->clear();
  delete gatt_cb.srv_list_info;
  gatt_cb.srv_list_info = nullptr;

  EattExtension::GetInstance()->Stop();
+6 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@

#include "common/message_loop_thread.h"
#include "stack/gatt/gatt_int.h"
#include "stack/include/gatt_api.h"

std::map<std::string, int> mock_function_count_map;

@@ -78,3 +79,8 @@ TEST_F(StackGattTest, lifecycle_tGATT_REG) {
    delete reg0;
  }
}

TEST_F(StackGattTest, gatt_init) {
  gatt_init();
  gatt_free();
}