mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 07:01:24 +00:00
commit
9effb4663e
@ -126,6 +126,7 @@ const std::unordered_map<AceLogTag, const char*> g_DOMAIN_CONTENTS_MAP = {
|
||||
{ AceLogTag::ACE_CLIPBOARD, "AceClipBoard"},
|
||||
{ AceLogTag::ACE_SECURITY_COMPONENT, "AceSecurityComponent"},
|
||||
{ AceLogTag::ACE_LAYOUT_INSPECTOR, "AceLayoutInspector" },
|
||||
{ AceLogTag::ACE_MEDIA_QUERY, "AceMediaQuery" },
|
||||
};
|
||||
// initial static member object
|
||||
LogLevel LogWrapper::level_ = LogLevel::DEBUG;
|
||||
|
@ -203,6 +203,7 @@ enum AceLogTag : uint8_t {
|
||||
ACE_VISUAL_EFFECT, // C03955
|
||||
ACE_SECURITY_COMPONENT, // C03956
|
||||
ACE_LAYOUT_INSPECTOR, // C03957
|
||||
ACE_MEDIA_QUERY, // C03958
|
||||
|
||||
FORM_RENDER = 255, // C039FF FormRenderer, last domain, do not add
|
||||
};
|
||||
|
@ -68,6 +68,7 @@ public:
|
||||
{
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
TAG_LOGI(AceLogTag::ACE_MEDIA_QUERY, "clean:%{public}s", media_.c_str());
|
||||
CleanListenerSet();
|
||||
}
|
||||
|
||||
@ -132,6 +133,8 @@ public:
|
||||
if (delayDeleteCallbacks_->find(cbRef) != delayDeleteCallbacks_->end()) {
|
||||
continue;
|
||||
}
|
||||
TAG_LOGI(AceLogTag::ACE_MEDIA_QUERY, "trigger:%{public}s matches:%{public}d",
|
||||
listener->media_.c_str(), listener->matches_);
|
||||
napi_handle_scope scope = nullptr;
|
||||
napi_open_handle_scope(listener->env_, &scope);
|
||||
if (scope == nullptr) {
|
||||
@ -182,6 +185,8 @@ public:
|
||||
napi_ref ref = nullptr;
|
||||
napi_create_reference(env, cb, 1, &ref);
|
||||
listener->cbList_.emplace_back(ref);
|
||||
TAG_LOGI(AceLogTag::ACE_MEDIA_QUERY, "on:%{public}s num=%{public}d", listener->media_.c_str(),
|
||||
static_cast<int>(listener->cbList_.size()));
|
||||
napi_close_handle_scope(env, scope);
|
||||
|
||||
#if defined(PREVIEW)
|
||||
@ -225,6 +230,8 @@ public:
|
||||
listener->cbList_.erase(iter);
|
||||
}
|
||||
}
|
||||
TAG_LOGI(AceLogTag::ACE_MEDIA_QUERY, "off:%{public}s num=%{public}d", listener->media_.c_str(),
|
||||
static_cast<int>(listener->cbList_.size()));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user