TicketNo:AR20240403329372

Description:modifying a bundle name
Team:EMUI
Feature or Bugfix:Feature
Binary Source:No
PrivateCode(Yes/No):No

Signed-off-by: zhangduanyang <zhangduanyang@huawei.com>
This commit is contained in:
zhangduanyang 2024-07-25 20:27:33 +08:00
parent 067baeec1c
commit fbf5e0547a
5 changed files with 15 additions and 2 deletions

View File

@ -107,6 +107,7 @@ declare_args() {
"com.ohos.textautofill/entry/TextAutoFillAbility"
cj_frontend = true
ability_runtime_app_no_response_dialog = false
ability_runtime_app_no_response_ability = "com.ohos.taskmanager"
include_app_domain_verify = true
if (!defined(global_parts_info) ||

View File

@ -26,7 +26,8 @@
"ability_runtime_auto_fill_ability",
"ability_runtime_graphics",
"ability_runtime_power",
"ability_runtime_app_no_response_dialog"
"ability_runtime_app_no_response_dialog",
"ability_runtime_app_no_response_ability"
],
"adapted_system_type": [
"standard"

View File

@ -168,6 +168,10 @@ ohos_shared_library("libappms") {
defines += [ "APP_NO_RESPONSE_DIALOG" ]
}
cflags += [
"-DAPP_NO_RESPONSE_BUNDLENAME=\"${ability_runtime_app_no_response_ability}\"",
]
version_script = "libappms.map"
subsystem_name = "ability"
part_name = "ability_runtime"

View File

@ -33,7 +33,6 @@
namespace OHOS {
namespace AppExecFwk {
constexpr const char* APP_NO_RESPONSE_BUNDLENAME = "com.huawei.hmos.taskmanager";
constexpr const char* APP_NO_RESPONSE_ABILITY = "AppAbnormalAbility";
class ModalSystemAppFreezeUIExtension {

View File

@ -5346,6 +5346,14 @@ void AppMgrServiceInner::TimeoutNotifyApp(int32_t pid, int32_t uid,
.processName = bundleName,
};
AppExecFwk::AppfreezeManager::GetInstance()->AppfreezeHandleWithStack(faultData, info);
#ifdef APP_NO_RESPONSE_DIALOG
bool isDialogExist = appRunningManager_ ?
appRunningManager_->CheckAppRunningRecordIsExist(APP_NO_RESPONSE_BUNDLENAME, APP_NO_RESPONSE_ABILITY) :
false;
auto killFaultApp = std::bind(&AppMgrServiceInner::KillFaultApp, this, pid, bundleName, faultData);
ModalSystemAppFreezeUIExtension::GetInstance().ProcessAppFreeze(true, faultData, std::to_string(pid),
bundleName, killFaultApp, isDialogExist);
#endif
}
}