From fcface24c7c88fbac21a34c193099fc77a42ba39 Mon Sep 17 00:00:00 2001 From: sin_dzzeng <13277932042@163.com> Date: Wed, 16 Mar 2022 01:03:41 +0800 Subject: [PATCH] =?UTF-8?q?device=20UI=E8=A7=A3=E8=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sin_dzzeng <13277932042@163.com> --- bundle.json | 2 +- devicemanager.gni | 3 --- ext/BUILD.gn | 10 ++++------ ext/pin_auth/show_pin_dialog/dialog_ui/js/BUILD.gn | 4 +--- services/devicemanagerservice/BUILD.gn | 11 +++-------- .../devicemanagerservice/include/config/json_config.h | 11 +---------- .../src/authentication/dm_auth_manager.cpp | 10 +--------- 7 files changed, 11 insertions(+), 40 deletions(-) diff --git a/bundle.json b/bundle.json index b6d72ecff..06952ef47 100644 --- a/bundle.json +++ b/bundle.json @@ -14,7 +14,7 @@ "name": "device_manager_base", "subsystem": "distributedhardware", "syscap":[ "SystemCapability.DistributedHardware.DeviceManager" ], - "features":["device_manager_base_no_interaction_auth"], + "features":[], "adapted_system_type": [ "standard", "small" ], "rom": "2M", "ram": "16M", diff --git a/devicemanager.gni b/devicemanager.gni index 517e229e1..bc49acbf9 100644 --- a/devicemanager.gni +++ b/devicemanager.gni @@ -26,6 +26,3 @@ ext_path = "${devicemanager_path}/ext" #----------------------compilation options--------------------------# dm_ldflags = [ "-lpthread" ] -declare_args() { - device_manager_base_no_interaction_auth = false -} diff --git a/ext/BUILD.gn b/ext/BUILD.gn index 99bdeaa31..bfbd36e1f 100644 --- a/ext/BUILD.gn +++ b/ext/BUILD.gn @@ -17,11 +17,9 @@ import("//foundation/distributedhardware/devicemanager/devicemanager.gni") group("ext_modules") { deps = [] if (support_jsapi) { - deps += [ "./profile:devicemanagerext_profile" ] - if (device_manager_base_no_interaction_auth) { - deps += [ "./no_interaction_auth:devicemanagerext_no_interaction_auth" ] - } else { - deps += [ "./pin_auth:devicemanagerext_pin_auth" ] - } + deps += [ + "./pin_auth:devicemanagerext_pin_auth", + "./profile:devicemanagerext_profile", + ] } } diff --git a/ext/pin_auth/show_pin_dialog/dialog_ui/js/BUILD.gn b/ext/pin_auth/show_pin_dialog/dialog_ui/js/BUILD.gn index d0042194c..893432b12 100644 --- a/ext/pin_auth/show_pin_dialog/dialog_ui/js/BUILD.gn +++ b/ext/pin_auth/show_pin_dialog/dialog_ui/js/BUILD.gn @@ -15,9 +15,7 @@ import("//foundation/ace/ace_engine/build/ace_gen_sa_dialog_js.gni") import("//foundation/distributedhardware/devicemanager/devicemanager.gni") gen_sa_dialog_js("dialog_js_files_etc") { - if (!device_manager_base_no_interaction_auth) { - project_path = "//foundation/distributedhardware/devicemanager/ext/pin_auth/show_pin_dialog/dialog_ui/js" - } + project_path = "//foundation/distributedhardware/devicemanager/ext/pin_auth/show_pin_dialog/dialog_ui/js" dialog_name = "show_pin_service" part_name = "device_manager_base" subsystem_name = "distributedhardware" diff --git a/services/devicemanagerservice/BUILD.gn b/services/devicemanagerservice/BUILD.gn index 9deff82fc..71f1d6812 100755 --- a/services/devicemanagerservice/BUILD.gn +++ b/services/devicemanagerservice/BUILD.gn @@ -93,6 +93,7 @@ if (defined(ohos_lite)) { ] deps = [ + "${common_path}/include/show_confirm_dialog/dialog_ui/js:dialog_js_files_etc", "${innerkits_path}/native_cpp:devicemanagersdk", "${utils_path}:devicemanagerutils", "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits", @@ -100,16 +101,10 @@ if (defined(ohos_lite)) { "//foundation/aafwk/standard/interfaces/innerkits/ability_manager:ability_manager", "//foundation/aafwk/standard/interfaces/innerkits/want:want", "//foundation/aafwk/standard/services/abilitymgr:abilityms", + "//foundation/ace/ace_engine/interfaces/innerkits/ui_service_manager:ui_service_mgr", + "//foundation/windowmanager/wm:libwm", ] - if (!device_manager_base_no_interaction_auth) { - deps += [ - "${common_path}/include/show_confirm_dialog/dialog_ui/js:dialog_js_files_etc", - "//foundation/ace/ace_engine/interfaces/innerkits/ui_service_manager:ui_service_mgr", - "//foundation/windowmanager/wm:libwm", - ] - defines += [ "SUPPORT_GRAPHICS" ] - } external_deps = [ "ability_runtime:app_manager", "bundle_framework:appexecfwk_base", diff --git a/services/devicemanagerservice/include/config/json_config.h b/services/devicemanagerservice/include/config/json_config.h index 817af97cb..5c497f5bd 100644 --- a/services/devicemanagerservice/include/config/json_config.h +++ b/services/devicemanagerservice/include/config/json_config.h @@ -79,18 +79,9 @@ const std::string authJsonConfigString = "funcName": "CreateNfcAuthObject", "soName": "libdevicemanager_nfcauth.z.so", "soPath": "/system/lib/" - }, - { - "name": "no_interaction_auth", - "type": "AUTHENTICATE", - "version": "1.0", - "authType": 4, - "funcName": "CreatePinAuthObject", - "soName": "libdevicemanagerext_no_interaction_auth.z.so", - "soPath": "/system/lib/" } ] })"; } // namespace DistributedHardware } // namespace OHOS -#endif // OHOS_OHOS_DM_JSON_CONFIG_H \ No newline at end of file +#endif // OHOS_OHOS_DM_JSON_CONFIG_H diff --git a/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp b/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp index bdb2f2048..9cb9504c4 100644 --- a/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp +++ b/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp @@ -25,11 +25,9 @@ #include "multiple_user_connector.h" #include "nlohmann/json.hpp" #include "parameter.h" -#ifdef SUPPORT_GRAPHICS #include "ui_service_mgr_client.h" #include "dialog_callback_stub.h" #include "dialog_callback.h" -#endif namespace OHOS { namespace DistributedHardware { @@ -557,9 +555,7 @@ int32_t DmAuthManager::AddMember(const std::string &deviceId) return DM_FAILED; } LOGI("DmAuthManager::authRequestContext CancelDisplay start"); -#ifdef SUPPORT_GRAPHICS Ace::UIServiceMgrClient::GetInstance()->CancelDialog(authResponseContext_->pageId); -#endif return DM_OK; } @@ -587,7 +583,6 @@ int32_t DmAuthManager::JoinNetwork() void DmAuthManager::AuthenticateFinish() { LOGI("DmAuthManager::AuthenticateFinish start"); -#ifdef SUPPORT_GRAPHICS if (authResponseState_ != nullptr) { if (authResponseState_->GetStateType() == AuthState::AUTH_RESPONSE_FINISH) { Ace::UIServiceMgrClient::GetInstance()->CancelDialog(authResponseContext_->pageId); @@ -637,7 +632,6 @@ void DmAuthManager::AuthenticateFinish() authRequestState_ = nullptr; authMessageProcessor_ = nullptr; } -#endif LOGI("DmAuthManager::AuthenticateFinish complete"); } @@ -710,7 +704,6 @@ int32_t DmAuthManager::GetPinCode() void DmAuthManager::ShowConfigDialog() { -#ifdef SUPPORT_GRAPHICS LOGI("ShowConfigDialog start"); nlohmann::json jsonObj; jsonObj[TAG_AUTH_TYPE] = AUTH_TYPE_PIN; @@ -730,8 +723,7 @@ void DmAuthManager::ShowConfigDialog() LOGI("CancelDialog start id:%d,event:%s,parms:%s", id, event.c_str(), params.c_str()); authMgr_->StartAuthProcess(atoi(params.c_str())); }); - LOGI("ShowConfigDialog end"); -#endif + LOGI("ShowConfigDialog end"); } void DmAuthManager::ShowAuthInfoDialog() -- Gitee