mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 01:03:08 +00:00
commit
9303822d18
@ -183,4 +183,14 @@ void UiSessionManager::ReportInspectorTreeValue(const std::string& data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UiSessionManager::OnRouterChange(const std::string& path, const std::string& event)
|
||||
{
|
||||
if (GetRouterChangeEventRegistered()) {
|
||||
auto value = InspectorJsonUtil::Create(true);
|
||||
value->Put("path", path.c_str());
|
||||
value->Put("event", event.c_str());
|
||||
ReportRouterChangeEvent(value->ToString());
|
||||
}
|
||||
}
|
||||
} // namespace OHOS::Ace
|
||||
|
@ -15,6 +15,9 @@
|
||||
|
||||
#include "core/components_ng/pattern/navigation/navigation_group_node.h"
|
||||
|
||||
#if !defined(PREVIEW) && !defined(ACE_UNITTEST)
|
||||
#include "interfaces/inner_api/ui_session/ui_session_manager.h"
|
||||
#endif
|
||||
#include "base/log/ace_checker.h"
|
||||
#include "base/log/ace_performance_check.h"
|
||||
#include "base/memory/ace_type.h"
|
||||
@ -588,6 +591,9 @@ void NavigationGroupNode::TransitionWithPop(const RefPtr<FrameNode>& preNode, co
|
||||
SetNeedSetInvisible(false);
|
||||
}
|
||||
isOnAnimation_ = true;
|
||||
#if !defined(PREVIEW) && !defined(ACE_UNITTEST)
|
||||
UiSessionManager::GetInstance().OnRouterChange(navigationPathInfo_, "navigationPopPage");
|
||||
#endif
|
||||
}
|
||||
|
||||
void NavigationGroupNode::TransitionWithPush(const RefPtr<FrameNode>& preNode, const RefPtr<FrameNode>& curNode,
|
||||
@ -767,6 +773,9 @@ void NavigationGroupNode::TransitionWithPush(const RefPtr<FrameNode>& preNode, c
|
||||
nodeMap, endTime - startTime, navigation->GetNavigationPathInfo());
|
||||
});
|
||||
}
|
||||
#if !defined(PREVIEW) && !defined(ACE_UNITTEST)
|
||||
UiSessionManager::GetInstance().OnRouterChange(navigationPathInfo_, "navigationPushPage");
|
||||
#endif
|
||||
}
|
||||
|
||||
std::shared_ptr<AnimationUtils::Animation> NavigationGroupNode::BackButtonAnimation(
|
||||
|
@ -17,12 +17,15 @@
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
#if !defined(PREVIEW) && !defined(ACE_UNITTEST)
|
||||
#include "interfaces/inner_api/ui_session/ui_session_manager.h"
|
||||
#endif
|
||||
#include "base/geometry/ng/size_t.h"
|
||||
#include "base/log/ace_checker.h"
|
||||
#include "base/log/ace_performance_check.h"
|
||||
#include "base/perfmonitor/perf_monitor.h"
|
||||
#include "base/perfmonitor/perf_constants.h"
|
||||
#include "base/memory/referenced.h"
|
||||
#include "base/perfmonitor/perf_constants.h"
|
||||
#include "base/perfmonitor/perf_monitor.h"
|
||||
#include "base/utils/time_util.h"
|
||||
#include "base/utils/utils.h"
|
||||
#include "core/animation/page_transition_common.h"
|
||||
@ -188,6 +191,9 @@ bool StageManager::PushPage(const RefPtr<FrameNode>& node, bool needHideLast, bo
|
||||
CHECK_NULL_RETURN(pageInfo, false);
|
||||
auto pagePath = pageInfo->GetFullPath();
|
||||
ACE_SCOPED_TRACE_COMMERCIAL("Router Main Page: %s", pagePath.c_str());
|
||||
#if !defined(PREVIEW) && !defined(ACE_UNITTEST)
|
||||
UiSessionManager::GetInstance().OnRouterChange(pagePath, "routerPushPage");
|
||||
#endif
|
||||
}
|
||||
if (needTransition) {
|
||||
pipeline->FlushPipelineImmediately();
|
||||
|
@ -71,6 +71,7 @@ public:
|
||||
void SaveInspectorTreeFunction(InspectorFunction&& function);
|
||||
void SetClickEventRegistered(bool status);
|
||||
void SetSearchEventRegistered(bool status);
|
||||
void OnRouterChange(const std::string& path, const std::string& event);
|
||||
void SetRouterChangeEventRegistered(bool status);
|
||||
void SetComponentChangeEventRegistered(bool status);
|
||||
bool GetClickEventRegistered();
|
||||
|
Loading…
Reference in New Issue
Block a user