添加开机动画等待

Signed-off-by: donglin <donglin9@huawei.com>
This commit is contained in:
donglin 2022-08-10 10:42:44 +08:00
parent 8a9a49430e
commit 4b725c68f9
4 changed files with 16 additions and 1 deletions

View File

@ -31,6 +31,7 @@ constexpr const char* DEVICE_TYPE = "device_type";
constexpr const char* SYSTEM_CONFIGURATION = "system_configuration";
constexpr const char* SYSTEM_ORIENTATION = "system_orientation";
constexpr const char* ROOT_LAUNCHER_RESTART_MAX = "root_launcher_restart_max";
constexpr const char* BOOTANNI_TIMEOUT_TIME = "bootanni_timeout_time";
} // namespace AmsConfig
enum class SatrtUiMode { STATUSBAR = 1, NAVIGATIONBAR = 2, STARTUIBOTH = 3 };
@ -74,6 +75,10 @@ public:
* get device type.
*/
std::string GetDeviceType() const;
/**
*
*/
int GetBootanniTimeoutTime() const;
enum { READ_OK = 0, READ_FAIL = 1, READ_JSON_FAIL = 2 };
@ -94,6 +99,7 @@ private:
int missionSaveTime_ {12 * 60 * 60 * 1000};
int anrTime_ {5000};
int amsTime_ {5000};
int bootanniTime_ {5};
std::string deviceType_ {""};
};
} // namespace AAFwk

View File

@ -4,7 +4,8 @@
"root_launcher_restart_max":15,
"app_not_response_process_timeout_time" : 1000,
"ams_timeout_time" : 180,
"device_type": "phone"
"device_type" : "phone",
"bootanni_timeout_time" : 5
},
"system_configuration":{
"system_orientation": "vertical"

View File

@ -123,6 +123,7 @@ const std::string DMS_MISSION_ID = "dmsMissionId";
const std::string DLP_INDEX = "ohos.dlp.params.index";
const std::string BOOTEVENT_APPFWK_READY = "bootevent.appfwk.ready";
const std::string BOOTEVENT_BOOT_COMPLETED = "bootevent.boot.completed";
const std::string BOOTEVENT_BOOTANNI_STARTED = "bootevent.bootanni.started";
const int DEFAULT_DMS_MISSION_ID = -1;
const std::map<std::string, AbilityManagerService::DumpKey> AbilityManagerService::dumpMap = {
std::map<std::string, AbilityManagerService::DumpKey>::value_type("--all", KEY_DUMP_ALL),
@ -259,6 +260,7 @@ bool AbilityManagerService::Init()
implicitStartProcessor_ = std::make_shared<ImplicitStartProcessor>();
anrListener_ = std::make_shared<ApplicationAnrListener>();
MMI::InputManager::GetInstance()->SetAnrObserver(anrListener_);
WaitParameter(BOOTEVENT_BOOTANNI_STARTED.c_str(), "true", amsConfigResolver_->GetBootanniTimeoutTime());
#endif
anrDisposer_ = std::make_shared<AppNoResponseDisposer>(amsConfigResolver_->GetANRTimeOutTime());

View File

@ -61,6 +61,11 @@ std::string AmsConfigurationParameter::GetDeviceType() const
return deviceType_;
}
int AmsConfigurationParameter::GetBootanniTimeoutTime() const
{
return bootanniTime_;
}
int AmsConfigurationParameter::LoadAmsConfiguration(const std::string &filePath)
{
HILOG_DEBUG("%{public}s", __func__);
@ -118,6 +123,7 @@ int AmsConfigurationParameter::LoadAppConfigurationForStartUpService(nlohmann::j
Object.at(AmsConfig::SERVICE_ITEM_AMS).at(AmsConfig::AMS_TIMEOUT_TIME).get<int>();
maxRestartNum_ = Object.at(AmsConfig::SERVICE_ITEM_AMS).at(AmsConfig::ROOT_LAUNCHER_RESTART_MAX).get<int>();
deviceType_ = Object.at(AmsConfig::SERVICE_ITEM_AMS).at(AmsConfig::DEVICE_TYPE).get<std::string>();
bootanniTime_ = Object.at(AmsConfig::SERVICE_ITEM_AMS).at(AmsConfig::BOOTANNI_TIMEOUT_TIME).get<int>();
HILOG_INFO("get ams service config success!");
ret = 0;
}