mirror of
https://gitee.com/openharmony/telephony_core_service
synced 2024-11-24 00:20:11 +00:00
fix: fix thread for ces
Signed-off-by: liujiandong <liujiandong1@huawei.com>
This commit is contained in:
parent
9f0dbddc75
commit
4c114c905a
@ -41,6 +41,7 @@ void DeviceStateObserver::StartEventSubscriber(const std::shared_ptr<DeviceState
|
|||||||
matchingSkills.AddEvent(CommonEventSupport::COMMON_EVENT_CHARGING);
|
matchingSkills.AddEvent(CommonEventSupport::COMMON_EVENT_CHARGING);
|
||||||
matchingSkills.AddEvent(CommonEventSupport::COMMON_EVENT_DISCHARGING);
|
matchingSkills.AddEvent(CommonEventSupport::COMMON_EVENT_DISCHARGING);
|
||||||
CommonEventSubscribeInfo subscriberInfo(matchingSkills);
|
CommonEventSubscribeInfo subscriberInfo(matchingSkills);
|
||||||
|
subscriberInfo.SetThreadMode(EventFwk::CommonEventSubscribeInfo::COMMON);
|
||||||
subscriber_ = std::make_shared<DeviceStateEventSubscriber>(subscriberInfo);
|
subscriber_ = std::make_shared<DeviceStateEventSubscriber>(subscriberInfo);
|
||||||
subscriber_->SetEventHandler(deviceStateHandler);
|
subscriber_->SetEventHandler(deviceStateHandler);
|
||||||
subscriber_->InitEventMap();
|
subscriber_->InitEventMap();
|
||||||
|
@ -131,6 +131,7 @@ bool NetworkSearchHandler::InitOperatorName()
|
|||||||
EventFwk::MatchingSkills matchingSkills;
|
EventFwk::MatchingSkills matchingSkills;
|
||||||
matchingSkills.AddEvent(CommonEventSupport::COMMON_EVENT_OPERATOR_CONFIG_CHANGED);
|
matchingSkills.AddEvent(CommonEventSupport::COMMON_EVENT_OPERATOR_CONFIG_CHANGED);
|
||||||
EventFwk::CommonEventSubscribeInfo subscriberInfo(matchingSkills);
|
EventFwk::CommonEventSubscribeInfo subscriberInfo(matchingSkills);
|
||||||
|
subscriberInfo.SetThreadMode(EventFwk::CommonEventSubscribeInfo::COMMON);
|
||||||
operatorName_ = std::make_shared<OperatorName>(
|
operatorName_ = std::make_shared<OperatorName>(
|
||||||
subscriberInfo, nsm->GetNetworkSearchState(slotId_), nsm->GetSimManager(), networkSearchManager_, slotId_);
|
subscriberInfo, nsm->GetNetworkSearchState(slotId_), nsm->GetSimManager(), networkSearchManager_, slotId_);
|
||||||
if (operatorName_ == nullptr) {
|
if (operatorName_ == nullptr) {
|
||||||
|
Loading…
Reference in New Issue
Block a user