1 /*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include "adapter/ohos/entrance/ace_view_ohos.h"
17
18 #include <memory>
19
20 #include "input_manager.h"
21 #include "adapter/ohos/entrance/ace_container.h"
22 #include "adapter/ohos/entrance/mmi_event_convertor.h"
23 #include "base/log/ace_trace.h"
24 #include "base/log/dump_log.h"
25 #include "base/log/event_report.h"
26 #include "base/log/log.h"
27 #include "base/utils/macros.h"
28 #include "base/utils/system_properties.h"
29 #include "base/utils/utils.h"
30 #include "core/common/ace_engine.h"
31 #include "core/components/theme/theme_manager.h"
32 #include "core/event/axis_event.h"
33 #include "core/event/key_event.h"
34 #include "core/event/mouse_event.h"
35 #include "core/event/pointer_event.h"
36 #include "core/event/touch_event.h"
37
38 namespace OHOS::Ace::Platform {
39 namespace {
40
41 constexpr int32_t ROTATION_DIVISOR = 64;
42
IsMMIMouseScrollBegin(const AxisEvent & event)43 bool IsMMIMouseScrollBegin(const AxisEvent& event)
44 {
45 if (event.action != AxisAction::BEGIN ||
46 event.sourceType != SourceType::MOUSE ||
47 event.sourceTool != SourceTool::MOUSE) {
48 return false;
49 }
50 return !(NearZero(event.horizontalAxis) && NearZero(event.verticalAxis));
51 }
52 } // namespace
53
CreateView(int32_t instanceId,bool useCurrentEventRunner,bool usePlatformThread)54 RefPtr<AceViewOhos> AceViewOhos::CreateView(int32_t instanceId, bool useCurrentEventRunner, bool usePlatformThread)
55 {
56 return AceType::MakeRefPtr<AceViewOhos>(
57 instanceId, ThreadModelImpl::CreateThreadModel(
58 useCurrentEventRunner, !usePlatformThread, !SystemProperties::GetRosenBackendEnabled()));
59 }
60
AceViewOhos(int32_t id,std::unique_ptr<ThreadModelImpl> threadModelImpl)61 AceViewOhos::AceViewOhos(int32_t id, std::unique_ptr<ThreadModelImpl> threadModelImpl)
62 : instanceId_(id), threadModelImpl_(std::move(threadModelImpl))
63 {}
64
SurfaceCreated(const RefPtr<AceViewOhos> & view,OHOS::sptr<OHOS::Rosen::Window> window)65 void AceViewOhos::SurfaceCreated(const RefPtr<AceViewOhos>& view, OHOS::sptr<OHOS::Rosen::Window> window)
66 {
67 CHECK_NULL_VOID(window);
68 CHECK_NULL_VOID(view);
69 }
70
ChangeViewSize(const RefPtr<AceViewOhos> & view,int32_t width,int32_t height)71 void AceViewOhos::ChangeViewSize(const RefPtr<AceViewOhos>& view, int32_t width, int32_t height)
72 {
73 CHECK_NULL_VOID(view);
74 view->ChangeSize(width, height);
75 }
76
SurfaceChanged(const RefPtr<AceViewOhos> & view,int32_t width,int32_t height,int32_t orientation,WindowSizeChangeReason type,const std::shared_ptr<Rosen::RSTransaction> & rsTransaction)77 void AceViewOhos::SurfaceChanged(const RefPtr<AceViewOhos>& view, int32_t width, int32_t height, int32_t orientation,
78 WindowSizeChangeReason type, const std::shared_ptr<Rosen::RSTransaction>& rsTransaction)
79 {
80 CHECK_NULL_VOID(view);
81
82 view->NotifySurfaceChanged(width, height, type, rsTransaction);
83
84 auto instanceId = view->GetInstanceId();
85 auto container = Platform::AceContainer::GetContainer(instanceId);
86 if (container) {
87 auto pipelineContext = container->GetPipelineContext();
88 CHECK_NULL_VOID(pipelineContext);
89 pipelineContext->HideOverlays();
90 }
91 }
92
SurfacePositionChanged(const RefPtr<AceViewOhos> & view,int32_t posX,int32_t posY)93 void AceViewOhos::SurfacePositionChanged(const RefPtr<AceViewOhos>& view, int32_t posX, int32_t posY)
94 {
95 CHECK_NULL_VOID(view);
96 view->NotifySurfacePositionChanged(posX, posY);
97 }
98
SetViewportMetrics(const RefPtr<AceViewOhos> & view,const ViewportConfig & config)99 void AceViewOhos::SetViewportMetrics(const RefPtr<AceViewOhos>& view, const ViewportConfig& config)
100 {
101 CHECK_NULL_VOID(view);
102 view->NotifyDensityChanged(config.Density());
103 }
104
TransformHintChanged(const RefPtr<AceViewOhos> & view,uint32_t transform)105 void AceViewOhos::TransformHintChanged(const RefPtr<AceViewOhos>& view, uint32_t transform)
106 {
107 CHECK_NULL_VOID(view);
108 view->NotifyTransformHintChanged(transform);
109 }
110
DispatchTouchEvent(const RefPtr<AceViewOhos> & view,const std::shared_ptr<MMI::PointerEvent> & pointerEvent,const RefPtr<OHOS::Ace::NG::FrameNode> & node,const std::function<void ()> & callback,bool isInjected)111 void AceViewOhos::DispatchTouchEvent(const RefPtr<AceViewOhos>& view,
112 const std::shared_ptr<MMI::PointerEvent>& pointerEvent, const RefPtr<OHOS::Ace::NG::FrameNode>& node,
113 const std::function<void()>& callback, bool isInjected)
114 {
115 if (!pointerEvent) {
116 TAG_LOGE(AceLogTag::ACE_INPUTTRACKING, "DispatchTouchEvent pointerEvent is null return.");
117 return;
118 }
119 if (!view) {
120 MMI::InputManager::GetInstance()->MarkProcessed(
121 pointerEvent->GetId(), pointerEvent->GetActionTime(), pointerEvent->IsMarkEnabled());
122 TAG_LOGE(AceLogTag::ACE_INPUTTRACKING, "DispatchTouchEvent eventId:%{public}d aceView is null return.",
123 pointerEvent->GetId());
124 return;
125 }
126 auto instanceId = view->GetInstanceId();
127 LogPointInfo(pointerEvent, instanceId);
128 DispatchEventToPerf(pointerEvent);
129 int32_t pointerAction = pointerEvent->GetPointerAction();
130 auto container = Platform::AceContainer::GetContainer(instanceId);
131 if (!container) {
132 MMI::InputManager::GetInstance()->MarkProcessed(
133 pointerEvent->GetId(), pointerEvent->GetActionTime(), pointerEvent->IsMarkEnabled());
134 TAG_LOGE(AceLogTag::ACE_INPUTTRACKING, "DispatchTouchEvent eventId:%{public}d container is null return.",
135 pointerEvent->GetId());
136 return;
137 }
138 container->SetCurPointerEvent(pointerEvent);
139
140 if (pointerEvent->GetSourceType() == MMI::PointerEvent::SOURCE_TYPE_MOUSE) {
141 // mouse event
142 if ((pointerAction >= MMI::PointerEvent::POINTER_ACTION_AXIS_BEGIN &&
143 pointerAction <= MMI::PointerEvent::POINTER_ACTION_AXIS_END) ||
144 (pointerAction >= MMI::PointerEvent::POINTER_ACTION_ROTATE_BEGIN &&
145 pointerAction <= MMI::PointerEvent::POINTER_ACTION_ROTATE_END)) {
146 view->ProcessAxisEvent(pointerEvent, node, isInjected);
147 } else {
148 view->ProcessDragEvent(pointerEvent, node);
149 view->ProcessMouseEvent(pointerEvent, node, isInjected);
150 }
151 } else {
152 // touch event
153 view->ProcessDragEvent(pointerEvent, node);
154 view->ProcessTouchEvent(pointerEvent, node, callback, isInjected);
155 }
156 }
157
DispatchEventToPerf(const std::shared_ptr<MMI::PointerEvent> & pointerEvent)158 void AceViewOhos::DispatchEventToPerf(const std::shared_ptr<MMI::PointerEvent>& pointerEvent)
159 {
160 CHECK_NULL_VOID(pointerEvent);
161 static bool isFirstMove = false;
162 PerfMonitor* pMonitor = PerfMonitor::GetPerfMonitor();
163 if (pMonitor == nullptr) {
164 return;
165 }
166 uint64_t inputTime = pointerEvent->GetSensorInputTime() * US_TO_MS;
167 if (inputTime <= 0) {
168 inputTime = pointerEvent->GetActionTime() * US_TO_MS;
169 }
170 if (inputTime <= 0) {
171 return;
172 }
173 PerfActionType inputType = UNKNOWN_ACTION;
174 PerfSourceType sourceType = UNKNOWN_SOURCE;
175 if (pointerEvent->GetSourceType() == MMI::PointerEvent::SOURCE_TYPE_MOUSE) {
176 sourceType = PERF_MOUSE_EVENT;
177 } else if (pointerEvent->GetSourceType() == MMI::PointerEvent::SOURCE_TYPE_TOUCHSCREEN) {
178 sourceType = PERF_TOUCH_EVENT;
179 } else if (pointerEvent->GetSourceType() == MMI::PointerEvent::SOURCE_TYPE_TOUCHPAD) {
180 sourceType = PERF_TOUCH_PAD;
181 } else if (pointerEvent->GetSourceType() == MMI::PointerEvent::SOURCE_TYPE_JOYSTICK) {
182 sourceType = PERF_JOY_STICK;
183 }
184 int32_t pointerAction = pointerEvent->GetPointerAction();
185 if (pointerAction == MMI::PointerEvent::POINTER_ACTION_DOWN
186 || pointerAction == MMI::PointerEvent::POINTER_ACTION_BUTTON_DOWN
187 || pointerAction == MMI::PointerEvent::POINTER_ACTION_AXIS_BEGIN
188 || pointerAction == MMI::PointerEvent::POINTER_ACTION_ROTATE_BEGIN) {
189 inputType = LAST_DOWN;
190 isFirstMove = true;
191 } else if (pointerAction == MMI::PointerEvent::POINTER_ACTION_UP
192 || pointerAction == MMI::PointerEvent::POINTER_ACTION_BUTTON_UP
193 || pointerAction == MMI::PointerEvent::POINTER_ACTION_AXIS_END
194 || pointerAction == MMI::PointerEvent::POINTER_ACTION_ROTATE_END) {
195 inputType = LAST_UP;
196 isFirstMove = false;
197 } else if (isFirstMove && (pointerAction == MMI::PointerEvent::POINTER_ACTION_MOVE
198 || pointerAction == MMI::PointerEvent::POINTER_ACTION_AXIS_UPDATE
199 || pointerAction == MMI::PointerEvent::POINTER_ACTION_ROTATE_UPDATE)) {
200 inputType = FIRST_MOVE;
201 isFirstMove = false;
202 }
203 pMonitor->RecordInputEvent(inputType, sourceType, inputTime);
204 }
205
DispatchEventToPerf(const std::shared_ptr<MMI::KeyEvent> & keyEvent)206 void AceViewOhos::DispatchEventToPerf(const std::shared_ptr<MMI::KeyEvent>& keyEvent)
207 {
208 CHECK_NULL_VOID(keyEvent);
209 int32_t keyCode = keyEvent->GetKeyCode();
210 if (keyCode != MMI::KeyEvent::KEYCODE_VOLUME_DOWN
211 && keyCode != MMI::KeyEvent::KEYCODE_VOLUME_UP
212 && keyCode != MMI::KeyEvent::KEYCODE_POWER
213 && keyCode != MMI::KeyEvent::KEYCODE_META_LEFT
214 && keyCode != MMI::KeyEvent::KEYCODE_ESCAPE) {
215 return;
216 }
217 PerfMonitor* pMonitor = PerfMonitor::GetPerfMonitor();
218 if (pMonitor == nullptr) {
219 return;
220 }
221 PerfActionType inputType = UNKNOWN_ACTION;
222 int32_t action = keyEvent->GetKeyAction();
223 if (action == MMI::KeyEvent::KEY_ACTION_UP) {
224 inputType = LAST_UP;
225 } else if (action == MMI::KeyEvent::KEY_ACTION_DOWN) {
226 inputType = LAST_DOWN;
227 }
228 PerfSourceType sourceType = PERF_KEY_EVENT;
229 int64_t inputTime = (keyEvent->GetKeyItem())->GetDownTime() * US_TO_MS;
230 pMonitor->RecordInputEvent(inputType, sourceType, inputTime);
231 }
232
DispatchKeyEvent(const RefPtr<AceViewOhos> & view,const std::shared_ptr<MMI::KeyEvent> & keyEvent,bool isPreIme)233 bool AceViewOhos::DispatchKeyEvent(const RefPtr<AceViewOhos>& view,
234 const std::shared_ptr<MMI::KeyEvent>& keyEvent, bool isPreIme)
235 {
236 CHECK_NULL_RETURN(view, false);
237 DispatchEventToPerf(keyEvent);
238 return view->ProcessKeyEvent(keyEvent, isPreIme);
239 }
240
DispatchRotationEvent(const RefPtr<AceViewOhos> & view,float rotationValue)241 bool AceViewOhos::DispatchRotationEvent(const RefPtr<AceViewOhos>& view, float rotationValue)
242 {
243 CHECK_NULL_RETURN(view, false);
244 return view->ProcessRotationEvent(rotationValue);
245 }
246
RegisterTouchEventCallback(TouchEventCallback && callback)247 void AceViewOhos::RegisterTouchEventCallback(TouchEventCallback&& callback)
248 {
249 ACE_DCHECK(callback);
250 touchEventCallback_ = std::move(callback);
251 }
252
RegisterDragEventCallback(DragEventCallBack && callback)253 void AceViewOhos::RegisterDragEventCallback(DragEventCallBack&& callback)
254 {
255 ACE_DCHECK(callback);
256 dragEventCallback_ = std::move(callback);
257 }
258
RegisterKeyEventCallback(KeyEventCallback && callback)259 void AceViewOhos::RegisterKeyEventCallback(KeyEventCallback&& callback)
260 {
261 ACE_DCHECK(callback);
262 keyEventCallback_ = std::move(callback);
263 }
264
RegisterMouseEventCallback(MouseEventCallback && callback)265 void AceViewOhos::RegisterMouseEventCallback(MouseEventCallback&& callback)
266 {
267 ACE_DCHECK(callback);
268 mouseEventCallback_ = std::move(callback);
269 }
270
RegisterAxisEventCallback(AxisEventCallback && callback)271 void AceViewOhos::RegisterAxisEventCallback(AxisEventCallback&& callback)
272 {
273 ACE_DCHECK(callback);
274 axisEventCallback_ = std::move(callback);
275 }
276
RegisterRotationEventCallback(RotationEventCallBack && callback)277 void AceViewOhos::RegisterRotationEventCallback(RotationEventCallBack&& callback)
278 {
279 ACE_DCHECK(callback);
280 rotationEventCallBack_ = std::move(callback);
281 }
282
Launch()283 void AceViewOhos::Launch()
284 {
285 }
286
ProcessTouchEvent(const std::shared_ptr<MMI::PointerEvent> & pointerEvent,const RefPtr<OHOS::Ace::NG::FrameNode> & node,const std::function<void ()> & callback,bool isInjected)287 void AceViewOhos::ProcessTouchEvent(const std::shared_ptr<MMI::PointerEvent>& pointerEvent,
288 const RefPtr<OHOS::Ace::NG::FrameNode>& node, const std::function<void()>& callback, bool isInjected)
289 {
290 if (!pointerEvent) {
291 TAG_LOGE(AceLogTag::ACE_INPUTTRACKING, "ProcessTouchEvent pointerEvent is null return.");
292 return;
293 }
294 TouchEvent touchPoint = ConvertTouchEvent(pointerEvent);
295 touchPoint.SetIsInjected(isInjected);
296 if (SystemProperties::GetDebugEnabled()) {
297 ACE_SCOPED_TRACE("ProcessTouchEvent pointX=%f pointY=%f type=%d timeStamp=%lld id=%d eventId=%d", touchPoint.x,
298 touchPoint.y, (int)touchPoint.type, touchPoint.time.time_since_epoch().count(), touchPoint.id,
299 touchPoint.touchEventId);
300 }
301 auto markProcess = [touchPoint, finallyCallback = callback, enabled = pointerEvent->IsMarkEnabled()]() {
302 MMI::InputManager::GetInstance()->MarkProcessed(touchPoint.touchEventId,
303 std::chrono::duration_cast<std::chrono::microseconds>(touchPoint.time.time_since_epoch()).count(),
304 enabled);
305 if (finallyCallback) {
306 finallyCallback();
307 }
308 };
309 if (touchPoint.type != TouchType::UNKNOWN) {
310 if (touchEventCallback_) {
311 touchEventCallback_(touchPoint, markProcess, node);
312 }
313 }
314 }
315
ProcessDragEvent(const std::shared_ptr<MMI::PointerEvent> & pointerEvent,const RefPtr<OHOS::Ace::NG::FrameNode> & node)316 void AceViewOhos::ProcessDragEvent(const std::shared_ptr<MMI::PointerEvent>& pointerEvent,
317 const RefPtr<OHOS::Ace::NG::FrameNode>& node)
318 {
319 DragEventAction action;
320 PointerEvent event;
321 ConvertPointerEvent(pointerEvent, event);
322 CHECK_NULL_VOID(dragEventCallback_);
323 int32_t orgAction = pointerEvent->GetPointerAction();
324 switch (orgAction) {
325 case OHOS::MMI::PointerEvent::POINTER_ACTION_PULL_MOVE: {
326 action = DragEventAction::DRAG_EVENT_MOVE;
327 dragEventCallback_(event, action, node);
328 break;
329 }
330 case OHOS::MMI::PointerEvent::POINTER_ACTION_PULL_UP: {
331 action = DragEventAction::DRAG_EVENT_END;
332 dragEventCallback_(event, action, node);
333 break;
334 }
335 case OHOS::MMI::PointerEvent::POINTER_ACTION_PULL_IN_WINDOW: {
336 action = DragEventAction::DRAG_EVENT_START;
337 dragEventCallback_(event, action, node);
338 break;
339 }
340 case OHOS::MMI::PointerEvent::POINTER_ACTION_PULL_OUT_WINDOW: {
341 action = DragEventAction::DRAG_EVENT_OUT;
342 dragEventCallback_(event, action, node);
343 break;
344 }
345 default:
346 break;
347 }
348 }
349
ProcessDragEvent(int32_t x,int32_t y,const DragEventAction & action,const RefPtr<OHOS::Ace::NG::FrameNode> & node)350 void AceViewOhos::ProcessDragEvent(int32_t x, int32_t y, const DragEventAction& action,
351 const RefPtr<OHOS::Ace::NG::FrameNode>& node)
352 {
353 CHECK_NULL_VOID(dragEventCallback_);
354 dragEventCallback_(PointerEvent(x, y), action, node);
355 }
356
ProcessMouseEvent(const std::shared_ptr<MMI::PointerEvent> & pointerEvent,const RefPtr<OHOS::Ace::NG::FrameNode> & node,bool isInjected)357 void AceViewOhos::ProcessMouseEvent(const std::shared_ptr<MMI::PointerEvent>& pointerEvent,
358 const RefPtr<OHOS::Ace::NG::FrameNode>& node, bool isInjected)
359 {
360 MouseEvent event;
361 bool markEnabled = true;
362 if (pointerEvent) {
363 auto container = Platform::AceContainer::GetContainer(instanceId_);
364 CHECK_NULL_VOID(container);
365 ConvertMouseEvent(pointerEvent, event, container->IsScenceBoardWindow());
366 markEnabled = pointerEvent->IsMarkEnabled();
367 }
368 event.isInjected = isInjected;
369 if (SystemProperties::GetDebugEnabled()) {
370 ACE_SCOPED_TRACE("ProcessMouseEvent pointX=%f pointY=%f type=%d timeStamp=%lld id=%d eventId=%d", event.x,
371 event.y, (int)event.action, event.time.time_since_epoch().count(), event.id, event.touchEventId);
372 }
373 auto markProcess = [event, markEnabled]() {
374 MMI::InputManager::GetInstance()->MarkProcessed(event.touchEventId,
375 std::chrono::duration_cast<std::chrono::microseconds>(event.time.time_since_epoch()).count(),
376 markEnabled);
377 };
378
379 CHECK_NULL_VOID(mouseEventCallback_);
380 mouseEventCallback_(event, markProcess, node);
381 }
382
ProcessAxisEvent(const std::shared_ptr<MMI::PointerEvent> & pointerEvent,const RefPtr<OHOS::Ace::NG::FrameNode> & node,bool isInjected)383 void AceViewOhos::ProcessAxisEvent(const std::shared_ptr<MMI::PointerEvent>& pointerEvent,
384 const RefPtr<OHOS::Ace::NG::FrameNode>& node, bool isInjected)
385 {
386 CHECK_NULL_VOID(axisEventCallback_);
387 AxisEvent event;
388 event.isInjected = isInjected;
389 if (!pointerEvent) {
390 axisEventCallback_(event, nullptr, node);
391 return;
392 }
393
394 ConvertAxisEvent(pointerEvent, event);
395 auto markProcess = [event, enabled = pointerEvent->IsMarkEnabled()]() {
396 MMI::InputManager::GetInstance()->MarkProcessed(event.touchEventId,
397 std::chrono::duration_cast<std::chrono::microseconds>(event.time.time_since_epoch()).count(),
398 enabled);
399 };
400
401 /* The first step of axis event of mouse is equivalent to touch event START + UPDATE.
402 * Create a fake UPDATE event here to adapt to axis event of mouse.
403 * e.g {START, END} turns into {START, UPDATE, END}.
404 */
405 if (IsMMIMouseScrollBegin(event)) {
406 auto fakeAxisStart = std::make_shared<MMI::PointerEvent>(*pointerEvent);
407 fakeAxisStart->SetAxisValue(MMI::PointerEvent::AxisType::AXIS_TYPE_SCROLL_VERTICAL, 0.0);
408 fakeAxisStart->SetAxisValue(MMI::PointerEvent::AxisType::AXIS_TYPE_SCROLL_HORIZONTAL, 0.0);
409 ConvertAxisEvent(fakeAxisStart, event);
410 axisEventCallback_(event, nullptr, node);
411
412 auto fakeAxisUpdate = std::make_shared<MMI::PointerEvent>(*pointerEvent);
413 fakeAxisUpdate->SetPointerAction(MMI::PointerEvent::POINTER_ACTION_AXIS_UPDATE);
414 ConvertAxisEvent(fakeAxisUpdate, event);
415 }
416 axisEventCallback_(event, markProcess, node);
417 }
418
ProcessKeyEvent(const std::shared_ptr<MMI::KeyEvent> & keyEvent,bool isPreIme)419 bool AceViewOhos::ProcessKeyEvent(const std::shared_ptr<MMI::KeyEvent>& keyEvent, bool isPreIme)
420 {
421 CHECK_NULL_RETURN(keyEventCallback_, false);
422 KeyEvent event;
423 ConvertKeyEvent(keyEvent, event);
424 event.isPreIme = isPreIme;
425 return keyEventCallback_(event);
426 }
427
GetNativeWindowById(uint64_t textureId)428 const void* AceViewOhos::GetNativeWindowById(uint64_t textureId)
429 {
430 return nullptr;
431 }
432
ProcessRotationEvent(float rotationValue)433 bool AceViewOhos::ProcessRotationEvent(float rotationValue)
434 {
435 CHECK_NULL_RETURN(rotationEventCallBack_, false);
436 RotationEvent event { .value = rotationValue * ROTATION_DIVISOR };
437 return rotationEventCallBack_(event);
438 }
439
Dump(const std::vector<std::string> & params)440 bool AceViewOhos::Dump(const std::vector<std::string>& params)
441 {
442 if (params.empty() || params[0] != "-drawcmd") {
443 return false;
444 }
445 if (DumpLog::GetInstance().GetDumpFile()) {
446 DumpLog::GetInstance().AddDesc("Dump draw command not support on this version.");
447 DumpLog::GetInstance().Print(0, "Info:", 0);
448 return true;
449 }
450 return false;
451 }
452
GetBackgroundColor()453 uint32_t AceViewOhos::GetBackgroundColor()
454 {
455 return Color::WHITE.GetValue();
456 }
457
458 } // namespace OHOS::Ace::Platform
459