mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-22 22:41:00 +00:00
Decription: 增加屏幕旋转DFX打点
IssueNo: https://gitee.com/openharmony/drivers_hdf_core/issues/I9S4V7 Signed-off-by: yellow sky <huangtian10@huawei.com>
This commit is contained in:
parent
0b3acb4120
commit
f09d101343
@ -150,3 +150,8 @@ CONTAINER_START_BEGIN:
|
||||
MISSION_ID: {type: INT32, desc: mission id}
|
||||
BUNDLE_NAME: {type: STRING, desc: bundle name}
|
||||
TIMESTAMP: {type: INT64, desc: timestamp}
|
||||
|
||||
VH_MODE:
|
||||
__BASE: {type: BEHAVIOR, level: MINOR, desc: notify VH_MODE}
|
||||
MODE: {type: INT32, desc: VH MODE after rotation}
|
||||
|
||||
|
@ -158,6 +158,7 @@ ohos_shared_library("screen_session") {
|
||||
"c_utils:utils",
|
||||
"graphic_2d:librender_service_client",
|
||||
"hilog:libhilog",
|
||||
"hisysevent:libhisysevent",
|
||||
"hitrace:hitrace_meter",
|
||||
"init:libbegetutil",
|
||||
]
|
||||
|
@ -220,6 +220,7 @@ private:
|
||||
std::vector<uint32_t> colorSpaces_;
|
||||
SetScreenSceneDpiFunc SetScreenSceneDpiCallback_ = nullptr;
|
||||
DestroyScreenSceneFunc destroyScreenSceneCallback_ = nullptr;
|
||||
void ReportNotifyModeChange(DisplayOrientation displayOrientation);
|
||||
};
|
||||
|
||||
class ScreenSessionGroup : public ScreenSession {
|
||||
|
@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
#include "session/screen/include/screen_session.h"
|
||||
#include <hisysevent.h>
|
||||
|
||||
#include <hitrace_meter.h>
|
||||
#include <surface_capture_future.h>
|
||||
@ -492,6 +493,24 @@ void ScreenSession::UpdatePropertyAfterRotation(RRect bounds, int rotation, Fold
|
||||
property_.GetBounds().rect_.GetLeft(), property_.GetBounds().rect_.GetTop(),
|
||||
property_.GetBounds().rect_.GetWidth(), property_.GetBounds().rect_.GetHeight(),
|
||||
rotation, displayOrientation);
|
||||
ReportNotifyModeChange(displayOrientation);
|
||||
}
|
||||
|
||||
void ScreenSession::ReportNotifyModeChange(DisplayOrientation displayOrientation)
|
||||
{
|
||||
int32_t vhMode = 1;
|
||||
if (displayOrientation == DisplayOrientation::PORTRAIT_INVERTED ||
|
||||
displayOrientation == DisplayOrientation::PORTRAIT) {
|
||||
vhMode = 0;
|
||||
}
|
||||
int32_t ret = HiSysEventWrite(
|
||||
OHOS::HiviewDFX::HiSysEvent::Domain::WINDOW_MANAGER,
|
||||
"VH_MODE",
|
||||
OHOS::HiviewDFX::HiSysEvent::EventType::BEHAVIOR,
|
||||
"MODE", vhMode);
|
||||
if (ret != 0) {
|
||||
TLOGE(WmsLogTag::DMS, "ReportNotifyModeChange Write HiSysEvent error, ret: %{public}d", ret);
|
||||
}
|
||||
}
|
||||
|
||||
void ScreenSession::UpdateRotationAfterBoot(bool foldToExpand)
|
||||
|
Loading…
Reference in New Issue
Block a user