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

Commit 199469a1 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

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

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

Change-Id: I7a57629347466cf8b42e87231dbd452af3dc20f7
parents dacdc2f8 55fb484d
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();
}