mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-12-11 20:03:42 +00:00
Merge branch 'master' of gitee.com:openharmony/ability_ability_runtime into devlog_fa
Signed-off-by: sodanotgreen <limengzheng@huawei.com>
This commit is contained in:
commit
064b55c0da
@ -34,7 +34,7 @@ AbilityMonitor::AbilityMonitor(const std::string &name, const std::string &modul
|
||||
|
||||
void AbilityMonitor::OnAbilityStart(const std::weak_ptr<NativeReference> &abilityObj)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter");
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "called");
|
||||
|
||||
if (jsMonitor_ == nullptr) {
|
||||
return;
|
||||
@ -47,7 +47,7 @@ void AbilityMonitor::OnAbilityStart(const std::weak_ptr<NativeReference> &abilit
|
||||
|
||||
void AbilityMonitor::OnAbilityForeground(const std::weak_ptr<NativeReference> &abilityObj)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter");
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "called");
|
||||
|
||||
if (jsMonitor_ == nullptr) {
|
||||
return;
|
||||
@ -60,7 +60,7 @@ void AbilityMonitor::OnAbilityForeground(const std::weak_ptr<NativeReference> &a
|
||||
|
||||
void AbilityMonitor::OnAbilityBackground(const std::weak_ptr<NativeReference> &abilityObj)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter");
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "called");
|
||||
|
||||
if (jsMonitor_ == nullptr) {
|
||||
return;
|
||||
@ -73,7 +73,7 @@ void AbilityMonitor::OnAbilityBackground(const std::weak_ptr<NativeReference> &a
|
||||
|
||||
void AbilityMonitor::OnAbilityStop(const std::weak_ptr<NativeReference> &abilityObj)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter");
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "called");
|
||||
|
||||
if (jsMonitor_ == nullptr) {
|
||||
return;
|
||||
@ -87,7 +87,7 @@ void AbilityMonitor::OnAbilityStop(const std::weak_ptr<NativeReference> &ability
|
||||
void AbilityMonitor::OnWindowStageCreate(const std::weak_ptr<NativeReference> &abilityObj)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter");
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "called");
|
||||
|
||||
if (jsMonitor_ == nullptr) {
|
||||
return;
|
||||
@ -100,7 +100,7 @@ void AbilityMonitor::OnWindowStageCreate(const std::weak_ptr<NativeReference> &a
|
||||
|
||||
void AbilityMonitor::OnWindowStageRestore(const std::weak_ptr<NativeReference> &abilityObj)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter");
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "called");
|
||||
|
||||
if (jsMonitor_ == nullptr) {
|
||||
return;
|
||||
@ -113,7 +113,7 @@ void AbilityMonitor::OnWindowStageRestore(const std::weak_ptr<NativeReference> &
|
||||
|
||||
void AbilityMonitor::OnWindowStageDestroy(const std::weak_ptr<NativeReference> &abilityObj)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter");
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "called");
|
||||
|
||||
if (jsMonitor_ == nullptr) {
|
||||
return;
|
||||
|
@ -143,7 +143,7 @@ JSAbilityDelegator::JSAbilityDelegator()
|
||||
|
||||
void JSAbilityDelegator::Finalizer(napi_env env, void *data, void *hint)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter");
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "called");
|
||||
std::unique_ptr<JSAbilityDelegator>(static_cast<JSAbilityDelegator *>(data));
|
||||
}
|
||||
|
||||
@ -254,7 +254,7 @@ napi_value JSAbilityDelegator::SetMockList(napi_env env, napi_callback_info info
|
||||
|
||||
napi_value JSAbilityDelegator::OnAddAbilityMonitor(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
std::shared_ptr<AbilityMonitor> monitor = nullptr;
|
||||
if (!ParseAbilityMonitorPara(env, info, monitor, false)) {
|
||||
@ -283,7 +283,7 @@ napi_value JSAbilityDelegator::OnAddAbilityMonitor(napi_env env, NapiCallbackInf
|
||||
|
||||
napi_value JSAbilityDelegator::OnAddAbilityMonitorSync(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
std::shared_ptr<AbilityMonitor> monitor = nullptr;
|
||||
if (!ParseAbilityMonitorPara(env, info, monitor, true)) {
|
||||
@ -302,7 +302,7 @@ napi_value JSAbilityDelegator::OnAddAbilityMonitorSync(napi_env env, NapiCallbac
|
||||
|
||||
napi_value JSAbilityDelegator::OnAddAbilityStageMonitor(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
bool isExisted = false;
|
||||
std::shared_ptr<AbilityStageMonitor> monitor = nullptr;
|
||||
@ -336,7 +336,7 @@ napi_value JSAbilityDelegator::OnAddAbilityStageMonitor(napi_env env, NapiCallba
|
||||
|
||||
napi_value JSAbilityDelegator::OnAddAbilityStageMonitorSync(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
bool isExisted = false;
|
||||
std::shared_ptr<AbilityStageMonitor> monitor = nullptr;
|
||||
@ -359,7 +359,7 @@ napi_value JSAbilityDelegator::OnAddAbilityStageMonitorSync(napi_env env, NapiCa
|
||||
|
||||
napi_value JSAbilityDelegator::OnRemoveAbilityMonitor(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
std::shared_ptr<AbilityMonitor> monitor = nullptr;
|
||||
if (!ParseAbilityMonitorPara(env, info, monitor, false)) {
|
||||
@ -403,7 +403,7 @@ napi_value JSAbilityDelegator::OnRemoveAbilityMonitor(napi_env env, NapiCallback
|
||||
|
||||
napi_value JSAbilityDelegator::OnRemoveAbilityMonitorSync(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
std::shared_ptr<AbilityMonitor> monitor = nullptr;
|
||||
if (!ParseAbilityMonitorPara(env, info, monitor, true)) {
|
||||
@ -431,7 +431,7 @@ napi_value JSAbilityDelegator::OnRemoveAbilityMonitorSync(napi_env env, NapiCall
|
||||
|
||||
napi_value JSAbilityDelegator::OnRemoveAbilityStageMonitor(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
bool isExisted = false;
|
||||
std::shared_ptr<AbilityStageMonitor> monitor = nullptr;
|
||||
@ -467,7 +467,7 @@ napi_value JSAbilityDelegator::OnRemoveAbilityStageMonitor(napi_env env, NapiCal
|
||||
|
||||
napi_value JSAbilityDelegator::OnRemoveAbilityStageMonitorSync(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
bool isExisted = false;
|
||||
std::shared_ptr<AbilityStageMonitor> monitor = nullptr;
|
||||
@ -491,7 +491,7 @@ napi_value JSAbilityDelegator::OnRemoveAbilityStageMonitorSync(napi_env env, Nap
|
||||
|
||||
napi_value JSAbilityDelegator::OnWaitAbilityMonitor(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
std::shared_ptr<AbilityMonitor> monitor = nullptr;
|
||||
TimeoutCallback opt {false, false};
|
||||
@ -551,7 +551,7 @@ napi_value JSAbilityDelegator::OnWaitAbilityMonitor(napi_env env, NapiCallbackIn
|
||||
|
||||
napi_value JSAbilityDelegator::OnWaitAbilityStageMonitor(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
std::shared_ptr<AbilityStageMonitor> monitor = nullptr;
|
||||
TimeoutCallback opt {false, false};
|
||||
@ -605,7 +605,7 @@ napi_value JSAbilityDelegator::OnWaitAbilityStageMonitor(napi_env env, NapiCallb
|
||||
|
||||
napi_value JSAbilityDelegator::OnPrint(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
std::string msg;
|
||||
if (!ParsePrintPara(env, info, msg)) {
|
||||
@ -634,7 +634,7 @@ napi_value JSAbilityDelegator::OnPrint(napi_env env, NapiCallbackInfo& info)
|
||||
|
||||
napi_value JSAbilityDelegator::OnPrintSync(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
std::string msg;
|
||||
if (!ParsePrintPara(env, info, msg)) {
|
||||
@ -655,7 +655,7 @@ napi_value JSAbilityDelegator::OnPrintSync(napi_env env, NapiCallbackInfo& info)
|
||||
|
||||
napi_value JSAbilityDelegator::OnExecuteShellCommand(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
std::string cmd;
|
||||
TimeoutCallback opt {false, false};
|
||||
@ -714,7 +714,7 @@ napi_value JSAbilityDelegator::OnExecuteShellCommand(napi_env env, NapiCallbackI
|
||||
|
||||
napi_value JSAbilityDelegator::OnGetAppContext(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
auto delegator = AbilityDelegatorRegistry::GetAbilityDelegator();
|
||||
if (!delegator) {
|
||||
@ -743,7 +743,7 @@ napi_value JSAbilityDelegator::OnGetAppContext(napi_env env, NapiCallbackInfo& i
|
||||
|
||||
napi_value JSAbilityDelegator::OnGetAbilityState(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
if (info.argc < ARGC_ONE) {
|
||||
TAG_LOGE(AAFwkTag::DELEGATOR, "Incorrect number of parameters");
|
||||
@ -769,7 +769,7 @@ napi_value JSAbilityDelegator::OnGetAbilityState(napi_env env, NapiCallbackInfo&
|
||||
|
||||
napi_value JSAbilityDelegator::OnGetCurrentTopAbility(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
if (info.argc >= ARGC_ONE && !AppExecFwk::IsTypeForNapiValue(env, info.argv[INDEX_ZERO], napi_function)) {
|
||||
TAG_LOGE(AAFwkTag::DELEGATOR, "Parse getCurrentTopAbility parameter failed");
|
||||
@ -807,7 +807,7 @@ napi_value JSAbilityDelegator::OnGetCurrentTopAbility(napi_env env, NapiCallback
|
||||
|
||||
napi_value JSAbilityDelegator::OnStartAbility(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
AAFwk::Want want;
|
||||
if (!ParseStartAbilityPara(env, info, want)) {
|
||||
@ -840,7 +840,7 @@ napi_value JSAbilityDelegator::OnStartAbility(napi_env env, NapiCallbackInfo& in
|
||||
|
||||
napi_value JSAbilityDelegator::OnDoAbilityForeground(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
sptr<OHOS::IRemoteObject> remoteObject = nullptr;
|
||||
if (!ParseAbilityCommonPara(env, info, remoteObject)) {
|
||||
@ -872,7 +872,7 @@ napi_value JSAbilityDelegator::OnDoAbilityForeground(napi_env env, NapiCallbackI
|
||||
|
||||
napi_value JSAbilityDelegator::OnDoAbilityBackground(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
sptr<OHOS::IRemoteObject> remoteObject = nullptr;
|
||||
if (!ParseAbilityCommonPara(env, info, remoteObject)) {
|
||||
@ -904,7 +904,7 @@ napi_value JSAbilityDelegator::OnDoAbilityBackground(napi_env env, NapiCallbackI
|
||||
|
||||
napi_value JSAbilityDelegator::OnFinishTest(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
std::string msg;
|
||||
int64_t code = 0;
|
||||
@ -933,7 +933,7 @@ napi_value JSAbilityDelegator::OnFinishTest(napi_env env, NapiCallbackInfo& info
|
||||
|
||||
napi_value JSAbilityDelegator::OnSetMockList(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
|
||||
std::map<std::string, std::string> mockList;
|
||||
if (!ParseMockListPara(env, info, mockList)) {
|
||||
@ -949,7 +949,7 @@ napi_value JSAbilityDelegator::OnSetMockList(napi_env env, NapiCallbackInfo& inf
|
||||
napi_value JSAbilityDelegator::ParseMonitorPara(
|
||||
napi_env env, napi_value value, std::shared_ptr<AbilityMonitor> &monitor)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, monitorRecord size = %{public}zu", g_monitorRecord.size());
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "monitorRecord size = %{public}zu", g_monitorRecord.size());
|
||||
|
||||
for (auto iter = g_monitorRecord.begin(); iter != g_monitorRecord.end(); ++iter) {
|
||||
std::shared_ptr<NativeReference> jsMonitor = iter->first;
|
||||
@ -1007,7 +1007,7 @@ napi_value JSAbilityDelegator::ParseMonitorPara(
|
||||
napi_value JSAbilityDelegator::ParseStageMonitorPara(
|
||||
napi_env env, napi_value value, std::shared_ptr<AbilityStageMonitor> &monitor, bool &isExisted)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter, stageMonitorRecord size = %{public}zu", g_stageMonitorRecord.size());
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "stageMonitorRecord size = %{public}zu", g_stageMonitorRecord.size());
|
||||
|
||||
isExisted = false;
|
||||
for (auto iter = g_stageMonitorRecord.begin(); iter != g_stageMonitorRecord.end(); ++iter) {
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
|
||||
static void Finalizer(napi_env env, void *data, void *hint)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter");
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "called");
|
||||
reference.reset();
|
||||
std::unique_ptr<JsAbilityDelegatorRegistry>(static_cast<JsAbilityDelegatorRegistry *>(data));
|
||||
}
|
||||
@ -54,7 +54,7 @@ public:
|
||||
private:
|
||||
napi_value OnGetAbilityDelegator(napi_env env, size_t argc, napi_value* argv)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter");
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "called");
|
||||
if (!AppExecFwk::AbilityDelegatorRegistry::GetAbilityDelegator()) {
|
||||
TAG_LOGE(AAFwkTag::DELEGATOR, "Failed to get delegator object");
|
||||
return CreateJsNull(env);
|
||||
@ -72,7 +72,7 @@ private:
|
||||
|
||||
napi_value OnGetArguments(napi_env env, size_t argc, napi_value* argv)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter");
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "called");
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityDelegatorArgs> abilityDelegatorArgs =
|
||||
AppExecFwk::AbilityDelegatorRegistry::GetArguments();
|
||||
@ -87,7 +87,7 @@ private:
|
||||
|
||||
napi_value JsAbilityDelegatorRegistryInit(napi_env env, napi_value exportObj)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter");
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "called");
|
||||
if (env == nullptr || exportObj == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::DELEGATOR, "Invalid input parameters");
|
||||
return nullptr;
|
||||
@ -109,7 +109,7 @@ napi_value JsAbilityDelegatorRegistryInit(napi_env env, napi_value exportObj)
|
||||
|
||||
napi_value AbilityLifecycleStateInit(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter");
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "called");
|
||||
|
||||
if (env == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::DELEGATOR, "Invalid input arguments");
|
||||
|
@ -25,7 +25,7 @@ namespace AbilityDelegatorJs {
|
||||
using namespace OHOS::AbilityRuntime;
|
||||
napi_value CreateJsAbilityDelegator(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter");
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "called");
|
||||
|
||||
napi_value objValue = nullptr;
|
||||
napi_create_object(env, &objValue);
|
||||
@ -70,7 +70,7 @@ napi_value CreateJsAbilityDelegator(napi_env env)
|
||||
|
||||
napi_value SetAbilityDelegatorArgumentsPara(napi_env env, const std::map<std::string, std::string> ¶s)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter");
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "called");
|
||||
napi_value objValue = nullptr;
|
||||
napi_create_object(env, &objValue);
|
||||
if (objValue == nullptr) {
|
||||
@ -89,7 +89,7 @@ napi_value SetAbilityDelegatorArgumentsPara(napi_env env, const std::map<std::st
|
||||
napi_value CreateJsAbilityDelegatorArguments(
|
||||
napi_env env, const std::shared_ptr<AbilityDelegatorArgs> &abilityDelegatorArgs)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter");
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "called");
|
||||
|
||||
napi_value objValue = nullptr;
|
||||
napi_create_object(env, &objValue);
|
||||
@ -112,7 +112,7 @@ napi_value CreateJsAbilityDelegatorArguments(
|
||||
|
||||
napi_value CreateJsShellCmdResult(napi_env env, std::unique_ptr<ShellCmdResult> &shellResult)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "enter");
|
||||
TAG_LOGI(AAFwkTag::DELEGATOR, "called");
|
||||
|
||||
if (!shellResult) {
|
||||
TAG_LOGE(AAFwkTag::DELEGATOR, "shellResult is null");
|
||||
|
@ -26,7 +26,7 @@ namespace OHOS {
|
||||
namespace AbilityRuntime {
|
||||
napi_value CreateJsAppStateData(napi_env env, const AppStateData &appStateData)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
napi_value object = nullptr;
|
||||
napi_create_object(env, &object);
|
||||
if (object == nullptr) {
|
||||
@ -42,7 +42,7 @@ napi_value CreateJsAppStateData(napi_env env, const AppStateData &appStateData)
|
||||
|
||||
napi_value CreateJsAbilityStateData(napi_env env, const AbilityStateData &abilityStateData)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
napi_value object = nullptr;
|
||||
napi_create_object(env, &object);
|
||||
if (object == nullptr) {
|
||||
@ -64,7 +64,7 @@ napi_value CreateJsAbilityStateData(napi_env env, const AbilityStateData &abilit
|
||||
|
||||
napi_value CreateJsProcessData(napi_env env, const ProcessData &processData)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
napi_value object = nullptr;
|
||||
napi_create_object(env, &object);
|
||||
if (object == nullptr) {
|
||||
|
@ -202,7 +202,7 @@ public:
|
||||
private:
|
||||
napi_value OnOn(napi_env env, const size_t argc, napi_value* argv)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called.");
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
std::string type = ParseParamType(env, argc, argv);
|
||||
if (type == ON_OFF_TYPE_SYNC) {
|
||||
return OnOnNew(env, argc, argv);
|
||||
@ -228,7 +228,7 @@ private:
|
||||
|
||||
napi_value OnOnOld(napi_env env, const size_t argc, napi_value* argv)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called.");
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
if (argc != ARGC_TWO) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "The param is invalid, observers need.");
|
||||
ThrowTooFewParametersError(env);
|
||||
@ -282,7 +282,7 @@ private:
|
||||
|
||||
napi_value OnOnNew(napi_env env, const size_t argc, napi_value* argv)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called.");
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
if (argc < ARGC_TWO) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "The param is invalid, observers need.");
|
||||
ThrowTooFewParametersError(env);
|
||||
@ -313,7 +313,7 @@ private:
|
||||
|
||||
napi_value OnOff(napi_env env, size_t argc, napi_value* argv)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called.");
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
std::string type = ParseParamType(env, argc, argv);
|
||||
if (type == ON_OFF_TYPE_SYNC) {
|
||||
return OnOffNew(env, argc, argv);
|
||||
@ -339,14 +339,14 @@ private:
|
||||
|
||||
napi_value OnOffOld(napi_env env, size_t argc, napi_value* argv)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called.");
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
int32_t observerId = -1;
|
||||
if (argc != ARGC_TWO && argc != ARGC_THREE) {
|
||||
ThrowTooFewParametersError(env);
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "unregister errorObserver error, not enough params.");
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "not enough params.");
|
||||
} else {
|
||||
napi_get_value_int32(env, argv[INDEX_ONE], &observerId);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "unregister errorObserver called, observer:%{public}d", observerId);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "observer:%{public}d", observerId);
|
||||
}
|
||||
|
||||
std::string type;
|
||||
@ -359,7 +359,7 @@ private:
|
||||
NapiAsyncTask::CompleteCallback complete =
|
||||
[&observer = observer_, observerId](
|
||||
napi_env env, NapiAsyncTask& task, int32_t status) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "Unregister errorObserver called.");
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
if (observerId == -1) {
|
||||
task.Reject(env, CreateJsError(env, AbilityErrorCode::ERROR_CODE_INVALID_PARAM));
|
||||
return;
|
||||
@ -414,7 +414,7 @@ private:
|
||||
|
||||
napi_value OnOffNew(napi_env env, size_t argc, napi_value* argv)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called.");
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
if (argc < ARGC_TWO) {
|
||||
ThrowTooFewParametersError(env);
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "unregister errorObserver error, not enough params.");
|
||||
|
@ -1322,7 +1322,7 @@ private:
|
||||
|
||||
napi_value OnPreloadApplication(napi_env env, size_t argc, napi_value *argv)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "OnPreloadApplication called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
if (argc < ARGC_THREE) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "PreloadApplication Invalid param count.");
|
||||
ThrowTooFewParametersError(env);
|
||||
|
@ -32,7 +32,7 @@ namespace {
|
||||
}
|
||||
napi_value CreateJsAppStateData(napi_env env, const AppStateData &appStateData)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
napi_value object = nullptr;
|
||||
napi_create_object(env, &object);
|
||||
if (object == nullptr) {
|
||||
@ -50,7 +50,7 @@ napi_value CreateJsAppStateData(napi_env env, const AppStateData &appStateData)
|
||||
|
||||
napi_value CreateJsAbilityStateData(napi_env env, const AbilityStateData &abilityStateData)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
napi_value object = nullptr;
|
||||
napi_create_object(env, &object);
|
||||
if (object == nullptr) {
|
||||
@ -94,7 +94,7 @@ napi_value CreateJsAbilityFirstFrameStateData(napi_env env,
|
||||
|
||||
napi_value CreateJsProcessData(napi_env env, const ProcessData &processData)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
napi_value object = nullptr;
|
||||
napi_create_object(env, &object);
|
||||
if (object == nullptr) {
|
||||
|
@ -64,7 +64,7 @@ napi_value JsStartupManager::RemoveResult(napi_env env, napi_callback_info info)
|
||||
|
||||
napi_value JsStartupManager::OnRun(napi_env env, NapiCallbackInfo &info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::STARTUP, "called.");
|
||||
TAG_LOGD(AAFwkTag::STARTUP, "called");
|
||||
if (info.argc < ARGC_ONE) {
|
||||
TAG_LOGE(AAFwkTag::STARTUP, "the param is invalid.");
|
||||
ThrowTooFewParametersError(env);
|
||||
@ -105,14 +105,14 @@ napi_value JsStartupManager::OnRun(napi_env env, NapiCallbackInfo &info)
|
||||
|
||||
napi_value JsStartupManager::OnRemoveAllResult(napi_env env, NapiCallbackInfo &info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::STARTUP, "called.");
|
||||
TAG_LOGD(AAFwkTag::STARTUP, "called");
|
||||
DelayedSingleton<StartupManager>::GetInstance()->RemoveAllResult();
|
||||
return CreateJsUndefined(env);
|
||||
}
|
||||
|
||||
napi_value JsStartupManager::OnGetResult(napi_env env, NapiCallbackInfo &info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::STARTUP, "called.");
|
||||
TAG_LOGD(AAFwkTag::STARTUP, "called");
|
||||
if (info.argc < ARGC_ONE) {
|
||||
TAG_LOGE(AAFwkTag::STARTUP, "the param is invalid.");
|
||||
ThrowTooFewParametersError(env);
|
||||
@ -152,7 +152,7 @@ napi_value JsStartupManager::OnGetResult(napi_env env, NapiCallbackInfo &info)
|
||||
|
||||
napi_value JsStartupManager::OnIsInitialized(napi_env env, NapiCallbackInfo &info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::STARTUP, "called.");
|
||||
TAG_LOGD(AAFwkTag::STARTUP, "called");
|
||||
if (info.argc < ARGC_ONE) {
|
||||
TAG_LOGE(AAFwkTag::STARTUP, "the param is invalid.");
|
||||
ThrowTooFewParametersError(env);
|
||||
@ -178,7 +178,7 @@ napi_value JsStartupManager::OnIsInitialized(napi_env env, NapiCallbackInfo &inf
|
||||
|
||||
napi_value JsStartupManager::OnRemoveResult(napi_env env, NapiCallbackInfo &info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::STARTUP, "called.");
|
||||
TAG_LOGD(AAFwkTag::STARTUP, "called");
|
||||
if (info.argc < ARGC_ONE) {
|
||||
TAG_LOGE(AAFwkTag::STARTUP, "the param is invalid.");
|
||||
ThrowTooFewParametersError(env);
|
||||
|
@ -41,7 +41,7 @@ sptr<IRemoteObject> RequestInfo::GetToken()
|
||||
|
||||
napi_value RequestInfo::WrapRequestInfo(napi_env env, RequestInfo *request)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::DIALOG, "WrapRequestInfo called.");
|
||||
TAG_LOGD(AAFwkTag::DIALOG, "called");
|
||||
if (request == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::DIALOG, "request is nullptr.");
|
||||
return nullptr;
|
||||
@ -102,7 +102,7 @@ napi_value RequestInfo::CreateJsWindowRect(
|
||||
|
||||
std::shared_ptr<RequestInfo> RequestInfo::UnwrapRequestInfo(napi_env env, napi_value jsParam)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DIALOG, "UnwrapRequestInfo called.");
|
||||
TAG_LOGI(AAFwkTag::DIALOG, "called");
|
||||
if (jsParam == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::DIALOG, "jsParam is nullptr");
|
||||
return nullptr;
|
||||
|
@ -501,7 +501,6 @@ void GetFileTypesPromiseCompleteCB(napi_env env, napi_status status, void *data)
|
||||
|
||||
napi_value WrapGetFileTypesCB(napi_env env, const DAHelperGetFileTypesCB &getfiletypesCB)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::FA, "called");
|
||||
TAG_LOGI(AAFwkTag::FA, "result.size:%{public}zu", getfiletypesCB.result.size());
|
||||
for (size_t i = 0; i < getfiletypesCB.result.size(); i++) {
|
||||
TAG_LOGI(
|
||||
|
@ -1238,7 +1238,7 @@ napi_value JsNapiCommon::JsTerminateAbility(napi_env env, NapiCallbackInfo& info
|
||||
*/
|
||||
bool UnwrapParamForWant(napi_env env, napi_value args, AbilityType, CallAbilityParam ¶m)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
bool ret = false;
|
||||
napi_valuetype valueType = napi_undefined;
|
||||
param.setting = nullptr;
|
||||
@ -1604,7 +1604,7 @@ void UvWorkOnAbilityConnectDone(uv_work_t *work, int status)
|
||||
|
||||
void NAPIAbilityConnection::HandleOnAbilityConnectDone(ConnectionCallback &callback, int resultCode)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
uv_loop_s *loop = nullptr;
|
||||
napi_get_uv_event_loop(callback.env, &loop);
|
||||
if (loop == nullptr) {
|
||||
@ -1725,7 +1725,7 @@ void UvWorkOnAbilityDisconnectDone(uv_work_t *work, int status)
|
||||
|
||||
void NAPIAbilityConnection::HandleOnAbilityDisconnectDone(ConnectionCallback &callback, int resultCode)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
uv_loop_s *loop = nullptr;
|
||||
napi_get_uv_event_loop(callback.env, &loop);
|
||||
if (loop == nullptr) {
|
||||
|
@ -113,7 +113,7 @@ napi_value NAPI_GetFilesDirWrap(napi_env env, napi_callback_info info, AsyncJSCa
|
||||
|
||||
napi_value NAPI_GetFilesDirCommon(napi_env env, napi_callback_info info, AbilityType abilityType)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = CreateAsyncJSCallbackInfo(env);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called. Invoke CreateAsyncJSCallbackInfo failed.", __func__);
|
||||
@ -182,7 +182,7 @@ napi_value NAPI_GetOrCreateDistributedDirWrap(
|
||||
|
||||
napi_value NAPI_GetOrCreateDistributedDirCommon(napi_env env, napi_callback_info info, AbilityType abilityType)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = CreateAsyncJSCallbackInfo(env);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s called. Invoke CreateAsyncJSCallbackInfo failed.", __func__);
|
||||
@ -250,7 +250,7 @@ napi_value NAPI_GetCacheDirWrap(napi_env env, napi_callback_info info, AsyncJSCa
|
||||
|
||||
napi_value NAPI_GetCacheDirCommon(napi_env env, napi_callback_info info, AbilityType abilityType)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = CreateAsyncJSCallbackInfo(env);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s called. Invoke CreateAsyncJSCallbackInfo failed.", __func__);
|
||||
@ -318,7 +318,7 @@ napi_value NAPI_GetExternalCacheDirWrap(napi_env env, napi_callback_info info, A
|
||||
|
||||
napi_value NAPI_GetExternalCacheDirCommon(napi_env env, napi_callback_info info, AbilityType abilityType)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = CreateAsyncJSCallbackInfo(env);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called. Invoke CreateAsyncJSCallbackInfo failed.", __func__);
|
||||
@ -339,7 +339,7 @@ napi_value NAPI_GetExternalCacheDirCommon(napi_env env, napi_callback_info info,
|
||||
napi_value NAPI_IsUpdatingConfigurationsWrap(
|
||||
napi_env env, napi_callback_info info, AsyncJSCallbackInfo *asyncCallbackInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s enter", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
size_t argc = ARGS_MAX_COUNT;
|
||||
napi_value args[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_value jsthis = nullptr;
|
||||
@ -348,13 +348,13 @@ napi_value NAPI_IsUpdatingConfigurationsWrap(
|
||||
NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, &jsthis, &data));
|
||||
|
||||
if (argc > ARGS_ONE) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s enter, parameters is invalid.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "parameters is invalid");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (argc == ARGS_ONE) {
|
||||
if (!CreateAsyncCallback(env, args[PARAM0], asyncCallbackInfo)) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s enter, the first parameter is invalid.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "the first parameter is invalid");
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
@ -419,7 +419,7 @@ napi_value NAPI_PrintDrawnCompletedWrap(napi_env env, napi_callback_info info, A
|
||||
|
||||
napi_value NAPI_IsUpdatingConfigurationsCommon(napi_env env, napi_callback_info info, AbilityType abilityType)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = CreateAsyncJSCallbackInfo(env);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called. Invoke CreateAsyncJSCallbackInfo failed.", __func__);
|
||||
@ -439,7 +439,7 @@ napi_value NAPI_IsUpdatingConfigurationsCommon(napi_env env, napi_callback_info
|
||||
|
||||
napi_value NAPI_PrintDrawnCompletedCommon(napi_env env, napi_callback_info info, AbilityType abilityType)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = CreateAsyncJSCallbackInfo(env);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called. Invoke CreateAsyncJSCallbackInfo failed.", __func__);
|
||||
@ -467,7 +467,7 @@ napi_value NAPI_PrintDrawnCompletedCommon(napi_env env, napi_callback_info info,
|
||||
*/
|
||||
napi_value NAPI_GetAppTypeCommon(napi_env env, napi_callback_info info, AbilityType abilityType)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AppTypeCB *appTypeCB = CreateAppTypeCBInfo(env);
|
||||
if (appTypeCB == nullptr) {
|
||||
return WrapVoidToJS(env);
|
||||
@ -491,7 +491,7 @@ napi_value NAPI_GetAppTypeCommon(napi_env env, napi_callback_info info, AbilityT
|
||||
#ifdef SUPPORT_GRAPHICS
|
||||
napi_value GetDisplayOrientationWrap(napi_env env, napi_callback_info info, AsyncJSCallbackInfo *asyncCallbackInfo)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
size_t argc = ARGS_MAX_COUNT;
|
||||
napi_value args[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_value jsthis = nullptr;
|
||||
@ -524,7 +524,7 @@ napi_value GetDisplayOrientationWrap(napi_env env, napi_callback_info info, Asyn
|
||||
|
||||
void GetDisplayOrientationExecuteCallback(napi_env env, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = static_cast<AsyncJSCallbackInfo *>(data);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s asyncCallbackInfo is nullptr", __func__);
|
||||
@ -574,7 +574,7 @@ bool UnwrapParamGetDisplayOrientationWrap(napi_env env, size_t argc, napi_value
|
||||
|
||||
napi_value NAPI_GetDisplayOrientationCommon(napi_env env, napi_callback_info info, AbilityType abilityType)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = CreateAsyncJSCallbackInfo(env);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s. Invoke CreateAsyncJSCallbackInfo failed.", __func__);
|
||||
@ -604,7 +604,7 @@ napi_value NAPI_GetDisplayOrientationCommon(napi_env env, napi_callback_info inf
|
||||
*/
|
||||
napi_value NAPI_GetAbilityInfoCommon(napi_env env, napi_callback_info info, AbilityType abilityType)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AbilityInfoCB *abilityInfoCB = CreateAbilityInfoCBInfo(env);
|
||||
if (abilityInfoCB == nullptr) {
|
||||
return WrapVoidToJS(env);
|
||||
@ -635,7 +635,7 @@ napi_value NAPI_GetAbilityInfoCommon(napi_env env, napi_callback_info info, Abil
|
||||
*/
|
||||
napi_value NAPI_GetHapModuleInfoCommon(napi_env env, napi_callback_info info, AbilityType abilityType)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
HapModuleInfoCB *hapModuleInfoCB = CreateHapModuleInfoCBInfo(env);
|
||||
if (hapModuleInfoCB == nullptr) {
|
||||
return WrapVoidToJS(env);
|
||||
@ -666,7 +666,7 @@ napi_value NAPI_GetHapModuleInfoCommon(napi_env env, napi_callback_info info, Ab
|
||||
*/
|
||||
napi_value NAPI_GetAppVersionInfoCommon(napi_env env, napi_callback_info info, AbilityType abilityType)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AppVersionInfoCB *appVersionInfoCB = CreateAppVersionInfoCBInfo(env);
|
||||
if (appVersionInfoCB == nullptr) {
|
||||
return WrapVoidToJS(env);
|
||||
@ -696,7 +696,7 @@ napi_value NAPI_GetAppVersionInfoCommon(napi_env env, napi_callback_info info, A
|
||||
*/
|
||||
AsyncCallbackInfo *CreateAsyncCallbackInfo(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
if (env == nullptr) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s env == nullptr.", __func__);
|
||||
return nullptr;
|
||||
@ -872,7 +872,7 @@ napi_value GetContextPromise(napi_env env, AsyncCallbackInfo *asyncCallbackInfo)
|
||||
*/
|
||||
napi_value GetContextWrap(napi_env env, napi_callback_info, AsyncCallbackInfo *asyncCallbackInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s, asyncCallbackInfo == nullptr.", __func__);
|
||||
return nullptr;
|
||||
@ -901,7 +901,7 @@ napi_value GetContextWrap(napi_env env, napi_callback_info, AsyncCallbackInfo *a
|
||||
*/
|
||||
napi_value NAPI_GetContextCommon(napi_env env, napi_callback_info info, AbilityType abilityType)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncCallbackInfo *asyncCallbackInfo = CreateAsyncCallbackInfo(env);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s asyncCallbackInfo == nullptr", __func__);
|
||||
@ -964,7 +964,7 @@ napi_value NAPI_GetWantCommon(napi_env env, napi_callback_info info, AbilityType
|
||||
*/
|
||||
napi_value NAPI_GetAbilityNameCommon(napi_env env, napi_callback_info info, AbilityType abilityType)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AbilityNameCB *abilityNameCB = CreateAbilityNameCBInfo(env);
|
||||
if (abilityNameCB == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s abilityNameCB == nullptr", __func__);
|
||||
@ -996,7 +996,7 @@ napi_value NAPI_GetAbilityNameCommon(napi_env env, napi_callback_info info, Abil
|
||||
*/
|
||||
napi_value NAPI_StopAbilityCommon(napi_env env, napi_callback_info info, AbilityType abilityType)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = CreateAsyncJSCallbackInfo(env);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s. Invoke CreateAsyncJSCallbackInfo failed.", __func__);
|
||||
@ -1126,7 +1126,7 @@ napi_value AcquireDataAbilityHelperWrap(napi_env env, napi_callback_info info, D
|
||||
|
||||
napi_value NAPI_StartBackgroundRunningCommon(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncCallbackInfo *asyncCallbackInfo = CreateAsyncCallbackInfo(env);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s asyncCallbackInfo == nullptr", __func__);
|
||||
@ -1149,7 +1149,7 @@ napi_value NAPI_StartBackgroundRunningCommon(napi_env env, napi_callback_info in
|
||||
|
||||
napi_value NAPI_CancelBackgroundRunningCommon(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncCallbackInfo *asyncCallbackInfo = CreateAsyncCallbackInfo(env);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s asyncCallbackInfo == nullptr", __func__);
|
||||
|
@ -791,7 +791,7 @@ napi_value GetAppVersionInfoWrap(napi_env env, napi_callback_info info, AppVersi
|
||||
|
||||
void GetWantExecuteCB(napi_env, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncCallbackInfo *asyncCallbackInfo = static_cast<AsyncCallbackInfo *>(data);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s, asyncCallbackInfo == nullptr", __func__);
|
||||
@ -959,7 +959,7 @@ napi_value GetWantWrap(napi_env env, napi_callback_info info, AsyncCallbackInfo
|
||||
*/
|
||||
void GetAbilityNameExecuteCB(napi_env, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AbilityNameCB *abilityNameCB = static_cast<AbilityNameCB *>(data);
|
||||
if (abilityNameCB == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s, abilityNameCB == nullptr", __func__);
|
||||
@ -990,7 +990,7 @@ void GetAbilityNameExecuteCB(napi_env, void *data)
|
||||
*/
|
||||
void GetAbilityNameAsyncCompleteCB(napi_env env, napi_status, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AbilityNameCB *abilityNameCB = static_cast<AbilityNameCB *>(data);
|
||||
napi_value callback = nullptr;
|
||||
napi_value undefined = nullptr;
|
||||
@ -1153,7 +1153,7 @@ napi_value GetAbilityNameWrap(napi_env env, napi_callback_info info, AbilityName
|
||||
|
||||
void StopAbilityExecuteCallback(napi_env, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = static_cast<AsyncJSCallbackInfo *>(data);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s asyncCallbackInfo is null", __func__);
|
||||
@ -1183,7 +1183,7 @@ void StopAbilityExecuteCallback(napi_env, void *data)
|
||||
|
||||
napi_value StopAbilityWrap(napi_env env, napi_callback_info info, AsyncJSCallbackInfo *asyncCallbackInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
size_t argc = ARGS_MAX_COUNT;
|
||||
napi_value args[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_value jsthis = nullptr;
|
||||
@ -1216,7 +1216,7 @@ napi_value StopAbilityWrap(napi_env env, napi_callback_info info, AsyncJSCallbac
|
||||
|
||||
void StartBackgroundRunningExecuteCB(napi_env env, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncCallbackInfo *asyncCallbackInfo = (AsyncCallbackInfo *)data;
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s asyncCallbackInfo == nullptr", __func__);
|
||||
@ -1252,7 +1252,7 @@ void StartBackgroundRunningExecuteCB(napi_env env, void *data)
|
||||
|
||||
void BackgroundRunningCallbackCompletedCB(napi_env env, napi_status status, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncCallbackInfo *asyncCallbackInfo = static_cast<AsyncCallbackInfo *>(data);
|
||||
napi_value callback = nullptr;
|
||||
napi_value undefined = nullptr;
|
||||
@ -1281,7 +1281,7 @@ void BackgroundRunningCallbackCompletedCB(napi_env env, napi_status status, void
|
||||
|
||||
void BackgroundRunningPromiseCompletedCB(napi_env env, napi_status status, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncCallbackInfo *asyncCallbackInfo = static_cast<AsyncCallbackInfo *>(data);
|
||||
napi_value result = nullptr;
|
||||
if (asyncCallbackInfo->errCode == NAPI_ERR_NO_ERROR) {
|
||||
@ -1357,7 +1357,7 @@ napi_value StartBackgroundRunningPromise(napi_env env, AsyncCallbackInfo *asyncC
|
||||
|
||||
napi_value StartBackgroundRunningWrap(napi_env &env, napi_callback_info &info, AsyncCallbackInfo *asyncCallbackInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
size_t paramNums = 3;
|
||||
const size_t minParamNums = 2;
|
||||
const size_t maxParamNums = 3;
|
||||
@ -1457,7 +1457,7 @@ napi_value CancelBackgroundRunningPromise(napi_env env, AsyncCallbackInfo *async
|
||||
|
||||
napi_value CancelBackgroundRunningWrap(napi_env &env, napi_callback_info &info, AsyncCallbackInfo *asyncCallbackInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
size_t argcAsync = 1;
|
||||
const size_t argcPromise = 0;
|
||||
const size_t argCountWithAsync = argcPromise + ARGS_ASYNC_COUNT;
|
||||
|
@ -136,7 +136,7 @@ bool CheckAbilityType(const AsyncJSCallbackInfo *asyncCallbackInfo)
|
||||
|
||||
bool CheckAbilityType(const AsyncCallbackInfo *asyncCallbackInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s asyncCallbackInfo == nullptr", __func__);
|
||||
return false;
|
||||
@ -386,7 +386,7 @@ void PrintDrawnCompletedExecuteCallback(napi_env, void *data)
|
||||
|
||||
void GetOrCreateDistributedDirExecuteCallback(napi_env, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = static_cast<AsyncJSCallbackInfo *>(data);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s. asyncCallbackInfo is nullptr.", __func__);
|
||||
@ -507,7 +507,7 @@ void GetExternalCacheDirExecuteCallback(napi_env, void *data)
|
||||
*/
|
||||
AppTypeCB *CreateAppTypeCBInfo(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
napi_value global = nullptr;
|
||||
NAPI_CALL(env, napi_get_global(env, &global));
|
||||
|
||||
@ -540,7 +540,7 @@ AppTypeCB *CreateAppTypeCBInfo(napi_env env)
|
||||
*/
|
||||
AbilityInfoCB *CreateAbilityInfoCBInfo(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
napi_value global = nullptr;
|
||||
NAPI_CALL(env, napi_get_global(env, &global));
|
||||
|
||||
@ -655,7 +655,7 @@ napi_value BuildJsAbilityInfoNamedPropertySecond(napi_env env, const AbilityInfo
|
||||
|
||||
napi_value WrapAbilityInfo(napi_env env, const AbilityInfo &abilityInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
napi_value result = nullptr;
|
||||
napi_value proValue = nullptr;
|
||||
NAPI_CALL(env, napi_create_object(env, &result));
|
||||
@ -724,7 +724,7 @@ napi_value ConvertAbilityInfo(napi_env env, const AbilityInfo &abilityInfo)
|
||||
*/
|
||||
HapModuleInfoCB *CreateHapModuleInfoCBInfo(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
napi_value global = nullptr;
|
||||
NAPI_CALL(env, napi_get_global(env, &global));
|
||||
|
||||
@ -791,7 +791,7 @@ napi_value BuildJsHapModuleInfoNamedProperty(napi_env env, const HapModuleInfoCB
|
||||
|
||||
napi_value WrapHapModuleInfo(napi_env env, const HapModuleInfoCB &cb)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
napi_value result = nullptr;
|
||||
napi_value proValue = nullptr;
|
||||
NAPI_CALL(env, napi_create_object(env, &result));
|
||||
@ -841,7 +841,7 @@ napi_value WrapHapModuleInfo(napi_env env, const HapModuleInfoCB &cb)
|
||||
*/
|
||||
AppVersionInfoCB *CreateAppVersionInfoCBInfo(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
napi_value global = nullptr;
|
||||
NAPI_CALL(env, napi_get_global(env, &global));
|
||||
|
||||
@ -868,7 +868,7 @@ AppVersionInfoCB *CreateAppVersionInfoCBInfo(napi_env env)
|
||||
void SaveAppVersionInfo(AppVersionInfo &appVersionInfo, const std::string appName, const std::string versionName,
|
||||
const int32_t versionCode)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
appVersionInfo.appName = appName;
|
||||
appVersionInfo.versionName = versionName;
|
||||
appVersionInfo.versionCode = versionCode;
|
||||
@ -877,7 +877,7 @@ void SaveAppVersionInfo(AppVersionInfo &appVersionInfo, const std::string appNam
|
||||
|
||||
napi_value WrapAppVersionInfo(napi_env env, const AppVersionInfoCB &appVersionInfoCB)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
napi_value result = nullptr;
|
||||
napi_value proValue = nullptr;
|
||||
NAPI_CALL(env, napi_create_object(env, &result));
|
||||
@ -905,7 +905,7 @@ napi_value WrapAppVersionInfo(napi_env env, const AppVersionInfoCB &appVersionIn
|
||||
*/
|
||||
AbilityNameCB *CreateAbilityNameCBInfo(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
napi_value global = nullptr;
|
||||
NAPI_CALL(env, napi_get_global(env, &global));
|
||||
|
||||
@ -931,7 +931,7 @@ AbilityNameCB *CreateAbilityNameCBInfo(napi_env env)
|
||||
|
||||
napi_value WrapAbilityName(napi_env env, const AbilityNameCB *abilityNameCB)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
if (abilityNameCB == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s, Invalid param(abilityNameCB == nullptr)", __func__);
|
||||
return nullptr;
|
||||
@ -974,7 +974,7 @@ void UnwrapAbilityStartSettingForNumber(
|
||||
|
||||
bool UnwrapAbilityStartSetting(napi_env env, napi_value param, AAFwk::AbilityStartSetting &setting)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
|
||||
if (!IsTypeForNapiValue(env, param, napi_object)) {
|
||||
return false;
|
||||
|
@ -196,7 +196,7 @@ napi_value SetShowOnLockScreenPromise(napi_env env, ShowOnLockScreenCB *cbData)
|
||||
|
||||
napi_value NAPI_SetDisplayOrientationWrap(napi_env env, napi_callback_info info, AsyncJSCallbackInfo *asyncCallbackInfo)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called.");
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
size_t argc = ARGS_MAX_COUNT;
|
||||
napi_value args[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_value jsthis = nullptr;
|
||||
@ -227,7 +227,7 @@ napi_value NAPI_SetDisplayOrientationWrap(napi_env env, napi_callback_info info,
|
||||
|
||||
void SetDisplayOrientationExecuteCallbackWork(napi_env env, void *data)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called.");
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = static_cast<AsyncJSCallbackInfo *>(data);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called. asyncCallbackInfo is null");
|
||||
@ -557,7 +557,7 @@ void VerifySelfPermissionExecuteCallbackWork(napi_env env, void *data)
|
||||
|
||||
napi_value NAPI_VerifySelfPermissionWrap(napi_env env, napi_callback_info info, AsyncJSCallbackInfo *asyncCallbackInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called.");
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
size_t argc = ARGS_MAX_COUNT;
|
||||
napi_value args[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_value jsthis = nullptr;
|
||||
@ -588,7 +588,7 @@ napi_value NAPI_VerifySelfPermissionWrap(napi_env env, napi_callback_info info,
|
||||
|
||||
napi_value NAPI_VerifySelfPermission(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called.");
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = CreateAsyncJSCallbackInfo(env);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
@ -640,7 +640,7 @@ bool UnwrapRequestPermissionsFromUser(
|
||||
|
||||
void RequestPermissionsFromUserExecuteCallbackWork(napi_env env, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called.");
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = static_cast<AsyncJSCallbackInfo *>(data);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called. asyncCallbackInfo is null");
|
||||
@ -667,7 +667,7 @@ void RequestPermissionsFromUserExecuteCallbackWork(napi_env env, void *data)
|
||||
|
||||
void RequestPermissionsFromUserCompleteAsyncCallbackWork(napi_env env, napi_status status, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called.");
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = static_cast<AsyncJSCallbackInfo *>(data);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
@ -702,7 +702,7 @@ void RequestPermissionsFromUserCompleteAsyncCallbackWork(napi_env env, napi_stat
|
||||
napi_value NAPI_RequestPermissionsFromUserWrap(
|
||||
napi_env env, napi_callback_info info, AsyncJSCallbackInfo *asyncCallbackInfo)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called.");
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
size_t argc = ARGS_MAX_COUNT;
|
||||
napi_value args[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_value jsthis = nullptr;
|
||||
@ -748,7 +748,7 @@ napi_value NAPI_RequestPermissionsFromUserWrap(
|
||||
|
||||
napi_value NAPI_RequestPermissionsFromUser(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called.");
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = CreateAsyncJSCallbackInfo(env);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
@ -786,7 +786,7 @@ struct OnRequestPermissionsData {
|
||||
|
||||
static void AfterWorkCallback(uv_work_t* work, int status)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "OnRequestPermissionsFromUserResult called");
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
if (work == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s, work is nullptr.", __func__);
|
||||
return;
|
||||
@ -856,55 +856,55 @@ EXTERN_C_END
|
||||
|
||||
napi_value NAPI_GetFilesDir(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
return NAPI_GetFilesDirCommon(env, info, AbilityType::PAGE);
|
||||
}
|
||||
|
||||
napi_value NAPI_GetOrCreateDistributedDir(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
return NAPI_GetOrCreateDistributedDirCommon(env, info, AbilityType::PAGE);
|
||||
}
|
||||
|
||||
napi_value NAPI_GetCacheDir(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
return NAPI_GetCacheDirCommon(env, info, AbilityType::PAGE);
|
||||
}
|
||||
|
||||
napi_value NAPI_GetCtxAppType(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
return NAPI_GetAppTypeCommon(env, info, AbilityType::PAGE);
|
||||
}
|
||||
|
||||
napi_value NAPI_GetCtxHapModuleInfo(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
return NAPI_GetHapModuleInfoCommon(env, info, AbilityType::PAGE);
|
||||
}
|
||||
|
||||
napi_value NAPI_GetAppVersionInfo(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
return NAPI_GetAppVersionInfoCommon(env, info, AbilityType::PAGE);
|
||||
}
|
||||
|
||||
napi_value NAPI_GetApplicationContext(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
return NAPI_GetContextCommon(env, info, AbilityType::PAGE);
|
||||
}
|
||||
|
||||
napi_value NAPI_GetCtxAbilityInfo(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
return NAPI_GetAbilityInfoCommon(env, info, AbilityType::PAGE);
|
||||
}
|
||||
|
||||
bool UnwrapVerifyPermissionOptions(napi_env env, napi_value argv, AsyncJSCallbackInfo *asyncCallbackInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called, asyncCallbackInfo is null", __func__);
|
||||
return false;
|
||||
@ -972,7 +972,7 @@ bool UnwrapParamVerifyPermission(napi_env env, size_t argc, napi_value *argv, As
|
||||
|
||||
void VerifyPermissionExecuteCallback(napi_env env, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = static_cast<AsyncJSCallbackInfo *>(data);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
@ -1004,7 +1004,7 @@ void VerifyPermissionExecuteCallback(napi_env env, void *data)
|
||||
|
||||
napi_value NAPI_VerifyPermissionWrap(napi_env env, napi_callback_info info, AsyncJSCallbackInfo *asyncCallbackInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
size_t argc = ARGS_MAX_COUNT;
|
||||
napi_value args[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_value jsthis = nullptr;
|
||||
@ -1037,7 +1037,7 @@ napi_value NAPI_VerifyPermissionWrap(napi_env env, napi_callback_info info, Asyn
|
||||
|
||||
napi_value NAPI_VerifyPermission(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = CreateAsyncJSCallbackInfo(env);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called. Invoke CreateAsyncJSCallbackInfo failed.", __func__);
|
||||
@ -1213,7 +1213,7 @@ napi_value GetApplicationInfoWrap(napi_env env, napi_callback_info info, AppInfo
|
||||
|
||||
AppInfoCB *CreateAppInfoCBInfo(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
napi_value global = nullptr;
|
||||
NAPI_CALL(env, napi_get_global(env, &global));
|
||||
|
||||
@ -1241,7 +1241,7 @@ AppInfoCB *CreateAppInfoCBInfo(napi_env env)
|
||||
|
||||
void GetBundleNameExecuteCallback(napi_env env, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = static_cast<AsyncJSCallbackInfo *>(data);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s. asyncCallbackInfo is null", __func__);
|
||||
@ -1264,7 +1264,7 @@ void GetBundleNameExecuteCallback(napi_env env, void *data)
|
||||
|
||||
napi_value NAPI_GetBundleNameWrap(napi_env env, napi_callback_info info, AsyncJSCallbackInfo *asyncCallbackInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
size_t argc = ARGS_MAX_COUNT;
|
||||
napi_value args[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_value jsthis = nullptr;
|
||||
@ -1304,7 +1304,7 @@ napi_value NAPI_GetBundleNameWrap(napi_env env, napi_callback_info info, AsyncJS
|
||||
|
||||
napi_value WrapProcessInfo(napi_env env, ProcessInfoCB *processInfoCB)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
if (processInfoCB == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s Invalid param(processInfoCB == nullptr)", __func__);
|
||||
return nullptr;
|
||||
@ -1482,7 +1482,7 @@ napi_value GetProcessInfoWrap(napi_env env, napi_callback_info info, ProcessInfo
|
||||
|
||||
ProcessInfoCB *CreateProcessInfoCBInfo(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
napi_value global = nullptr;
|
||||
NAPI_CALL(env, napi_get_global(env, &global));
|
||||
|
||||
@ -1508,7 +1508,7 @@ ProcessInfoCB *CreateProcessInfoCBInfo(napi_env env)
|
||||
|
||||
ElementNameCB *CreateElementNameCBInfo(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
napi_value global = nullptr;
|
||||
NAPI_CALL(env, napi_get_global(env, &global));
|
||||
|
||||
@ -1534,7 +1534,7 @@ ElementNameCB *CreateElementNameCBInfo(napi_env env)
|
||||
|
||||
napi_value WrapElementName(napi_env env, const ElementNameCB *elementNameCB)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
if (elementNameCB == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s,Invalid param(appInfoCB = nullptr)", __func__);
|
||||
return nullptr;
|
||||
@ -1727,7 +1727,7 @@ napi_value GetElementNameWrap(napi_env env, napi_callback_info info, ElementName
|
||||
|
||||
ProcessNameCB *CreateProcessNameCBInfo(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
napi_value global = nullptr;
|
||||
NAPI_CALL(env, napi_get_global(env, &global));
|
||||
|
||||
@ -1773,7 +1773,7 @@ void GetProcessNameExecuteCB(napi_env env, void *data)
|
||||
|
||||
napi_value WrapProcessName(napi_env env, const ProcessNameCB *processNameCB)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
if (processNameCB == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s, Invalid param(processNameCB == nullptr)", __func__);
|
||||
return nullptr;
|
||||
@ -1918,7 +1918,7 @@ napi_value GetProcessNameWrap(napi_env env, napi_callback_info info, ProcessName
|
||||
|
||||
CallingBundleCB *CreateCallingBundleCBInfo(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
napi_value global = nullptr;
|
||||
NAPI_CALL(env, napi_get_global(env, &global));
|
||||
|
||||
@ -1964,7 +1964,7 @@ void GetCallingBundleExecuteCB(napi_env env, void *data)
|
||||
|
||||
napi_value WrapCallingBundle(napi_env env, const CallingBundleCB *callingBundleCB)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
if (callingBundleCB == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s,Invalid param(callingBundleCB == nullptr)", __func__);
|
||||
return nullptr;
|
||||
@ -2110,7 +2110,7 @@ napi_value GetCallingBundleWrap(napi_env env, napi_callback_info info, CallingBu
|
||||
|
||||
GetOrCreateLocalDirCB *CreateGetOrCreateLocalDirCBInfo(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
napi_value global = nullptr;
|
||||
NAPI_CALL(env, napi_get_global(env, &global));
|
||||
|
||||
@ -2164,7 +2164,7 @@ void GetOrCreateLocalDirExecuteCB(napi_env env, void *data)
|
||||
|
||||
napi_value WrapGetOrCreateLocalDir(napi_env env, const GetOrCreateLocalDirCB *getOrCreateLocalDirCB)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
if (getOrCreateLocalDirCB == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s,Invalid param(getOrCreateLocalDirCB == nullptr)", __func__);
|
||||
return nullptr;
|
||||
@ -2311,7 +2311,7 @@ napi_value GetOrCreateLocalDirWrap(napi_env env, napi_callback_info info, GetOrC
|
||||
|
||||
napi_value NAPI_GetBundleName(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = CreateAsyncJSCallbackInfo(env);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called. Invoke CreateAsyncJSCallbackInfo failed.", __func__);
|
||||
@ -2351,7 +2351,7 @@ napi_value NAPI_GetApplicationInfo(napi_env env, napi_callback_info info)
|
||||
|
||||
napi_value NAPI_GetProcessInfo(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
ProcessInfoCB *processInfoCB = CreateProcessInfoCBInfo(env);
|
||||
if (processInfoCB == nullptr) {
|
||||
return WrapVoidToJS(env);
|
||||
@ -2373,7 +2373,7 @@ napi_value NAPI_GetProcessInfo(napi_env env, napi_callback_info info)
|
||||
|
||||
napi_value NAPI_GetElementName(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
ElementNameCB *elementNameCB = CreateElementNameCBInfo(env);
|
||||
if (elementNameCB == nullptr) {
|
||||
return WrapVoidToJS(env);
|
||||
@ -2395,7 +2395,7 @@ napi_value NAPI_GetElementName(napi_env env, napi_callback_info info)
|
||||
|
||||
napi_value NAPI_GetProcessName(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
ProcessNameCB *processNameCB = CreateProcessNameCBInfo(env);
|
||||
if (processNameCB == nullptr) {
|
||||
return WrapVoidToJS(env);
|
||||
@ -2417,7 +2417,7 @@ napi_value NAPI_GetProcessName(napi_env env, napi_callback_info info)
|
||||
|
||||
napi_value NAPI_GetCallingBundle(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
CallingBundleCB *callingBundleCB = CreateCallingBundleCBInfo(env);
|
||||
if (callingBundleCB == nullptr) {
|
||||
return WrapVoidToJS(env);
|
||||
@ -2439,7 +2439,7 @@ napi_value NAPI_GetCallingBundle(napi_env env, napi_callback_info info)
|
||||
|
||||
napi_value NAPI_GetOrCreateLocalDir(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
GetOrCreateLocalDirCB *getOrCreateLocalDirCB = CreateGetOrCreateLocalDirCBInfo(env);
|
||||
if (getOrCreateLocalDirCB == nullptr) {
|
||||
return WrapVoidToJS(env);
|
||||
@ -2461,7 +2461,7 @@ napi_value NAPI_GetOrCreateLocalDir(napi_env env, napi_callback_info info)
|
||||
|
||||
DatabaseDirCB *CreateGetDatabaseDirCBInfo(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
napi_value global = nullptr;
|
||||
NAPI_CALL(env, napi_get_global(env, &global));
|
||||
|
||||
@ -2487,7 +2487,7 @@ DatabaseDirCB *CreateGetDatabaseDirCBInfo(napi_env env)
|
||||
|
||||
napi_value GetDatabaseDirWrap(napi_env env, napi_callback_info info, DatabaseDirCB *getDatabaseDirCB)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
if (getDatabaseDirCB == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s, getDatabaseDirCB == nullptr.", __func__);
|
||||
return nullptr;
|
||||
@ -2537,7 +2537,7 @@ napi_value GetDatabaseDirWrap(napi_env env, napi_callback_info info, DatabaseDir
|
||||
|
||||
napi_value NAPI_GetDatabaseDirSync(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
DatabaseDirCB *getDatabaseDirCB = CreateGetDatabaseDirCBInfo(env);
|
||||
if (getDatabaseDirCB == nullptr) {
|
||||
return WrapVoidToJS(env);
|
||||
@ -2560,7 +2560,7 @@ napi_value NAPI_GetDatabaseDirSync(napi_env env, napi_callback_info info)
|
||||
|
||||
PreferencesDirCB *CreateGetPreferencesDirCBInfo(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
napi_value global = nullptr;
|
||||
NAPI_CALL(env, napi_get_global(env, &global));
|
||||
|
||||
@ -2586,7 +2586,7 @@ PreferencesDirCB *CreateGetPreferencesDirCBInfo(napi_env env)
|
||||
|
||||
napi_value GetPreferencesDirWrap(napi_env env, napi_callback_info info, PreferencesDirCB *getPreferencesDirCB)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
if (getPreferencesDirCB == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "%{public}s, getPreferencesDirCB == nullptr.", __func__);
|
||||
return nullptr;
|
||||
@ -2638,7 +2638,7 @@ napi_value GetPreferencesDirWrap(napi_env env, napi_callback_info info, Preferen
|
||||
|
||||
napi_value NAPI_GetPreferencesDirSync(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
PreferencesDirCB *preferencesDirCB = CreateGetPreferencesDirCBInfo(env);
|
||||
if (preferencesDirCB == nullptr) {
|
||||
return WrapVoidToJS(env);
|
||||
@ -2661,7 +2661,7 @@ napi_value NAPI_GetPreferencesDirSync(napi_env env, napi_callback_info info)
|
||||
|
||||
napi_value NAPI_IsUpdatingConfigurations(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
return NAPI_IsUpdatingConfigurationsCommon(env, info, AbilityType::PAGE);
|
||||
}
|
||||
|
||||
@ -2673,14 +2673,14 @@ napi_value NAPI_GetExternalCacheDir(napi_env env, napi_callback_info info)
|
||||
|
||||
napi_value NAPI_PrintDrawnCompleted(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
return NAPI_PrintDrawnCompletedCommon(env, info, AbilityType::PAGE);
|
||||
}
|
||||
|
||||
napi_value NAPI_SetDisplayOrientation(napi_env env, napi_callback_info info)
|
||||
{
|
||||
#ifdef SUPPORT_GRAPHICS
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = CreateAsyncJSCallbackInfo(env);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
@ -2702,7 +2702,7 @@ napi_value NAPI_SetDisplayOrientation(napi_env env, napi_callback_info info)
|
||||
napi_value NAPI_GetDisplayOrientation(napi_env env, napi_callback_info info)
|
||||
{
|
||||
#ifdef SUPPORT_GRAPHICS
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
return NAPI_GetDisplayOrientationCommon(env, info, AbilityType::PAGE);
|
||||
#else
|
||||
return 0;
|
||||
@ -2711,7 +2711,7 @@ napi_value NAPI_GetDisplayOrientation(napi_env env, napi_callback_info info)
|
||||
|
||||
napi_value ContextPermissionInit(napi_env env, napi_value exports)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "Context::ContextPermissionInit called.");
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
|
||||
napi_property_descriptor properties[] = {
|
||||
DECLARE_NAPI_FUNCTION("verifySelfPermission", NAPI_VerifySelfPermission),
|
||||
@ -2790,7 +2790,7 @@ public:
|
||||
|
||||
static void Finalizer(napi_env env, void *data, void *hint)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called.");
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
std::unique_ptr<NapiJsContext>(static_cast<NapiJsContext*>(data));
|
||||
};
|
||||
|
||||
|
@ -95,7 +95,7 @@ napi_value WrapConfiguration(napi_env env, const AppExecFwk::Configuration &conf
|
||||
|
||||
bool UnwrapConfiguration(napi_env env, napi_value param, Configuration &config)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
|
||||
if (!IsTypeForNapiValue(env, param, napi_object)) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called. Params is invalid.", __func__);
|
||||
|
@ -27,7 +27,7 @@ namespace AbilityRuntime {
|
||||
using namespace OHOS::AppExecFwk;
|
||||
bool UnwrapExecuteResult(napi_env env, napi_value param, InsightIntentExecuteResult &executeResult)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called.");
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
|
||||
if (!IsTypeForNapiValue(env, param, napi_valuetype::napi_object)) {
|
||||
TAG_LOGE(AAFwkTag::JSNAPI, "UnwrapExecuteResult not object");
|
||||
|
@ -71,7 +71,7 @@ bool UnwrapStartOptionsWithProcessOption(napi_env env, napi_value param, AAFwk::
|
||||
|
||||
bool UnwrapStartOptions(napi_env env, napi_value param, AAFwk::StartOptions &startOptions)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
|
||||
if (!IsTypeForNapiValue(env, param, napi_object)) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called. Params is invalid.", __func__);
|
||||
|
@ -851,7 +851,7 @@ napi_value GetCallbackErrorValue(napi_env env, int errCode)
|
||||
*/
|
||||
AsyncJSCallbackInfo *CreateAsyncJSCallbackInfo(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
|
||||
napi_value global = nullptr;
|
||||
NAPI_CALL(env, napi_get_global(env, &global));
|
||||
@ -946,7 +946,7 @@ bool WrapThreadReturnData(napi_env env, const ThreadReturnData *data, napi_value
|
||||
*/
|
||||
bool CreateAsyncCallback(napi_env env, napi_value param, AsyncJSCallbackInfo *callback)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
|
||||
if (param == nullptr || callback == nullptr) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called, param or callback is null.", __func__);
|
||||
@ -993,7 +993,7 @@ napi_ref CreateCallbackRefFromJS(napi_env env, napi_value param)
|
||||
*/
|
||||
napi_value ExecuteAsyncCallbackWork(napi_env env, AsyncJSCallbackInfo *asyncCallbackInfo, const AsyncParamEx *param)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
if (asyncCallbackInfo == nullptr || param == nullptr) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called, asyncCallbackInfo or param is null", __func__);
|
||||
return nullptr;
|
||||
@ -1027,7 +1027,7 @@ napi_value ExecuteAsyncCallbackWork(napi_env env, AsyncJSCallbackInfo *asyncCall
|
||||
*/
|
||||
napi_value ExecutePromiseCallbackWork(napi_env env, AsyncJSCallbackInfo *asyncCallbackInfo, const AsyncParamEx *param)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
if (asyncCallbackInfo == nullptr || param == nullptr) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called, asyncCallbackInfo or param is null", __func__);
|
||||
return nullptr;
|
||||
@ -1062,7 +1062,7 @@ napi_value ExecutePromiseCallbackWork(napi_env env, AsyncJSCallbackInfo *asyncCa
|
||||
*/
|
||||
void CompleteAsyncCallbackWork(napi_env env, napi_status status, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = static_cast<AsyncJSCallbackInfo *>(data);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
@ -1092,7 +1092,7 @@ void CompleteAsyncCallbackWork(napi_env env, napi_status status, void *data)
|
||||
|
||||
void CompleteAsyncVoidCallbackWork(napi_env env, napi_status status, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = static_cast<AsyncJSCallbackInfo *>(data);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called, asyncCallbackInfo is null", __func__);
|
||||
@ -1132,7 +1132,7 @@ void CompleteAsyncVoidCallbackWork(napi_env env, napi_status status, void *data)
|
||||
*/
|
||||
void CompletePromiseCallbackWork(napi_env env, napi_status status, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = static_cast<AsyncJSCallbackInfo *>(data);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
@ -1155,7 +1155,7 @@ void CompletePromiseCallbackWork(napi_env env, napi_status status, void *data)
|
||||
|
||||
void CompletePromiseVoidCallbackWork(napi_env env, napi_status status, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::JSNAPI, "called");
|
||||
|
||||
AsyncJSCallbackInfo *asyncCallbackInfo = static_cast<AsyncJSCallbackInfo *>(data);
|
||||
if (asyncCallbackInfo == nullptr) {
|
||||
|
@ -327,7 +327,7 @@ bool InnerWrapWantParamsRemoteObject(
|
||||
|
||||
bool InnerWrapWantParamsArrayChar(napi_env env, napi_value jsObject, const std::string &key, sptr<AAFwk::IArray> &ao)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
long size = 0;
|
||||
if (ao->GetLength(size) != ERR_OK) {
|
||||
return false;
|
||||
@ -774,7 +774,7 @@ bool InnerSetWantParamsArrayDouble(
|
||||
|
||||
bool InnerUnwrapWantParamsArray(napi_env env, const std::string &key, napi_value param, AAFwk::WantParams &wantParams)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
ComplexArrayData natArrayValue;
|
||||
if (!UnwrapArrayComplexFromJS(env, param, natArrayValue)) {
|
||||
return false;
|
||||
@ -803,7 +803,7 @@ bool InnerUnwrapWantParamsArray(napi_env env, const std::string &key, napi_value
|
||||
|
||||
bool InnerUnwrapWantParams(napi_env env, const std::string &key, napi_value param, AAFwk::WantParams &wantParams)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::JSNAPI, "called");
|
||||
AAFwk::WantParams wp;
|
||||
|
||||
if (UnwrapWantParams(env, param, wp)) {
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
private:
|
||||
napi_value OnStartChildProcess(napi_env env, size_t argc, napi_value* argv)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::PROCESSMGR, "OnStartChildProcess called.");
|
||||
TAG_LOGI(AAFwkTag::PROCESSMGR, "called");
|
||||
if (ChildProcessManager::GetInstance().IsChildProcess()) {
|
||||
TAG_LOGE(AAFwkTag::PROCESSMGR, "Already in child process");
|
||||
ThrowError(env, AbilityErrorCode::ERROR_CODE_OPERATION_NOT_SUPPORTED);
|
||||
@ -152,7 +152,7 @@ private:
|
||||
|
||||
napi_value OnStartArkChildProcess(napi_env env, size_t argc, napi_value* argv)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::PROCESSMGR, "OnStartArkChildProcess called.");
|
||||
TAG_LOGI(AAFwkTag::PROCESSMGR, "called");
|
||||
if (ChildProcessManager::GetInstance().IsChildProcess()) {
|
||||
TAG_LOGE(AAFwkTag::PROCESSMGR, "Already in child process");
|
||||
ThrowError(env, AbilityErrorCode::ERROR_CODE_OPERATION_NOT_SUPPORTED);
|
||||
@ -229,7 +229,7 @@ private:
|
||||
|
||||
napi_value JsChildProcessManagerInit(napi_env env, napi_value exportObj)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::PROCESSMGR, "called.");
|
||||
TAG_LOGI(AAFwkTag::PROCESSMGR, "called");
|
||||
if (env == nullptr || exportObj == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::PROCESSMGR, "Invalid input params");
|
||||
return nullptr;
|
||||
|
@ -33,7 +33,7 @@ public:
|
||||
|
||||
static void Finalizer(napi_env env, void* data, void* hint)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::DIALOG, "JsDialogRequestCallback::Finalizer is called.");
|
||||
TAG_LOGD(AAFwkTag::DIALOG, "called");
|
||||
std::unique_ptr<JsDialogRequestCallback>(static_cast<JsDialogRequestCallback*>(data));
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
private:
|
||||
napi_value OnGetDialogSessionInfo(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::DIALOG, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGD(AAFwkTag::DIALOG, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
if (info.argc < 1) {
|
||||
TAG_LOGE(AAFwkTag::DIALOG, "not enough params");
|
||||
ThrowTooFewParametersError(env);
|
||||
@ -82,7 +82,7 @@ private:
|
||||
|
||||
napi_value OnSendDialogResult(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::DIALOG, "enter, argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
TAG_LOGD(AAFwkTag::DIALOG, "argc = %{public}d", static_cast<int32_t>(info.argc));
|
||||
if (info.argc < ARGC_THREE) {
|
||||
TAG_LOGE(AAFwkTag::DIALOG, "not enough params");
|
||||
ThrowTooFewParametersError(env);
|
||||
|
@ -224,7 +224,7 @@ bool SetSyncRemoteMissionsContext(const napi_env &env, const napi_value &value,
|
||||
bool ProcessSyncInput(napi_env &env, napi_callback_info info, bool isStart,
|
||||
SyncRemoteMissionsContext* syncContext, std::string &errInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s,called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
size_t argc = 2;
|
||||
napi_value argv[2] = { nullptr };
|
||||
napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr);
|
||||
@ -255,7 +255,7 @@ bool ProcessSyncInput(napi_env &env, napi_callback_info info, bool isStart,
|
||||
void StartSyncRemoteMissionsAsyncWork(napi_env &env, const napi_value resourceName,
|
||||
SyncRemoteMissionsContext* syncContext)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
napi_create_async_work(env, nullptr, resourceName,
|
||||
[](napi_env env, void* data) {
|
||||
SyncRemoteMissionsContext* syncContext = (SyncRemoteMissionsContext*)data;
|
||||
@ -300,7 +300,7 @@ void StartSyncRemoteMissionsAsyncWork(napi_env &env, const napi_value resourceNa
|
||||
|
||||
napi_value NAPI_StartSyncRemoteMissions(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
std::string errInfo = "Parameter error";
|
||||
auto syncContext = new SyncRemoteMissionsContext();
|
||||
if (!ProcessSyncInput(env, info, true, syncContext, errInfo)) {
|
||||
@ -328,7 +328,7 @@ napi_value NAPI_StartSyncRemoteMissions(napi_env env, napi_callback_info info)
|
||||
void StopSyncRemoteMissionsAsyncWork(napi_env &env, napi_value resourceName,
|
||||
SyncRemoteMissionsContext* syncContext)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
napi_create_async_work(env, nullptr, resourceName,
|
||||
[](napi_env env, void* data) {
|
||||
SyncRemoteMissionsContext* syncContext = (SyncRemoteMissionsContext*)data;
|
||||
@ -372,7 +372,7 @@ void StopSyncRemoteMissionsAsyncWork(napi_env &env, napi_value resourceName,
|
||||
|
||||
napi_value NAPI_StopSyncRemoteMissions(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
std::string errInfo = "Parameter error";
|
||||
auto syncContext = new SyncRemoteMissionsContext();
|
||||
if (!ProcessSyncInput(env, info, false, syncContext, errInfo)) {
|
||||
@ -399,7 +399,7 @@ napi_value NAPI_StopSyncRemoteMissions(napi_env env, napi_callback_info info)
|
||||
|
||||
RegisterMissionCB *CreateRegisterMissionCBCBInfo(napi_env &env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
auto registerMissionCB = new (std::nothrow) RegisterMissionCB;
|
||||
if (registerMissionCB == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::MISSION, "%{public}s registerMissionCB == nullptr", __func__);
|
||||
@ -415,7 +415,7 @@ RegisterMissionCB *CreateRegisterMissionCBCBInfo(napi_env &env)
|
||||
|
||||
OnCB *CreateOnCBCBInfo(napi_env &env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
auto onCB = new (std::nothrow) OnCB;
|
||||
if (onCB == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::MISSION, "%{public}s onCB == nullptr", __func__);
|
||||
@ -431,7 +431,7 @@ OnCB *CreateOnCBCBInfo(napi_env &env)
|
||||
|
||||
void RegisterMissionExecuteCB(napi_env env, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
auto registerMissionCB = (RegisterMissionCB*)data;
|
||||
|
||||
std::lock_guard<std::mutex> autoLock(registrationLock_);
|
||||
@ -473,7 +473,7 @@ void RegisterMissionExecuteCB(napi_env env, void *data)
|
||||
|
||||
void RegisterMissionCallbackCompletedCB(napi_env env, napi_status status, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
auto registerMissionCB = static_cast<RegisterMissionCB *>(data);
|
||||
// set result
|
||||
napi_value result[2] = { nullptr };
|
||||
@ -540,7 +540,7 @@ napi_value RegisterMissionAsync(napi_env env, RegisterMissionCB *registerMission
|
||||
|
||||
bool CheckMissionCallbackProperty(napi_env &env, const napi_value &value, std::string &errInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
bool isFirstCallback = false;
|
||||
napi_has_named_property(env, value, "notifyMissionsChanged", &isFirstCallback);
|
||||
bool isSecondCallback = false;
|
||||
@ -559,7 +559,7 @@ bool CheckMissionCallbackProperty(napi_env &env, const napi_value &value, std::s
|
||||
bool SetCallbackReference(napi_env &env, const napi_value &value,
|
||||
RegisterMissionCB *registerMissionCB, std::string &errInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
if (!CheckMissionCallbackProperty(env, value, errInfo)) {
|
||||
return false;
|
||||
}
|
||||
@ -612,7 +612,7 @@ bool SetCallbackReference(napi_env &env, const napi_value &value,
|
||||
bool CreateCallbackReference(napi_env &env, const napi_value &value,
|
||||
RegisterMissionCB *registerMissionCB, std::string &errInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
napi_valuetype valuetype = napi_undefined;
|
||||
napi_typeof(env, value, &valuetype);
|
||||
if (valuetype == napi_object) {
|
||||
@ -632,7 +632,7 @@ bool CreateCallbackReference(napi_env &env, const napi_value &value,
|
||||
bool CreateOnCallbackReference(napi_env &env, const napi_value &jsMethod,
|
||||
OnCB *onCB, std::string &errInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
napi_valuetype valuetype = napi_undefined;
|
||||
napi_typeof(env, jsMethod, &valuetype);
|
||||
if (valuetype != napi_function) {
|
||||
@ -710,7 +710,7 @@ bool OnWrapType(napi_env &env, napi_value &argc,
|
||||
napi_value RegisterMissionWrap(napi_env &env, napi_callback_info info,
|
||||
RegisterMissionCB *registerMissionCB, std::string &errInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
size_t argcAsync = 3;
|
||||
napi_value args[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_get_cb_info(env, info, &argcAsync, args, nullptr, nullptr);
|
||||
@ -745,7 +745,7 @@ napi_value RegisterMissionWrap(napi_env &env, napi_callback_info info,
|
||||
|
||||
void OnExecuteCB(napi_env &env, OnCB *onCB)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
std::lock_guard<std::mutex> autoLock(onLock_);
|
||||
sptr<NAPIRemoteOnListener> registrationOfOn;
|
||||
auto item = registrationOfOn_.find(onCB->type);
|
||||
@ -790,7 +790,7 @@ void OnExecuteCB(napi_env &env, OnCB *onCB)
|
||||
napi_value OnWrap(napi_env &env, napi_callback_info info,
|
||||
OnCB *onCB, std::string &errInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
size_t argcAsync = 2;
|
||||
napi_value args[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_get_cb_info(env, info, &argcAsync, args, nullptr, nullptr);
|
||||
@ -823,7 +823,7 @@ napi_value OnWrap(napi_env &env, napi_callback_info info,
|
||||
|
||||
void OffExecuteCB(napi_env env, OnCB *onCB)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
std::lock_guard<std::mutex> autoLock(onLock_);
|
||||
sptr<NAPIRemoteOnListener> registrationOfOn;
|
||||
auto item = registrationOfOn_.find(onCB->type);
|
||||
@ -851,7 +851,7 @@ void OffExecuteCB(napi_env env, OnCB *onCB)
|
||||
napi_value OffWrap(napi_env &env, napi_callback_info info,
|
||||
OnCB *onCB, std::string &errInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
size_t argcAsync = 2;
|
||||
napi_value args[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_get_cb_info(env, info, &argcAsync, args, nullptr, nullptr);
|
||||
@ -883,7 +883,7 @@ napi_value OffWrap(napi_env &env, napi_callback_info info,
|
||||
|
||||
napi_value NAPI_RegisterMissionListener(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
std::string errInfo = "Parameter error";
|
||||
RegisterMissionCB *registerMissionCB = CreateRegisterMissionCBCBInfo(env);
|
||||
if (registerMissionCB == nullptr) {
|
||||
@ -906,7 +906,7 @@ napi_value NAPI_RegisterMissionListener(napi_env env, napi_callback_info info)
|
||||
|
||||
napi_value NAPI_On(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
std::string errInfo = "Parameter error";
|
||||
OnCB *onCB = CreateOnCBCBInfo(env);
|
||||
if (onCB == nullptr) {
|
||||
@ -929,7 +929,7 @@ napi_value NAPI_On(napi_env env, napi_callback_info info)
|
||||
|
||||
napi_value NAPI_Off(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
std::string errInfo = "Parameter error";
|
||||
OnCB *onCB = CreateOnCBCBInfo(env);
|
||||
if (onCB == nullptr) {
|
||||
@ -952,7 +952,7 @@ napi_value NAPI_Off(napi_env env, napi_callback_info info)
|
||||
|
||||
napi_value NAPI_ContinueState(napi_env env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
napi_value continueState = nullptr;
|
||||
napi_create_object(env, &continueState);
|
||||
napi_value active = nullptr;
|
||||
@ -1136,7 +1136,7 @@ void UvWorkOnCallback(uv_work_t *work, int status)
|
||||
|
||||
void NAPIRemoteMissionListener::NotifyMissionsChanged(const std::string &deviceId)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
uv_loop_s *loop = nullptr;
|
||||
|
||||
napi_get_uv_event_loop(env_, &loop);
|
||||
@ -1171,7 +1171,7 @@ void NAPIRemoteMissionListener::NotifyMissionsChanged(const std::string &deviceI
|
||||
void NAPIRemoteOnListener::OnCallback(const uint32_t continueState, const std::string &srcDeviceId,
|
||||
const std::string &bundleName, const std::string &continueType, const std::string &srcBundleName)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
uv_loop_s *loop = nullptr;
|
||||
|
||||
napi_get_uv_event_loop(env_, &loop);
|
||||
@ -1211,7 +1211,7 @@ void NAPIRemoteOnListener::OnCallback(const uint32_t continueState, const std::s
|
||||
|
||||
void UvWorkNotifySnapshot(uv_work_t *work, int status)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "UvWorkNotifySnapshot enter, uv_queue_work");
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
if (work == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::MISSION, "UvWorkNotifySnapshot, work is null");
|
||||
return;
|
||||
@ -1366,7 +1366,7 @@ void NAPIRemoteMissionListener::NotifyNetDisconnect(const std::string &deviceId,
|
||||
|
||||
void UnRegisterMissionExecuteCB(napi_env env, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
auto registerMissionCB = (RegisterMissionCB*)data;
|
||||
|
||||
std::lock_guard<std::mutex> autoLock(registrationLock_);
|
||||
@ -1395,7 +1395,7 @@ void UnRegisterMissionExecuteCB(napi_env env, void *data)
|
||||
|
||||
void UnRegisterMissionPromiseCompletedCB(napi_env env, napi_status status, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
auto registerMissionCB = (RegisterMissionCB*)data;
|
||||
// set result
|
||||
napi_value result[2] = { nullptr };
|
||||
@ -1445,7 +1445,7 @@ napi_value UnRegisterMissionPromise(napi_env env, RegisterMissionCB *registerMis
|
||||
bool GetUnRegisterMissionDeviceId(napi_env &env, const napi_value &value,
|
||||
RegisterMissionCB *registerMissionCB, std::string &errInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
napi_value napiDeviceId = nullptr;
|
||||
napi_valuetype valueType = napi_undefined;
|
||||
bool isDeviceId = false;
|
||||
@ -1487,7 +1487,7 @@ bool GetUnRegisterMissionDeviceId(napi_env &env, const napi_value &value,
|
||||
napi_value UnRegisterMissionWrap(napi_env &env, napi_callback_info info,
|
||||
RegisterMissionCB *registerMissionCB, std::string &errInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
size_t argc = 2;
|
||||
napi_value args[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_value ret = nullptr;
|
||||
@ -1522,7 +1522,7 @@ napi_value UnRegisterMissionWrap(napi_env &env, napi_callback_info info,
|
||||
|
||||
napi_value NAPI_UnRegisterMissionListener(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
std::string errInfo = "Parameter error";
|
||||
RegisterMissionCB *registerMissionCB = CreateRegisterMissionCBCBInfo(env);
|
||||
if (registerMissionCB == nullptr) {
|
||||
@ -1545,7 +1545,7 @@ napi_value NAPI_UnRegisterMissionListener(napi_env env, napi_callback_info info)
|
||||
|
||||
napi_value WrapString(napi_env &env, const std::string ¶m, const std::string ¶mName)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
|
||||
napi_value jsValue = nullptr;
|
||||
TAG_LOGD(AAFwkTag::MISSION, "%{public}s called. %{public}s = %{public}s",
|
||||
@ -1557,7 +1557,7 @@ napi_value WrapString(napi_env &env, const std::string ¶m, const std::string
|
||||
|
||||
napi_value WrapInt32(napi_env &env, int32_t num, const std::string ¶mName)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
|
||||
napi_value jsObject = nullptr;
|
||||
napi_create_object(env, &jsObject);
|
||||
@ -1582,7 +1582,7 @@ napi_value CreateInt32(napi_env &env, int32_t num, const std::string ¶mName)
|
||||
|
||||
ContinueAbilityCB *CreateContinueAbilityCBCBInfo(napi_env &env)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
auto continueAbilityCB = new (std::nothrow) ContinueAbilityCB;
|
||||
if (continueAbilityCB == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::MISSION, "%{public}s continueAbilityCB == nullptr", __func__);
|
||||
@ -1598,7 +1598,7 @@ ContinueAbilityCB *CreateContinueAbilityCBCBInfo(napi_env &env)
|
||||
|
||||
void ContinueAbilityExecuteCB(napi_env env, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
auto continueAbilityCB = static_cast<ContinueAbilityCB *>(data);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "create continueAbilityCB success.");
|
||||
sptr<NAPIMissionContinue> continuation(new (std::nothrow) NAPIMissionContinue());
|
||||
@ -1642,7 +1642,7 @@ void ContinueAbilityExecuteCB(napi_env env, void *data)
|
||||
|
||||
void ContinueAbilityCallbackCompletedCB(napi_env env, napi_status status, void *data)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
auto continueAbilityCB = static_cast<ContinueAbilityCB *>(data);
|
||||
// set result
|
||||
napi_value result[2] = { nullptr };
|
||||
@ -1819,7 +1819,7 @@ bool CheckContinueDeviceInfoWantParam(napi_env &env, napi_value &napiWantParam,
|
||||
bool CheckContinueFirstArgs(napi_env &env, const napi_value &value,
|
||||
ContinueAbilityCB *continueAbilityCB, std::string &errInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
if (!CheckContinueKeyExist(env, value)) {
|
||||
TAG_LOGE(AAFwkTag::MISSION, "%{public}s, Wrong argument key.", __func__);
|
||||
errInfo = "Parameter error. The type of \"parameter\" must be ContinueMission";
|
||||
@ -1860,7 +1860,7 @@ bool CheckContinueFirstArgs(napi_env &env, const napi_value &value,
|
||||
bool CheckArgsWithBundleName(napi_env &env, const napi_value &value,
|
||||
ContinueAbilityCB *continueAbilityCB, std::string &errInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
if (!CheckBundleNameExist(env, value)) {
|
||||
TAG_LOGE(AAFwkTag::MISSION, "%{public}s, Args without bundleName.", __func__);
|
||||
return false;
|
||||
@ -1899,7 +1899,7 @@ bool CheckArgsWithBundleName(napi_env &env, const napi_value &value,
|
||||
bool CheckContinueCallback(napi_env &env, const napi_value &value,
|
||||
ContinueAbilityCB *continueAbilityCB, std::string &errInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
napi_value jsMethod = nullptr;
|
||||
napi_valuetype valuetype = napi_undefined;
|
||||
napi_typeof(env, value, &valuetype);
|
||||
@ -1935,7 +1935,7 @@ bool CheckContinueCallback(napi_env &env, const napi_value &value,
|
||||
bool CheckContinueCallbackWithBundleName(napi_env &env, const napi_value &value,
|
||||
ContinueAbilityCB *continueAbilityCB, std::string &errInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
napi_valuetype valueType = napi_undefined;
|
||||
napi_typeof(env, value, &valueType);
|
||||
if (valueType != napi_function) {
|
||||
@ -1951,7 +1951,7 @@ bool CheckContinueCallbackWithBundleName(napi_env &env, const napi_value &value,
|
||||
napi_value ContinueAbilityWrap(napi_env &env, napi_callback_info info,
|
||||
ContinueAbilityCB *continueAbilityCB, std::string &errInfo)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
size_t argcAsync = 3;
|
||||
napi_value args[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_value ret = nullptr;
|
||||
@ -2006,7 +2006,7 @@ napi_value ContinueAbilityWrap(napi_env &env, napi_callback_info info,
|
||||
|
||||
napi_value NAPI_ContinueAbility(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
std::string errInfo = "Parameter error";
|
||||
ContinueAbilityCB *continueAbilityCB = CreateContinueAbilityCBCBInfo(env);
|
||||
if (continueAbilityCB == nullptr) {
|
||||
|
@ -19,14 +19,14 @@ namespace OHOS {
|
||||
namespace AAFwk {
|
||||
DmsSaClient &DmsSaClient::GetInstance()
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
static DmsSaClient instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool DmsSaClient::SubscribeDmsSA()
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::MISSION, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::MISSION, "called");
|
||||
sptr<DmsSystemAbilityStatusChange> callback(new DmsSystemAbilityStatusChange());
|
||||
int32_t ret = saMgrProxy_->SubscribeSystemAbility(DISTRIBUTED_SCHED_SA_ID, callback);
|
||||
if (ret != ERR_OK) {
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
|
||||
static void Finalizer(napi_env env, void *data, void *hint)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "function called.");
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "called");
|
||||
std::unique_ptr<JsQuickFixManager>(static_cast<JsQuickFixManager*>(data));
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ public:
|
||||
private:
|
||||
napi_value OnGetApplyedQuickFixInfo(napi_env env, NapiCallbackInfo &info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "function called.");
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "called");
|
||||
if (info.argc != ARGC_ONE && info.argc != ARGC_TWO) {
|
||||
TAG_LOGE(AAFwkTag::QUICKFIX, "The number of parameter is invalid.");
|
||||
ThrowInvalidParamError(env, "Parameter error: The number of parameter is invalid.");
|
||||
@ -111,7 +111,7 @@ private:
|
||||
|
||||
napi_value OnApplyQuickFix(napi_env env, NapiCallbackInfo &info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "function called.");
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "called");
|
||||
if (info.argc != ARGC_ONE && info.argc != ARGC_TWO) {
|
||||
TAG_LOGE(AAFwkTag::QUICKFIX, "The number of parameter is invalid.");
|
||||
ThrowInvalidParamError(env, "Parameter error: The number of parameter is invalid.");
|
||||
@ -145,7 +145,7 @@ private:
|
||||
|
||||
napi_value OnRevokeQuickFix(napi_env env, NapiCallbackInfo &info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "called.");
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "called");
|
||||
if (info.argc == ARGC_ZERO) {
|
||||
TAG_LOGE(AAFwkTag::QUICKFIX, "The number of parameter is invalid.");
|
||||
ThrowInvalidParamError(env, "Parameter error: The number of parameter is invalid.");
|
||||
@ -173,7 +173,7 @@ private:
|
||||
};
|
||||
|
||||
auto complete = [retval = errCode](napi_env env, NapiAsyncTask &task, int32_t status) {
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "Revoke quick fix complete called.");
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "Revoke quick fix complete called");
|
||||
if (*retval != AAFwk::ERR_OK) {
|
||||
TAG_LOGE(AAFwkTag::QUICKFIX, "Revoke quick fix execution failed. retval is %{public}d", *retval);
|
||||
task.Reject(env, CreateJsErrorByErrorCode(env, *retval));
|
||||
@ -194,7 +194,7 @@ private:
|
||||
|
||||
napi_value CreateJsQuickFixManager(napi_env env, napi_value exportObj)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "function called.");
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "called");
|
||||
if (env == nullptr || exportObj == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::QUICKFIX, "Input parameter is invalid.");
|
||||
return nullptr;
|
||||
|
@ -495,7 +495,7 @@ napi_value JsWantAgent::OnGetOperationType(napi_env env, napi_callback_info info
|
||||
|
||||
napi_value JsWantAgent::OnGetBundleName(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::WANTAGENT, "called.");
|
||||
TAG_LOGI(AAFwkTag::WANTAGENT, "called");
|
||||
size_t argc = ARGS_MAX_COUNT;
|
||||
napi_value argv[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr);
|
||||
@ -562,7 +562,7 @@ void JsWantAgent::SetOnGetBundleNameCallback(std::shared_ptr<WantAgent> wantAgen
|
||||
|
||||
napi_value JsWantAgent::OnGetUid(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::WANTAGENT, "called.");
|
||||
TAG_LOGI(AAFwkTag::WANTAGENT, "called");
|
||||
size_t argc = ARGS_MAX_COUNT;
|
||||
napi_value argv[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr);
|
||||
@ -827,7 +827,7 @@ int32_t JsWantAgent::GetTriggerExtraInfo(napi_env env, napi_value param, std::sh
|
||||
|
||||
int32_t JsWantAgent::GetTriggerInfo(napi_env env, napi_value param, TriggerInfo &triggerInfo)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::WANTAGENT, "GetTriggerInfo called.");
|
||||
TAG_LOGD(AAFwkTag::WANTAGENT, "called");
|
||||
if (!CheckTypeForNapiValue(env, param, napi_object)) {
|
||||
TAG_LOGE(AAFwkTag::WANTAGENT, "param type mismatch!");
|
||||
return ERR_NOT_OK;
|
||||
@ -883,7 +883,7 @@ int32_t JsWantAgent::GetTriggerInfo(napi_env env, napi_value param, TriggerInfo
|
||||
|
||||
int32_t JsWantAgent::GetWantAgentParam(napi_env env, napi_callback_info info, WantAgentWantsParas ¶s)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::WANTAGENT, "GetWantAgentParam called.");
|
||||
TAG_LOGD(AAFwkTag::WANTAGENT, "called");
|
||||
size_t argc = ARGS_MAX_COUNT;
|
||||
napi_value argv[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr);
|
||||
@ -1031,7 +1031,7 @@ int32_t JsWantAgent::GetWantAgentParam(napi_env env, napi_callback_info info, Wa
|
||||
|
||||
napi_value JsWantAgent::WrapWantAgent(napi_env env, WantAgent* wantAgent)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::WANTAGENT, "WrapWantAgent called.");
|
||||
TAG_LOGD(AAFwkTag::WANTAGENT, "called");
|
||||
napi_value wantAgentClass = nullptr;
|
||||
napi_define_class(
|
||||
env,
|
||||
@ -1071,7 +1071,7 @@ napi_value JsWantAgent::WrapWantAgent(napi_env env, WantAgent* wantAgent)
|
||||
|
||||
void JsWantAgent::UnwrapWantAgent(napi_env env, napi_value jsParam, void** result)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::WANTAGENT, "UnwrapWantAgent called.");
|
||||
TAG_LOGD(AAFwkTag::WANTAGENT, "called");
|
||||
if (jsParam == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::WANTAGENT, "UnwrapWantAgent jsParam is nullptr!");
|
||||
return;
|
||||
@ -1191,7 +1191,7 @@ napi_value JsWantAgent::OnNapiGetWant(napi_env env, napi_callback_info info)
|
||||
|
||||
napi_value JsWantAgent::OnNapiTrigger(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::WANTAGENT, "called.");
|
||||
TAG_LOGI(AAFwkTag::WANTAGENT, "called");
|
||||
size_t argc = ARGS_MAX_COUNT;
|
||||
napi_value argv[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr);
|
||||
@ -1292,7 +1292,7 @@ void JsWantAgent::SetOnNapiGetWantAgentCallback(std::shared_ptr<WantAgentWantsPa
|
||||
|
||||
napi_value JsWantAgent::OnNapiGetOperationType(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::WANTAGENT, "called.");
|
||||
TAG_LOGI(AAFwkTag::WANTAGENT, "called");
|
||||
size_t argc = ARGS_MAX_COUNT;
|
||||
napi_value argv[ARGS_MAX_COUNT] = {nullptr};
|
||||
napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr);
|
||||
|
@ -727,7 +727,7 @@ ErrCode AbilityContextImpl::RequestDialogService(AAFwk::Want &want, RequestDialo
|
||||
|
||||
ErrCode AbilityContextImpl::ReportDrawnCompleted()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::CONTEXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::CONTEXT, "called");
|
||||
return AAFwk::AbilityManagerClient::GetInstance()->ReportDrawnCompleted(token_);
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ namespace AbilityRuntime {
|
||||
void AuthorizationResult::GrantResultsCallback(const std::vector<std::string>& permissions,
|
||||
const std::vector<int>& grantResults)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DEFAULT, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::DEFAULT, "called");
|
||||
if (task_) {
|
||||
TAG_LOGD(AAFwkTag::DEFAULT, "%{public}s callback client function.", __func__);
|
||||
task_(permissions, grantResults);
|
||||
|
@ -21,7 +21,7 @@ namespace OHOS {
|
||||
namespace AbilityRuntime {
|
||||
void DialogRequestCallbackImpl::SendResult(int32_t resultCode, const AAFwk::Want &want)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DIALOG, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::DIALOG, "called");
|
||||
if (task_) {
|
||||
TAG_LOGD(AAFwkTag::DIALOG, "result code:%{public}d.", resultCode);
|
||||
task_(resultCode, want);
|
||||
|
@ -194,7 +194,7 @@ bool LocalCallContainer::IsCallBackCalled(const std::vector<std::shared_ptr<Call
|
||||
{
|
||||
for (auto& callBack : callers) {
|
||||
if (callBack != nullptr && !callBack->IsCallBack()) {
|
||||
TAG_LOGI(AAFwkTag::LOCAL_CALL, "%{public}s call back is not called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::LOCAL_CALL, "callback is not called");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -204,7 +204,7 @@ bool LocalCallContainer::IsCallBackCalled(const std::vector<std::shared_ptr<Call
|
||||
|
||||
void LocalCallContainer::DumpCalls(std::vector<std::string>& info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::LOCAL_CALL, "LocalCallContainer::DumpCalls called.");
|
||||
TAG_LOGD(AAFwkTag::LOCAL_CALL, "called");
|
||||
info.emplace_back(" caller connections:");
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
for (auto &item : callProxyRecords_) {
|
||||
|
@ -822,7 +822,7 @@ void AbilityImpl::InputEventConsumerImpl::OnInputEvent(std::shared_ptr<MMI::KeyE
|
||||
|
||||
void AbilityImpl::InputEventConsumerImpl::OnInputEvent(std::shared_ptr<MMI::PointerEvent> pointerEvent) const
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "AbilityImpl::DoPointerEvent called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "called");
|
||||
abilityImpl_->DoPointerEvent(pointerEvent);
|
||||
}
|
||||
#endif
|
||||
|
@ -278,7 +278,7 @@ void CJUIAbility::OnSceneCreated()
|
||||
void CJUIAbility::OnSceneRestored()
|
||||
{
|
||||
UIAbility::OnSceneRestored();
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called.");
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called");
|
||||
|
||||
if (!cjAbilityObj_) {
|
||||
TAG_LOGE(AAFwkTag::UIABILITY, "CJAbility is not loaded.");
|
||||
@ -594,7 +594,7 @@ void CJUIAbility::ExecuteInsightIntentMoveToForeground(const Want &want,
|
||||
const std::shared_ptr<InsightIntentExecuteParam> &executeParam,
|
||||
std::unique_ptr<InsightIntentExecutorAsyncCallback> callback)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called.");
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called");
|
||||
if (executeParam == nullptr) {
|
||||
TAG_LOGW(AAFwkTag::UIABILITY, "Intention execute param invalid.");
|
||||
OnForeground(want);
|
||||
@ -629,7 +629,7 @@ bool CJUIAbility::GetInsightIntentExecutorInfo(const Want &want,
|
||||
const std::shared_ptr<InsightIntentExecuteParam> &executeParam,
|
||||
InsightIntentExecutorInfo& executeInfo)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called.");
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called");
|
||||
auto context = GetAbilityContext();
|
||||
if (executeParam == nullptr || context == nullptr || abilityInfo_ == nullptr || cjWindowStage_ == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::UIABILITY, "Param invalid.");
|
||||
|
@ -730,7 +730,7 @@ void JsAbility::RequestFocus(const Want &want)
|
||||
|
||||
void JsAbility::ContinuationRestore(const Want &want)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "called");
|
||||
if (!IsRestoredInContinuation() || scene_ == nullptr) {
|
||||
return;
|
||||
}
|
||||
@ -741,7 +741,7 @@ void JsAbility::ContinuationRestore(const Want &want)
|
||||
|
||||
std::shared_ptr<NativeReference> JsAbility::GetJsWindowStage()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "called");
|
||||
if (jsWindowStageObj_ == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::ABILITY, "jsWindowSatge is nullptr");
|
||||
}
|
||||
@ -835,7 +835,7 @@ int32_t JsAbility::OnSaveState(int32_t reason, WantParams &wantParams)
|
||||
void JsAbility::OnConfigurationUpdated(const Configuration &configuration)
|
||||
{
|
||||
Ability::OnConfigurationUpdated(configuration);
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "called");
|
||||
|
||||
HandleScope handleScope(jsRuntime_);
|
||||
auto env = jsRuntime_.GetNapiEnv();
|
||||
@ -854,7 +854,7 @@ void JsAbility::OnConfigurationUpdated(const Configuration &configuration)
|
||||
void JsAbility::OnMemoryLevel(int level)
|
||||
{
|
||||
Ability::OnMemoryLevel(level);
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "called");
|
||||
|
||||
HandleScope handleScope(jsRuntime_);
|
||||
auto env = jsRuntime_.GetNapiEnv();
|
||||
@ -877,7 +877,7 @@ void JsAbility::OnMemoryLevel(int level)
|
||||
|
||||
void JsAbility::UpdateContextConfiguration()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "called");
|
||||
HandleScope handleScope(jsRuntime_);
|
||||
auto env = jsRuntime_.GetNapiEnv();
|
||||
JsAbilityContext::ConfigurationUpdated(env, shellContextRef_, GetAbilityContext()->GetConfiguration());
|
||||
@ -1088,7 +1088,7 @@ std::shared_ptr<AppExecFwk::ADelegatorAbilityProperty> JsAbility::CreateADelegat
|
||||
void JsAbility::Dump(const std::vector<std::string> ¶ms, std::vector<std::string> &info)
|
||||
{
|
||||
Ability::Dump(params, info);
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "called");
|
||||
HandleScope handleScope(jsRuntime_);
|
||||
|
||||
if (!jsAbilityObj_) {
|
||||
@ -1146,7 +1146,7 @@ bool JsAbility::AddDumpInfo(napi_env env, napi_value obj, const std::vector<std:
|
||||
|
||||
std::shared_ptr<NativeReference> JsAbility::GetJsAbility()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "called");
|
||||
if (jsAbilityObj_ == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::ABILITY, "jsAbility object is nullptr");
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ void StartAbilityByCallComplete(napi_env env, NapiAsyncTask& task, std::weak_ptr
|
||||
if (calldata->err != 0) {
|
||||
TAG_LOGE(AAFwkTag::CONTEXT, "OnStartAbilityByCall callComplete err is %{public}d", calldata->err);
|
||||
task.Reject(env, CreateJsError(env, AbilityErrorCode::ERROR_CODE_INNER));
|
||||
TAG_LOGD(AAFwkTag::CONTEXT, "clear failed call of startup is called.");
|
||||
TAG_LOGD(AAFwkTag::CONTEXT, "clear failed call of startup is called");
|
||||
auto context = abilityContext.lock();
|
||||
if (context == nullptr || callerCallBack == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::CONTEXT, "clear failed call of startup input param is nullptr.");
|
||||
@ -377,7 +377,7 @@ napi_value JsAbilityContext::DisconnectUIServiceExtension(napi_env env, napi_cal
|
||||
void JsAbilityContext::ClearFailedCallConnection(
|
||||
const std::weak_ptr<AbilityContext>& abilityContext, const std::shared_ptr<CallerCallBack> &callback)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::CONTEXT, "clear failed call of startup is called.");
|
||||
TAG_LOGD(AAFwkTag::CONTEXT, "clear failed call of startup is called");
|
||||
auto context = abilityContext.lock();
|
||||
if (context == nullptr || callback == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::CONTEXT, "clear failed call of startup input param is nullptr.");
|
||||
@ -1685,7 +1685,7 @@ napi_value JsAbilityContext::OnIsTerminating(napi_env env, NapiCallbackInfo& inf
|
||||
|
||||
napi_value JsAbilityContext::OnReportDrawnCompleted(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::CONTEXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::CONTEXT, "called");
|
||||
auto innerErrorCode = std::make_shared<int32_t>(ERR_OK);
|
||||
NapiAsyncTask::ExecuteCallback execute = [weak = context_, innerErrorCode]() {
|
||||
auto context = weak.lock();
|
||||
|
@ -214,7 +214,7 @@ void JsUIAbility::Init(std::shared_ptr<AppExecFwk::AbilityLocalRecord> record,
|
||||
void JsUIAbility::SetAbilityContext(std::shared_ptr<AbilityInfo> abilityInfo,
|
||||
std::shared_ptr<AAFwk::Want> want, const std::string &moduleName, const std::string &srcPath)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::UIABILITY, "called.");
|
||||
TAG_LOGI(AAFwkTag::UIABILITY, "called");
|
||||
HandleScope handleScope(jsRuntime_);
|
||||
auto env = jsRuntime_.GetNapiEnv();
|
||||
jsAbilityObj_ = jsRuntime_.LoadModule(
|
||||
@ -510,7 +510,7 @@ void JsUIAbility::OnSceneRestored()
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
UIAbility::OnSceneRestored();
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called.");
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called");
|
||||
HandleScope handleScope(jsRuntime_);
|
||||
auto jsAppWindowStage = CreateAppWindowStage();
|
||||
if (jsAppWindowStage == nullptr) {
|
||||
@ -920,7 +920,7 @@ void JsUIAbility::ExecuteInsightIntentRepeateForeground(const Want &want,
|
||||
const std::shared_ptr<InsightIntentExecuteParam> &executeParam,
|
||||
std::unique_ptr<InsightIntentExecutorAsyncCallback> callback)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called.");
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called");
|
||||
if (executeParam == nullptr) {
|
||||
TAG_LOGW(AAFwkTag::UIABILITY, "Intent execute param invalid.");
|
||||
RequestFocus(want);
|
||||
@ -960,7 +960,7 @@ void JsUIAbility::ExecuteInsightIntentMoveToForeground(const Want &want,
|
||||
const std::shared_ptr<InsightIntentExecuteParam> &executeParam,
|
||||
std::unique_ptr<InsightIntentExecutorAsyncCallback> callback)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called.");
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called");
|
||||
if (executeParam == nullptr) {
|
||||
TAG_LOGW(AAFwkTag::UIABILITY, "Intent execute param invalid.");
|
||||
OnForeground(want);
|
||||
@ -1005,7 +1005,7 @@ void JsUIAbility::ExecuteInsightIntentBackground(const Want &want,
|
||||
const std::shared_ptr<InsightIntentExecuteParam> &executeParam,
|
||||
std::unique_ptr<InsightIntentExecutorAsyncCallback> callback)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called.");
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called");
|
||||
if (executeParam == nullptr) {
|
||||
TAG_LOGW(AAFwkTag::UIABILITY, "Intent execute param invalid.");
|
||||
InsightIntentExecutorMgr::TriggerCallbackInner(std::move(callback), ERR_OK);
|
||||
@ -1037,7 +1037,7 @@ bool JsUIAbility::GetInsightIntentExecutorInfo(const Want &want,
|
||||
const std::shared_ptr<InsightIntentExecuteParam> &executeParam,
|
||||
InsightIntentExecutorInfo& executeInfo)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called.");
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called");
|
||||
|
||||
auto context = GetAbilityContext();
|
||||
if (executeParam == nullptr || context == nullptr || abilityInfo_ == nullptr) {
|
||||
@ -1067,7 +1067,7 @@ bool JsUIAbility::GetInsightIntentExecutorInfo(const Want &want,
|
||||
|
||||
int32_t JsUIAbility::OnContinue(WantParams &wantParams)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::UIABILITY, "OnContinue called.");
|
||||
TAG_LOGI(AAFwkTag::UIABILITY, "called");
|
||||
HandleScope handleScope(jsRuntime_);
|
||||
auto env = jsRuntime_.GetNapiEnv();
|
||||
if (jsAbilityObj_ == nullptr) {
|
||||
|
@ -80,7 +80,7 @@ bool AbilityWindow::InitWindow(std::shared_ptr<AbilityRuntime::AbilityContext> &
|
||||
*/
|
||||
void AbilityWindow::OnPostAbilityBackground(uint32_t sceneFlag)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "AbilityWindow::OnPostAbilityBackground called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "called");
|
||||
if (!isWindowAttached) {
|
||||
TAG_LOGE(AAFwkTag::ABILITY, "AbilityWindow::OnPostAbilityBackground window not attached.");
|
||||
return;
|
||||
@ -102,7 +102,7 @@ void AbilityWindow::OnPostAbilityBackground(uint32_t sceneFlag)
|
||||
*/
|
||||
void AbilityWindow::OnPostAbilityForeground(uint32_t sceneFlag)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "AbilityWindow::OnPostAbilityForeground called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "called");
|
||||
if (!isWindowAttached) {
|
||||
TAG_LOGE(AAFwkTag::ABILITY, "AbilityWindow::OnPostAbilityForeground window not attached.");
|
||||
return;
|
||||
@ -124,7 +124,7 @@ void AbilityWindow::OnPostAbilityForeground(uint32_t sceneFlag)
|
||||
*/
|
||||
void AbilityWindow::OnPostAbilityStop()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "AbilityWindow::OnPostAbilityStop called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "called");
|
||||
if (!isWindowAttached) {
|
||||
TAG_LOGE(AAFwkTag::ABILITY, "AbilityWindow::OnPostAbilityStop window not attached.");
|
||||
return;
|
||||
|
@ -38,7 +38,7 @@ JsSaveRequestCallback::JsSaveRequestCallback(
|
||||
|
||||
void JsSaveRequestCallback::Finalizer(napi_env env, void *data, void *hint)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::AUTOFILL_EXT, "Finalizer is called.");
|
||||
TAG_LOGD(AAFwkTag::AUTOFILL_EXT, "called");
|
||||
std::unique_ptr<JsSaveRequestCallback>(static_cast<JsSaveRequestCallback*>(data));
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ ChildProcessManager::~ChildProcessManager()
|
||||
|
||||
ChildProcessManagerErrorCode ChildProcessManager::StartChildProcessBySelfFork(const std::string &srcEntry, pid_t &pid)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::PROCESSMGR, "called.");
|
||||
TAG_LOGI(AAFwkTag::PROCESSMGR, "called");
|
||||
ChildProcessManagerErrorCode errorCode = PreCheck();
|
||||
if (errorCode != ChildProcessManagerErrorCode::ERR_OK) {
|
||||
return errorCode;
|
||||
|
@ -234,7 +234,7 @@ std::shared_ptr<DataAbilityHelper> DataAbilityHelper::Creator(
|
||||
*/
|
||||
bool DataAbilityHelper::Release()
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "Release called.");
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "called");
|
||||
bool ret = false;
|
||||
if (dataAbilityHelperImpl_) {
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "Call DataAbilityHelperImpl Release.");
|
||||
@ -259,7 +259,7 @@ bool DataAbilityHelper::Release()
|
||||
std::vector<std::string> DataAbilityHelper::GetFileTypes(Uri &uri, const std::string &mimeTypeFilter)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_DISTRIBUTEDDATA, __PRETTY_FUNCTION__);
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "GetFileTypes called.");
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "called");
|
||||
std::vector<std::string> matchedMIMEs;
|
||||
auto dataAbilityHelperImpl = GetDataAbilityHelperImpl();
|
||||
if (dataAbilityHelperImpl) {
|
||||
@ -326,7 +326,7 @@ int DataAbilityHelper::OpenFile(Uri &uri, const std::string &mode)
|
||||
*/
|
||||
int DataAbilityHelper::OpenRawFile(Uri &uri, const std::string &mode)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "OpenRawFile called.");
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "called");
|
||||
int fd = -1;
|
||||
auto dataAbilityHelperImpl = GetDataAbilityHelperImpl();
|
||||
if (dataAbilityHelperImpl) {
|
||||
@ -355,7 +355,7 @@ int DataAbilityHelper::OpenRawFile(Uri &uri, const std::string &mode)
|
||||
int DataAbilityHelper::Insert(Uri &uri, const NativeRdb::ValuesBucket &value)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_DISTRIBUTEDDATA, __PRETTY_FUNCTION__);
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "Insert called.");
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "called");
|
||||
int index = -1;
|
||||
auto dataAbilityHelperImpl = GetDataAbilityHelperImpl();
|
||||
if (dataAbilityHelperImpl) {
|
||||
@ -378,7 +378,7 @@ std::shared_ptr<AppExecFwk::PacMap> DataAbilityHelper::Call(
|
||||
const Uri &uri, const std::string &method, const std::string &arg, const AppExecFwk::PacMap &pacMap)
|
||||
{
|
||||
std::shared_ptr<AppExecFwk::PacMap> result = nullptr;
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "Call called.");
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "called");
|
||||
auto dataAbilityHelperImpl = GetDataAbilityHelperImpl();
|
||||
if (dataAbilityHelperImpl) {
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "Call DataAbilityHelperImpl Call.");
|
||||
@ -403,7 +403,7 @@ int DataAbilityHelper::Update(
|
||||
Uri &uri, const NativeRdb::ValuesBucket &value, const NativeRdb::DataAbilityPredicates &predicates)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_DISTRIBUTEDDATA, __PRETTY_FUNCTION__);
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "Update called.");
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "called");
|
||||
int index = -1;
|
||||
auto dataAbilityHelperImpl = GetDataAbilityHelperImpl();
|
||||
if (dataAbilityHelperImpl) {
|
||||
@ -434,7 +434,7 @@ int DataAbilityHelper::Update(
|
||||
int DataAbilityHelper::Delete(Uri &uri, const NativeRdb::DataAbilityPredicates &predicates)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_DISTRIBUTEDDATA, __PRETTY_FUNCTION__);
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "Delete called.");
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "called");
|
||||
int index = -1;
|
||||
auto dataAbilityHelperImpl = GetDataAbilityHelperImpl();
|
||||
if (dataAbilityHelperImpl) {
|
||||
@ -466,7 +466,7 @@ std::shared_ptr<NativeRdb::AbsSharedResultSet> DataAbilityHelper::Query(
|
||||
Uri &uri, std::vector<std::string> &columns, const NativeRdb::DataAbilityPredicates &predicates)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_DISTRIBUTEDDATA, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::DATA_ABILITY, "Query called.");
|
||||
TAG_LOGD(AAFwkTag::DATA_ABILITY, "called");
|
||||
std::shared_ptr<NativeRdb::AbsSharedResultSet> resultSet = nullptr;
|
||||
auto dataAbilityHelperImpl = GetDataAbilityHelperImpl();
|
||||
if (dataAbilityHelperImpl) {
|
||||
@ -505,7 +505,7 @@ std::shared_ptr<NativeRdb::AbsSharedResultSet> DataAbilityHelper::Query(
|
||||
std::string DataAbilityHelper::GetType(Uri &uri)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_DISTRIBUTEDDATA, __PRETTY_FUNCTION__);
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "GetType called.");
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "called");
|
||||
std::string type;
|
||||
auto dataAbilityHelperImpl = GetDataAbilityHelperImpl();
|
||||
if (dataAbilityHelperImpl) {
|
||||
@ -535,7 +535,7 @@ std::string DataAbilityHelper::GetType(Uri &uri)
|
||||
*/
|
||||
bool DataAbilityHelper::Reload(Uri &uri, const PacMap &extras)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "Reload called.");
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "called");
|
||||
bool ret = false;
|
||||
auto dataAbilityHelperImpl = GetDataAbilityHelperImpl();
|
||||
if (dataAbilityHelperImpl) {
|
||||
@ -559,7 +559,7 @@ bool DataAbilityHelper::Reload(Uri &uri, const PacMap &extras)
|
||||
int DataAbilityHelper::BatchInsert(Uri &uri, const std::vector<NativeRdb::ValuesBucket> &values)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_DISTRIBUTEDDATA, __PRETTY_FUNCTION__);
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "BatchInsert called.");
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "called");
|
||||
int ret = -1;
|
||||
auto dataAbilityHelperImpl = GetDataAbilityHelperImpl();
|
||||
if (dataAbilityHelperImpl) {
|
||||
@ -590,7 +590,7 @@ int DataAbilityHelper::BatchInsert(Uri &uri, const std::vector<NativeRdb::Values
|
||||
*/
|
||||
void DataAbilityHelper::RegisterObserver(const Uri &uri, const sptr<AAFwk::IDataAbilityObserver> &dataObserver)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "RegisterObserver called.");
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "called");
|
||||
auto dataAbilityHelperImpl = GetDataAbilityHelperImpl();
|
||||
if (dataAbilityHelperImpl) {
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "Call DataAbilityHelperImpl RegisterObserver.");
|
||||
@ -614,7 +614,7 @@ void DataAbilityHelper::RegisterObserver(const Uri &uri, const sptr<AAFwk::IData
|
||||
*/
|
||||
void DataAbilityHelper::UnregisterObserver(const Uri &uri, const sptr<AAFwk::IDataAbilityObserver> &dataObserver)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "UnregisterObserver called.");
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "called");
|
||||
auto dataAbilityHelperImpl = GetDataAbilityHelperImpl();
|
||||
if (dataAbilityHelperImpl) {
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "Call DataAbilityHelperImpl UnregisterObserver.");
|
||||
@ -638,7 +638,7 @@ void DataAbilityHelper::UnregisterObserver(const Uri &uri, const sptr<AAFwk::IDa
|
||||
void DataAbilityHelper::NotifyChange(const Uri &uri)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_DISTRIBUTEDDATA, __PRETTY_FUNCTION__);
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "NotifyChange called.");
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "called");
|
||||
auto dataAbilityHelperImpl = GetDataAbilityHelperImpl();
|
||||
if (dataAbilityHelperImpl) {
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "Call DataAbilityHelperImpl NotifyChange.");
|
||||
@ -669,7 +669,7 @@ void DataAbilityHelper::NotifyChange(const Uri &uri)
|
||||
Uri DataAbilityHelper::NormalizeUri(Uri &uri)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_DISTRIBUTEDDATA, __PRETTY_FUNCTION__);
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "NormalizeUri called.");
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "called");
|
||||
Uri urivalue("");
|
||||
auto dataAbilityHelperImpl = GetDataAbilityHelperImpl();
|
||||
if (dataAbilityHelperImpl) {
|
||||
@ -700,7 +700,7 @@ Uri DataAbilityHelper::NormalizeUri(Uri &uri)
|
||||
Uri DataAbilityHelper::DenormalizeUri(Uri &uri)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_DISTRIBUTEDDATA, __PRETTY_FUNCTION__);
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "DenormalizeUri called.");
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "called");
|
||||
Uri urivalue("");
|
||||
auto dataAbilityHelperImpl = GetDataAbilityHelperImpl();
|
||||
if (dataAbilityHelperImpl) {
|
||||
@ -721,7 +721,7 @@ Uri DataAbilityHelper::DenormalizeUri(Uri &uri)
|
||||
std::vector<std::shared_ptr<DataAbilityResult>> DataAbilityHelper::ExecuteBatch(
|
||||
const Uri &uri, const std::vector<std::shared_ptr<DataAbilityOperation>> &operations)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "ExecuteBatch called.");
|
||||
TAG_LOGI(AAFwkTag::DATA_ABILITY, "called");
|
||||
std::vector<std::shared_ptr<DataAbilityResult>> results;
|
||||
auto dataAbilityHelperImpl = GetDataAbilityHelperImpl();
|
||||
if (dataAbilityHelperImpl) {
|
||||
|
@ -509,22 +509,22 @@ void ExtensionImpl::Background(const Want &want, sptr<AAFwk::SessionInfo> sessio
|
||||
|
||||
void ExtensionImpl::ExtensionWindowLifeCycleImpl::AfterForeground()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::EXT, "called");
|
||||
}
|
||||
|
||||
void ExtensionImpl::ExtensionWindowLifeCycleImpl::AfterBackground()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::EXT, "called");
|
||||
}
|
||||
|
||||
void ExtensionImpl::ExtensionWindowLifeCycleImpl::AfterActive()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::EXT, "called");
|
||||
}
|
||||
|
||||
void ExtensionImpl::ExtensionWindowLifeCycleImpl::AfterInactive()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::EXT, "called");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ int FormExtensionProviderClient::AcquireProviderFormInfo(const AppExecFwk::FormJ
|
||||
void FormExtensionProviderClient::AcquireFormExtensionProviderInfo(const AppExecFwk::FormJsInfo &formJsInfo,
|
||||
const Want &want, const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called");
|
||||
Want connectWant(want);
|
||||
connectWant.SetParam(Constants::ACQUIRE_TYPE, want.GetIntParam(Constants::ACQUIRE_TYPE, 0));
|
||||
connectWant.SetParam(Constants::FORM_CONNECT_ID, want.GetIntParam(Constants::FORM_CONNECT_ID, 0));
|
||||
@ -121,7 +121,7 @@ void FormExtensionProviderClient::AcquireFormExtensionProviderInfo(const AppExec
|
||||
int FormExtensionProviderClient::NotifyFormDelete(const int64_t formId, const Want &want,
|
||||
const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called");
|
||||
std::pair<int, int> errorCode = CheckParam(want, callerToken);
|
||||
if (errorCode.first != ERR_OK) {
|
||||
TAG_LOGE(AAFwkTag::FORM_EXT, "CheckParam failed with %{public}d.", errorCode.first);
|
||||
@ -140,7 +140,7 @@ int FormExtensionProviderClient::NotifyFormDelete(const int64_t formId, const Wa
|
||||
void FormExtensionProviderClient::NotifyFormExtensionDelete(const int64_t formId, const Want &want,
|
||||
const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called");
|
||||
int errorCode = ERR_OK;
|
||||
auto hostToken = want.GetRemoteObject(Constants::PARAM_FORM_HOST_TOKEN);
|
||||
if (hostToken != nullptr) {
|
||||
@ -164,7 +164,7 @@ void FormExtensionProviderClient::NotifyFormExtensionDelete(const int64_t formId
|
||||
int FormExtensionProviderClient::NotifyFormsDelete(const std::vector<int64_t> &formIds, const Want &want,
|
||||
const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called");
|
||||
std::pair<int, int> errorCode = CheckParam(want, callerToken);
|
||||
if (errorCode.first != ERR_OK) {
|
||||
TAG_LOGE(AAFwkTag::FORM_EXT, "CheckParam failed with %{public}d.", errorCode.first);
|
||||
@ -183,7 +183,7 @@ int FormExtensionProviderClient::NotifyFormsDelete(const std::vector<int64_t> &f
|
||||
void FormExtensionProviderClient::NotifyFormExtensionsDelete(const std::vector<int64_t> &formIds,
|
||||
const Want &want, const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called");
|
||||
int errorCode = ERR_OK;
|
||||
std::shared_ptr<FormExtension> ownerFormExtension = GetOwner();
|
||||
if (ownerFormExtension == nullptr) {
|
||||
@ -202,7 +202,7 @@ void FormExtensionProviderClient::NotifyFormExtensionsDelete(const std::vector<i
|
||||
int FormExtensionProviderClient::NotifyFormUpdate(const int64_t formId, const Want &want,
|
||||
const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called");
|
||||
std::pair<int, int> errorCode = CheckParam(want, callerToken);
|
||||
if (errorCode.first != ERR_OK) {
|
||||
TAG_LOGE(AAFwkTag::FORM_EXT, "CheckParam failed with %{public}d.", errorCode.first);
|
||||
@ -221,7 +221,7 @@ int FormExtensionProviderClient::NotifyFormUpdate(const int64_t formId, const Wa
|
||||
void FormExtensionProviderClient::NotifyFormExtensionUpdate(const int64_t formId, const Want &want,
|
||||
const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called");
|
||||
int errorCode = ERR_OK;
|
||||
std::shared_ptr<FormExtension> ownerFormExtension = GetOwner();
|
||||
if (ownerFormExtension == nullptr) {
|
||||
@ -240,7 +240,7 @@ void FormExtensionProviderClient::NotifyFormExtensionUpdate(const int64_t formId
|
||||
int FormExtensionProviderClient::EventNotify(const std::vector<int64_t> &formIds, const int32_t formVisibleType,
|
||||
const Want &want, const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called");
|
||||
std::pair<int, int> errorCode = CheckParam(want, callerToken);
|
||||
if (errorCode.first != ERR_OK) {
|
||||
TAG_LOGE(AAFwkTag::FORM_EXT, "CheckParam failed with %{public}d.", errorCode.first);
|
||||
@ -259,7 +259,7 @@ int FormExtensionProviderClient::EventNotify(const std::vector<int64_t> &formIds
|
||||
void FormExtensionProviderClient::EventNotifyExtension(const std::vector<int64_t> &formIds,
|
||||
const int32_t formVisibleType, const Want &want, const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called");
|
||||
int errorCode = ERR_OK;
|
||||
std::shared_ptr<FormExtension> ownerFormExtension = GetOwner();
|
||||
if (ownerFormExtension == nullptr) {
|
||||
@ -280,7 +280,7 @@ void FormExtensionProviderClient::EventNotifyExtension(const std::vector<int64_t
|
||||
int FormExtensionProviderClient::NotifyFormCastTempForm(const int64_t formId, const Want &want,
|
||||
const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called");
|
||||
std::pair<int, int> errorCode = CheckParam(want, callerToken);
|
||||
if (errorCode.first != ERR_OK) {
|
||||
TAG_LOGE(AAFwkTag::FORM_EXT, "CheckParam failed with %{public}d.", errorCode.first);
|
||||
@ -299,7 +299,7 @@ int FormExtensionProviderClient::NotifyFormCastTempForm(const int64_t formId, co
|
||||
void FormExtensionProviderClient::NotifyFormExtensionCastTempForm(const int64_t formId, const Want &want,
|
||||
const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called");
|
||||
int errorCode = ERR_OK;
|
||||
std::shared_ptr<FormExtension> ownerFormExtension = GetOwner();
|
||||
if (ownerFormExtension == nullptr) {
|
||||
@ -316,7 +316,7 @@ void FormExtensionProviderClient::NotifyFormExtensionCastTempForm(const int64_t
|
||||
int FormExtensionProviderClient::FireFormEvent(const int64_t formId, const std::string &message,
|
||||
const Want &want, const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called");
|
||||
std::pair<int, int> errorCode = CheckParam(want, callerToken);
|
||||
if (errorCode.first != ERR_OK) {
|
||||
TAG_LOGE(AAFwkTag::FORM_EXT, "CheckParam failed with %{public}d.", errorCode.first);
|
||||
@ -335,7 +335,7 @@ int FormExtensionProviderClient::FireFormEvent(const int64_t formId, const std::
|
||||
void FormExtensionProviderClient::FireFormExtensionEvent(const int64_t formId, const std::string &message,
|
||||
const Want &want, const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called");
|
||||
int errorCode = ERR_OK;
|
||||
std::shared_ptr<FormExtension> ownerFormExtension = GetOwner();
|
||||
if (ownerFormExtension == nullptr) {
|
||||
@ -354,7 +354,7 @@ void FormExtensionProviderClient::FireFormExtensionEvent(const int64_t formId, c
|
||||
int FormExtensionProviderClient::AcquireState(const Want &wantArg, const std::string &provider, const Want &want,
|
||||
const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called");
|
||||
std::pair<int, int> errorCode = CheckParam(want, callerToken);
|
||||
if (errorCode.first != ERR_OK) {
|
||||
TAG_LOGE(AAFwkTag::FORM_EXT, "CheckParam failed with %{public}d.", errorCode.first);
|
||||
@ -374,7 +374,7 @@ void FormExtensionProviderClient::NotifyFormExtensionAcquireState(const Want &wa
|
||||
const Want &want,
|
||||
const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called");
|
||||
FormState state = FormState::UNKNOWN;
|
||||
std::shared_ptr<FormExtension> ownerFormExtension = GetOwner();
|
||||
if (ownerFormExtension == nullptr) {
|
||||
@ -459,7 +459,7 @@ std::pair<ErrCode, ErrCode> FormExtensionProviderClient::CheckParam(const Want &
|
||||
int32_t FormExtensionProviderClient::AcquireShareFormData(int64_t formId, const std::string &remoteDeviceId,
|
||||
const sptr<IRemoteObject> &formSupplyCallback, int64_t requestCode)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called");
|
||||
|
||||
if (!FormProviderClient::CheckIsSystemApp()) {
|
||||
TAG_LOGE(AAFwkTag::FORM_EXT, "Permission denied.");
|
||||
@ -487,7 +487,7 @@ int32_t FormExtensionProviderClient::AcquireShareFormData(int64_t formId, const
|
||||
bool FormExtensionProviderClient::AcquireFormExtensionProviderShareFormInfo(
|
||||
int64_t formId, AAFwk::WantParams &wantParams)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called");
|
||||
std::shared_ptr<FormExtension> ownerFormExtension = GetOwner();
|
||||
if (ownerFormExtension == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::FORM_EXT, "Owner is nullptr.");
|
||||
@ -500,7 +500,7 @@ bool FormExtensionProviderClient::AcquireFormExtensionProviderShareFormInfo(
|
||||
int32_t FormExtensionProviderClient::AcquireFormData(int64_t formId, const sptr<IRemoteObject> &formSupplyCallback,
|
||||
int64_t requestCode)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called");
|
||||
|
||||
if (!FormProviderClient::CheckIsSystemApp()) {
|
||||
TAG_LOGE(AAFwkTag::FORM_EXT, "Permission denied.");
|
||||
@ -528,7 +528,7 @@ int32_t FormExtensionProviderClient::AcquireFormData(int64_t formId, const sptr<
|
||||
bool FormExtensionProviderClient::FormExtensionProviderAcquireFormData(
|
||||
int64_t formId, AAFwk::WantParams &wantParams)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called");
|
||||
std::shared_ptr<FormExtension> ownerFormExtension = GetOwner();
|
||||
if (ownerFormExtension == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::FORM_EXT, "Owner is nullptr.");
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
|
||||
static void Finalizer(napi_env env, void* data, void* hint)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called");
|
||||
std::unique_ptr<JsFormExtensionContext>(static_cast<JsFormExtensionContext*>(data));
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ private:
|
||||
|
||||
napi_value OnUpdateForm(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called.");
|
||||
TAG_LOGI(AAFwkTag::FORM_EXT, "called");
|
||||
if (info.argc < UPDATE_FORM_PARAMS_SIZE) {
|
||||
TAG_LOGE(AAFwkTag::FORM_EXT, "Not enough params, not enough params");
|
||||
return CreateJsUndefined(env);
|
||||
@ -203,7 +203,7 @@ private:
|
||||
|
||||
napi_value OnConnectAbility(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "ConnectAbility called.");
|
||||
TAG_LOGD(AAFwkTag::FORM_EXT, "called");
|
||||
if (!CheckCallerIsSystemApp()) {
|
||||
TAG_LOGE(AAFwkTag::FORM_EXT, "ConnectAbility app is not system-app, can not use system-api");
|
||||
ThrowError(env, AbilityErrorCode::ERROR_CODE_NOT_SYSTEM_APP);
|
||||
|
@ -33,7 +33,7 @@ InsightIntentExecutorMgr::~InsightIntentExecutorMgr()
|
||||
bool InsightIntentExecutorMgr::ExecuteInsightIntent(Runtime& runtime, const InsightIntentExecutorInfo& executeInfo,
|
||||
std::unique_ptr<InsightIntentExecutorAsyncCallback> callback)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::INTENT, "called.");
|
||||
TAG_LOGD(AAFwkTag::INTENT, "called");
|
||||
auto executeParam = executeInfo.executeParam;
|
||||
if (executeParam == nullptr || executeParam->insightIntentParam_ == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::INTENT, "Execute param invalid.");
|
||||
@ -86,14 +86,14 @@ bool InsightIntentExecutorMgr::ExecuteInsightIntent(Runtime& runtime, const Insi
|
||||
void InsightIntentExecutorMgr::AddInsightIntentExecutor(uint64_t intentId,
|
||||
const std::shared_ptr<InsightIntentExecutor>& executor)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::INTENT, "called.");
|
||||
TAG_LOGD(AAFwkTag::INTENT, "called");
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
insightIntentExecutors_[intentId] = executor;
|
||||
}
|
||||
|
||||
void InsightIntentExecutorMgr::RemoveInsightIntentExecutor(uint64_t intentId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::INTENT, "called.");
|
||||
TAG_LOGD(AAFwkTag::INTENT, "called");
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
insightIntentExecutors_.erase(intentId);
|
||||
}
|
||||
@ -101,7 +101,7 @@ void InsightIntentExecutorMgr::RemoveInsightIntentExecutor(uint64_t intentId)
|
||||
void InsightIntentExecutorMgr::TriggerCallbackInner(
|
||||
std::unique_ptr<InsightIntentExecutorAsyncCallback> callback, int32_t errCode)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::INTENT, "called.");
|
||||
TAG_LOGD(AAFwkTag::INTENT, "called");
|
||||
AppExecFwk::InsightIntentExecuteResult result;
|
||||
result.innerErr = errCode;
|
||||
callback->Call(result);
|
||||
|
@ -37,7 +37,7 @@ sptr<InsightIntentHostClient> InsightIntentHostClient::GetInstance()
|
||||
uint64_t InsightIntentHostClient::AddInsightIntentExecute(
|
||||
const std::shared_ptr<InsightIntentExecuteCallbackInterface> &callback)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::INTENT, "called.");
|
||||
TAG_LOGD(AAFwkTag::INTENT, "called");
|
||||
std::lock_guard<std::mutex> lock(insightIntentExecutebackMutex_);
|
||||
callbackMap_.emplace(++key_, callback);
|
||||
return key_;
|
||||
@ -45,7 +45,7 @@ uint64_t InsightIntentHostClient::AddInsightIntentExecute(
|
||||
|
||||
void InsightIntentHostClient::RemoveInsightIntentExecute(uint64_t key)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::INTENT, "called.");
|
||||
TAG_LOGD(AAFwkTag::INTENT, "called");
|
||||
std::lock_guard<std::mutex> lock(insightIntentExecutebackMutex_);
|
||||
auto iter = callbackMap_.find(key);
|
||||
if (iter != callbackMap_.end()) {
|
||||
@ -56,7 +56,7 @@ void InsightIntentHostClient::RemoveInsightIntentExecute(uint64_t key)
|
||||
void InsightIntentHostClient::OnExecuteDone(uint64_t key, int32_t resultCode,
|
||||
const AppExecFwk::InsightIntentExecuteResult &executeResult)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::INTENT, "called.");
|
||||
TAG_LOGD(AAFwkTag::INTENT, "called");
|
||||
|
||||
std::shared_ptr<InsightIntentExecuteCallbackInterface> callback = nullptr;
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ JsExtensionCommon::~JsExtensionCommon()
|
||||
|
||||
void JsExtensionCommon::OnConfigurationUpdated(const std::shared_ptr<AppExecFwk::Configuration> &fullConfig)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::EXT, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::EXT, "called");
|
||||
if (!fullConfig) {
|
||||
TAG_LOGE(AAFwkTag::EXT, "invalid configuration.");
|
||||
return;
|
||||
@ -65,7 +65,7 @@ void JsExtensionCommon::OnConfigurationUpdated(const std::shared_ptr<AppExecFwk:
|
||||
|
||||
void JsExtensionCommon::OnMemoryLevel(int level)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::EXT, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::EXT, "called");
|
||||
|
||||
HandleScope handleScope(jsRuntime_);
|
||||
auto env = jsRuntime_.GetNapiEnv();
|
||||
|
@ -453,7 +453,7 @@ void JsServiceExtension::OnCommand(const AAFwk::Want &want, bool restart, int st
|
||||
|
||||
bool JsServiceExtension::HandleInsightIntent(const AAFwk::Want &want)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::SERVICE_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::SERVICE_EXT, "called");
|
||||
auto callback = std::make_unique<InsightIntentExecutorAsyncCallback>();
|
||||
callback.reset(InsightIntentExecutorAsyncCallback::Create());
|
||||
if (callback == nullptr) {
|
||||
@ -507,7 +507,7 @@ bool JsServiceExtension::GetInsightIntentExecutorInfo(const Want &want,
|
||||
const std::shared_ptr<AppExecFwk::InsightIntentExecuteParam> &executeParam,
|
||||
InsightIntentExecutorInfo &executorInfo)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::SERVICE_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::SERVICE_EXT, "called");
|
||||
auto context = GetContext();
|
||||
if (executeParam == nullptr || context == nullptr || abilityInfo_ == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::SERVICE_EXT, "Param invalid.");
|
||||
@ -735,7 +735,7 @@ void JsServiceExtension::OnConfigurationUpdated(const AppExecFwk::Configuration&
|
||||
|
||||
void JsServiceExtension::ConfigurationUpdated()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::SERVICE_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::SERVICE_EXT, "called");
|
||||
HandleScope handleScope(jsRuntime_);
|
||||
napi_env env = jsRuntime_.GetNapiEnv();
|
||||
|
||||
|
@ -187,7 +187,7 @@ private:
|
||||
static void ClearFailedCallConnection(
|
||||
const std::weak_ptr<ServiceExtensionContext>& serviceContext, const std::shared_ptr<CallerCallBack> &callback)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::SERVICE_EXT, "clear failed call of startup is called.");
|
||||
TAG_LOGD(AAFwkTag::SERVICE_EXT, "called");
|
||||
auto context = serviceContext.lock();
|
||||
if (context == nullptr || callback == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::SERVICE_EXT, "clear failed call of startup input param is nullptr.");
|
||||
@ -681,7 +681,7 @@ private:
|
||||
|
||||
napi_value OnConnectAbility(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::SERVICE_EXT, "ConnectAbility called.");
|
||||
TAG_LOGD(AAFwkTag::SERVICE_EXT, "called");
|
||||
// Check params count
|
||||
if (info.argc < ARGC_TWO) {
|
||||
TAG_LOGE(AAFwkTag::SERVICE_EXT, "Connect ability error, not enough params.");
|
||||
|
@ -66,19 +66,19 @@ napi_value JsPhotoEditorExtensionContext::CreateJsPhotoEditorExtensionContext(
|
||||
|
||||
napi_value JsPhotoEditorExtensionContext::SaveEditedContentWithUri(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "SaveEditedContentWithUri is called.");
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called");
|
||||
GET_NAPI_INFO_AND_CALL(env, info, JsPhotoEditorExtensionContext, OnSaveEditedContentWithUri);
|
||||
}
|
||||
|
||||
napi_value JsPhotoEditorExtensionContext::SaveEditedContentWithImage(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "SaveEditedContentWithImage is called.");
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called");
|
||||
GET_NAPI_INFO_AND_CALL(env, info, JsPhotoEditorExtensionContext, OnSaveEditedContentWithImage);
|
||||
}
|
||||
|
||||
napi_value JsPhotoEditorExtensionContext::OnSaveEditedContentWithUri(napi_env env, NapiCallbackInfo &info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "OnSaveEditedContentWithUri is called: param size: %{public}d.",
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called: param size: %{public}d.",
|
||||
static_cast<int32_t>(info.argc));
|
||||
|
||||
if (info.argc != ARGC_TWO) {
|
||||
|
@ -59,7 +59,7 @@ napi_value AttachUIExtensionContext(napi_env env, void *value, void *)
|
||||
napi_wrap(
|
||||
env, contextObj, workContext,
|
||||
[](napi_env, void *data, void *) {
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "Finalizer for weak_ptr ui extension context is called.");
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "Finalizer called");
|
||||
if (data == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::UI_EXT, "Finalizer for weak_ptr is nullptr.");
|
||||
return;
|
||||
@ -118,7 +118,7 @@ void JsPhotoEditorExtensionImpl::BindContext()
|
||||
napi_set_named_property(env, obj, "context", contextObj);
|
||||
napi_wrap(env, contextObj, workContext,
|
||||
[](napi_env, void *data, void *) {
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "Finalizer for weak_ptr ui extension context is called.");
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "Finalizer called");
|
||||
if (data == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::UI_EXT, "Finalizer for weak_ptr is nullptr.");
|
||||
return;
|
||||
|
@ -67,7 +67,7 @@ void ServiceAbilityImpl::HandleAbilityTransaction(const Want &want, const AAFwk:
|
||||
|
||||
void ServiceAbilityImpl::AbilityTransactionCallback(const AbilityLifeCycleState &state)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITY, "called");
|
||||
AbilityManagerClient::GetInstance()->AbilityTransitionDone(token_, state, GetRestoreData());
|
||||
}
|
||||
} // namespace AppExecFwk
|
||||
|
@ -707,7 +707,7 @@ void UIAbilityImpl::ExecuteInsightIntentRepeateForeground(const Want &want,
|
||||
const std::shared_ptr<InsightIntentExecuteParam> &executeParam,
|
||||
std::unique_ptr<InsightIntentExecutorAsyncCallback> callback)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called.");
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called");
|
||||
auto asyncCallback =
|
||||
[weak = weak_from_this(), intentId = executeParam->insightIntentId_](InsightIntentExecuteResult result) {
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "Execute insight intent finshed, intentId %{public}" PRIu64"", intentId);
|
||||
@ -729,7 +729,7 @@ void UIAbilityImpl::ExecuteInsightIntentMoveToForeground(const Want &want,
|
||||
const std::shared_ptr<InsightIntentExecuteParam> &executeParam,
|
||||
std::unique_ptr<InsightIntentExecutorAsyncCallback> callback)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called.");
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called");
|
||||
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(notifyForegroundLock_);
|
||||
@ -822,7 +822,7 @@ void UIAbilityImpl::ExecuteInsightIntentBackgroundByColdBoot(const Want &want,
|
||||
const std::shared_ptr<InsightIntentExecuteParam> &executeParam,
|
||||
std::unique_ptr<InsightIntentExecutorAsyncCallback> callback)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called.");
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called");
|
||||
auto asyncCallback =
|
||||
[weak = weak_from_this(), intentId = executeParam->insightIntentId_](InsightIntentExecuteResult result) {
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "Execute insight intent finshed, intentId %{public}" PRIu64"", intentId);
|
||||
@ -844,7 +844,7 @@ void UIAbilityImpl::ExecuteInsightIntentBackgroundAlreadyStart(const Want &want,
|
||||
const std::shared_ptr<InsightIntentExecuteParam> &executeParam,
|
||||
std::unique_ptr<InsightIntentExecutorAsyncCallback> callback)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called.");
|
||||
TAG_LOGD(AAFwkTag::UIABILITY, "called");
|
||||
|
||||
auto asyncCallback =
|
||||
[weak = weak_from_this(), intentId = executeParam->insightIntentId_](InsightIntentExecuteResult result) {
|
||||
|
@ -56,7 +56,7 @@ JsEmbeddableUIAbilityContext::JsEmbeddableUIAbilityContext(const std::shared_ptr
|
||||
|
||||
void JsEmbeddableUIAbilityContext::Finalizer(napi_env env, void* data, void* hint)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "The Finalizer of embeddable UI ability context is called.");
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called");
|
||||
std::unique_ptr<JsEmbeddableUIAbilityContext>(static_cast<JsEmbeddableUIAbilityContext*>(data));
|
||||
}
|
||||
|
||||
@ -447,13 +447,13 @@ napi_value JsEmbeddableUIAbilityContext::OnMoveAbilityToBackground(napi_env env,
|
||||
#ifdef SUPPORT_GRAPHICS
|
||||
napi_value JsEmbeddableUIAbilityContext::SetMissionLabel(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::UI_EXT, "Set mission label is called.");
|
||||
TAG_LOGI(AAFwkTag::UI_EXT, "called");
|
||||
GET_NAPI_INFO_AND_CALL(env, info, JsEmbeddableUIAbilityContext, OnSetMissionLabel);
|
||||
}
|
||||
|
||||
napi_value JsEmbeddableUIAbilityContext::SetMissionIcon(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::UI_EXT, "Set mission icon is called.");
|
||||
TAG_LOGI(AAFwkTag::UI_EXT, "called");
|
||||
GET_NAPI_INFO_AND_CALL(env, info, JsEmbeddableUIAbilityContext, OnSetMissionIcon);
|
||||
}
|
||||
|
||||
|
@ -457,7 +457,7 @@ bool JsUIExtension::ForegroundWindowWithInsightIntent(const AAFwk::Want &want,
|
||||
const sptr<AAFwk::SessionInfo> &sessionInfo, bool needForeground)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called");
|
||||
if (!HandleSessionCreate(want, sessionInfo)) {
|
||||
TAG_LOGE(AAFwkTag::UI_EXT, "HandleSessionCreate failed.");
|
||||
return false;
|
||||
@ -538,7 +538,7 @@ void JsUIExtension::PostInsightIntentExecuted(const sptr<AAFwk::SessionInfo> &se
|
||||
void JsUIExtension::OnCommandWindowDone(const sptr<AAFwk::SessionInfo> &sessionInfo, AAFwk::WindowCommand winCmd)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called");
|
||||
auto context = GetContext();
|
||||
if (context == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::UI_EXT, "Failed to get context");
|
||||
@ -918,7 +918,7 @@ void JsUIExtension::OnConfigurationUpdated(const AppExecFwk::Configuration& conf
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
Extension::OnConfigurationUpdated(configuration);
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "JsUIExtension OnConfigurationUpdated called.");
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called");
|
||||
|
||||
HandleScope handleScope(jsRuntime_);
|
||||
napi_env env = jsRuntime_.GetNapiEnv();
|
||||
@ -947,7 +947,7 @@ void JsUIExtension::OnConfigurationUpdated(const AppExecFwk::Configuration& conf
|
||||
void JsUIExtension::Dump(const std::vector<std::string> ¶ms, std::vector<std::string> &info)
|
||||
{
|
||||
Extension::Dump(params, info);
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "JsUIExtension Dump called.");
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called");
|
||||
HandleScope handleScope(jsRuntime_);
|
||||
napi_env env = jsRuntime_.GetNapiEnv();
|
||||
// create js array object of params
|
||||
|
@ -265,7 +265,7 @@ bool JsUIExtensionBase::ForegroundWindowWithInsightIntent(const AAFwk::Want &wan
|
||||
const sptr<AAFwk::SessionInfo> &sessionInfo, bool needForeground)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called");
|
||||
if (!HandleSessionCreate(want, sessionInfo)) {
|
||||
TAG_LOGE(AAFwkTag::UI_EXT, "HandleSessionCreate failed.");
|
||||
return false;
|
||||
@ -341,7 +341,7 @@ void JsUIExtensionBase::PostInsightIntentExecuted(const sptr<AAFwk::SessionInfo>
|
||||
void JsUIExtensionBase::OnCommandWindowDone(const sptr<AAFwk::SessionInfo> &sessionInfo, AAFwk::WindowCommand winCmd)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called");
|
||||
if (context_ == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::UI_EXT, "Error to get context");
|
||||
return;
|
||||
@ -618,7 +618,7 @@ napi_value JsUIExtensionBase::CallObjectMethod(const char *name, napi_value cons
|
||||
void JsUIExtensionBase::OnConfigurationUpdated(const AppExecFwk::Configuration &configuration)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called");
|
||||
if (context_ == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::UI_EXT, "context is nullptr");
|
||||
return;
|
||||
|
@ -416,7 +416,7 @@ napi_value JsUIExtensionContext::OnTerminateSelf(napi_env env, NapiCallbackInfo&
|
||||
|
||||
napi_value JsUIExtensionContext::OnStartAbilityForResult(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "OnStartAbilityForResult called.");
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called");
|
||||
if (info.argc == ARGC_ZERO) {
|
||||
ThrowTooFewParametersError(env);
|
||||
return CreateJsUndefined(env);
|
||||
@ -434,7 +434,7 @@ napi_value JsUIExtensionContext::OnStartAbilityForResult(napi_env env, NapiCallb
|
||||
std::unique_ptr<NapiAsyncTask> uasyncTask = CreateAsyncTaskWithLastParam(env, lastParam, nullptr, nullptr, &result);
|
||||
std::shared_ptr<NapiAsyncTask> asyncTask = std::move(uasyncTask);
|
||||
RuntimeTask task = [env, asyncTask](int resultCode, const AAFwk::Want &want, bool isInner) {
|
||||
TAG_LOGI(AAFwkTag::UI_EXT, "async callback is called.");
|
||||
TAG_LOGI(AAFwkTag::UI_EXT, "called");
|
||||
napi_value abilityResult = AppExecFwk::WrapAbilityResult(env, resultCode, want);
|
||||
if (abilityResult == nullptr) {
|
||||
TAG_LOGW(AAFwkTag::UI_EXT, "wrap abilityResult failed.");
|
||||
@ -506,7 +506,7 @@ napi_value JsUIExtensionContext::OnStartAbilityForResultAsCaller(napi_env env, N
|
||||
std::unique_ptr<NapiAsyncTask> uasyncTask = CreateAsyncTaskWithLastParam(env, nullptr, nullptr, nullptr, &result);
|
||||
std::shared_ptr<NapiAsyncTask> asyncTask = std::move(uasyncTask);
|
||||
RuntimeTask task = [env, asyncTask](int resultCode, const AAFwk::Want &want, bool isInner) {
|
||||
TAG_LOGI(AAFwkTag::UI_EXT, "Async callback is called.");
|
||||
TAG_LOGI(AAFwkTag::UI_EXT, "called");
|
||||
napi_value abilityResult = AppExecFwk::WrapAbilityResult(env, resultCode, want);
|
||||
if (abilityResult == nullptr) {
|
||||
TAG_LOGW(AAFwkTag::UI_EXT, "Wrap abilityResult failed.");
|
||||
@ -536,7 +536,7 @@ napi_value JsUIExtensionContext::OnStartAbilityForResultAsCaller(napi_env env, N
|
||||
|
||||
napi_value JsUIExtensionContext::OnConnectAbility(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "ConnectAbility called.");
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called");
|
||||
// Check params count
|
||||
if (info.argc < ARGC_TWO) {
|
||||
TAG_LOGE(AAFwkTag::UI_EXT, "Connect ability failed, not enough params.");
|
||||
@ -834,7 +834,7 @@ napi_value JsUIExtensionContext::OnDisconnectUIServiceExtension(napi_env env, Na
|
||||
|
||||
napi_value JsUIExtensionContext::OnReportDrawnCompleted(napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::UI_EXT, "called");
|
||||
auto innerErrorCode = std::make_shared<int32_t>(ERR_OK);
|
||||
NapiAsyncTask::ExecuteCallback execute = [weak = context_, innerErrorCode]() {
|
||||
auto context = weak.lock();
|
||||
|
@ -545,7 +545,7 @@ void JsUIServiceExtension::OnConfigurationUpdated(const AppExecFwk::Configuratio
|
||||
|
||||
void JsUIServiceExtension::ConfigurationUpdated()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::UISERVC_EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::UISERVC_EXT, "called");
|
||||
HandleScope handleScope(jsRuntime_);
|
||||
napi_env env = jsRuntime_.GetNapiEnv();
|
||||
|
||||
|
@ -112,12 +112,12 @@ std::string AbilityStage::OnNewProcessRequest(const AAFwk::Want &want)
|
||||
|
||||
void AbilityStage::OnConfigurationUpdated(const AppExecFwk::Configuration& configuration)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
}
|
||||
|
||||
void AbilityStage::OnMemoryLevel(int level)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
}
|
||||
|
||||
int32_t AbilityStage::RunAutoStartupTask(const std::function<void()> &callback, bool &isAsyncCallback,
|
||||
|
@ -408,7 +408,7 @@ int32_t JsAbilityStage::RunAutoStartupTask(const std::function<void()> &callback
|
||||
|
||||
int32_t JsAbilityStage::RegisterStartupTaskFromProfile(std::vector<JsStartupTask> &jsStartupTasks)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "RegisterStartupTaskFromProfile called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
std::vector<std::string> profileInfo;
|
||||
if (!GetProfileInfoFromResourceManager(profileInfo)) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "appStartup config not exist.");
|
||||
@ -425,7 +425,7 @@ int32_t JsAbilityStage::RegisterStartupTaskFromProfile(std::vector<JsStartupTask
|
||||
|
||||
bool JsAbilityStage::GetProfileInfoFromResourceManager(std::vector<std::string> &profileInfo)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "GetProfileInfoFromResourceManager called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
auto context = GetContext();
|
||||
if (!context) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "context is nullptr.");
|
||||
@ -524,7 +524,7 @@ void JsAbilityStage::SetOptionalParameters(
|
||||
const nlohmann::json &module,
|
||||
JsStartupTask &jsStartupTask)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "SetOptionalParameters called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
if (module.contains(DEPENDENCIES) && module[DEPENDENCIES].is_array()) {
|
||||
std::vector<std::string> dependencies;
|
||||
for (const auto& dependency : module.at(DEPENDENCIES)) {
|
||||
@ -559,7 +559,7 @@ void JsAbilityStage::SetOptionalParameters(
|
||||
|
||||
bool JsAbilityStage::AnalyzeProfileInfoAndRegisterStartupTask(const std::vector<std::string> &profileInfo)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "AnalyzeProfileInfoAndRegisterStartupTask called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
std::string startupInfo;
|
||||
for (const std::string& info: profileInfo) {
|
||||
startupInfo.append(info);
|
||||
|
@ -53,7 +53,7 @@ void JsAbilityStageContext::ConfigurationUpdated(napi_env env, std::shared_ptr<N
|
||||
|
||||
napi_value CreateJsAbilityStageContext(napi_env env, std::shared_ptr<AbilityRuntime::Context> context)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
napi_value objValue = CreateJsBaseContext(env, context);
|
||||
if (context == nullptr) {
|
||||
return objValue;
|
||||
|
@ -1335,7 +1335,7 @@ napi_value JsApplicationContextUtils::OnOffEnvironmentEventSync(
|
||||
napi_value JsApplicationContextUtils::OnOnApplicationStateChange(
|
||||
napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
auto applicationContext = applicationContext_.lock();
|
||||
if (applicationContext == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "ApplicationContext is nullptr.");
|
||||
@ -1358,7 +1358,7 @@ napi_value JsApplicationContextUtils::OnOnApplicationStateChange(
|
||||
napi_value JsApplicationContextUtils::OnOffApplicationStateChange(
|
||||
napi_env env, NapiCallbackInfo& info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
auto applicationContext = applicationContext_.lock();
|
||||
if (applicationContext == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "ApplicationContext is nullptr.");
|
||||
|
@ -48,7 +48,7 @@ AAFwk::UserStatus AssertFaultTaskThread::RequestAssertResult(const std::string &
|
||||
auto assertResult = ASSERT_FAULT_DEFAULT_VALUE;
|
||||
std::weak_ptr<AssertFaultTaskThread> weak = shared_from_this();
|
||||
assertHandler_->PostSyncTask([weak, exprStr, &assertResult]() {
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "Post sync task called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
auto assertFaultTask = weak.lock();
|
||||
if (assertFaultTask == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "Assert fault task instance is nullptr.");
|
||||
|
@ -78,7 +78,7 @@ void ChildMainThread::Start(const std::map<std::string, int32_t> &fds)
|
||||
|
||||
int32_t ChildMainThread::GetChildProcessInfo(ChildProcessInfo &info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "GetChildProcessInfo called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
auto object = OHOS::DelayedSingleton<SysMrgClient>::GetInstance()->GetSystemAbility(APP_MGR_SERVICE_ID);
|
||||
if (object == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "failed to get app manager service");
|
||||
@ -103,7 +103,7 @@ void ChildMainThread::SetFds(const std::map<std::string, int32_t> &fds)
|
||||
|
||||
bool ChildMainThread::Init(const std::shared_ptr<EventRunner> &runner, const ChildProcessInfo &processInfo)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "ChildMainThread:Init called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
if (runner == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "runner is null.");
|
||||
return false;
|
||||
@ -122,7 +122,7 @@ bool ChildMainThread::Init(const std::shared_ptr<EventRunner> &runner, const Chi
|
||||
|
||||
bool ChildMainThread::Attach()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "ChildMainThread::Attach called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
auto sysMrgClient = DelayedSingleton<AppExecFwk::SysMrgClient>::GetInstance();
|
||||
if (sysMrgClient == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "Failed to get SysMrgClient.");
|
||||
@ -144,7 +144,7 @@ bool ChildMainThread::Attach()
|
||||
|
||||
bool ChildMainThread::ScheduleLoadJs()
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::APPKIT, "ScheduleLoadJs called.");
|
||||
TAG_LOGI(AAFwkTag::APPKIT, "called");
|
||||
if (mainHandler_ == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "mainHandler_ is null");
|
||||
return false;
|
||||
@ -176,7 +176,7 @@ bool ChildMainThread::ScheduleLoadJs()
|
||||
|
||||
void ChildMainThread::HandleLoadJs()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "HandleLoadJs called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
if (!processInfo_ || !bundleInfo_) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "processInfo or bundleInfo_ is null.");
|
||||
return;
|
||||
@ -209,7 +209,7 @@ void ChildMainThread::HandleLoadJs()
|
||||
|
||||
void ChildMainThread::HandleLoadArkTs()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "HandleLoadArkTs called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
if (!processInfo_ || !bundleInfo_) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "processInfo or bundleInfo_ is null.");
|
||||
return;
|
||||
@ -297,7 +297,7 @@ bool ChildMainThread::ScheduleExitProcessSafely()
|
||||
|
||||
void ChildMainThread::HandleExitProcessSafely()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "HandleExitProcessSafely called start.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
std::shared_ptr<EventRunner> runner = mainHandler_->GetEventRunner();
|
||||
if (runner == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "HandleExitProcessSafely get runner error.");
|
||||
@ -339,7 +339,7 @@ bool ChildMainThread::ScheduleRunNativeProc(const sptr<IRemoteObject> &mainProce
|
||||
|
||||
void ChildMainThread::HandleRunNativeProc(const sptr<IRemoteObject> &mainProcessCb)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "HandleRunNativeProc called start.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
if (!processInfo_) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "processInfo is null.");
|
||||
return;
|
||||
|
@ -1359,7 +1359,7 @@ CJUncaughtExceptionInfo MainThread::CreateCjExceptionInfo(const std::string &bun
|
||||
void MainThread::HandleLaunchApplication(const AppLaunchData &appLaunchData, const Configuration &config)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_APP, __PRETTY_FUNCTION__);
|
||||
TAG_LOGI(AAFwkTag::APPKIT, "HandleLaunchApplication called.");
|
||||
TAG_LOGI(AAFwkTag::APPKIT, "called");
|
||||
if (!CheckForHandleLaunchApplication(appLaunchData)) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "CheckForHandleLaunchApplication failed.");
|
||||
return;
|
||||
@ -2254,7 +2254,7 @@ void MainThread::HandleCleanAbility(const sptr<IRemoteObject> &token, bool isCac
|
||||
void MainThread::HandleForegroundApplication()
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_APP, __PRETTY_FUNCTION__);
|
||||
TAG_LOGI(AAFwkTag::APPKIT, "called.");
|
||||
TAG_LOGI(AAFwkTag::APPKIT, "called");
|
||||
if ((application_ == nullptr) || (appMgr_ == nullptr)) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "MainThread::handleForegroundApplication error!");
|
||||
return;
|
||||
@ -2966,7 +2966,7 @@ int32_t MainThread::ScheduleNotifyLoadRepairPatch(const std::string &bundleName,
|
||||
const sptr<IQuickFixCallback> &callback, const int32_t recordId)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "ScheduleNotifyLoadRepairPatch function called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
wptr<MainThread> weak = this;
|
||||
auto task = [weak, bundleName, callback, recordId]() {
|
||||
auto appThread = weak.promote();
|
||||
@ -3000,7 +3000,7 @@ int32_t MainThread::ScheduleNotifyLoadRepairPatch(const std::string &bundleName,
|
||||
int32_t MainThread::ScheduleNotifyHotReloadPage(const sptr<IQuickFixCallback> &callback, const int32_t recordId)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
wptr<MainThread> weak = this;
|
||||
auto task = [weak, callback, recordId]() {
|
||||
auto appThread = weak.promote();
|
||||
@ -3022,7 +3022,7 @@ int32_t MainThread::ScheduleNotifyHotReloadPage(const sptr<IQuickFixCallback> &c
|
||||
bool MainThread::GetHqfFileAndHapPath(const std::string &bundleName,
|
||||
std::vector<std::pair<std::string, std::string>> &fileMap)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
auto bundleMgrHelper = DelayedSingleton<BundleMgrHelper>::GetInstance();
|
||||
if (bundleMgrHelper == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "The bundleMgrHelper is nullptr.");
|
||||
@ -3061,7 +3061,7 @@ int32_t MainThread::ScheduleNotifyUnLoadRepairPatch(const std::string &bundleNam
|
||||
const sptr<IQuickFixCallback> &callback, const int32_t recordId)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
wptr<MainThread> weak = this;
|
||||
auto task = [weak, bundleName, callback, recordId]() {
|
||||
auto appThread = weak.promote();
|
||||
@ -3258,7 +3258,7 @@ int32_t MainThread::ScheduleChangeAppGcState(int32_t state)
|
||||
|
||||
int32_t MainThread::ChangeAppGcState(int32_t state)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "called");
|
||||
if (application_ == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "application_ is nullptr.");
|
||||
return ERR_INVALID_VALUE;
|
||||
|
@ -134,7 +134,7 @@ const std::shared_ptr<StartupConfig>& StartupManager::GetDefaultConfig() const
|
||||
|
||||
int32_t StartupManager::RemoveAllResult()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::STARTUP, "called.");
|
||||
TAG_LOGD(AAFwkTag::STARTUP, "called");
|
||||
for (auto &iter : startupTasks_) {
|
||||
if (iter.second != nullptr) {
|
||||
iter.second->RemoveResult();
|
||||
|
@ -324,7 +324,7 @@ void JsRuntime::InitConsoleModule()
|
||||
|
||||
bool JsRuntime::StartDebugger(bool needBreakPoint, uint32_t instanceId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSRUNTIME, "StartDebugger called.");
|
||||
TAG_LOGD(AAFwkTag::JSRUNTIME, "called");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -486,7 +486,7 @@ bool JsRuntime::GetFileBuffer(const std::string& filePath, std::string& fileFull
|
||||
|
||||
bool JsRuntime::LoadRepairPatch(const std::string& hqfFile, const std::string& hapPath)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSRUNTIME, "LoadRepairPatch function called.");
|
||||
TAG_LOGD(AAFwkTag::JSRUNTIME, "called");
|
||||
auto vm = GetEcmaVm();
|
||||
CHECK_POINTER_AND_RETURN(vm, false);
|
||||
|
||||
@ -532,7 +532,7 @@ bool JsRuntime::LoadRepairPatch(const std::string& hqfFile, const std::string& h
|
||||
|
||||
bool JsRuntime::UnLoadRepairPatch(const std::string& hqfFile)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSRUNTIME, "UnLoadRepairPatch function called.");
|
||||
TAG_LOGD(AAFwkTag::JSRUNTIME, "called");
|
||||
auto vm = GetEcmaVm();
|
||||
CHECK_POINTER_AND_RETURN(vm, false);
|
||||
|
||||
@ -564,7 +564,7 @@ bool JsRuntime::UnLoadRepairPatch(const std::string& hqfFile)
|
||||
|
||||
bool JsRuntime::NotifyHotReloadPage()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSRUNTIME, "function called.");
|
||||
TAG_LOGD(AAFwkTag::JSRUNTIME, "called");
|
||||
#ifdef SUPPORT_SCREEN
|
||||
Ace::HotReloader::HotReload();
|
||||
#endif // SUPPORT_SCREEN
|
||||
|
@ -360,7 +360,7 @@ void NapiAsyncTask::Execute(napi_env env, void* data)
|
||||
|
||||
void NapiAsyncTask::Complete(napi_env env, napi_status status, void* data)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::JSRUNTIME, "called.");
|
||||
TAG_LOGD(AAFwkTag::JSRUNTIME, "called");
|
||||
if (data == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ napi_value JsAbilityContext::TerminateSelfWithResult(napi_env env, napi_callback
|
||||
|
||||
napi_value JsAbilityContext::OnTerminateSelfWithResult(napi_env env, NapiCallbackInfo &info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITY_SIM, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITY_SIM, "called");
|
||||
auto abilityContext = context_.lock();
|
||||
if (abilityContext == nullptr) {
|
||||
return nullptr;
|
||||
@ -203,7 +203,7 @@ napi_value CreateJsErrorByNativeErr(napi_env env, int32_t err, const std::string
|
||||
void JsAbilityContext::ConfigurationUpdated(napi_env env, std::shared_ptr<NativeReference> &jsContext,
|
||||
const std::shared_ptr<AppExecFwk::Configuration> &config)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITY_SIM, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITY_SIM, "called");
|
||||
if (jsContext == nullptr || config == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::ABILITY_SIM, "jsContext is nullptr.");
|
||||
return;
|
||||
|
@ -24,7 +24,7 @@ namespace OHOS {
|
||||
namespace AbilityRuntime {
|
||||
napi_value CreateJsAbilityStageContext(napi_env env, const std::shared_ptr<AbilityRuntime::Context> &context)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITY_SIM, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITY_SIM, "called");
|
||||
napi_value objValue = CreateJsBaseContext(env, context);
|
||||
if (context == nullptr) {
|
||||
return objValue;
|
||||
@ -40,7 +40,7 @@ napi_value CreateJsAbilityStageContext(napi_env env, const std::shared_ptr<Abili
|
||||
void JsAbilityStageContext::ConfigurationUpdated(napi_env env, std::shared_ptr<NativeReference> &jsContext,
|
||||
const std::shared_ptr<AppExecFwk::Configuration> &config)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITY_SIM, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITY_SIM, "called");
|
||||
if (!jsContext || !config) {
|
||||
TAG_LOGE(AAFwkTag::ABILITY_SIM, "jsContext or config is nullptr.");
|
||||
return;
|
||||
|
@ -498,7 +498,7 @@ void SimulatorImpl::TerminateAbility(int64_t abilityId)
|
||||
|
||||
void SimulatorImpl::UpdateConfiguration(const AppExecFwk::Configuration &config)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITY_SIM, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITY_SIM, "called");
|
||||
if (abilityStage_ == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::ABILITY_SIM, "abilityStage_ is nullptr");
|
||||
return;
|
||||
@ -547,7 +547,7 @@ void SimulatorImpl::SetMockList(const std::map<std::string, std::string> &mockLi
|
||||
|
||||
void SimulatorImpl::InitResourceMgr()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITY_SIM, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITY_SIM, "called");
|
||||
resourceMgr_ = std::shared_ptr<Global::Resource::ResourceManager>(Global::Resource::CreateResourceManager());
|
||||
if (resourceMgr_ == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::ABILITY_SIM, "resourceMgr is nullptr");
|
||||
|
@ -28,7 +28,7 @@ WindowManagerServiceHandlerProxy::WindowManagerServiceHandlerProxy(const sptr<IR
|
||||
void WindowManagerServiceHandlerProxy::NotifyWindowTransition(sptr<AbilityTransitionInfo> fromInfo,
|
||||
sptr<AbilityTransitionInfo> toInfo, bool& animaEnabled)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
MessageParcel data;
|
||||
if (!data.WriteInterfaceToken(IWindowManagerServiceHandler::GetDescriptor())) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "Write interface token failed.");
|
||||
@ -57,7 +57,7 @@ void WindowManagerServiceHandlerProxy::NotifyWindowTransition(sptr<AbilityTransi
|
||||
|
||||
int32_t WindowManagerServiceHandlerProxy::GetFocusWindow(sptr<IRemoteObject>& abilityToken)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
MessageParcel data;
|
||||
if (!data.WriteInterfaceToken(IWindowManagerServiceHandler::GetDescriptor())) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "Write interface token failed.");
|
||||
@ -82,7 +82,7 @@ int32_t WindowManagerServiceHandlerProxy::GetFocusWindow(sptr<IRemoteObject>& ab
|
||||
void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo> info,
|
||||
std::shared_ptr<Media::PixelMap> pixelMap, uint32_t bgColor)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
MessageParcel data;
|
||||
if (!data.WriteInterfaceToken(IWindowManagerServiceHandler::GetDescriptor())) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "Failed to write interface token.");
|
||||
@ -111,7 +111,7 @@ void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo
|
||||
void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo> info,
|
||||
std::shared_ptr<Media::PixelMap> pixelMap)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
MessageParcel data;
|
||||
if (!data.WriteInterfaceToken(IWindowManagerServiceHandler::GetDescriptor())) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "Write interface token failed.");
|
||||
@ -135,7 +135,7 @@ void WindowManagerServiceHandlerProxy::StartingWindow(sptr<AbilityTransitionInfo
|
||||
|
||||
void WindowManagerServiceHandlerProxy::CancelStartingWindow(sptr<IRemoteObject> abilityToken)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
MessageParcel data;
|
||||
if (!data.WriteInterfaceToken(IWindowManagerServiceHandler::GetDescriptor())) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "Write interface token failed.");
|
||||
@ -166,7 +166,7 @@ void WindowManagerServiceHandlerProxy::CancelStartingWindow(sptr<IRemoteObject>
|
||||
|
||||
void WindowManagerServiceHandlerProxy::NotifyAnimationAbilityDied(sptr<AbilityTransitionInfo> info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
MessageParcel data;
|
||||
if (!data.WriteInterfaceToken(IWindowManagerServiceHandler::GetDescriptor())) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "Write interface token failed.");
|
||||
@ -187,7 +187,7 @@ void WindowManagerServiceHandlerProxy::NotifyAnimationAbilityDied(sptr<AbilityTr
|
||||
int32_t WindowManagerServiceHandlerProxy::MoveMissionsToForeground(const std::vector<int32_t>& missionIds,
|
||||
int32_t topMissionId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
@ -218,7 +218,7 @@ int32_t WindowManagerServiceHandlerProxy::MoveMissionsToForeground(const std::ve
|
||||
int32_t WindowManagerServiceHandlerProxy::MoveMissionsToBackground(const std::vector<int32_t>& missionIds,
|
||||
std::vector<int32_t>& result)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
|
@ -63,7 +63,7 @@ int WindowManagerServiceHandlerStub::OnRemoteRequest(
|
||||
|
||||
int WindowManagerServiceHandlerStub::NotifyWindowTransitionInner(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
sptr<AbilityTransitionInfo> fromInfo(data.ReadParcelable<AbilityTransitionInfo>());
|
||||
if (!fromInfo) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "To read fromInfo failed.");
|
||||
@ -82,7 +82,7 @@ int WindowManagerServiceHandlerStub::NotifyWindowTransitionInner(MessageParcel &
|
||||
|
||||
int WindowManagerServiceHandlerStub::GetFocusWindowInner(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
sptr<IRemoteObject> abilityToken = nullptr;
|
||||
int32_t ret = GetFocusWindow(abilityToken);
|
||||
if (!reply.WriteInt32(ret)) {
|
||||
@ -109,7 +109,7 @@ int WindowManagerServiceHandlerStub::GetFocusWindowInner(MessageParcel &data, Me
|
||||
|
||||
int WindowManagerServiceHandlerStub::StartingWindowCold(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
sptr<AbilityTransitionInfo> info(data.ReadParcelable<AbilityTransitionInfo>());
|
||||
if (!info) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "To read info failed!");
|
||||
@ -128,7 +128,7 @@ int WindowManagerServiceHandlerStub::StartingWindowCold(MessageParcel &data, Mes
|
||||
|
||||
int WindowManagerServiceHandlerStub::StartingWindowHot(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
sptr<AbilityTransitionInfo> info(data.ReadParcelable<AbilityTransitionInfo>());
|
||||
if (!info) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "To read info failed.");
|
||||
@ -146,7 +146,7 @@ int WindowManagerServiceHandlerStub::StartingWindowHot(MessageParcel &data, Mess
|
||||
|
||||
int WindowManagerServiceHandlerStub::CancelStartingWindowInner(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
sptr<IRemoteObject> abilityToken = nullptr;
|
||||
if (data.ReadBool()) {
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "abilityToken is valid.");
|
||||
@ -158,7 +158,7 @@ int WindowManagerServiceHandlerStub::CancelStartingWindowInner(MessageParcel &da
|
||||
|
||||
int WindowManagerServiceHandlerStub::NotifyAnimationAbilityDiedInner(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
sptr<AbilityTransitionInfo> info(data.ReadParcelable<AbilityTransitionInfo>());
|
||||
if (!info) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "To read info failed.");
|
||||
@ -170,7 +170,7 @@ int WindowManagerServiceHandlerStub::NotifyAnimationAbilityDiedInner(MessageParc
|
||||
|
||||
int WindowManagerServiceHandlerStub::MoveMissionsToForegroundInner(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
std::vector<int32_t> missionIds;
|
||||
data.ReadInt32Vector(&missionIds);
|
||||
int32_t topMissionId = data.ReadInt32();
|
||||
@ -181,7 +181,7 @@ int WindowManagerServiceHandlerStub::MoveMissionsToForegroundInner(MessageParcel
|
||||
|
||||
int WindowManagerServiceHandlerStub::MoveMissionsToBackgroundInner(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
std::vector<int32_t> missionIds;
|
||||
std::vector<int32_t> result;
|
||||
data.ReadInt32Vector(&missionIds);
|
||||
|
@ -726,7 +726,7 @@ int AmsMgrProxy::GetApplicationInfoByProcessID(const int pid, AppExecFwk::Applic
|
||||
|
||||
int32_t AmsMgrProxy::NotifyAppMgrRecordExitReason(int32_t pid, int32_t reason, const std::string &exitMsg)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "NotifyAppMgrRecordExitReason called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option(MessageOption::TF_SYNC);
|
||||
|
@ -492,7 +492,7 @@ int32_t AmsMgrStub::HandleGetApplicationInfoByProcessID(MessageParcel &data, Mes
|
||||
|
||||
int32_t AmsMgrStub::HandleNotifyAppMgrRecordExitReason(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "HandleNotifyAppMgrRecordExitReason called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
int32_t pid = data.ReadInt32();
|
||||
int32_t reason = data.ReadInt32();
|
||||
std::string exitMsg = Str16ToStr8(data.ReadString16());
|
||||
|
@ -53,7 +53,7 @@ void AppMgrProxy::AttachApplication(const sptr<IRemoteObject> &obj)
|
||||
int32_t AppMgrProxy::PreloadApplication(const std::string &bundleName, int32_t userId,
|
||||
AppExecFwk::PreloadMode preloadMode, int32_t appIndex)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "PreloadApplication called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option(MessageOption::TF_SYNC);
|
||||
@ -982,7 +982,7 @@ int AppMgrProxy::BlockAppService()
|
||||
bool AppMgrProxy::GetAppRunningStateByBundleName(const std::string &bundleName)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
MessageParcel data;
|
||||
if (!WriteInterfaceToken(data)) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "Write interface token failed.");
|
||||
@ -1009,7 +1009,7 @@ bool AppMgrProxy::GetAppRunningStateByBundleName(const std::string &bundleName)
|
||||
int32_t AppMgrProxy::NotifyLoadRepairPatch(const std::string &bundleName, const sptr<IQuickFixCallback> &callback)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "NotifyLoadRepairPatch, function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
MessageParcel data;
|
||||
if (!WriteInterfaceToken(data)) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "NotifyLoadRepairPatch, Write interface token failed.");
|
||||
@ -1041,7 +1041,7 @@ int32_t AppMgrProxy::NotifyLoadRepairPatch(const std::string &bundleName, const
|
||||
int32_t AppMgrProxy::NotifyHotReloadPage(const std::string &bundleName, const sptr<IQuickFixCallback> &callback)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
MessageParcel data;
|
||||
if (!WriteInterfaceToken(data)) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "Write interface token failed.");
|
||||
@ -1107,7 +1107,7 @@ int32_t AppMgrProxy::SetContinuousTaskProcess(int32_t pid, bool isContinuousTask
|
||||
int32_t AppMgrProxy::NotifyUnLoadRepairPatch(const std::string &bundleName, const sptr<IQuickFixCallback> &callback)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
MessageParcel data;
|
||||
if (!WriteInterfaceToken(data)) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "Notify unload patch, Write interface token failed.");
|
||||
@ -1134,7 +1134,7 @@ int32_t AppMgrProxy::NotifyUnLoadRepairPatch(const std::string &bundleName, cons
|
||||
bool AppMgrProxy::IsSharedBundleRunning(const std::string &bundleName, uint32_t versionCode)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
MessageParcel data;
|
||||
if (!WriteInterfaceToken(data)) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "Write interface token failed.");
|
||||
@ -1226,7 +1226,7 @@ int32_t AppMgrProxy::GetRunningProcessInfoByPid(const pid_t pid, OHOS::AppExecFw
|
||||
|
||||
int32_t AppMgrProxy::NotifyAppFault(const FaultData &faultData)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
MessageParcel data;
|
||||
|
||||
if (!WriteInterfaceToken(data)) {
|
||||
@ -1248,7 +1248,7 @@ int32_t AppMgrProxy::NotifyAppFault(const FaultData &faultData)
|
||||
|
||||
int32_t AppMgrProxy::NotifyAppFaultBySA(const AppFaultDataBySA &faultData)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
MessageParcel data;
|
||||
|
||||
if (!WriteInterfaceToken(data)) {
|
||||
@ -1270,7 +1270,7 @@ int32_t AppMgrProxy::NotifyAppFaultBySA(const AppFaultDataBySA &faultData)
|
||||
|
||||
bool AppMgrProxy::SetAppFreezeFilter(int32_t pid)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
@ -1352,7 +1352,7 @@ int32_t AppMgrProxy::GetRunningProcessInformation(
|
||||
|
||||
int32_t AppMgrProxy::ChangeAppGcState(pid_t pid, int32_t state)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
if (!WriteInterfaceToken(data)) {
|
||||
@ -1547,7 +1547,7 @@ int32_t AppMgrProxy::IsAppRunning(const std::string &bundleName, int32_t appClon
|
||||
|
||||
int32_t AppMgrProxy::StartChildProcess(pid_t &childPid, const ChildProcessRequest &request)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "StartChildProcess called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
if (request.srcEntry.empty()) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "Invalid params, srcEntry:%{private}s", request.srcEntry.c_str());
|
||||
return ERR_INVALID_VALUE;
|
||||
|
@ -350,7 +350,7 @@ int32_t AppMgrStub::HandleAttachApplication(MessageParcel &data, MessageParcel &
|
||||
int32_t AppMgrStub::HandlePreloadApplication(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
HITRACE_METER(HITRACE_TAG_APP);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "Stub HandlePreloadApplication called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
std::string bundleName = Str16ToStr8(data.ReadString16());
|
||||
int32_t userId = data.ReadInt32();
|
||||
int32_t preloadMode = data.ReadInt32();
|
||||
@ -942,7 +942,7 @@ int32_t AppMgrStub::HandleBlockAppServiceDone(MessageParcel &data, MessageParcel
|
||||
int32_t AppMgrStub::HandleGetAppRunningStateByBundleName(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
std::string bundleName = data.ReadString();
|
||||
auto ret = GetAppRunningStateByBundleName(bundleName);
|
||||
if (!reply.WriteBool(ret)) {
|
||||
@ -954,7 +954,7 @@ int32_t AppMgrStub::HandleGetAppRunningStateByBundleName(MessageParcel &data, Me
|
||||
int32_t AppMgrStub::HandleNotifyLoadRepairPatch(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
std::string bundleName = data.ReadString();
|
||||
auto callback = iface_cast<IQuickFixCallback>(data.ReadRemoteObject());
|
||||
if (callback == nullptr) {
|
||||
@ -971,7 +971,7 @@ int32_t AppMgrStub::HandleNotifyLoadRepairPatch(MessageParcel &data, MessageParc
|
||||
int32_t AppMgrStub::HandleNotifyHotReloadPage(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
std::string bundleName = data.ReadString();
|
||||
auto callback = iface_cast<IQuickFixCallback>(data.ReadRemoteObject());
|
||||
if (callback == nullptr) {
|
||||
@ -989,7 +989,7 @@ int32_t AppMgrStub::HandleNotifyHotReloadPage(MessageParcel &data, MessageParcel
|
||||
int32_t AppMgrStub::HandleSetContinuousTaskProcess(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
int32_t pid = data.ReadInt32();
|
||||
bool isContinuousTask = data.ReadBool();
|
||||
auto ret = SetContinuousTaskProcess(pid, isContinuousTask);
|
||||
@ -1003,7 +1003,7 @@ int32_t AppMgrStub::HandleSetContinuousTaskProcess(MessageParcel &data, MessageP
|
||||
int32_t AppMgrStub::HandleNotifyUnLoadRepairPatch(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
std::string bundleName = data.ReadString();
|
||||
auto callback = iface_cast<IQuickFixCallback>(data.ReadRemoteObject());
|
||||
if (callback == nullptr) {
|
||||
@ -1020,7 +1020,7 @@ int32_t AppMgrStub::HandleNotifyUnLoadRepairPatch(MessageParcel &data, MessagePa
|
||||
int32_t AppMgrStub::HandleIsSharedBundleRunning(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
std::string bundleName = data.ReadString();
|
||||
uint32_t versionCode = data.ReadUint32();
|
||||
bool result = IsSharedBundleRunning(bundleName, versionCode);
|
||||
@ -1033,7 +1033,7 @@ int32_t AppMgrStub::HandleIsSharedBundleRunning(MessageParcel &data, MessageParc
|
||||
int32_t AppMgrStub::HandleStartNativeProcessForDebugger(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
std::unique_ptr<AAFwk::Want> want(data.ReadParcelable<AAFwk::Want>());
|
||||
if (want == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "want is nullptr");
|
||||
@ -1304,7 +1304,7 @@ int32_t AppMgrStub::HandleIsAppRunning(MessageParcel &data, MessageParcel &reply
|
||||
|
||||
int32_t AppMgrStub::HandleStartChildProcess(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
std::unique_ptr<ChildProcessRequest> request(data.ReadParcelable<ChildProcessRequest>());
|
||||
if (!request) {
|
||||
return IPC_STUB_ERR;
|
||||
@ -1324,7 +1324,7 @@ int32_t AppMgrStub::HandleStartChildProcess(MessageParcel &data, MessageParcel &
|
||||
|
||||
int32_t AppMgrStub::HandleGetChildProcessInfoForSelf(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
ChildProcessInfo info;
|
||||
auto result = GetChildProcessInfoForSelf(info);
|
||||
if (!reply.WriteInt32(result)) {
|
||||
@ -1339,7 +1339,7 @@ int32_t AppMgrStub::HandleGetChildProcessInfoForSelf(MessageParcel &data, Messag
|
||||
|
||||
int32_t AppMgrStub::HandleAttachChildProcess(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
sptr<IRemoteObject> scheduler = data.ReadRemoteObject();
|
||||
AttachChildProcess(scheduler);
|
||||
return NO_ERROR;
|
||||
@ -1347,7 +1347,7 @@ int32_t AppMgrStub::HandleAttachChildProcess(MessageParcel &data, MessageParcel
|
||||
|
||||
int32_t AppMgrStub::HandleExitChildProcessSafely(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
ExitChildProcessSafely();
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
void QuickFixCallbackProxy::OnLoadPatchDone(int32_t resultCode, int32_t recordId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
@ -40,7 +40,7 @@ void QuickFixCallbackProxy::OnLoadPatchDone(int32_t resultCode, int32_t recordId
|
||||
|
||||
void QuickFixCallbackProxy::OnUnloadPatchDone(int32_t resultCode, int32_t recordId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
@ -57,7 +57,7 @@ void QuickFixCallbackProxy::OnUnloadPatchDone(int32_t resultCode, int32_t record
|
||||
|
||||
void QuickFixCallbackProxy::OnReloadPageDone(int32_t resultCode, int32_t recordId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
|
@ -51,7 +51,7 @@ void ConnectionObserverProxy::OnExtensionDisconnected(const ConnectionData& conn
|
||||
MessageParcel reply;
|
||||
MessageOption option(MessageOption::TF_ASYNC);
|
||||
|
||||
TAG_LOGD(AAFwkTag::CONNECTION, "called.");
|
||||
TAG_LOGD(AAFwkTag::CONNECTION, "called");
|
||||
if (!data.WriteInterfaceToken(IConnectionObserver::GetDescriptor())) {
|
||||
TAG_LOGE(AAFwkTag::CONNECTION, "Write interface token failed.");
|
||||
return;
|
||||
|
@ -35,7 +35,7 @@ const int LOAD_SA_TIMEOUT_MS = 4 * 1000;
|
||||
int32_t QuickFixManagerClient::ApplyQuickFix(const std::vector<std::string> &quickFixFiles, bool isDebug)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "function called.");
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "called");
|
||||
|
||||
auto quickFixMgr = GetQuickFixMgrProxy();
|
||||
if (quickFixMgr == nullptr) {
|
||||
@ -64,7 +64,7 @@ int32_t QuickFixManagerClient::GetApplyedQuickFixInfo(const std::string &bundleN
|
||||
ApplicationQuickFixInfo &quickFixInfo)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "function called.");
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "called");
|
||||
|
||||
auto quickFixMgr = GetQuickFixMgrProxy();
|
||||
if (quickFixMgr == nullptr) {
|
||||
@ -78,7 +78,7 @@ int32_t QuickFixManagerClient::GetApplyedQuickFixInfo(const std::string &bundleN
|
||||
sptr<IQuickFixManager> QuickFixManagerClient::GetQuickFixMgrProxy()
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "function called.");
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "called");
|
||||
auto quickFixMgr = GetQuickFixMgr();
|
||||
if (quickFixMgr != nullptr) {
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "Quick fix manager has been started.");
|
||||
@ -113,7 +113,7 @@ sptr<IQuickFixManager> QuickFixManagerClient::GetQuickFixMgrProxy()
|
||||
|
||||
int32_t QuickFixManagerClient::RevokeQuickFix(const std::string &bundleName)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "Function called.");
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "called");
|
||||
|
||||
auto quickFixMgr = GetQuickFixMgrProxy();
|
||||
if (quickFixMgr == nullptr) {
|
||||
@ -128,7 +128,7 @@ int32_t QuickFixManagerClient::RevokeQuickFix(const std::string &bundleName)
|
||||
|
||||
void QuickFixManagerClient::ClearProxy()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "function called.");
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "called");
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
quickFixMgr_ = nullptr;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ sptr<AppExecFwk::IAppMgr> QuickFixUtil::GetAppManagerProxy()
|
||||
|
||||
sptr<AppExecFwk::IQuickFixManager> QuickFixUtil::GetBundleQuickFixMgrProxy()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "Function called.");
|
||||
TAG_LOGD(AAFwkTag::QUICKFIX, "called");
|
||||
auto bundleMgrHelper = DelayedSingleton<AppExecFwk::BundleMgrHelper>::GetInstance();
|
||||
if (bundleMgrHelper == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::QUICKFIX, "The bundleMgrHelper is nullptr.");
|
||||
|
@ -80,7 +80,7 @@ int32_t UriPermissionManagerClient::GrantUriPermissionPrivileged(const std::vect
|
||||
|
||||
void UriPermissionManagerClient::RevokeUriPermission(const uint32_t tokenId, int32_t abilityId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerClient::RevokeUriPermission is called.");
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "called");
|
||||
auto uriPermMgr = ConnectUriPermService();
|
||||
if (uriPermMgr) {
|
||||
return uriPermMgr->RevokeUriPermission(tokenId, abilityId);
|
||||
@ -89,7 +89,7 @@ void UriPermissionManagerClient::RevokeUriPermission(const uint32_t tokenId, int
|
||||
|
||||
int UriPermissionManagerClient::RevokeAllUriPermissions(const uint32_t tokenId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerClient::RevokeAllUriPermissions is called.");
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "called");
|
||||
auto uriPermMgr = ConnectUriPermService();
|
||||
if (uriPermMgr) {
|
||||
return uriPermMgr->RevokeAllUriPermissions(tokenId);
|
||||
@ -100,7 +100,7 @@ int UriPermissionManagerClient::RevokeAllUriPermissions(const uint32_t tokenId)
|
||||
int UriPermissionManagerClient::RevokeUriPermissionManually(const Uri &uri, const std::string bundleName,
|
||||
int32_t appIndex)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerClient::RevokeUriPermissionManually is called.");
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "called");
|
||||
auto uriPermMgr = ConnectUriPermService();
|
||||
if (uriPermMgr) {
|
||||
return uriPermMgr->RevokeUriPermissionManually(uri, bundleName, appIndex);
|
||||
@ -136,7 +136,7 @@ std::vector<bool> UriPermissionManagerClient::CheckUriAuthorization(const std::v
|
||||
|
||||
sptr<IUriPermissionManager> UriPermissionManagerClient::ConnectUriPermService()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerClient::ConnectUriPermService is called.");
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "called");
|
||||
auto uriPermMgr = GetUriPermMgr();
|
||||
if (uriPermMgr == nullptr) {
|
||||
if (!LoadUriPermService()) {
|
||||
@ -160,7 +160,7 @@ sptr<IUriPermissionManager> UriPermissionManagerClient::ConnectUriPermService()
|
||||
|
||||
bool UriPermissionManagerClient::LoadUriPermService()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerClient::LoadUriPermService is called.");
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "called");
|
||||
auto systemAbilityMgr = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager();
|
||||
if (systemAbilityMgr == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::URIPERMMGR, "Failed to get SystemAbilityManager.");
|
||||
@ -202,14 +202,14 @@ sptr<IUriPermissionManager> UriPermissionManagerClient::GetUriPermMgr()
|
||||
|
||||
void UriPermissionManagerClient::SetUriPermMgr(const sptr<IRemoteObject> &remoteObject)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerClient::SetUriPermMgr is called.");
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "called");
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
uriPermMgr_ = iface_cast<IUriPermissionManager>(remoteObject);
|
||||
}
|
||||
|
||||
void UriPermissionManagerClient::OnLoadSystemAbilitySuccess(const sptr<IRemoteObject> &remoteObject)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerClient::OnLoadSystemAbilitySuccess is called.");
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "called");
|
||||
SetUriPermMgr(remoteObject);
|
||||
std::unique_lock<std::mutex> lock(saLoadMutex_);
|
||||
saLoadFinished_ = true;
|
||||
@ -218,7 +218,7 @@ void UriPermissionManagerClient::OnLoadSystemAbilitySuccess(const sptr<IRemoteOb
|
||||
|
||||
void UriPermissionManagerClient::OnLoadSystemAbilityFail()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerClient::OnLoadSystemAbilityFail is called.");
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "called");
|
||||
SetUriPermMgr(nullptr);
|
||||
std::unique_lock<std::mutex> lock(saLoadMutex_);
|
||||
saLoadFinished_ = true;
|
||||
@ -227,7 +227,7 @@ void UriPermissionManagerClient::OnLoadSystemAbilityFail()
|
||||
|
||||
void UriPermissionManagerClient::ClearProxy()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerClient::ClearProxy is called.");
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "called");
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
uriPermMgr_ = nullptr;
|
||||
|
@ -30,7 +30,7 @@ UriPermissionManagerProxy::UriPermissionManagerProxy(const sptr<IRemoteObject> &
|
||||
int UriPermissionManagerProxy::GrantUriPermission(const Uri &uri, unsigned int flag,
|
||||
const std::string targetBundleName, int32_t appIndex, uint32_t initiatorTokenId, int32_t abilityId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerProxy::GrantUriPermission is called.");
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "called");
|
||||
MessageParcel data;
|
||||
if (!data.WriteInterfaceToken(IUriPermissionManager::GetDescriptor())) {
|
||||
TAG_LOGE(AAFwkTag::URIPERMMGR, "Write interface token failed.");
|
||||
@ -73,7 +73,7 @@ int UriPermissionManagerProxy::GrantUriPermission(const Uri &uri, unsigned int f
|
||||
int UriPermissionManagerProxy::GrantUriPermission(const std::vector<Uri> &uriVec, unsigned int flag,
|
||||
const std::string targetBundleName, int32_t appIndex, uint32_t initiatorTokenId, int32_t abilityId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerProxy::GrantUriPermission is called.");
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "called");
|
||||
if (uriVec.empty() || uriVec.size() > MAX_URI_COUNT) {
|
||||
TAG_LOGE(AAFwkTag::URIPERMMGR, "uriVec is empty or exceed maximum size %{public}d.", MAX_URI_COUNT);
|
||||
return ERR_URI_LIST_OUT_OF_RANGE;
|
||||
@ -126,7 +126,7 @@ int UriPermissionManagerProxy::GrantUriPermission(const std::vector<Uri> &uriVec
|
||||
int32_t UriPermissionManagerProxy::GrantUriPermissionPrivileged(const std::vector<Uri> &uriVec, uint32_t flag,
|
||||
const std::string &targetBundleName, int32_t appIndex)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerProxy::GrantUriPermissionPrivileged is called.");
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "called");
|
||||
if (uriVec.empty() || uriVec.size() > MAX_URI_COUNT) {
|
||||
TAG_LOGE(AAFwkTag::URIPERMMGR, "uriVec is empty or exceed maximum size %{public}d.", MAX_URI_COUNT);
|
||||
return ERR_URI_LIST_OUT_OF_RANGE;
|
||||
@ -170,7 +170,7 @@ int32_t UriPermissionManagerProxy::GrantUriPermissionPrivileged(const std::vecto
|
||||
|
||||
void UriPermissionManagerProxy::RevokeUriPermission(const uint32_t tokenId, int32_t abilityId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerProxy::RevokeUriPermission is called.");
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "called");
|
||||
MessageParcel data;
|
||||
if (!data.WriteInterfaceToken(IUriPermissionManager::GetDescriptor())) {
|
||||
TAG_LOGE(AAFwkTag::URIPERMMGR, "Write interface token failed.");
|
||||
@ -194,7 +194,7 @@ void UriPermissionManagerProxy::RevokeUriPermission(const uint32_t tokenId, int3
|
||||
|
||||
int UriPermissionManagerProxy::RevokeAllUriPermissions(const uint32_t tokenId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerProxy::RevokeAllUriPermissions is called.");
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "called");
|
||||
MessageParcel data;
|
||||
if (!data.WriteInterfaceToken(IUriPermissionManager::GetDescriptor())) {
|
||||
TAG_LOGE(AAFwkTag::URIPERMMGR, "Write interface token failed.");
|
||||
@ -217,7 +217,7 @@ int UriPermissionManagerProxy::RevokeAllUriPermissions(const uint32_t tokenId)
|
||||
int UriPermissionManagerProxy::RevokeUriPermissionManually(const Uri &uri, const std::string bundleName,
|
||||
int32_t appIndex)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerProxy::RevokeUriPermissionManually is called.");
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "called");
|
||||
MessageParcel data;
|
||||
if (!data.WriteInterfaceToken(IUriPermissionManager::GetDescriptor())) {
|
||||
TAG_LOGE(AAFwkTag::URIPERMMGR, "Write interface token failed.");
|
||||
@ -247,7 +247,7 @@ int UriPermissionManagerProxy::RevokeUriPermissionManually(const Uri &uri, const
|
||||
|
||||
bool UriPermissionManagerProxy::VerifyUriPermission(const Uri& uri, uint32_t flag, uint32_t tokenId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerProxy::VerifyUriPermission is called.");
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "called");
|
||||
MessageParcel data;
|
||||
if (!data.WriteInterfaceToken(IUriPermissionManager::GetDescriptor())) {
|
||||
TAG_LOGE(AAFwkTag::URIPERMMGR, "Write interface token failed.");
|
||||
@ -278,7 +278,7 @@ bool UriPermissionManagerProxy::VerifyUriPermission(const Uri& uri, uint32_t fla
|
||||
std::vector<bool> UriPermissionManagerProxy::CheckUriAuthorization(const std::vector<std::string> &uriVec,
|
||||
uint32_t flag, uint32_t tokenId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerProxy::CheckUriAuthorization is called.");
|
||||
TAG_LOGD(AAFwkTag::URIPERMMGR, "UriPermissionManagerProxy::CheckUriAuthorization is called");
|
||||
std::vector<bool> result(uriVec.size(), false);
|
||||
if (uriVec.empty() || uriVec.size() > MAX_URI_COUNT) {
|
||||
TAG_LOGE(AAFwkTag::URIPERMMGR, "uriVec is empty or exceed maximum size %{public}d.", MAX_URI_COUNT);
|
||||
|
@ -77,7 +77,7 @@ template<class C>
|
||||
void ExtensionBase<C>::OnConfigurationUpdated(const AppExecFwk::Configuration &configuration)
|
||||
{
|
||||
Extension::OnConfigurationUpdated(configuration);
|
||||
TAG_LOGD(AAFwkTag::EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::EXT, "called");
|
||||
|
||||
if (!context_) {
|
||||
TAG_LOGE(AAFwkTag::EXT, "context is nullptr.");
|
||||
@ -99,7 +99,7 @@ template<class C>
|
||||
void ExtensionBase<C>::OnMemoryLevel(int level)
|
||||
{
|
||||
Extension::OnMemoryLevel(level);
|
||||
TAG_LOGD(AAFwkTag::EXT, "called.");
|
||||
TAG_LOGD(AAFwkTag::EXT, "called");
|
||||
|
||||
if (extensionCommon_) {
|
||||
extensionCommon_->OnMemoryLevel(level);
|
||||
|
@ -36,7 +36,7 @@ SrSamgrHelper::~SrSamgrHelper()
|
||||
|
||||
sptr<IBundleMgr> SrSamgrHelper::GetBundleMgr()
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::SER_ROUTER, "GetBundleMgr called.");
|
||||
TAG_LOGI(AAFwkTag::SER_ROUTER, "called");
|
||||
std::lock_guard<std::mutex> lock(bundleMgrMutex_);
|
||||
if (iBundleMgr_ == nullptr) {
|
||||
ConnectBundleMgrLocked();
|
||||
|
@ -777,7 +777,7 @@ int AbilityConnectManager::DisconnectAbilityLocked(const sptr<IAbilityConnection
|
||||
|
||||
void AbilityConnectManager::TerminateRecord(std::shared_ptr<AbilityRecord> abilityRecord)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "terminate record called.");
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "called");
|
||||
if (!GetAbilityRecordById(abilityRecord->GetRecordId()) &&
|
||||
!AbilityCacheManager::GetInstance().FindRecordByToken(abilityRecord->GetToken())) {
|
||||
return;
|
||||
@ -2109,7 +2109,7 @@ bool AbilityConnectManager::IsAbilityNeedKeepAlive(const std::shared_ptr<Ability
|
||||
|
||||
void AbilityConnectManager::ClearPreloadUIExtensionRecord(const std::shared_ptr<AbilityRecord> &abilityRecord)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
CHECK_POINTER(abilityRecord);
|
||||
auto extensionRecordId = abilityRecord->GetUIExtensionAbilityId();
|
||||
std::string hostBundleName;
|
||||
@ -2154,7 +2154,7 @@ void AbilityConnectManager::KeepAbilityAlive(const std::shared_ptr<AbilityRecord
|
||||
void AbilityConnectManager::HandleAbilityDiedTask(
|
||||
const std::shared_ptr<AbilityRecord> &abilityRecord, int32_t currentUserId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
std::lock_guard guard(serialMutex_);
|
||||
CHECK_POINTER(abilityRecord);
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "Ability died: %{public}s", abilityRecord->GetURI().c_str());
|
||||
@ -2268,7 +2268,7 @@ void AbilityConnectManager::CloseAssertDialog(const std::string &assertSessionId
|
||||
if (abilityRecord == nullptr) {
|
||||
return;
|
||||
}
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "Terminate assert fault dialog called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "Terminate assert fault dialog");
|
||||
terminatingExtensionList_.push_back(abilityRecord);
|
||||
sptr<IRemoteObject> token = abilityRecord->GetToken();
|
||||
if (token != nullptr) {
|
||||
|
@ -73,7 +73,7 @@ void AbilityEventHandler::ProcessEvent(const EventWrap &event)
|
||||
|
||||
void AbilityEventHandler::ProcessLoadTimeOut(const EventWrap &event)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
auto server = server_.lock();
|
||||
CHECK_POINTER(server);
|
||||
if (event.GetRunCount() == 0) {
|
||||
@ -91,7 +91,7 @@ void AbilityEventHandler::ProcessLoadTimeOut(const EventWrap &event)
|
||||
|
||||
void AbilityEventHandler::ProcessActiveTimeOut(int64_t abilityRecordId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
auto server = server_.lock();
|
||||
CHECK_POINTER(server);
|
||||
server->HandleActiveTimeOut(abilityRecordId);
|
||||
@ -99,7 +99,7 @@ void AbilityEventHandler::ProcessActiveTimeOut(int64_t abilityRecordId)
|
||||
|
||||
void AbilityEventHandler::ProcessInactiveTimeOut(int64_t abilityRecordId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
auto server = server_.lock();
|
||||
CHECK_POINTER(server);
|
||||
server->HandleInactiveTimeOut(abilityRecordId);
|
||||
|
@ -1008,7 +1008,7 @@ ErrCode AbilityManagerClient::StartAbilityByCall(const Want &want, sptr<IAbility
|
||||
{
|
||||
auto abms = GetAbilityManager();
|
||||
CHECK_POINTER_RETURN_NOT_CONNECTED(abms);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "AbilityManagerClient::StartAbilityByCall called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
return abms->StartAbilityByCall(want, connect, nullptr, DEFAULT_INVAL_VALUE);
|
||||
}
|
||||
|
||||
@ -1017,7 +1017,7 @@ ErrCode AbilityManagerClient::StartAbilityByCall(const Want &want, sptr<IAbility
|
||||
{
|
||||
auto abms = GetAbilityManager();
|
||||
CHECK_POINTER_RETURN_NOT_CONNECTED(abms);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "AbilityManagerClient::StartAbilityByCall called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
return abms->StartAbilityByCall(want, connect, callToken, accountId);
|
||||
}
|
||||
|
||||
@ -1079,7 +1079,7 @@ ErrCode AbilityManagerClient::RequestDialogService(
|
||||
|
||||
ErrCode AbilityManagerClient::ReportDrawnCompleted(sptr<IRemoteObject> callerToken)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
auto abilityMgr = GetAbilityManager();
|
||||
CHECK_POINTER_RETURN_NOT_CONNECTED(abilityMgr);
|
||||
return abilityMgr->ReportDrawnCompleted(callerToken);
|
||||
@ -1900,7 +1900,7 @@ int32_t AbilityManagerClient::StartShortcut(const Want &want, const StartOptions
|
||||
|
||||
int32_t AbilityManagerClient::GetAbilityStateByPersistentId(int32_t persistentId, bool &state)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "GetAbilityStateByPersistentId, called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
auto abms = GetAbilityManager();
|
||||
CHECK_POINTER_RETURN_INVALID_VALUE(abms);
|
||||
return abms->GetAbilityStateByPersistentId(persistentId, state);
|
||||
|
@ -2166,7 +2166,7 @@ bool AbilityManagerProxy::IsRamConstrainedDevice()
|
||||
int AbilityManagerProxy::ContinueMission(const std::string &srcDeviceId, const std::string &dstDeviceId,
|
||||
int32_t missionId, const sptr<IRemoteObject> &callBack, AAFwk::WantParams &wantParams)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "amsProxy %{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "called");
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
@ -4068,7 +4068,7 @@ int32_t AbilityManagerProxy::RequestDialogService(const Want &want, const sptr<I
|
||||
|
||||
int32_t AbilityManagerProxy::ReportDrawnCompleted(const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
if (callerToken == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken is nullptr");
|
||||
return INNER_ERR;
|
||||
|
@ -1816,7 +1816,7 @@ int32_t AbilityManagerService::RequestDialogService(const Want &want, const sptr
|
||||
|
||||
int32_t AbilityManagerService::ReportDrawnCompleted(const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
if (callerToken == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken is nullptr");
|
||||
return INNER_ERR;
|
||||
@ -2026,7 +2026,7 @@ int AbilityManagerService::StartUIAbilityBySCBDefault(sptr<SessionInfo> sessionI
|
||||
}
|
||||
StartAbilityInfoWrap threadLocalInfo(sessionInfo->want, currentUserId, appIndex, sessionInfo->callerToken);
|
||||
if (sessionInfo->want.GetBoolParam(IS_CALL_BY_SCB, true)) {
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "interceptorExecuter_ called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "interceptorExecuter_ called");
|
||||
AbilityInterceptorParam interceptorParam = AbilityInterceptorParam(sessionInfo->want, requestCode,
|
||||
currentUserId, true, nullptr);
|
||||
auto result = interceptorExecuter_ == nullptr ? ERR_INVALID_VALUE :
|
||||
@ -2072,7 +2072,7 @@ int AbilityManagerService::StartUIAbilityBySCBDefault(sptr<SessionInfo> sessionI
|
||||
}
|
||||
|
||||
if (sessionInfo->want.GetBoolParam(IS_CALL_BY_SCB, true)) {
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "afterCheckExecuter_ called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "afterCheckExecuter_ called");
|
||||
Want newWant = abilityRequest.want;
|
||||
AbilityInterceptorParam afterCheckParam = AbilityInterceptorParam(newWant, requestCode,
|
||||
GetUserId(), true, sessionInfo->callerToken, std::make_shared<AppExecFwk::AbilityInfo>(abilityInfo));
|
||||
@ -3198,7 +3198,7 @@ int AbilityManagerService::MoveAbilityToBackground(const sptr<IRemoteObject> &to
|
||||
int32_t AbilityManagerService::MoveUIAbilityToBackground(const sptr<IRemoteObject> token)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "MoveUIAbilityToBackground called.");
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "called");
|
||||
if (!AppUtils::GetInstance().EnableMoveUIAbilityToBackgroundApi()) {
|
||||
return ERR_OPERATION_NOT_SUPPORTED_ON_CURRENT_DEVICE;
|
||||
}
|
||||
@ -3974,7 +3974,7 @@ int AbilityManagerService::ConnectRemoteAbility(Want &want, const sptr<IRemoteOb
|
||||
|
||||
int AbilityManagerService::DisconnectLocalAbility(const sptr<IAbilityConnection> &connect)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
auto currentConnectManager = GetCurrentConnectManager();
|
||||
CHECK_POINTER_AND_RETURN(currentConnectManager, ERR_NO_INIT);
|
||||
if (currentConnectManager->DisconnectAbilityLocked(connect) == ERR_OK) {
|
||||
@ -4015,7 +4015,6 @@ int AbilityManagerService::DisconnectRemoteAbility(const sptr<IRemoteObject> &co
|
||||
int AbilityManagerService::ContinueMission(const std::string &srcDeviceId, const std::string &dstDeviceId,
|
||||
int32_t missionId, const sptr<IRemoteObject> &callBack, AAFwk::WantParams &wantParams)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "amsServ %{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "ContinueMission missionId: %{public}d", missionId);
|
||||
if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s: Permission verification failed", __func__);
|
||||
@ -4029,7 +4028,7 @@ int AbilityManagerService::ContinueMission(const std::string &srcDeviceId, const
|
||||
int AbilityManagerService::ContinueMission(AAFwk::ContinueMissionInfo continueMissionInfo,
|
||||
const sptr<IRemoteObject> &callback)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "amsServ %{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "called");
|
||||
AAFWK::ContinueRadar::GetInstance().ClickIconContinue("ContinueMission");
|
||||
if (!PermissionVerification::GetInstance()->VerifyMissionPermission()) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s: Permission verification failed", __func__);
|
||||
@ -4346,7 +4345,7 @@ int AbilityManagerService::SendWantSender(sptr<IWantSender> target, const Sender
|
||||
|
||||
void AbilityManagerService::CancelWantSender(const sptr<IWantSender> &sender)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
auto pendingWantManager = GetCurrentPendingWantManager();
|
||||
CHECK_POINTER(pendingWantManager);
|
||||
CHECK_POINTER(sender);
|
||||
@ -4879,7 +4878,7 @@ sptr<IAbilityScheduler> AbilityManagerService::AcquireDataAbility(
|
||||
int AbilityManagerService::ReleaseDataAbility(
|
||||
sptr<IAbilityScheduler> dataAbilityScheduler, const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s, called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "called");
|
||||
if (!dataAbilityScheduler || !callerToken) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "dataAbilitySchedule or callerToken is nullptr");
|
||||
return ERR_INVALID_VALUE;
|
||||
@ -4901,7 +4900,7 @@ int AbilityManagerService::AttachAbilityThread(
|
||||
const sptr<IAbilityScheduler> &scheduler, const sptr<IRemoteObject> &token)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
CHECK_POINTER_AND_RETURN(scheduler, ERR_INVALID_VALUE);
|
||||
if (!Rosen::SceneBoardJudgement::IsSceneBoardEnabled() && !VerificationAllToken(token)) {
|
||||
return ERR_INVALID_VALUE;
|
||||
@ -5572,7 +5571,7 @@ int AbilityManagerService::ScheduleConnectAbilityDone(
|
||||
const sptr<IRemoteObject> &token, const sptr<IRemoteObject> &remoteObject)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
if (!VerificationAllToken(token)) {
|
||||
return ERR_INVALID_VALUE;
|
||||
}
|
||||
@ -8697,7 +8696,7 @@ sptr<IWindowManagerServiceHandler> AbilityManagerService::GetWMSHandler() const
|
||||
|
||||
void AbilityManagerService::CompleteFirstFrameDrawing(const sptr<IRemoteObject> &abilityToken)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
auto abilityRecord = Token::GetAbilityRecordByToken(abilityToken);
|
||||
CHECK_POINTER(abilityRecord);
|
||||
auto ownerUserId = abilityRecord->GetOwnerMissionUserId();
|
||||
@ -8715,7 +8714,7 @@ void AbilityManagerService::CompleteFirstFrameDrawing(const sptr<IRemoteObject>
|
||||
|
||||
void AbilityManagerService::CompleteFirstFrameDrawing(int32_t sessionId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "CompleteFirstFrameDrawing, called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
if (!IsCallerSceneBoard()) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "Not sceneboard called, not allowed.");
|
||||
return;
|
||||
@ -9394,7 +9393,7 @@ bool AbilityManagerService::IsAppSelfCalled(const std::shared_ptr<AbilityRecord>
|
||||
auto callingTokenId = IPCSkeleton::GetCallingTokenID();
|
||||
auto tokenID = abilityRecord->GetApplicationInfo().accessTokenId;
|
||||
if (callingTokenId != tokenID) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "Is not app self called.");
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "not app self called");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -10077,7 +10076,7 @@ int32_t AbilityManagerService::StartAbilityWithInsightIntent(const Want &want, i
|
||||
int32_t AbilityManagerService::StartExtensionAbilityWithInsightIntent(const Want &want,
|
||||
AppExecFwk::ExtensionAbilityType extensionType)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
return StartExtensionAbilityInner(want, nullptr, DEFAULT_INVAL_VALUE, extensionType, true);
|
||||
}
|
||||
|
||||
@ -11121,7 +11120,7 @@ int32_t AbilityManagerService::StartUIAbilityByPreInstall(const FreeInstallInfo
|
||||
return ERR_INVALID_VALUE;
|
||||
}
|
||||
if (!taskInfo.isStartUIAbilityBySCBCalled) {
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "Free install is finished, StartUIAbilityBySCB has not been called.");
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "Free install is finished, StartUIAbilityBySCB has not been called");
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
|
@ -1898,7 +1898,7 @@ int AbilityManagerStub::IsRamConstrainedDeviceInner(MessageParcel &data, Message
|
||||
|
||||
int AbilityManagerStub::ContinueMissionInner(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "amsStub %{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "called");
|
||||
std::string srcDeviceId = data.ReadString();
|
||||
std::string dstDeviceId = data.ReadString();
|
||||
int32_t missionId = data.ReadInt32();
|
||||
@ -2156,7 +2156,7 @@ int AbilityManagerStub::MoveMissionToFrontByOptionsInner(MessageParcel &data, Me
|
||||
|
||||
int AbilityManagerStub::MoveMissionsToForegroundInner(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
std::vector<int32_t> missionIds;
|
||||
data.ReadInt32Vector(&missionIds);
|
||||
int32_t topMissionId = data.ReadInt32();
|
||||
@ -2169,7 +2169,7 @@ int AbilityManagerStub::MoveMissionsToForegroundInner(MessageParcel &data, Messa
|
||||
|
||||
int AbilityManagerStub::MoveMissionsToBackgroundInner(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
std::vector<int32_t> missionIds;
|
||||
std::vector<int32_t> result;
|
||||
|
||||
@ -2798,7 +2798,7 @@ int AbilityManagerStub::HandleRequestDialogService(MessageParcel &data, MessageP
|
||||
|
||||
int32_t AbilityManagerStub::HandleReportDrawnCompleted(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
sptr<IRemoteObject> callerToken = data.ReadRemoteObject();
|
||||
if (callerToken == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "callerToken is invalid.");
|
||||
@ -3023,7 +3023,7 @@ int AbilityManagerStub::RegisterWindowManagerServiceHandlerInner(MessageParcel &
|
||||
|
||||
int AbilityManagerStub::CompleteFirstFrameDrawingInner(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
sptr<IRemoteObject> abilityToken = data.ReadRemoteObject();
|
||||
if (abilityToken == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "%{public}s read abilityToken failed!", __func__);
|
||||
@ -3035,7 +3035,7 @@ int AbilityManagerStub::CompleteFirstFrameDrawingInner(MessageParcel &data, Mess
|
||||
|
||||
int AbilityManagerStub::CompleteFirstFrameDrawingBySCBInner(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "CompleteFirstFrameDrawingBySCBInner, called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
int32_t sessionId = data.ReadInt32();
|
||||
CompleteFirstFrameDrawing(sessionId);
|
||||
return NO_ERROR;
|
||||
@ -3134,7 +3134,7 @@ int AbilityManagerStub::UnregisterAbilityFirstFrameStateObserverInner(MessagePar
|
||||
|
||||
int32_t AbilityManagerStub::IsValidMissionIdsInner(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s is called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
std::vector<int32_t> missionIds;
|
||||
std::vector<MissionValidResult> results;
|
||||
|
||||
|
@ -750,7 +750,7 @@ std::shared_ptr<Want> AbilityRecord::GetWantFromMission() const
|
||||
void AbilityRecord::AnimationTask(bool isRecent, const AbilityRequest &abilityRequest,
|
||||
const std::shared_ptr<StartOptions> &startOptions, const std::shared_ptr<AbilityRecord> &callerAbility)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
if (isRecent) {
|
||||
auto want = GetWantFromMission();
|
||||
NotifyAnimationFromRecentTask(startOptions, want);
|
||||
@ -832,7 +832,7 @@ void AbilityRecord::StartingWindowTask(bool isRecent, bool isCold, const Ability
|
||||
std::shared_ptr<StartOptions> &startOptions)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s was called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
if (isRecent) {
|
||||
auto want = GetWantFromMission();
|
||||
if (isCold) {
|
||||
@ -853,10 +853,10 @@ void AbilityRecord::StartingWindowTask(bool isRecent, bool isCold, const Ability
|
||||
void AbilityRecord::PostCancelStartingWindowHotTask()
|
||||
{
|
||||
if (IsDebug()) {
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "PostCancelStartingWindowHotTask was called, debug mode, just return.");
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "debug mode, just return.");
|
||||
return;
|
||||
}
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "PostCancelStartingWindowHotTask was called.");
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "called");
|
||||
auto handler = DelayedSingleton<AbilityManagerService>::GetInstance()->GetTaskHandler();
|
||||
CHECK_POINTER_LOG(handler, "Fail to get TaskHandler.");
|
||||
|
||||
@ -881,10 +881,10 @@ void AbilityRecord::PostCancelStartingWindowHotTask()
|
||||
void AbilityRecord::PostCancelStartingWindowColdTask()
|
||||
{
|
||||
if (IsDebug()) {
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "PostCancelStartingWindowColdTask was called, debug mode, just return.");
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "debug mode, just return.");
|
||||
return;
|
||||
}
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "PostCancelStartingWindowColdTask was called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
auto handler = DelayedSingleton<AbilityManagerService>::GetInstance()->GetTaskHandler();
|
||||
CHECK_POINTER_LOG(handler, "Fail to get TaskHandler.");
|
||||
|
||||
@ -2401,7 +2401,7 @@ void AbilityRecord::RemoveAbilityDeathRecipient() const
|
||||
|
||||
void AbilityRecord::OnSchedulerDied(const wptr<IRemoteObject> &remote)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
std::lock_guard<ffrt::mutex> guard(lock_);
|
||||
CHECK_POINTER(scheduler_);
|
||||
|
||||
|
@ -182,14 +182,14 @@ void AppScheduler::KillProcessesByUserId(int32_t userId)
|
||||
|
||||
void AppScheduler::KillProcessesByPids(std::vector<int32_t> &pids)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "called");
|
||||
CHECK_POINTER(appMgrClient_);
|
||||
appMgrClient_->KillProcessesByPids(pids);
|
||||
}
|
||||
|
||||
void AppScheduler::AttachPidToParent(const sptr<IRemoteObject> &token, const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "called");
|
||||
CHECK_POINTER(appMgrClient_);
|
||||
appMgrClient_->AttachPidToParent(token, callerToken);
|
||||
}
|
||||
@ -610,14 +610,14 @@ bool AppScheduler::IsMemorySizeSufficent() const
|
||||
|
||||
void AppScheduler::AttachedToStatusBar(const sptr<IRemoteObject> &token)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "called");
|
||||
CHECK_POINTER(appMgrClient_);
|
||||
appMgrClient_->AttachedToStatusBar(token);
|
||||
}
|
||||
|
||||
void AppScheduler::BlockProcessCacheByPids(const std::vector<int32_t> &pids)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "called.");
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "called");
|
||||
CHECK_POINTER(appMgrClient_);
|
||||
appMgrClient_->BlockProcessCacheByPids(pids);
|
||||
}
|
||||
|
@ -2903,7 +2903,7 @@ int MissionListManager::SetMissionIcon(const sptr<IRemoteObject> &token, const s
|
||||
void MissionListManager::CompleteFirstFrameDrawing(const sptr<IRemoteObject> &abilityToken)
|
||||
{
|
||||
FinishAsyncTrace(HITRACE_TAG_ABILITY_MANAGER, TRACE_ATOMIC_SERVICE, TRACE_ATOMIC_SERVICE_ID);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "CompleteFirstFrameDrawing called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
if (!abilityToken) {
|
||||
TAG_LOGW(AAFwkTag::ABILITYMGR, "%{public}s ability token is nullptr.", __func__);
|
||||
return;
|
||||
@ -3515,7 +3515,7 @@ void MissionListManager::NotifyRestartSpecifiedAbility(AbilityRequest &request,
|
||||
sptr<AppExecFwk::IAbilityInfoCallback> abilityInfoCallback
|
||||
= iface_cast<AppExecFwk::IAbilityInfoCallback> (request.abilityInfoCallback);
|
||||
if (abilityInfoCallback != nullptr) {
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
abilityInfoCallback->NotifyRestartSpecifiedAbility(token);
|
||||
}
|
||||
}
|
||||
@ -3548,7 +3548,7 @@ void MissionListManager::NotifyStartSpecifiedAbility(AbilityRequest &abilityRequ
|
||||
|
||||
void MissionListManager::OnStartSpecifiedAbilityTimeoutResponse(const AAFwk::Want &want)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
std::lock_guard guard(managerLock_);
|
||||
if (waitingAbilityQueue_.empty()) {
|
||||
return;
|
||||
|
@ -50,7 +50,7 @@ void RestartAppManager::AddRestartAppHistory(const RestartAppKeyType &key, time_
|
||||
|
||||
bool RestartAppManager::IsForegroundToRestartApp() const
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "IsForegroundToRestartApp, called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
auto callerPid = IPCSkeleton::GetCallingPid();
|
||||
AppExecFwk::RunningProcessInfo processInfo;
|
||||
DelayedSingleton<AppScheduler>::GetInstance()->GetRunningProcessInfoByPid(callerPid, processInfo);
|
||||
|
@ -1529,7 +1529,7 @@ void UIAbilityLifecycleManager::OnAcceptWantResponse(const AAFwk::Want &want, co
|
||||
|
||||
void UIAbilityLifecycleManager::OnStartSpecifiedAbilityTimeoutResponse(const AAFwk::Want &want, int32_t requestId)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "called");
|
||||
std::lock_guard<ffrt::mutex> guard(sessionLock_);
|
||||
specifiedRequestMap_.erase(requestId);
|
||||
}
|
||||
@ -1567,7 +1567,7 @@ void UIAbilityLifecycleManager::OnStartSpecifiedProcessResponse(const AAFwk::Wan
|
||||
|
||||
void UIAbilityLifecycleManager::OnStartSpecifiedProcessTimeoutResponse(const AAFwk::Want &want, int32_t requestId)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::ABILITYMGR, "called");
|
||||
std::lock_guard<ffrt::mutex> guard(sessionLock_);
|
||||
specifiedRequestMap_.erase(requestId);
|
||||
}
|
||||
@ -1615,7 +1615,7 @@ void UIAbilityLifecycleManager::NotifyRestartSpecifiedAbility(AbilityRequest &re
|
||||
sptr<AppExecFwk::IAbilityInfoCallback> abilityInfoCallback
|
||||
= iface_cast<AppExecFwk::IAbilityInfoCallback> (request.abilityInfoCallback);
|
||||
if (abilityInfoCallback != nullptr) {
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s called.", __func__);
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
abilityInfoCallback->NotifyRestartSpecifiedAbility(token);
|
||||
}
|
||||
}
|
||||
@ -2477,7 +2477,7 @@ void UIAbilityLifecycleManager::SignRestartAppFlag(const std::string &bundleName
|
||||
|
||||
void UIAbilityLifecycleManager::CompleteFirstFrameDrawing(int32_t sessionId) const
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "CompleteFirstFrameDrawing, called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
auto abilityRecord = GetAbilityRecordsById(sessionId);
|
||||
if (abilityRecord == nullptr) {
|
||||
TAG_LOGW(AAFwkTag::ABILITYMGR, "CompleteFirstFrameDrawing, get AbilityRecord by sessionId failed.");
|
||||
@ -2507,7 +2507,7 @@ int UIAbilityLifecycleManager::StartWithPersistentIdByDistributed(const AbilityR
|
||||
|
||||
int32_t UIAbilityLifecycleManager::GetAbilityStateByPersistentId(int32_t persistentId, bool &state)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "GetAbilityStateByPersistentId, called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
std::lock_guard<ffrt::mutex> guard(sessionLock_);
|
||||
auto iter = sessionAbilityMap_.find(persistentId);
|
||||
if (iter != sessionAbilityMap_.end()) {
|
||||
|
@ -86,7 +86,7 @@ std::vector<std::string> UriUtils::GetUriListFromWantDms(const Want &want)
|
||||
|
||||
void UriUtils::FilterUriWithPermissionDms(Want &want, uint32_t tokenId)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "FilterUriWithPermissionDms called.");
|
||||
TAG_LOGD(AAFwkTag::ABILITYMGR, "called");
|
||||
if ((want.GetFlags() & (Want::FLAG_AUTH_READ_URI_PERMISSION | Want::FLAG_AUTH_WRITE_URI_PERMISSION)) == 0) {
|
||||
TAG_LOGW(AAFwkTag::ABILITYMGR, "Flag is invalid.");
|
||||
return;
|
||||
|
@ -285,7 +285,7 @@ int32_t AppLifeCycleDeal::NotifyUnLoadRepairPatch(const std::string &bundleName,
|
||||
const sptr<IQuickFixCallback> &callback, const int32_t recordId)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
auto appThread = GetApplicationClient();
|
||||
if (appThread == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "appThread is nullptr.");
|
||||
@ -296,7 +296,7 @@ int32_t AppLifeCycleDeal::NotifyUnLoadRepairPatch(const std::string &bundleName,
|
||||
|
||||
int32_t AppLifeCycleDeal::NotifyAppFault(const FaultData &faultData)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
auto appThread = GetApplicationClient();
|
||||
if (appThread == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "appThread is nullptr.");
|
||||
@ -307,7 +307,7 @@ int32_t AppLifeCycleDeal::NotifyAppFault(const FaultData &faultData)
|
||||
|
||||
int32_t AppLifeCycleDeal::ChangeAppGcState(int32_t state)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
auto appThread = GetApplicationClient();
|
||||
if (appThread == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "appThread is nullptr.");
|
||||
|
@ -944,7 +944,7 @@ int32_t AppMgrService::StartRenderProcess(const std::string &renderParam, int32_
|
||||
|
||||
void AppMgrService::AttachRenderProcess(const sptr<IRemoteObject> &scheduler)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::APPMGR, "AttachRenderProcess called.");
|
||||
TAG_LOGI(AAFwkTag::APPMGR, "called");
|
||||
if (!IsReady()) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "AttachRenderProcess failed, not ready.");
|
||||
return;
|
||||
@ -1259,7 +1259,7 @@ void AppMgrService::OnRemoveSystemAbility(int32_t systemAbilityId, const std::st
|
||||
|
||||
int32_t AppMgrService::ChangeAppGcState(pid_t pid, int32_t state)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
if (!appMgrServiceInner_) {
|
||||
return ERR_INVALID_VALUE;
|
||||
}
|
||||
@ -1549,7 +1549,7 @@ int32_t AppMgrService::StartNativeChildProcess(const std::string &libName, int32
|
||||
|
||||
int32_t AppMgrService::CheckCallingIsUserTestMode(const pid_t pid, bool &isUserTest)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
if (!appMgrServiceInner_) {
|
||||
return ERR_INVALID_VALUE;
|
||||
}
|
||||
@ -1558,7 +1558,7 @@ int32_t AppMgrService::CheckCallingIsUserTestMode(const pid_t pid, bool &isUserT
|
||||
|
||||
int32_t AppMgrService::NotifyProcessDependedOnWeb()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
if (!appMgrServiceInner_) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "Not ready.");
|
||||
return ERR_INVALID_VALUE;
|
||||
@ -1568,7 +1568,7 @@ int32_t AppMgrService::NotifyProcessDependedOnWeb()
|
||||
|
||||
void AppMgrService::KillProcessDependedOnWeb()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
if (!AAFwk::PermissionVerification::GetInstance()->VerifyKillProcessDependedOnWebPermission()) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "caller have not permission.");
|
||||
return;
|
||||
@ -1581,7 +1581,7 @@ void AppMgrService::KillProcessDependedOnWeb()
|
||||
|
||||
void AppMgrService::RestartResidentProcessDependedOnWeb()
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
if (!AAFwk::PermissionVerification::GetInstance()->CheckSpecificSystemAbilityAccessPermission(FOUNDATION_PROCESS)) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "caller is not foundation.");
|
||||
return;
|
||||
|
@ -1284,7 +1284,7 @@ void AppMgrServiceInner::SendProcessExitEventTask(
|
||||
|
||||
void AppMgrServiceInner::SendProcessExitEvent(const std::shared_ptr<AppRunningRecord> &appRecord)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
time_t currentTime;
|
||||
time(¤tTime);
|
||||
constexpr int32_t RETRY_COUNT = 5;
|
||||
@ -1503,7 +1503,7 @@ int32_t AppMgrServiceInner::GetAllRunningProcesses(std::vector<RunningProcessInf
|
||||
int32_t AppMgrServiceInner::GetRunningProcessesByBundleType(BundleType bundleType,
|
||||
std::vector<RunningProcessInfo> &info)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
CHECK_CALLER_IS_SYSTEM_APP;
|
||||
if (!AAFwk::PermissionVerification::GetInstance()->VerifyRunningInfoPerm()) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "permission deny");
|
||||
@ -2667,7 +2667,7 @@ void AppMgrServiceInner::StartProcessVerifyPermission(const BundleInfo &bundleIn
|
||||
int32_t AppMgrServiceInner::CreatNewStartMsg(const Want &want, const AbilityInfo &abilityInfo,
|
||||
const std::shared_ptr<ApplicationInfo> &appInfo, const std::string &processName, AppSpawnStartMsg &startMsg)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "CreatNewStartMsg called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
if (!remoteClientManager_) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "remoteClientManager is null.");
|
||||
return ERR_NO_INIT;
|
||||
@ -2916,7 +2916,7 @@ void AppMgrServiceInner::StartProcess(const std::string &appName, const std::str
|
||||
void AppMgrServiceInner::SetProcessJITState(const std::shared_ptr<AppRunningRecord> appRecord)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_APP, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "SetProcessJITState called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
if (!appRecord) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "appRecord is nullptr.");
|
||||
return;
|
||||
@ -4849,7 +4849,7 @@ void AppMgrServiceInner::OnRenderRemoteDied(const wptr<IRemoteObject> &remote)
|
||||
|
||||
void AppMgrServiceInner::AddWatchParameter()
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::APPMGR, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::APPMGR, "called");
|
||||
auto context = new (std::nothrow) std::weak_ptr<AppMgrServiceInner>(shared_from_this());
|
||||
int ret = WatchParameter(AAFwk::GlobalConfigurationKey::INPUT_POINTER_DEVICE, PointerDeviceEventCallback,
|
||||
context);
|
||||
@ -5030,7 +5030,7 @@ void AppMgrServiceInner::HandleWindowVisibilityChanged(
|
||||
#endif // SUPPORT_SCREEN
|
||||
void AppMgrServiceInner::PointerDeviceEventCallback(const char *key, const char *value, void *context)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::APPMGR, "%{public}s called.", __func__);
|
||||
TAG_LOGI(AAFwkTag::APPMGR, "called");
|
||||
auto weak = static_cast<std::weak_ptr<AppMgrServiceInner>*>(context);
|
||||
if (weak == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "context is nullptr.");
|
||||
@ -5067,7 +5067,7 @@ void AppMgrServiceInner::PointerDeviceEventCallback(const char *key, const char
|
||||
bool AppMgrServiceInner::GetAppRunningStateByBundleName(const std::string &bundleName)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
if (!appRunningManager_) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "app running manager is nullptr.");
|
||||
return false;
|
||||
@ -5085,7 +5085,7 @@ int32_t AppMgrServiceInner::NotifyLoadRepairPatch(const std::string &bundleName,
|
||||
const sptr<IQuickFixCallback> &callback)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
if (!appRunningManager_) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "app running manager is nullptr.");
|
||||
return ERR_INVALID_OPERATION;
|
||||
@ -5102,7 +5102,7 @@ int32_t AppMgrServiceInner::NotifyLoadRepairPatch(const std::string &bundleName,
|
||||
int32_t AppMgrServiceInner::NotifyHotReloadPage(const std::string &bundleName, const sptr<IQuickFixCallback> &callback)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
if (!appRunningManager_) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "app running manager is nullptr.");
|
||||
return ERR_INVALID_OPERATION;
|
||||
@ -5140,7 +5140,7 @@ int32_t AppMgrServiceInner::NotifyUnLoadRepairPatch(const std::string &bundleNam
|
||||
const sptr<IQuickFixCallback> &callback)
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "function called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
if (!appRunningManager_) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "app running manager is nullptr.");
|
||||
return ERR_INVALID_OPERATION;
|
||||
@ -5195,7 +5195,7 @@ void AppMgrServiceInner::AppRecoveryNotifyApp(int32_t pid, const std::string& bu
|
||||
|
||||
int32_t AppMgrServiceInner::NotifyAppFault(const FaultData &faultData)
|
||||
{
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called.");
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "called");
|
||||
int32_t callerUid = IPCSkeleton::GetCallingUid();
|
||||
int32_t pid = IPCSkeleton::GetCallingPid();
|
||||
auto appRecord = GetAppRunningRecordByPid(pid);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user