remove death recipient after the object is desdroyed @2022-11-20

Signed-off-by: legendtau <yanxiaotao@huawei.com>
This commit is contained in:
legendtau 2022-11-22 07:19:09 +08:00
parent 244a11c5d3
commit ab53b386c2
3 changed files with 9 additions and 1 deletions

View File

@ -67,6 +67,9 @@ bool WifiDeviceImpl::Init()
bool WifiDeviceImpl::GetWifiDeviceProxy()
{
#ifdef OHOS_ARCH_LITE
return (client_ != nullptr);
#else
WIFI_LOGI("enter GetWifiDeviceProxy!");
if (client_ != nullptr && !IsRemoteDied()) {
WIFI_LOGI("client_ is existed now!");
@ -95,6 +98,7 @@ bool WifiDeviceImpl::GetWifiDeviceProxy()
return false;
}
return true;
#endif
}
ErrCode WifiDeviceImpl::EnableWifi()

View File

@ -65,6 +65,9 @@ bool WifiScanImpl::Init()
bool WifiScanImpl::GetWifiScanProxy(void)
{
#ifdef OHOS_ARCH_LITE
return (client_ != nullptr);
#else
WIFI_LOGI("enter GetWifiScanProxy!");
if (client_ != nullptr && !IsRemoteDied()) {
WIFI_LOGI("client_ is existed now!");
@ -90,6 +93,7 @@ bool WifiScanImpl::GetWifiScanProxy(void)
return false;
}
return true;
#endif
}
ErrCode WifiScanImpl::SetScanControlInfo(const ScanControlInfo &info)

View File

@ -97,7 +97,7 @@ public:
bool IsRemoteDied(void);
private:
bool WifiScanImpl::GetWifiScanProxy(void);
bool GetWifiScanProxy(void);
int systemAbilityId_;
#ifdef OHOS_ARCH_LITE
IWifiScan *client_;