diff --git a/services/include/im_common_event_manager.h b/services/include/im_common_event_manager.h index 73787ad..a9e7386 100644 --- a/services/include/im_common_event_manager.h +++ b/services/include/im_common_event_manager.h @@ -17,7 +17,6 @@ #define FM_IMMS_PROJECT_IMCOMMONEVENTMANAGER_H #include - #include "common_event_subscriber.h" #include "common_event_subscribe_info.h" #include "common_event_data.h" @@ -25,7 +24,6 @@ namespace OHOS { namespace MiscServices { - class ImCommonEventManager : public RefBase { public: ImCommonEventManager(); @@ -36,7 +34,8 @@ public: class EventSubscriber : public EventFwk::CommonEventSubscriber { public: - EventSubscriber(const EventFwk::CommonEventSubscribeInfo &subscribeInfo) : EventFwk::CommonEventSubscriber(subscribeInfo) {} + EventSubscriber(const EventFwk::CommonEventSubscribeInfo &subscribeInfo) : + EventFwk::CommonEventSubscriber(subscribeInfo) {} void OnReceiveEvent(const EventFwk::CommonEventData &data); void startUser(int32_t newUserId); }; @@ -45,7 +44,6 @@ private: static std::mutex instanceLock_; static sptr instance_; }; - } // namespace MiscServices } // namespace OHOS #endif // FM_IMMS_PROJECT_IPLATFORMCALLBACK_H diff --git a/services/src/im_common_event_manager.cpp b/services/src/im_common_event_manager.cpp index e9be6d8..462291e 100644 --- a/services/src/im_common_event_manager.cpp +++ b/services/src/im_common_event_manager.cpp @@ -13,7 +13,6 @@ * limitations under the License. */ -#include #include "im_common_event_manager.h" #include "common_event_manager.h" #include "common_event_support.h" @@ -32,16 +31,12 @@ namespace MiscServices { /*! Constructor */ ImCommonEventManager::ImCommonEventManager() - { - - } + {} /*! Destructor */ ImCommonEventManager::~ImCommonEventManager() - { - - } + {} sptr ImCommonEventManager::GetInstance() { @@ -62,18 +57,14 @@ namespace MiscServices { EventFwk::CommonEventSubscribeInfo subscriberInfo(matchingSkills); - // std::shared_ptr subscriber = - // std::make_shared(subscriberInfo, event); - std::shared_ptr subscriber = - std::make_shared(subscriberInfo); - + std::shared_ptr subscriber = std::make_shared(subscriberInfo); if (subscriber == nullptr) { IMSA_HILOGI("ImCommonEventManager::SubscribeEvent subscriber is nullptr"); return false; } if (!EventFwk::CommonEventManager::SubscribeCommonEvent(subscriber)) { - IMSA_HILOGI("ImCommonEventManager::SubscribeEvent fail"); + IMSA_HILOGI("ImCommonEventManager::SubscribeEvent fail"); return false; } diff --git a/services/src/input_method_system_ability.cpp b/services/src/input_method_system_ability.cpp index ab58768..e0381b8 100644 --- a/services/src/input_method_system_ability.cpp +++ b/services/src/input_method_system_ability.cpp @@ -694,7 +694,8 @@ namespace MiscServices { } if (setting == nullptr || setting->GetUserState() != UserState::USER_STATE_UNLOCKED) { IMSA_HILOGE("InputMethodSystemAbility::OnHandleMessage Aborted! userId = %{public}d,", userId); - IMSA_HILOGE("InputMethodSystemAbility::OnHandleMessage Aborted! userState = %{public}d,", setting->GetUserState()); + IMSA_HILOGE("InputMethodSystemAbility::OnHandleMessage Aborted! userState = %{public}d", + setting->GetUserState()); return ErrorCode::ERROR_USER_NOT_UNLOCKED; }