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

Commit 3864cf4a authored by Chienyuan's avatar Chienyuan Committed by Chienyuan Huang
Browse files

gd: Check stack is running before getting storage

Tag: #gd-refactor
Bug: 186696547
Test: gd/cert/run
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I9d545f4c9cadbf981ded9ddaf5138a229cc384e3
parent 3699c3ac
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
#include "gd/storage/storage_module.h"
#include "main/shim/entry.h"
#include "main/shim/helpers.h"
#include "main/shim/shim.h"

#include "advertise_data_parser.h"
#include "stack/btm/btm_int_types.h"
@@ -410,7 +411,10 @@ class BleScannerInterfaceImpl : public BleScannerInterface,
        }
      }
    }

    if (!bluetooth::shim::is_gd_stack_started_up()) {
      LOG_WARN("Gd stack is stopped, return");
      return;
    }
    auto* storage_module = bluetooth::shim::GetStorage();
    bluetooth::hci::Address address = ToGdAddress(bd_addr);