From bebb5cf4a273fad6ed424d9d37323854beabaddf Mon Sep 17 00:00:00 2001 From: hwyml Date: Wed, 17 Jul 2024 20:10:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91=E8=80=85=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=E4=B8=8D=E9=80=80=E5=87=BAusb=5Fservice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hwyml Change-Id: If4a73fbbd3e008c6954f1186a133af60ad715716 --- services/native/src/usb_service.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/native/src/usb_service.cpp b/services/native/src/usb_service.cpp index d7fc728d..760bac14 100644 --- a/services/native/src/usb_service.cpp +++ b/services/native/src/usb_service.cpp @@ -1629,6 +1629,11 @@ void UsbService::DumpHelp(int32_t fd) void UsbService::UnLoadSelf(UnLoadSaType type) { + if (OHOS::system::GetBoolParameter("const.security.developermode.state", true)) { + USB_HILOGI(MODULE_USB_SERVICE, "no need to unload in dev mode"); + return; + } + auto task = []() { auto samgrProxy = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); if (samgrProxy == nullptr) { -- Gitee