From b634f69d917c9f02e50d6bae1500a8baf9f76f77 Mon Sep 17 00:00:00 2001 From: yangjintaoYYDS Date: Wed, 10 Sep 2025 17:46:44 +0800 Subject: [PATCH] 0910mapclear Signed-off-by: yangjintaoYYDS --- service/key_command/src/key_command_handler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/key_command/src/key_command_handler.cpp b/service/key_command/src/key_command_handler.cpp index 1d1c59ca8d..188689cf12 100644 --- a/service/key_command/src/key_command_handler.cpp +++ b/service/key_command/src/key_command_handler.cpp @@ -2507,6 +2507,7 @@ void KeyCommandHandler::LaunchAbility(const Ability &ability, int64_t delay) DfxHisysevent::ReportApiCallTimes(ApiDurationStatistics::Api::ABILITY_MGR_CLIENT_START_ABILITY, durationMS); #endif // OHOS_BUILD_ENABLE_DFX_RADAR if (err != ERR_OK) { + specialKeys_.clear(); MMI_HILOGE("LaunchAbility failed, bundleName:%{public}s, err:%{public}d", ability.bundleName.c_str(), err); return; } @@ -2520,6 +2521,7 @@ void KeyCommandHandler::LaunchAbility(const Ability &ability, int64_t delay) napData.uid = -1; napData.bundleName = ability.bundleName; int32_t syncState = ACTIVE_EVENT; + specialKeys_.clear(); NapProcess::GetInstance()->AddMmiSubscribedEventData(napData, syncState); NapProcess::GetInstance()->NotifyBundleName(napData, syncState); MMI_HILOGW("End launch ability, bundleName:%{public}s", ability.bundleName.c_str()); @@ -2586,6 +2588,7 @@ void KeyCommandHandler::LaunchAbility(const Ability &ability) } } } + specialKeys_.clear(); MMI_HILOGW("End launch ability, bundleName:%{public}s", ability.bundleName.c_str()); } -- Gitee