mirror of
https://gitee.com/openharmony/communication_wifi.git
synced 2024-11-23 15:10:16 +00:00
Merge pull request !1634 from hxyang111111/revert-merge-1543-master
This commit is contained in:
commit
88791b1fc9
@ -75,12 +75,6 @@ if (defined(ohos_lite)) {
|
||||
ohos_static_library("rpc_server") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
sources = crpc_server_sources
|
||||
|
||||
include_dirs = [ "include" ]
|
||||
@ -97,12 +91,6 @@ if (defined(ohos_lite)) {
|
||||
ohos_static_library("rpc_client") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
sources = crpc_client_sources
|
||||
include_dirs = [
|
||||
"include",
|
||||
|
@ -22,6 +22,7 @@ ohos_shared_library("wifi") {
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
blocklist = "../../wifi_frameworks_sdk_block.txt"
|
||||
}
|
||||
install_enable = true
|
||||
include_dirs = [
|
||||
@ -81,6 +82,7 @@ ohos_shared_library("wifiext") {
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
blocklist = "../../wifi_frameworks_sdk_block.txt"
|
||||
}
|
||||
install_enable = true
|
||||
include_dirs = [
|
||||
@ -134,6 +136,7 @@ ohos_shared_library("wifi_native_js") {
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
blocklist = "../../wifi_frameworks_sdk_block.txt"
|
||||
}
|
||||
install_enable = true
|
||||
include_dirs = [
|
||||
@ -193,6 +196,7 @@ ohos_shared_library("wifimanager") {
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
blocklist = "../../wifi_frameworks_sdk_block.txt"
|
||||
}
|
||||
install_enable = true
|
||||
include_dirs = [
|
||||
@ -249,6 +253,7 @@ ohos_shared_library("wifimanagerext") {
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
blocklist = "../../wifi_frameworks_sdk_block.txt"
|
||||
}
|
||||
install_enable = true
|
||||
include_dirs = [
|
||||
|
@ -113,12 +113,6 @@ if (defined(ohos_lite)) {
|
||||
ohos_source_set("wifi_device_proxy_impl") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
part_name = "wifi"
|
||||
sources = [
|
||||
"src/wifi_device_impl.cpp",
|
||||
@ -142,12 +136,6 @@ if (defined(ohos_lite)) {
|
||||
ohos_source_set("wifi_hotspot_proxy_impl") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
part_name = "wifi"
|
||||
sources = [
|
||||
"src/wifi_hotspot_impl.cpp",
|
||||
@ -171,12 +159,6 @@ if (defined(ohos_lite)) {
|
||||
ohos_source_set("wifi_scan_proxy_impl") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
part_name = "wifi"
|
||||
sources = [
|
||||
"src/wifi_scan_impl.cpp",
|
||||
@ -200,12 +182,6 @@ if (defined(ohos_lite)) {
|
||||
ohos_source_set("wifi_p2p_proxy_impl") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
part_name = "wifi"
|
||||
sources = [
|
||||
"src/wifi_p2p_impl.cpp",
|
||||
@ -233,6 +209,7 @@ if (defined(ohos_lite)) {
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
blocklist = "../wifi_frameworks_sdk_block.txt"
|
||||
}
|
||||
install_enable = true
|
||||
sources = [
|
||||
|
@ -417,7 +417,7 @@ EventManager& EventManager::GetInstance()
|
||||
return g_eventManger;
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi") void EventManager::Init()
|
||||
void EventManager::Init()
|
||||
{
|
||||
if (mSaStatusListener == nullptr) {
|
||||
int32_t ret;
|
||||
|
@ -78,12 +78,6 @@ if (defined(ohos_lite)) {
|
||||
ohos_static_library("crpc_server") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
sources = crpc_server_sources
|
||||
|
||||
include_dirs = [
|
||||
@ -104,12 +98,6 @@ if (defined(ohos_lite)) {
|
||||
ohos_static_library("crpc_client") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
sources = crpc_client_sources
|
||||
include_dirs = [
|
||||
"include",
|
||||
@ -130,12 +118,6 @@ if (defined(ohos_lite)) {
|
||||
ohos_shared_library("crpc_client_updater") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
install_enable = true
|
||||
sources = [ "./src/client_updater.c" ]
|
||||
include_dirs = [ "include" ]
|
||||
|
@ -233,12 +233,6 @@ if (defined(ohos_lite)) {
|
||||
ohos_source_set("wifi_scan_service_impl") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
part_name = "wifi"
|
||||
sources = [
|
||||
"$WIFI_ROOT_DIR/services/wifi_standard/wifi_framework/wifi_manage/wifi_scan_sa/wifi_scan_callback_proxy.cpp",
|
||||
@ -279,12 +273,6 @@ if (defined(ohos_lite)) {
|
||||
ohos_source_set("wifi_device_service_impl") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
part_name = "wifi"
|
||||
sources = [
|
||||
"$WIFI_ROOT_DIR/services/wifi_standard/wifi_framework/wifi_manage/wifi_sta_sa/wifi_device_callback_proxy.cpp",
|
||||
@ -346,12 +334,6 @@ if (defined(ohos_lite)) {
|
||||
ohos_source_set("wifi_hotspot_service_impl") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
part_name = "wifi"
|
||||
sources = [
|
||||
"$WIFI_ROOT_DIR/services/wifi_standard/wifi_framework/wifi_manage/wifi_ap_sa/wifi_hotspot_callback_proxy.cpp",
|
||||
@ -402,12 +384,6 @@ if (defined(ohos_lite)) {
|
||||
ohos_source_set("wifi_p2p_service_impl") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
part_name = "wifi"
|
||||
sources = [
|
||||
"$WIFI_ROOT_DIR/frameworks/native/src/wifi_hid2d_msg.cpp",
|
||||
|
@ -71,7 +71,7 @@ void Handler::StopHandlerThread()
|
||||
return;
|
||||
}
|
||||
|
||||
void *Handler::RunHandleThreadFunc(void *pInstance) __attribute__((no_sanitize("cfi")))
|
||||
void *Handler::RunHandleThreadFunc(void *pInstance)
|
||||
{
|
||||
if (pInstance == nullptr) {
|
||||
LOGE("pInstance is null.\n");
|
||||
|
@ -119,7 +119,7 @@ WifiInternalEventDispatcher::WifiInternalEventDispatcher() : mRunFlag(true)
|
||||
WifiInternalEventDispatcher::~WifiInternalEventDispatcher()
|
||||
{}
|
||||
|
||||
NO_SANITIZE("cfi") int WifiInternalEventDispatcher::Init()
|
||||
int WifiInternalEventDispatcher::Init()
|
||||
{
|
||||
/* first init system notify service client here ! */
|
||||
|
||||
|
@ -143,12 +143,6 @@ if (defined(ohos_lite)) {
|
||||
ohos_source_set("wifi_utils") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
part_name = "wifi"
|
||||
sources = []
|
||||
|
||||
|
@ -96,7 +96,7 @@ void StandByListerner::RegisterStandByEvent()
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(standByEventMutex);
|
||||
if (isStandBySubscribered) {
|
||||
WIFI_LOGI("isStandBySubscribered is true");
|
||||
WIFI_LOGI("isStandBySubscribered is true!");
|
||||
return;
|
||||
}
|
||||
OHOS::EventFwk::MatchingSkills matchingSkills;
|
||||
@ -116,7 +116,7 @@ void StandByListerner::UnRegisterStandByEvent()
|
||||
WIFI_LOGI("UnRegisterStandByEvent enter");
|
||||
std::unique_lock<std::mutex> lock(standByEventMutex);
|
||||
if (!isStandBySubscribered) {
|
||||
WIFI_LOGI("isStandBySubscribered is false");
|
||||
WIFI_LOGI("isStandBySubscribered is false!");
|
||||
return;
|
||||
}
|
||||
if (!EventFwk::CommonEventManager::UnSubscribeCommonEvent(standBySubscriber_)) {
|
||||
|
@ -81,17 +81,17 @@ WifiEventSubscriberManager::WifiEventSubscriberManager()
|
||||
WifiTimer::GetInstance()->Register(timeoutCallback, locationTimerId, TIMEOUT_EVENT_SUBSCRIBER, false);
|
||||
WIFI_LOGI("RegisterLocationEvent success! locationTimerId:%{public}u", locationTimerId);
|
||||
}
|
||||
if (!isBatterySubscribered && batteryTimerId == 0) {
|
||||
if (batterySubscriber_ == nullptr && batteryTimerId == 0) {
|
||||
WifiTimer::TimerCallback timeoutCallback = std::bind(&WifiEventSubscriberManager::RegisterBatteryEvent, this);
|
||||
WifiTimer::GetInstance()->Register(timeoutCallback, batteryTimerId, TIMEOUT_EVENT_SUBSCRIBER, false);
|
||||
WIFI_LOGI("RegisterBatteryEvent success! locationTimerId:%{public}u", batteryTimerId);
|
||||
}
|
||||
if (!isEventSubscribered && appEventTimerId == 0) {
|
||||
if (eventSubscriber_ == nullptr && appEventTimerId == 0) {
|
||||
WifiTimer::TimerCallback timeoutCallback = std::bind(&WifiEventSubscriberManager::RegisterAppRemoved, this);
|
||||
WifiTimer::GetInstance()->Register(timeoutCallback, appEventTimerId, TIMEOUT_EVENT_SUBSCRIBER, false);
|
||||
}
|
||||
|
||||
if (!isThermalLevelSubscribered && thermalTimerId == 0) {
|
||||
if (thermalLevelSubscriber_ == nullptr && thermalTimerId == 0) {
|
||||
WifiTimer::TimerCallback timeoutCallback = std::bind(&WifiEventSubscriberManager::RegisterThermalLevel, this);
|
||||
WifiTimer::GetInstance()->Register(timeoutCallback, thermalTimerId, TIMEOUT_EVENT_SUBSCRIBER, false);
|
||||
}
|
||||
@ -127,13 +127,13 @@ WifiEventSubscriberManager::~WifiEventSubscriberManager()
|
||||
if (deviceProvisionObserver_) {
|
||||
UnRegisterDeviceProvisionEvent();
|
||||
}
|
||||
if (isBatterySubscribered) {
|
||||
if (batterySubscriber_) {
|
||||
UnRegisterBatteryEvent();
|
||||
}
|
||||
if (isEventSubscribered) {
|
||||
if (eventSubscriber_) {
|
||||
UnRegisterAppRemoved();
|
||||
}
|
||||
if (isThermalLevelSubscribered) {
|
||||
if (thermalLevelSubscriber_) {
|
||||
UnRegisterThermalLevel();
|
||||
}
|
||||
#ifdef HAS_POWERMGR_PART
|
||||
@ -490,7 +490,7 @@ void WifiEventSubscriberManager::UnRegisterDeviceProvisionEvent()
|
||||
void WifiEventSubscriberManager::RegisterBatteryEvent()
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(batteryEventMutex);
|
||||
if (isBatterySubscribered) {
|
||||
if (batterySubscriber_) {
|
||||
return;
|
||||
}
|
||||
OHOS::EventFwk::MatchingSkills matchingSkills;
|
||||
@ -502,7 +502,6 @@ void WifiEventSubscriberManager::RegisterBatteryEvent()
|
||||
WIFI_LOGE("BatteryEvent SubscribeCommonEvent() failed");
|
||||
} else {
|
||||
WIFI_LOGI("BatteryEvent SubscribeCommonEvent() OK");
|
||||
isBatterySubscribered = true;
|
||||
WifiTimer::GetInstance()->UnRegister(batteryTimerId);
|
||||
}
|
||||
}
|
||||
@ -510,13 +509,12 @@ void WifiEventSubscriberManager::RegisterBatteryEvent()
|
||||
void WifiEventSubscriberManager::UnRegisterBatteryEvent()
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(batteryEventMutex);
|
||||
if (!isBatterySubscribered) {
|
||||
if (!batterySubscriber_) {
|
||||
return;
|
||||
}
|
||||
if (!EventFwk::CommonEventManager::UnSubscribeCommonEvent(batterySubscriber_)) {
|
||||
WIFI_LOGE("BatteryEvent UnSubscribeCommonEvent() failed");
|
||||
} else {
|
||||
isBatterySubscribered = false;
|
||||
WIFI_LOGI("BatteryEvent UnSubscribeCommonEvent() OK");
|
||||
}
|
||||
}
|
||||
@ -653,7 +651,7 @@ void WifiEventSubscriberManager::UnRegisterPowerStateListener()
|
||||
void WifiEventSubscriberManager::RegisterAppRemoved()
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(appEventMutex);
|
||||
if (isEventSubscribered) {
|
||||
if (eventSubscriber_) {
|
||||
return;
|
||||
}
|
||||
OHOS::EventFwk::MatchingSkills matchingSkills;
|
||||
@ -664,7 +662,6 @@ void WifiEventSubscriberManager::RegisterAppRemoved()
|
||||
WIFI_LOGE("AppEvent SubscribeCommonEvent() failed");
|
||||
} else {
|
||||
WIFI_LOGI("AppEvent SubscribeCommonEvent() OK");
|
||||
isEventSubscribered = true;
|
||||
WifiTimer::GetInstance()->UnRegister(appEventTimerId);
|
||||
}
|
||||
}
|
||||
@ -672,13 +669,12 @@ void WifiEventSubscriberManager::RegisterAppRemoved()
|
||||
void WifiEventSubscriberManager::UnRegisterAppRemoved()
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(appEventMutex);
|
||||
if (!isEventSubscribered) {
|
||||
if (!eventSubscriber_) {
|
||||
return;
|
||||
}
|
||||
if (!EventFwk::CommonEventManager::UnSubscribeCommonEvent(eventSubscriber_)) {
|
||||
WIFI_LOGE("AppEvent UnSubscribeCommonEvent() failed");
|
||||
} else {
|
||||
isEventSubscribered = false;
|
||||
WIFI_LOGI("AppEvent UnSubscribeCommonEvent() OK");
|
||||
}
|
||||
}
|
||||
@ -686,7 +682,7 @@ void WifiEventSubscriberManager::UnRegisterAppRemoved()
|
||||
void WifiEventSubscriberManager::RegisterThermalLevel()
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(thermalEventMutex);
|
||||
if (isThermalLevelSubscribered) {
|
||||
if (thermalLevelSubscriber_) {
|
||||
return;
|
||||
}
|
||||
OHOS::EventFwk::MatchingSkills matchingSkills;
|
||||
@ -697,7 +693,6 @@ void WifiEventSubscriberManager::RegisterThermalLevel()
|
||||
WIFI_LOGE("THERMAL_LEVEL_CHANGED SubscribeCommonEvent() failed");
|
||||
} else {
|
||||
WIFI_LOGI("THERMAL_LEVEL_CHANGED SubscribeCommonEvent() OK");
|
||||
isThermalLevelSubscribered = true;
|
||||
WifiTimer::GetInstance()->UnRegister(thermalTimerId);
|
||||
}
|
||||
}
|
||||
@ -705,13 +700,12 @@ void WifiEventSubscriberManager::RegisterThermalLevel()
|
||||
void WifiEventSubscriberManager::UnRegisterThermalLevel()
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(thermalEventMutex);
|
||||
if (!isThermalLevelSubscribered) {
|
||||
if (!thermalLevelSubscriber_) {
|
||||
return;
|
||||
}
|
||||
if (!EventFwk::CommonEventManager::UnSubscribeCommonEvent(thermalLevelSubscriber_)) {
|
||||
WIFI_LOGE("THERMAL_LEVEL_CHANGED UnSubscribeCommonEvent() failed");
|
||||
} else {
|
||||
isThermalLevelSubscribered = false;
|
||||
WIFI_LOGI("THERMAL_LEVEL_CHANGED UnSubscribeCommonEvent() OK");
|
||||
}
|
||||
}
|
||||
|
@ -124,7 +124,6 @@ private:
|
||||
std::shared_ptr<AirplaneModeEventSubscriber> airplaneModeEventSubscriber_ = nullptr;
|
||||
uint32_t batteryTimerId{0};
|
||||
std::shared_ptr<BatteryEventSubscriber> batterySubscriber_ = nullptr;
|
||||
bool isBatterySubscribered = false;
|
||||
uint32_t locationTimerId{0};
|
||||
uint32_t migrateTimerId{0};
|
||||
static bool mIsMdmForbidden;
|
||||
@ -132,10 +131,8 @@ private:
|
||||
bool islocationModeObservered = false;
|
||||
uint32_t appEventTimerId{0};
|
||||
std::shared_ptr<AppEventSubscriber> eventSubscriber_ = nullptr;
|
||||
bool isEventSubscribered = false;
|
||||
uint32_t thermalTimerId{0};
|
||||
std::shared_ptr<ThermalLevelSubscriber> thermalLevelSubscriber_ = nullptr;
|
||||
bool isThermalLevelSubscribered = false;
|
||||
};
|
||||
|
||||
} // namespace Wifi
|
||||
|
@ -94,12 +94,6 @@ if (defined(ohos_lite)) {
|
||||
ohos_executable("wifi_hal_service") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
install_enable = true
|
||||
sources = local_base_sources
|
||||
|
||||
@ -153,12 +147,6 @@ if (defined(ohos_lite)) {
|
||||
ohos_executable("wifi_hal_service_updater") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
boundary_sanitize = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
install_enable = true
|
||||
sources = local_base_sources
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user