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

Commit be14a07d authored by Chienyuan's avatar Chienyuan Committed by Automerger Merge Worker
Browse files

gd: Check stack is running before getting storage am: 3864cf4a

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

Change-Id: I74ce30229decfa32272ea980039a26d5719fac00
parents 1178f473 3864cf4a
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);