mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-12-11 19:43:42 +00:00
Fix codex
Signed-off-by: zhaoyuan17 <zhaoyuan17@huawei.com>
This commit is contained in:
parent
e3bf623bd7
commit
b2ffbc603e
@ -1879,10 +1879,10 @@ static napi_value SystemMemoryAttrConvertJSObject(napi_env env, const SystemMemo
|
||||
NAPI_CALL(env, napi_create_int64(env, memoryInfo.threshold_, &jsThreshold));
|
||||
NAPI_CALL(env, napi_get_boolean(env, memoryInfo.isSysInlowMem_, &jsIsSysInlowMem));
|
||||
|
||||
HILOG_DEBUG("SystemMemoryAttrConvertJSObject %{public}lld %{public}lld %{public}lld %{public}s",
|
||||
memoryInfo.availSysMem_,
|
||||
memoryInfo.totalSysMem_,
|
||||
memoryInfo.threshold_,
|
||||
HILOG_DEBUG("SystemMemoryAttrConvertJSObject %{public}zu %{public}zu %{public}zu %{public}s",
|
||||
static_cast<size_t>(memoryInfo.availSysMem_),
|
||||
static_cast<size_t>(memoryInfo.totalSysMem_),
|
||||
static_cast<size_t>(memoryInfo.threshold_),
|
||||
(memoryInfo.isSysInlowMem_ ? "true" : "false"));
|
||||
|
||||
NAPI_CALL(env, napi_set_named_property(env, retJsObject, "availSysMem", jsAvailSysMem));
|
||||
@ -2070,6 +2070,5 @@ napi_value NAPI_GetSystemMemoryAttr(napi_env env, napi_callback_info info)
|
||||
HILOG_INFO("%{public}s end", __func__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
|
@ -28,15 +28,15 @@
|
||||
using RunningProcessInfo = OHOS::AppExecFwk::RunningProcessInfo;
|
||||
using AbilityMissionInfo = OHOS::AAFwk::AbilityMissionInfo;
|
||||
|
||||
#define BUFFER_LENGTH_MAX (128)
|
||||
#define DEFAULT_STACK_ID (1)
|
||||
#define DEFAULT_LAST_MEMORY_LEVEL (-1)
|
||||
#define DEFAULT_WEIGHT (-1)
|
||||
const int BUFFER_LENGTH_MAX = 128;
|
||||
const int DEFAULT_STACK_ID = 1;
|
||||
const int DEFAULT_LAST_MEMORY_LEVEL = -1;
|
||||
const int DEFAULT_WEIGHT = -1;
|
||||
|
||||
#define MAX_MISSION_NUM (65535)
|
||||
#define QUERY_RECENT_RUNNING_MISSION_INFO_TYPE (2)
|
||||
const int MAX_MISSION_NUM = 65535;
|
||||
const int QUERY_RECENT_RUNNING_MISSION_INFO_TYPE = 2;
|
||||
|
||||
#define BUSINESS_ERROR_CODE_OK 0
|
||||
const int BUSINESS_ERROR_CODE_OK = 0;
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
@ -542,10 +542,8 @@ ErrCode AbilityManagerClient::GetPendingRequestWant(const sptr<IWantSender> &tar
|
||||
|
||||
ErrCode AbilityManagerClient::SetShowOnLockScreen(bool isAwakenScreen)
|
||||
{
|
||||
// CHECK_REMOTE_OBJECT_AND_RETURN(remoteObject_, ABILITY_SERVICE_NOT_CONNECTED);
|
||||
// sptr<IAbilityManager> abms = iface_cast<IAbilityManager>(remoteObject_);
|
||||
// return abms->SetShowOnLockScreen(isAwakenScreen);
|
||||
return ERR_OK;
|
||||
// TODO
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -559,6 +557,5 @@ void AbilityManagerClient::GetSystemMemoryAttr(AppExecFwk::SystemMemoryAttr &mem
|
||||
abms->GetSystemMemoryAttr(memoryInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
} // namespace AAFwk
|
||||
} // namespace OHOS
|
||||
|
@ -36,6 +36,7 @@ using OHOS::AppExecFwk::ElementName;
|
||||
namespace OHOS {
|
||||
namespace AAFwk {
|
||||
using namespace std::chrono;
|
||||
static const int experienceMemThreshold = 20;
|
||||
constexpr auto DATA_ABILITY_START_TIMEOUT = 5s;
|
||||
const std::map<std::string, AbilityManagerService::DumpKey> AbilityManagerService::dumpMap = {
|
||||
std::map<std::string, AbilityManagerService::DumpKey>::value_type("--all", KEY_DUMP_ALL),
|
||||
@ -1660,7 +1661,7 @@ void AbilityManagerService::GetSystemMemoryAttr(AppExecFwk::SystemMemoryAttr &me
|
||||
int memoryThreshold = 0;
|
||||
if (amsConfigResolver_ == nullptr) {
|
||||
HILOG_ERROR("%{public}s, amsConfigResolver_ is nullptr", __func__);
|
||||
memoryThreshold = 20;
|
||||
memoryThreshold = experienceMemThreshold;
|
||||
} else {
|
||||
memoryThreshold = amsConfigResolver_->GetMemThreshold(AmsConfig::MemThreshold::HOME_APP);
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
namespace OHOS {
|
||||
namespace AAFwk {
|
||||
using json = nlohmann::json;
|
||||
static const int experienceMemThreshold = 20;
|
||||
|
||||
void AmsConfigurationParameter::Parse()
|
||||
{
|
||||
@ -145,7 +146,7 @@ int AmsConfigurationParameter::GetMemThreshold(const std::string &key)
|
||||
auto threshold = memThreshold_.find(key);
|
||||
if (threshold == memThreshold_.end()) {
|
||||
HILOG_ERROR("%{public}s, threshold[%{public}s] find failed", __func__, key.c_str());
|
||||
return 20;
|
||||
return experienceMemThreshold;
|
||||
}
|
||||
|
||||
return std::stoi(threshold->second);
|
||||
|
Loading…
Reference in New Issue
Block a user