修复codecheck问题

Signed-off-by: c00524366 <chenjiale5@hisilicon.com>
This commit is contained in:
c00524366
2022-02-15 19:39:08 +08:00
parent ea1933b851
commit c97eed69a7
3 changed files with 8 additions and 18 deletions
+2 -4
View File
@@ -17,7 +17,6 @@
#define FM_IMMS_PROJECT_IMCOMMONEVENTMANAGER_H
#include <mutex>
#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<ImCommonEventManager> instance_;
};
} // namespace MiscServices
} // namespace OHOS
#endif // FM_IMMS_PROJECT_IPLATFORMCALLBACK_H
+4 -13
View File
@@ -13,7 +13,6 @@
* limitations under the License.
*/
#include <functional>
#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> ImCommonEventManager::GetInstance()
{
@@ -62,18 +57,14 @@ namespace MiscServices {
EventFwk::CommonEventSubscribeInfo subscriberInfo(matchingSkills);
// std::shared_ptr<EventSubscriber> subscriber =
// std::make_shared<EventSubscriber>(subscriberInfo, event);
std::shared_ptr<EventSubscriber> subscriber =
std::make_shared<EventSubscriber>(subscriberInfo);
std::shared_ptr<EventSubscriber> subscriber = std::make_shared<EventSubscriber>(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;
}
+2 -1
View File
@@ -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;
}