From 68e565416713617f3d0f10e5368b4e062f8a08e4 Mon Sep 17 00:00:00 2001 From: FangWuxing Date: Thu, 21 Aug 2025 09:11:30 +0000 Subject: [PATCH 1/9] =?UTF-8?q?=E5=8D=95=E5=BA=94=E7=94=A8=E6=8A=95?= =?UTF-8?q?=E5=B1=8F=E6=8B=89=E8=B5=B7=E8=BE=93=E5=85=A5=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=B3=95=E9=81=AE=E6=8C=A1=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: FangWuxing --- services/BUILD.gn | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/BUILD.gn b/services/BUILD.gn index 7561e6210..6679ece9e 100644 --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -24,6 +24,7 @@ config("inputmethod_services_native_config") { "${inputmethod_path}/frameworks/native/inputmethod_controller/include", "${inputmethod_path}/interfaces/inner_api/inputmethod_ability/include", "${inputmethod_path}/interfaces/inner_api/inputmethod_controller/include", + "${inputmethod_path}/services/adapter/display_adapter/include", "${inputmethod_path}/services/adapter/focus_monitor/include", "${inputmethod_path}/services/adapter/ime_connection_manager/include", "${inputmethod_path}/services/adapter/keyboard/include", @@ -58,6 +59,7 @@ ohos_shared_library("inputmethod_service") { "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_client_info.cpp", "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_method_tools.cpp", "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_method_utils.cpp", + "${inputmethod_path}/services/adapter/display_adapter/src/display_adapter.cpp", "${inputmethod_path}/services/adapter/focus_monitor/src/focus_change_listener.cpp", "${inputmethod_path}/services/adapter/focus_monitor/src/focus_monitor_manager.cpp", "${inputmethod_path}/services/adapter/ime_connection_manager/src/ime_connection.cpp", @@ -171,6 +173,7 @@ ohos_static_library("inputmethod_service_static") { "-Oz", ] sources = [ + "adapter/display_adapter/src/display_adapter.cpp", "adapter/focus_monitor/src/focus_change_listener.cpp", "adapter/focus_monitor/src/focus_monitor_manager.cpp", "adapter/ime_connection_manager/src/ime_connection.cpp", -- Gitee From 664db5a55e7c28c884859db4700caae8d2e8b98d Mon Sep 17 00:00:00 2001 From: FangWuxing Date: Thu, 21 Aug 2025 09:11:56 +0000 Subject: [PATCH 2/9] =?UTF-8?q?=E5=8D=95=E5=BA=94=E7=94=A8=E6=8A=95?= =?UTF-8?q?=E5=B1=8F=E6=8B=89=E8=B5=B7=E8=BE=93=E5=85=A5=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=B3=95=E9=81=AE=E6=8C=A1=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: FangWuxing --- .../display_adapter/include/display_adapter.h | 32 +++++++++++++ .../display_adapter/src/display_adapter.cpp | 47 +++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 services/adapter/display_adapter/include/display_adapter.h create mode 100644 services/adapter/display_adapter/src/display_adapter.cpp diff --git a/services/adapter/display_adapter/include/display_adapter.h b/services/adapter/display_adapter/include/display_adapter.h new file mode 100644 index 000000000..f9eac38f9 --- /dev/null +++ b/services/adapter/display_adapter/include/display_adapter.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INPUTMETHOD_IMF_DISPLAY_ADAPTER_H +#define INPUTMETHOD_IMF_DISPLAY_ADAPTER_H + +#include +#include + +namespace OHOS { +namespace MiscServices { +class DisplayAdapter final { +public: + static std::string GetDisplayName(uint64_t displayId); + static uint64_t GetDefaultDisplayId(); +}; +} // namespace MiscServices +} // namespace OHOS + +#endif //INPUTMETHOD_IMF_DISPLAY_ADAPTER_H \ No newline at end of file diff --git a/services/adapter/display_adapter/src/display_adapter.cpp b/services/adapter/display_adapter/src/display_adapter.cpp new file mode 100644 index 000000000..9634b7b74 --- /dev/null +++ b/services/adapter/display_adapter/src/display_adapter.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "display_adapter.h" + +#include + +#include "display_info.h" +#include "display_manager_lite.h" +#include "global.h" + +namespace OHOS { +namespace MiscServices { +using namespace OHOS::Rosen; +std::string DisplayAdapter::GetDisplayName(uint64_t displayId) +{ + sptr display = DisplayManagerLite::GetInstance().GetDisplayById(displayId); + if (display == nullptr) { + IMSA_HILOGE("display is null!"); + return ""; + } + sptr displayInfo = display->GetDisplayInfo(); + if (displayInfo == nullptr) { + IMSA_HILOGE("displayInfo is null!"); + return ""; + } + return displayInfo->GetName(); +} + +uint64_t DisplayAdapter::GetDefaultDisplayId() +{ + return DisplayManagerLite::GetInstance().GetDefaultDisplayId(); +} +} // namespace MiscServices +} // namespace OHOS \ No newline at end of file -- Gitee From ea65aba51b4d98edda0b0b7eeb8c4cd5e5357e6d Mon Sep 17 00:00:00 2001 From: FangWuxing Date: Thu, 21 Aug 2025 09:12:06 +0000 Subject: [PATCH 3/9] =?UTF-8?q?=E5=8D=95=E5=BA=94=E7=94=A8=E6=8A=95?= =?UTF-8?q?=E5=B1=8F=E6=8B=89=E8=B5=B7=E8=BE=93=E5=85=A5=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=B3=95=E9=81=AE=E6=8C=A1=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: FangWuxing --- services/include/ime_info_inquirer.h | 1 + services/src/ime_info_inquirer.cpp | 22 +++++++++------------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/services/include/ime_info_inquirer.h b/services/include/ime_info_inquirer.h index 54d7ae8be..d99de2814 100644 --- a/services/include/ime_info_inquirer.h +++ b/services/include/ime_info_inquirer.h @@ -105,6 +105,7 @@ public: bool IsImeInstalled(const int32_t userId, const std::string &bundleName, const std::string &extName); bool IsInputMethodExtension(pid_t pid); bool IsRestrictedDefaultImeByDisplay(uint64_t displayId); + bool IsRestrictedMainDisplayId(uint64_t displayId); bool IsDynamicStartIme(); std::unordered_set GetDisableNumKeyAppDeviceTypes(); bool IsCapacitySupport(const std::string &capacityName); diff --git a/services/src/ime_info_inquirer.cpp b/services/src/ime_info_inquirer.cpp index 73d83a1e7..155e08004 100644 --- a/services/src/ime_info_inquirer.cpp +++ b/services/src/ime_info_inquirer.cpp @@ -27,8 +27,7 @@ #include "parameters.h" #include "singleton.h" #include "system_ability_definition.h" -#include "display_manager_lite.h" -#include "display_info.h" +#include "display_adapter.h" namespace OHOS { namespace MiscServices { @@ -1227,20 +1226,17 @@ bool ImeInfoInquirer::IsInputMethodExtension(pid_t pid) bool ImeInfoInquirer::IsRestrictedDefaultImeByDisplay(uint64_t displayId) { - sptr display = Rosen::DisplayManagerLite::GetInstance().GetDisplayById(displayId); - if (display == nullptr) { - IMSA_HILOGE("display is null!"); - return false; - } - sptr displayInfo = display->GetDisplayInfo(); - if (displayInfo == nullptr) { - IMSA_HILOGE("displayInfo is null!"); - return false; - } - auto screenName = displayInfo->GetName(); + auto screenName = DisplayAdapter::GetDisplayName(displayId); return systemConfig_.defaultImeScreenList.find(screenName) != systemConfig_.defaultImeScreenList.end(); } +bool ImeInfoInquirer::IsRestrictedMainDisplayId(uint64_t displayId) +{ + auto screenName = DisplayAdapter::GetDisplayName(displayId); + return systemConfig_.defaultMainDisplayIdScreenList.find(screenName) + != systemConfig_.defaultMainDisplayIdScreenList.end(); +} + bool ImeInfoInquirer::IsDynamicStartIme() { if (systemConfig_.dynamicStartImeSysParam.empty()) { -- Gitee From 5a4e3be3de497f88573daa7b86ebb0a2eeaf2770 Mon Sep 17 00:00:00 2001 From: FangWuxing Date: Thu, 21 Aug 2025 09:13:03 +0000 Subject: [PATCH 4/9] =?UTF-8?q?=E5=8D=95=E5=BA=94=E7=94=A8=E6=8A=95?= =?UTF-8?q?=E5=B1=8F=E6=8B=89=E8=B5=B7=E8=BE=93=E5=85=A5=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=B3=95=E9=81=AE=E6=8C=A1=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: FangWuxing --- services/include/sys_cfg_parser.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/include/sys_cfg_parser.h b/services/include/sys_cfg_parser.h index 664f7c1d3..c980d0db1 100644 --- a/services/include/sys_cfg_parser.h +++ b/services/include/sys_cfg_parser.h @@ -34,6 +34,7 @@ struct SystemConfig : public Serializable { std::unordered_set proxyImeUidList; std::unordered_set specialSaUidList; std::unordered_set defaultImeScreenList; + std::unordered_set defaultMainDisplayIdScreenList; std::unordered_set supportedCapacityList; std::string dynamicStartImeSysParam; std::string dynamicStartImeValue; @@ -53,6 +54,7 @@ struct SystemConfig : public Serializable { GetValue(node, GET_NAME(proxyImeUidList), proxyImeUidList); GetValue(node, GET_NAME(specialSaUidList), specialSaUidList); GetValue(node, GET_NAME(defaultImeScreenList), defaultImeScreenList); + GetValue(node, GET_NAME(defaultMainDisplayIdScreenList), defaultMainDisplayIdScreenList); GetValue(node, GET_NAME(supportedCapacityList), supportedCapacityList); GetValue(node, GET_NAME(dynamicStartImeSysParam), dynamicStartImeSysParam); GetValue(node, GET_NAME(dynamicStartImeValue), dynamicStartImeValue); -- Gitee From bb6a3467e83b69fdca774e8543709a4a09edf956 Mon Sep 17 00:00:00 2001 From: FangWuxing Date: Thu, 21 Aug 2025 09:13:20 +0000 Subject: [PATCH 5/9] =?UTF-8?q?=E5=8D=95=E5=BA=94=E7=94=A8=E6=8A=95?= =?UTF-8?q?=E5=B1=8F=E6=8B=89=E8=B5=B7=E8=BE=93=E5=85=A5=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=B3=95=E9=81=AE=E6=8C=A1=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: FangWuxing --- services/include/peruser_session.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/include/peruser_session.h b/services/include/peruser_session.h index 8d749c9d1..75aa943f1 100644 --- a/services/include/peruser_session.h +++ b/services/include/peruser_session.h @@ -161,7 +161,7 @@ public: bool IsSaReady(int32_t saId); void TryUnloadSystemAbility(); void OnCallingDisplayIdChanged(const int32_t windowId, const int32_t callingPid, const uint64_t displayId); - ImfCallingWindowInfo GetCallingWindowInfo(const InputClientInfo &clientInfo); + ImfCallingWindowInfo GetFinalCallingWindowInfo(const InputClientInfo &clientInfo); bool SpecialScenarioCheck(); bool IsScreenLockOrSecurityFlag(); int32_t SpecialSendPrivateData(const std::unordered_map &privateCommand); @@ -273,6 +273,7 @@ private: bool GetInputTypeToStart(std::shared_ptr &imeToStart); void HandleBindImeChanged(InputClientInfo &newClientInfo, const std::shared_ptr &clientGroup); int32_t NotifyCallingDisplayChanged(uint64_t displayId); + ImfCallingWindowInfo GetCallingWindowInfo(const InputClientInfo &clientInfo); bool GetCallingWindowInfo(const InputClientInfo &clientInfo, Rosen::CallingWindowInfo &callingWindowInfo); int32_t SendPrivateData(const std::unordered_map &privateCommand); void ClearRequestKeyboardReason(std::shared_ptr &clientInfo); -- Gitee From c795ff52dcd355921165269e0eab2bec4d8d1b0f Mon Sep 17 00:00:00 2001 From: FangWuxing Date: Thu, 21 Aug 2025 10:18:57 +0000 Subject: [PATCH 6/9] =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=B3=95=E9=81=AE?= =?UTF-8?q?=E6=8C=A1=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: FangWuxing --- services/src/input_method_system_ability.cpp | 2 +- services/src/peruser_session.cpp | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/services/src/input_method_system_ability.cpp b/services/src/input_method_system_ability.cpp index af92b18f9..a738fe496 100644 --- a/services/src/input_method_system_ability.cpp +++ b/services/src/input_method_system_ability.cpp @@ -594,7 +594,7 @@ int32_t InputMethodSystemAbility::GenerateClientInfo(int32_t userId, InputClient clientInfo.name = ImfHiSysEventUtil::GetAppName(tokenId); auto session = UserSessionManager::GetInstance().GetUserSession(userId); if (session != nullptr) { - auto callingWindowInfo = session->GetCallingWindowInfo(clientInfo); + auto callingWindowInfo = session->GetFinalCallingWindowInfo(clientInfo); clientInfo.config.inputAttribute.windowId = callingWindowInfo.windowId; clientInfo.config.inputAttribute.callingDisplayId = callingWindowInfo.displayId; clientInfo.config.inputAttribute.needAutoInputNumkey = diff --git a/services/src/peruser_session.cpp b/services/src/peruser_session.cpp index ab28232a5..ac6bdd162 100644 --- a/services/src/peruser_session.cpp +++ b/services/src/peruser_session.cpp @@ -48,6 +48,7 @@ #include "ime_state_manager_factory.h" #include "inputmethod_trace.h" #include "notify_service_impl.h" +#include "display_adapter.h" namespace OHOS { namespace MiscServices { @@ -1534,7 +1535,7 @@ int32_t PerUserSession::OnSetCallingWindow(uint32_t callingWindowId, clientGroup->NotifyInputStartToClients(callingWindowId, static_cast(clientInfo->requestKeyboardReason)); if (callingWindowId != INVALID_WINDOW_ID) { - auto callingWindowInfo = GetCallingWindowInfo(*clientInfo); + auto callingWindowInfo = GetFinalCallingWindowInfo(*clientInfo); clientInfo->config.inputAttribute.windowId = callingWindowInfo.windowId; bool isNotifyDisplayChanged = clientInfo->config.inputAttribute.callingDisplayId != callingWindowInfo.displayId && @@ -2501,6 +2502,17 @@ int32_t PerUserSession::NotifyCallingDisplayChanged(uint64_t displayId) return ret; } +ImfCallingWindowInfo PerUserSession::GetFinalCallingWindowInfo(const InputClientInfo &clientInfo) +{ + auto windowInfo = GetCallingWindowInfo(clientInfo); + if (SceneBoardJudgement::IsSceneBoardEnabled() && + ImeInfoInquirer::GetInstance().IsRestrictedMainDisplayId(windowInfo.displayId)) { + IMSA_HILOGI("get default displayId"); + windowInfo.displayId = DisplayAdapter::GetDefaultDisplayId(); + } + return windowInfo; +} + ImfCallingWindowInfo PerUserSession::GetCallingWindowInfo(const InputClientInfo &clientInfo) { InputMethodSyncTrace tracer("GetCallingWindowInfo trace"); -- Gitee From 1eb1d2955994324534524924e797e6e73aeddf89 Mon Sep 17 00:00:00 2001 From: FangWuxing Date: Fri, 22 Aug 2025 03:29:46 +0000 Subject: [PATCH 7/9] =?UTF-8?q?=E5=8D=95=E5=BA=94=E7=94=A8=E6=8A=95?= =?UTF-8?q?=E5=B1=8F=E6=8B=89=E8=B5=B7=E8=BE=93=E5=85=A5=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=B3=95=E9=81=AE=E6=8C=A1=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: FangWuxing --- services/include/sys_cfg_parser.h | 4 ++-- services/src/ime_info_inquirer.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/include/sys_cfg_parser.h b/services/include/sys_cfg_parser.h index c980d0db1..4c24401d8 100644 --- a/services/include/sys_cfg_parser.h +++ b/services/include/sys_cfg_parser.h @@ -34,7 +34,7 @@ struct SystemConfig : public Serializable { std::unordered_set proxyImeUidList; std::unordered_set specialSaUidList; std::unordered_set defaultImeScreenList; - std::unordered_set defaultMainDisplayIdScreenList; + std::unordered_set defaultMainDisplayScreenList; std::unordered_set supportedCapacityList; std::string dynamicStartImeSysParam; std::string dynamicStartImeValue; @@ -54,7 +54,7 @@ struct SystemConfig : public Serializable { GetValue(node, GET_NAME(proxyImeUidList), proxyImeUidList); GetValue(node, GET_NAME(specialSaUidList), specialSaUidList); GetValue(node, GET_NAME(defaultImeScreenList), defaultImeScreenList); - GetValue(node, GET_NAME(defaultMainDisplayIdScreenList), defaultMainDisplayIdScreenList); + GetValue(node, GET_NAME(defaultMainDisplayScreenList), defaultMainDisplayScreenList); GetValue(node, GET_NAME(supportedCapacityList), supportedCapacityList); GetValue(node, GET_NAME(dynamicStartImeSysParam), dynamicStartImeSysParam); GetValue(node, GET_NAME(dynamicStartImeValue), dynamicStartImeValue); diff --git a/services/src/ime_info_inquirer.cpp b/services/src/ime_info_inquirer.cpp index 155e08004..5c06d246e 100644 --- a/services/src/ime_info_inquirer.cpp +++ b/services/src/ime_info_inquirer.cpp @@ -1233,8 +1233,8 @@ bool ImeInfoInquirer::IsRestrictedDefaultImeByDisplay(uint64_t displayId) bool ImeInfoInquirer::IsRestrictedMainDisplayId(uint64_t displayId) { auto screenName = DisplayAdapter::GetDisplayName(displayId); - return systemConfig_.defaultMainDisplayIdScreenList.find(screenName) - != systemConfig_.defaultMainDisplayIdScreenList.end(); + return systemConfig_.defaultMainDisplayScreenList.find(screenName) != + systemConfig_.defaultMainDisplayScreenList.end(); } bool ImeInfoInquirer::IsDynamicStartIme() -- Gitee From b895513450f9d4595f7d5ec3872a01b39f9267fe Mon Sep 17 00:00:00 2001 From: FangWuxing Date: Thu, 28 Aug 2025 06:23:35 +0000 Subject: [PATCH 8/9] =?UTF-8?q?=20=E5=8D=95=E5=BA=94=E7=94=A8=E6=8A=95?= =?UTF-8?q?=E5=B1=8F=E6=8B=89=E8=B5=B7=E8=BE=93=E5=85=A5=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=B3=95=E9=81=AE=E6=8C=A1=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: FangWuxing --- .../src/input_method_private_member_test.cpp | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/unittest/cpp_test/src/input_method_private_member_test.cpp b/test/unittest/cpp_test/src/input_method_private_member_test.cpp index b22bb83fa..76214b5d1 100644 --- a/test/unittest/cpp_test/src/input_method_private_member_test.cpp +++ b/test/unittest/cpp_test/src/input_method_private_member_test.cpp @@ -53,6 +53,8 @@ #include "keyboard_event.h" #include "os_account_manager.h" #include "tdd_util.h" +#include "window_adapter.h" +#include "display_adapter.h" using namespace testing::ext; using namespace testing::mt; @@ -2946,5 +2948,27 @@ HWTEST_F(InputMethodPrivateMemberTest, IMSA_IsTmpIme, TestSize.Level0) ret = systemAbility.IsTmpImeSwitchSubtype(MAIN_USER_ID, tokenId, switchInfo); EXPECT_TRUE(ret); } + +/** + * @tc.name: PerUserSession_GetFinalCallingWindowInfo + * @tc.desc: PerUserSession_GetFinalCallingWindowInfo + * @tc.type: FUNC + * @tc.require: + */ +HWTEST_F(InputMethodPrivateMemberTest, PerUserSession_GetFinalCallingWindowInfo, TestSize.Level0) +{ + IMSA_HILOGI("InputMethodPrivateMemberTest::PerUserSession_GetFinalCallingWindowInfo start."); + auto userSession = std::make_shared(MAIN_USER_ID); + Rosen::CallingWindowInfo callingWindowInfo; + Rosen::FocusChangeInfo focusInfo; + WindowAdapter::GetFocusInfo(focusInfo); + WindowAdapter::GetCallingWindowInfo(focusInfo.windowId_, userSession->userId_, callingWindowInfo); + auto screenName = DisplayAdapter::GetDisplayName(callingWindowInfo.displayId_); + ImeInfoInquirer.GetInstance().systemConfig_.defaultMainDisplayScreenList.insert(screenName); + InputClientInfo clientInfo; + clientInfo.config.windowId = focusInfo.windowId_; + ImfCallingWindowInfo windowInfo = userSession->GetFinalCallingWindowInfo(clientInfo); + EXPECT_TRUE(windowInfo.displayId == DisplayAdapter::GetDefaultDisplayId()); +} } // namespace MiscServices } // namespace OHOS \ No newline at end of file -- Gitee From a5e28a0ea2cac4e6c0322758c789871413998823 Mon Sep 17 00:00:00 2001 From: FangWuxing Date: Thu, 28 Aug 2025 06:46:50 +0000 Subject: [PATCH 9/9] =?UTF-8?q?=E5=8D=95=E5=BA=94=E7=94=A8=E6=8A=95?= =?UTF-8?q?=E5=B1=8F=E6=8B=89=E8=B5=B7=E8=BE=93=E5=85=A5=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=B3=95=E9=81=AE=E6=8C=A1=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: FangWuxing --- test/unittest/cpp_test/src/input_method_private_member_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unittest/cpp_test/src/input_method_private_member_test.cpp b/test/unittest/cpp_test/src/input_method_private_member_test.cpp index 76214b5d1..4826653dd 100644 --- a/test/unittest/cpp_test/src/input_method_private_member_test.cpp +++ b/test/unittest/cpp_test/src/input_method_private_member_test.cpp @@ -2964,7 +2964,7 @@ HWTEST_F(InputMethodPrivateMemberTest, PerUserSession_GetFinalCallingWindowInfo, WindowAdapter::GetFocusInfo(focusInfo); WindowAdapter::GetCallingWindowInfo(focusInfo.windowId_, userSession->userId_, callingWindowInfo); auto screenName = DisplayAdapter::GetDisplayName(callingWindowInfo.displayId_); - ImeInfoInquirer.GetInstance().systemConfig_.defaultMainDisplayScreenList.insert(screenName); + ImeInfoInquirer::GetInstance().systemConfig_.defaultMainDisplayScreenList.insert(screenName); InputClientInfo clientInfo; clientInfo.config.windowId = focusInfo.windowId_; ImfCallingWindowInfo windowInfo = userSession->GetFinalCallingWindowInfo(clientInfo); -- Gitee