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

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

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

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

Change-Id: I43082d70daa949feb71701a2c38fa026c843bd43
parents c469fb00 81b6611e
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);