From a30035114e66b08866f2624e13b117bc7dba2740 Mon Sep 17 00:00:00 2001 From: lanhaoyu Date: Fri, 14 Feb 2025 10:56:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E7=94=A8=E9=94=815.0.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lanhaoyu --- frameworks/src/bundle_command.cpp | 1 + frameworks/src/bundle_command_common.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/frameworks/src/bundle_command.cpp b/frameworks/src/bundle_command.cpp index 2855098..ab61020 100644 --- a/frameworks/src/bundle_command.cpp +++ b/frameworks/src/bundle_command.cpp @@ -925,6 +925,7 @@ ErrCode BundleManagerShellCommand::RunAsUninstallCommand() InstallParam installParam; installParam.userId = userId; installParam.isKeepData = isKeepData; + installParam.parameters.emplace(Constants::VERIFY_UNINSTALL_RULE_KEY, Constants::VERIFY_UNINSTALL_RULE_VALUE); int32_t uninstallResult = UninstallOperation(bundleName, moduleName, installParam); if (uninstallResult == OHOS::ERR_OK) { resultReceiver_ = STRING_UNINSTALL_BUNDLE_OK + "\n"; diff --git a/frameworks/src/bundle_command_common.cpp b/frameworks/src/bundle_command_common.cpp index 0aac05c..943d4a9 100644 --- a/frameworks/src/bundle_command_common.cpp +++ b/frameworks/src/bundle_command_common.cpp @@ -699,6 +699,10 @@ std::map BundleCommandCommon::bundleMessageMap_ = { IStatusReceiver::ERR_INSTALL_ENCRYPTED_BUNDLE_NOT_ALLOWED_FOR_SHELL, "error: Encrypted bundle cannot be installed by shell without root." }, + { + IStatusReceiver::ERR_UNINSTALL_DISPOSED_RULE_DENIED, + "error: Failed to uninstall the app because the app is locked." + }, { IStatusReceiver::ERR_INSTALL_APPID_NOT_SAME_WITH_PREINSTALLED, "error: Bundle cannot be installed because the appId is not same with preinstalled bundle." -- Gitee