mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-09 06:10:14 +00:00
Make WifiStaIfaces using the create() method.
Unlike the default constructor, create() populates
the weak_ptr_this_ variable, which is needed for
callbacks from the legacy hal.
Bug: 265857332
Test: Manual test - connect to an AP and walk away
from it. Check that the RSSI callback is
triggered in the framework.
Change-Id: I1a10a75c07ea59a3e01b9bb68d9d393bbd20d29d
This commit is contained in:
@@ -1146,8 +1146,7 @@ std::pair<std::shared_ptr<IWifiStaIface>, ndk::ScopedAStatus> WifiChip::createSt
|
||||
<< legacyErrorToString(legacy_status);
|
||||
return {nullptr, createWifiStatusFromLegacyError(legacy_status)};
|
||||
}
|
||||
std::shared_ptr<WifiStaIface> iface =
|
||||
ndk::SharedRefBase::make<WifiStaIface>(ifname, legacy_hal_, iface_util_);
|
||||
std::shared_ptr<WifiStaIface> iface = WifiStaIface::create(ifname, legacy_hal_, iface_util_);
|
||||
sta_ifaces_.push_back(iface);
|
||||
for (const auto& callback : event_cb_handler_.getCallbacks()) {
|
||||
if (!callback->onIfaceAdded(IfaceType::STA, ifname).isOk()) {
|
||||
|
||||
Reference in New Issue
Block a user