!36781 SUEC提供方不处理除Shift+tab外的其他组合键

Merge pull request !36781 from ZhangYu/suec
This commit is contained in:
openharmony_ci 2024-07-12 13:05:07 +00:00 committed by Gitee
commit 91a3dcce7c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 20 additions and 15 deletions

View File

@ -44,7 +44,6 @@
#include "core/common/router_recover_record.h"
#include "core/components/common/layout/constants.h"
#include "core/pipeline/pipeline_context.h"
#include "interfaces/inner_api/ace/constants.h"
namespace OHOS::Accessibility {
class AccessibilityElementInfo;
@ -180,16 +179,6 @@ public:
return resRegister_;
}
UIContentType GetUIContentType() const
{
return uIContentType_;
}
void SetUIContentType(UIContentType uIContentType)
{
uIContentType_ = uIContentType;
}
RefPtr<PipelineBase> GetPipelineContext() const override
{
std::lock_guard<std::mutex> lock(pipelineMutex_);
@ -743,7 +732,6 @@ private:
mutable std::mutex cardTokensMutex_;
std::string webHapPath_;
UIContentType uIContentType_ = UIContentType::UNDEFINED;
bool installationFree_ = false;
SharePanelCallback sharePanelCallback_ = nullptr;

View File

@ -16,12 +16,13 @@
#ifndef FOUNDATION_ACE_FRAMEWORKS_CORE_COMMON_CONTAINER_H
#define FOUNDATION_ACE_FRAMEWORKS_CORE_COMMON_CONTAINER_H
#include <atomic>
#include <functional>
#include <mutex>
#include <unordered_map>
#include <atomic>
#include "interfaces/inner_api/ace/ace_forward_compatibility.h"
#include "interfaces/inner_api/ace/constants.h"
#include "interfaces/inner_api/ace/navigation_controller.h"
#include "base/memory/ace_type.h"
@ -33,6 +34,7 @@
#include "base/utils/system_properties.h"
#include "base/utils/utils.h"
#include "core/common/ace_application_info.h"
#include "core/common/container_consts.h"
#include "core/common/display_info.h"
#include "core/common/frontend.h"
#include "core/common/page_url_checker.h"
@ -43,11 +45,10 @@
#include "core/components/common/layout/constants.h"
#include "core/components_ng/base/distributed_ui.h"
#include "core/components_ng/pattern/app_bar/app_bar_view.h"
#include "core/components_ng/pattern/navigator/navigator_event_hub.h"
#include "core/components_ng/pattern/navigation/navigation_route.h"
#include "core/components_ng/pattern/navigator/navigator_event_hub.h"
#include "core/event/pointer_event.h"
#include "core/pipeline/pipeline_base.h"
#include "core/common/container_consts.h"
namespace OHOS::Ace {
@ -555,6 +556,16 @@ public:
apiTargetVersion_ = apiTargetVersion % 1000;
}
UIContentType GetUIContentType() const
{
return uIContentType_;
}
void SetUIContentType(UIContentType uIContentType)
{
uIContentType_ = uIContentType;
}
private:
static bool IsIdAvailable(int32_t id);
@ -582,6 +593,8 @@ private:
std::shared_ptr<NG::DistributedUI> distributedUI_;
RefPtr<NG::AppBarView> appBar_;
int32_t apiTargetVersion_ = 0;
// Define the type of UI Content, for example, Security UIExtension.
UIContentType uIContentType_ = UIContentType::UNDEFINED;
ACE_DISALLOW_COPY_AND_MOVE(Container);
};

View File

@ -1776,6 +1776,10 @@ bool TriggerKeyboardShortcut(const KeyEvent& event, const std::vector<NG::Keyboa
bool EventManager::DispatchKeyboardShortcut(const KeyEvent& event)
{
auto container = Container::GetContainer(instanceId_);
if (container && container->GetUIContentType() == UIContentType::SECURITY_UI_EXTENSION) {
return false;
}
if (event.action != KeyAction::DOWN) {
return false;
}