mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 23:21:05 +00:00
告警处理
Signed-off-by: hwx1119949 <huyisuo@huawei.com>
This commit is contained in:
parent
b208a6d55a
commit
9dedfdd4cd
@ -33,7 +33,7 @@
|
||||
|
||||
namespace OHOS::Ace::Platform {
|
||||
|
||||
void AceApplicationInfoImpl::ChangeLocale(const std::string& language, const std::string& countryOrRegion)
|
||||
void AceApplicationInfoImpl::ChangeLocale(const std::string& language, const std::string& countryOrRegion)
|
||||
{
|
||||
std::string languageLower = language;
|
||||
std::transform(language.begin(), language.end(), languageLower.begin(), ::tolower);
|
||||
|
@ -27,7 +27,6 @@ std::vector<std::string> JsForEachFunction::ExecuteIdentityMapper()
|
||||
if (!jsIdentityMapperFunc_.IsEmpty()) {
|
||||
JSRef<JSVal> argv[] = { jsIdentityMapperFunc_.Lock() };
|
||||
jsKeys = JSRef<JSObject>::Cast(JsFunction::ExecuteJS(1, argv));
|
||||
|
||||
if (jsKeys.IsEmpty()) {
|
||||
return result;
|
||||
}
|
||||
|
@ -163,7 +163,6 @@ void JSForEach::SetIdArray(const JSCallbackInfo& info)
|
||||
JSRef<JSVal> strId = jsArr->GetValueAt(i);
|
||||
// Save return value of insert to know was it duplicate...
|
||||
std::pair<std::unordered_set<std::string>::iterator, bool> ret = newIds.insert(strId->ToString());
|
||||
|
||||
// Duplicate Id detected. Will return index of those to caller.
|
||||
if (!ret.second) {
|
||||
duplicateIds->SetValueAt(duplicateIndx++, JSRef<JSVal>::Make(ToJSValue(i)));
|
||||
|
@ -121,9 +121,7 @@ void JSStateMgmtProfiler::ProfileBlock::Report(int32_t depth) const
|
||||
|
||||
ss << std::left << std::string(depth, ' ');
|
||||
ss << name_;
|
||||
if (nameAdjustWidth >= name_.size() + depth) {
|
||||
ss << std::setw(nameAdjustWidth - name_.size() - depth);
|
||||
}
|
||||
ss << std::setw(nameAdjustWidth - static_cast<int32_t>(name_.size()) - depth);
|
||||
ss << std::right << numberOfCalls_;
|
||||
ss << std::setw(itemAdjustWidth);
|
||||
ss << std::fixed << std::setprecision(itemPrecision)
|
||||
|
@ -56,7 +56,8 @@ void ForEachModelImpl::Create(const std::string& compilerGenId, const OHOS::Ace:
|
||||
}
|
||||
}
|
||||
|
||||
void ForEachModelImpl::Create() {
|
||||
void ForEachModelImpl::Create()
|
||||
{
|
||||
LOGE("Create (no params) unsupported by ForEachModelImpl");
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
namespace OHOS::Ace::Framework {
|
||||
|
||||
class ACE_EXPORT ForEachModelImpl : public ForEachModel{
|
||||
class ACE_EXPORT ForEachModelImpl : public ForEachModel {
|
||||
public:
|
||||
virtual ~ForEachModelImpl() override = default;
|
||||
|
||||
@ -39,6 +39,6 @@ public:
|
||||
void CreateNewChildFinish(const std::string& id) override;
|
||||
void OnMove(std::function<void(int32_t, int32_t)>&& onMove) override {};
|
||||
};
|
||||
}
|
||||
} // namespace OHOS::Ace::Framework
|
||||
|
||||
#endif // FRAMEWORKS_BRIDGE_DECLARATIVE_FRONTEND_JS_VIEW_FOREACH_MODEL_IMPL_H
|
||||
|
@ -1828,7 +1828,6 @@ shared_ptr<JsValue> JsiCanvasBridge::JsGetPixelMap(const shared_ptr<JsRuntime>&
|
||||
napi_env env = reinterpret_cast<napi_env>(nativeEngine);
|
||||
std::shared_ptr<OHOS::Media::PixelMap> sharedPixelmap(pixelmap.release());
|
||||
napi_value napiValue = OHOS::Media::PixelMapNapi::CreatePixelMap(env, sharedPixelmap);
|
||||
|
||||
if (!napiValue) {
|
||||
LOGE("napiValue is null");
|
||||
return runtime->NewUndefined();
|
||||
|
@ -600,7 +600,6 @@ void RosenRenderOffscreenCanvas::DrawSvgImage(const CanvasImage& canvasImage)
|
||||
// Make the ImageSourceInfo
|
||||
canvasImage_ = canvasImage;
|
||||
loadingSource_ = ImageSourceInfo(canvasImage.src);
|
||||
|
||||
// get the ImageObject
|
||||
if (currentSource_ != loadingSource_) {
|
||||
ImageProvider::FetchImageObject(loadingSource_, imageObjSuccessCallback_, uploadSuccessCallback_,
|
||||
|
@ -86,7 +86,6 @@ protected:
|
||||
int32_t row_ = 0;
|
||||
int32_t column_ = 0;
|
||||
std::vector<double> mesh_;
|
||||
|
||||
};
|
||||
|
||||
} // namespace OHOS::Ace
|
||||
|
@ -62,7 +62,6 @@ PlaybackStatus ConvertToPlaybackStatus(int32_t status)
|
||||
} // namespace
|
||||
|
||||
struct MediaPlayerCallback : public Media::PlayerCallback {
|
||||
|
||||
public:
|
||||
using PositionUpdatedEvent = std::function<void(uint32_t)>;
|
||||
using StateChangedEvent = std::function<void(PlaybackStatus)>;
|
||||
|
@ -162,7 +162,6 @@ void RenderTexture::CalculateFitContain()
|
||||
const Size& layoutSize = GetLayoutSize();
|
||||
double layoutRatio = NearZero(layoutSize.Height()) ? 0.0 : layoutSize.Width() / layoutSize.Height();
|
||||
double sourceRatio = NearZero(sourceSize_.Height()) ? layoutRatio : sourceSize_.Width() / sourceSize_.Height();
|
||||
|
||||
if (NearZero(layoutRatio) || NearZero(sourceRatio)) {
|
||||
drawSize_ = layoutSize;
|
||||
} else if (sourceRatio < layoutRatio) {
|
||||
@ -177,7 +176,6 @@ void RenderTexture::CalculateFitCover()
|
||||
const Size& layoutSize = GetLayoutSize();
|
||||
double layoutRatio = NearZero(layoutSize.Height()) ? 0.0 : layoutSize.Width() / layoutSize.Height();
|
||||
double sourceRatio = NearZero(sourceSize_.Height()) ? layoutRatio : sourceSize_.Width() / sourceSize_.Height();
|
||||
|
||||
if (NearZero(layoutRatio) || NearZero(sourceRatio)) {
|
||||
drawSize_ = layoutSize;
|
||||
} else if (sourceRatio < layoutRatio) {
|
||||
|
@ -2064,5 +2064,4 @@ void VideoElement::OnTextureRefresh()
|
||||
context->MarkForcedRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace OHOS::Ace
|
||||
|
@ -43,7 +43,6 @@ public:
|
||||
#ifdef OHOS_STANDARD_SYSTEM
|
||||
OHOS::sptr<OHOS::Surface> GetSurface();
|
||||
#endif
|
||||
|
||||
};
|
||||
} // namespace OHOS::Ace
|
||||
|
||||
|
@ -49,7 +49,7 @@ void FullScreenManager::RequestFullScreen(const RefPtr<FrameNode>& frameNode)
|
||||
if (!resultForGeo.second) {
|
||||
return;
|
||||
}
|
||||
// TODO: remove the original property of padding&margin
|
||||
// remove the original property of padding&margin
|
||||
auto rootWidth = PipelineContext::GetCurrentRootWidth();
|
||||
auto rootHeight = PipelineContext::GetCurrentRootHeight();
|
||||
auto calcRootWidth = CalcLength(rootWidth);
|
||||
@ -82,7 +82,7 @@ void FullScreenManager::ExitFullScreen(const RefPtr<FrameNode>& frameNode)
|
||||
CHECK_NULL_VOID(parent);
|
||||
auto slot = iterOfParent->second.second;
|
||||
|
||||
// TODO: recover the original property of padding&margin
|
||||
// recover the original property of padding&margin
|
||||
auto originGeometryNode = iterOfGeometryNode->second;
|
||||
auto originFrameOffset = originGeometryNode->GetMarginFrameOffset();
|
||||
auto originParentGlobalOffset = originGeometryNode->GetParentGlobalOffset();
|
||||
@ -90,7 +90,7 @@ void FullScreenManager::ExitFullScreen(const RefPtr<FrameNode>& frameNode)
|
||||
frameNode->GetGeometryNode()->SetParentGlobalOffset(originParentGlobalOffset);
|
||||
originalParent_.erase(iterOfParent);
|
||||
originGeometryNode_.erase(iterOfGeometryNode);
|
||||
// TODO: need to reserve the value set by developers
|
||||
// need to reserve the value set by developers
|
||||
frameNode->MountToParent(parent, slot);
|
||||
frameNode->MarkDirtyNode(PROPERTY_UPDATE_MEASURE);
|
||||
parent->MarkDirtyNode(PROPERTY_UPDATE_LAYOUT);
|
||||
|
@ -131,7 +131,6 @@ void AbilityComponentPattern::UpdateWindowRect()
|
||||
CHECK_NULL_VOID(pipeline);
|
||||
Rect rect = pipeline->GetDisplayWindowRectInfo();
|
||||
rect = Rect(offset.GetX() + rect.Left(), offset.GetY() + rect.Top(), size.Width(), size.Height());
|
||||
|
||||
if (adapter_ && rect != lastRect_) {
|
||||
LOGI("ConnectExtension: %{public}f %{public}f %{public}f %{public}f", offset.GetX(), offset.GetY(),
|
||||
size.Width(), size.Height());
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
virtual void Pop() = 0;
|
||||
|
||||
// classic / full update code path
|
||||
virtual void Create(const std::string& compilerGenId, const ForEachFunc& ForEachFunc) = 0;
|
||||
virtual void Create(const std::string& compilerGenId, const ForEachFunc& ForEachFunc) = 0;
|
||||
|
||||
// Only implemented by ForEachModelNG
|
||||
virtual void Create() = 0;
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
namespace OHOS::Ace::NG {
|
||||
|
||||
class ACE_EXPORT ForEachModelNG : public ForEachModel{
|
||||
class ACE_EXPORT ForEachModelNG : public ForEachModel {
|
||||
public:
|
||||
virtual ~ForEachModelNG() override = default;
|
||||
void Pop() override;
|
||||
|
Loading…
Reference in New Issue
Block a user