1 /*
2 * Copyright (C) 2024 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 #include "mock.h"
16
17 #include "input_manager_impl.h"
18 #include "input_windows_manager.h"
19 #include "scene_board_judgement.h"
20 #ifdef OHOS_BUILD_ENABLE_MAGICCURSOR
21 #include "magic_pointer_velocity_tracker.h"
22 #endif // OHOS_BUILD_ENABLE_MAGICCURSOR
23
24 namespace OHOS {
25 using namespace OHOS::MMI;
26
27 #ifdef OHOS_BUILD_ENABLE_MAGICCURSOR
MagicPointerVelocityTracker()28 MagicPointerVelocityTracker::MagicPointerVelocityTracker() {}
~MagicPointerVelocityTracker()29 MagicPointerVelocityTracker::~MagicPointerVelocityTracker() {}
30
MonitorCursorMovement(std::shared_ptr<PointerEvent> pointerEvent)31 void MagicPointerVelocityTracker::MonitorCursorMovement(std::shared_ptr<PointerEvent> pointerEvent)
32 {}
33
Clear()34 void MagicPointerVelocityTracker::Clear()
35 {}
36
CheckPointerEventValidity(std::shared_ptr<PointerEvent> pointerEvent,int64_t time)37 bool MagicPointerVelocityTracker::CheckPointerEventValidity(std::shared_ptr<PointerEvent> pointerEvent, int64_t time)
38 {
39 return false;
40 }
41
CalculateVelocity(PointerEvent::PointerItem pointerItem,int64_t time)42 void MagicPointerVelocityTracker::CalculateVelocity(PointerEvent::PointerItem pointerItem, int64_t time)
43 {}
44
DrawMovePointer(std::shared_ptr<PointerEvent> pointerEvent)45 void MagicPointerVelocityTracker::DrawMovePointer(std::shared_ptr<PointerEvent> pointerEvent)
46 {}
47
ProcessVelocityEvent(std::shared_ptr<PointerEvent> pointerEvent)48 void MagicPointerVelocityTracker::ProcessVelocityEvent(std::shared_ptr<PointerEvent> pointerEvent)
49 {}
50
CalculateAngle(PointerEvent::PointerItem currentPointer)51 double MagicPointerVelocityTracker::CalculateAngle(PointerEvent::PointerItem currentPointer)
52 {
53 return 0;
54 }
55
CalculateDistance(PointerEvent::PointerItem currentPointer,PointerEvent::PointerItem lastPointer)56 double MagicPointerVelocityTracker::CalculateDistance(PointerEvent::PointerItem currentPointer,
57 PointerEvent::PointerItem lastPointer)
58 {
59 return 0;
60 }
61 #endif // OHOS_BUILD_ENABLE_MAGICCURSOR
62
InputManagerImpl()63 InputManagerImpl::InputManagerImpl() {}
~InputManagerImpl()64 InputManagerImpl::~InputManagerImpl() {}
65
66 #ifdef OHOS_BUILD_ENABLE_ANCO
IsAncoWindowFocus(const WindowInfo & window) const67 bool InputWindowsManager::IsAncoWindowFocus(const WindowInfo &window) const
68 {
69 return false;
70 }
71
IsAncoWindow(const WindowInfo & window) const72 bool InputWindowsManager::IsAncoWindow(const WindowInfo &window) const
73 {
74 return false;
75 }
76
IsInAncoWindow(const WindowInfo & window,int32_t x,int32_t y) const77 bool InputWindowsManager::IsInAncoWindow(const WindowInfo &window, int32_t x, int32_t y) const
78 {
79 return false;
80 }
81
DumpAncoWindows(std::string & out) const82 void InputWindowsManager::DumpAncoWindows(std::string& out) const
83 {}
84
UpdateWindowInfoExt(const WindowGroupInfo & windowGroupInfo,const DisplayGroupInfo & displayGroupInfo)85 void InputWindowsManager::UpdateWindowInfoExt(const WindowGroupInfo &windowGroupInfo,
86 const DisplayGroupInfo &displayGroupInfo)
87 {}
88
UpdateShellWindow(const WindowInfo & window)89 void InputWindowsManager::UpdateShellWindow(const WindowInfo &window)
90 {}
91
UpdateDisplayInfoExt(const DisplayGroupInfo & displayGroupInfo)92 void InputWindowsManager::UpdateDisplayInfoExt(const DisplayGroupInfo &displayGroupInfo)
93 {}
94
SimulateKeyExt(std::shared_ptr<KeyEvent> keyEvent)95 void InputWindowsManager::SimulateKeyExt(std::shared_ptr<KeyEvent> keyEvent)
96 {}
97
SimulatePointerExt(std::shared_ptr<PointerEvent> pointerEvent)98 void InputWindowsManager::SimulatePointerExt(std::shared_ptr<PointerEvent> pointerEvent)
99 {}
100
CleanShellWindowIds()101 void InputWindowsManager::CleanShellWindowIds()
102 {}
103 #endif // OHOS_BUILD_ENABLE_ANCO
104
InputDisplayBindHelper(const std::string bindCfgFile)105 InputDisplayBindHelper::InputDisplayBindHelper(const std::string bindCfgFile)
106 : fileName_(bindCfgFile), infos_(std::make_shared<BindInfos>()), configFileInfos_(std::make_shared<BindInfos>())
107 {}
108
Load()109 void InputDisplayBindHelper::Load()
110 {}
111
Dumps() const112 std::string InputDisplayBindHelper::Dumps() const
113 {
114 return "";
115 }
116
GetDisplayBindInfo(DisplayBindInfos & infos)117 int32_t InputDisplayBindHelper::GetDisplayBindInfo(DisplayBindInfos &infos)
118 {
119 return 0;
120 }
121
SetDisplayBind(int32_t deviceId,int32_t displayId,std::string & msg)122 int32_t InputDisplayBindHelper::SetDisplayBind(int32_t deviceId, int32_t displayId, std::string &msg)
123 {
124 return 0;
125 }
126
GetBindDisplayNameByInputDevice(int32_t inputDeviceId) const127 std::string InputDisplayBindHelper::GetBindDisplayNameByInputDevice(int32_t inputDeviceId) const
128 {
129 return "";
130 }
131
GetDisplayIdNames() const132 std::set<std::pair<int32_t, std::string>> InputDisplayBindHelper::GetDisplayIdNames() const
133 {
134 std::set<std::pair<int32_t, std::string>> idNames;
135 return idNames;
136 }
137
RemoveDisplay(int32_t id)138 void InputDisplayBindHelper::RemoveDisplay(int32_t id)
139 {}
140
AddLocalDisplay(int32_t id,const std::string & name)141 void InputDisplayBindHelper::AddLocalDisplay(int32_t id, const std::string &name)
142 {}
143
IsDisplayAdd(int32_t id,const std::string & name)144 bool InputDisplayBindHelper::IsDisplayAdd(int32_t id, const std::string &name)
145 {
146 return false;
147 }
148
AddDisplay(int32_t id,const std::string & name)149 void InputDisplayBindHelper::AddDisplay(int32_t id, const std::string &name)
150 {}
151
RemoveInputDevice(int32_t id)152 void InputDisplayBindHelper::RemoveInputDevice(int32_t id)
153 {}
154
AddInputDevice(int32_t id,const std::string & name)155 void InputDisplayBindHelper::AddInputDevice(int32_t id, const std::string &name)
156 {}
157
~UDSServer()158 UDSServer::~UDSServer() {}
159
AddSessionDeletedCallback(std::function<void (SessionPtr)> callback)160 void UDSServer::AddSessionDeletedCallback(std::function<void(SessionPtr)> callback)
161 {}
162
GetSession(int32_t fd) const163 SessionPtr UDSServer::GetSession(int32_t fd) const
164 {
165 if (DfsMessageParcel::messageParcel == nullptr) {
166 return nullptr;
167 }
168 return DfsMessageParcel::messageParcel->GetSession(fd);
169 }
170
GetClientFd(int32_t pid) const171 int32_t UDSServer::GetClientFd(int32_t pid) const
172 {
173 if (DfsMessageParcel::messageParcel == nullptr) {
174 return 0;
175 }
176 return DfsMessageParcel::messageParcel->GetClientFd(pid);
177 }
178
GetSessionByPid(int32_t pid) const179 SessionPtr UDSServer::GetSessionByPid(int32_t pid) const
180 {
181 return nullptr;
182 }
183
OnConnected(SessionPtr sess)184 void UDSServer::OnConnected(SessionPtr sess)
185 {}
186
OnDisconnected(SessionPtr sess)187 void UDSServer::OnDisconnected(SessionPtr sess)
188 {}
189
AddEpoll(EpollEventType type,int32_t fd)190 int32_t UDSServer::AddEpoll(EpollEventType type, int32_t fd)
191 {
192 return RET_ERR;
193 }
194
AddSocketPairInfo(const std::string & programName,const int32_t moduleType,const int32_t uid,const int32_t pid,int32_t & serverFd,int32_t & toReturnClientFd,int32_t & tokenType)195 int32_t UDSServer::AddSocketPairInfo(const std::string& programName,
196 const int32_t moduleType, const int32_t uid, const int32_t pid,
197 int32_t& serverFd, int32_t& toReturnClientFd, int32_t& tokenType)
198 {
199 return RET_ERR;
200 }
201
202 std::shared_ptr<InputDeviceManager> InputDeviceManager::instance_ = nullptr;
203 std::mutex InputDeviceManager::mutex_;
GetInstance()204 std::shared_ptr<InputDeviceManager> InputDeviceManager::GetInstance()
205 {
206 if (instance_ == nullptr) {
207 std::lock_guard<std::mutex> lock(mutex_);
208 if (instance_ == nullptr) {
209 instance_ = std::make_shared<InputDeviceManager>();
210 }
211 }
212 return instance_;
213 }
214
Attach(std::shared_ptr<IDeviceObserver> observer)215 void InputDeviceManager::Attach(std::shared_ptr<IDeviceObserver> observer)
216 {}
217
Detach(std::shared_ptr<IDeviceObserver> observer)218 void InputDeviceManager::Detach(std::shared_ptr<IDeviceObserver> observer)
219 {}
220
NotifyPointerDevice(bool hasPointerDevice,bool isVisible,bool isHotPlug)221 void InputDeviceManager::NotifyPointerDevice(bool hasPointerDevice, bool isVisible, bool isHotPlug)
222 {}
223
SetInputStatusChangeCallback(inputDeviceCallback callback)224 void InputDeviceManager::SetInputStatusChangeCallback(inputDeviceCallback callback)
225 {}
226
227 #ifdef OHOS_BUILD_ENABLE_POINTER_DRAWING
HasPointerDevice()228 bool InputDeviceManager::HasPointerDevice()
229 {
230 if (DfsMessageParcel::messageParcel == nullptr) {
231 return false;
232 }
233 return DfsMessageParcel::messageParcel->HasPointerDevice();
234 }
235 #endif // OHOS_BUILD_ENABLE_POINTER_DRAWING
236
GetInputDevice(int32_t deviceId,bool checked) const237 std::shared_ptr<InputDevice> InputDeviceManager::GetInputDevice(int32_t deviceId, bool checked) const
238 {
239 if (DfsMessageParcel::messageParcel == nullptr) {
240 return nullptr;
241 }
242 return DfsMessageParcel::messageParcel->GetInputDevice(deviceId, checked);
243 }
244
TimerManager()245 TimerManager::TimerManager() {}
246
~TimerManager()247 TimerManager::~TimerManager() {}
248
AddTimer(int32_t intervalMs,int32_t repeatCount,std::function<void ()> callback)249 int32_t TimerManager::AddTimer(int32_t intervalMs, int32_t repeatCount, std::function<void()> callback)
250 {
251 return 0;
252 }
253
OnFocusWindowChanged(int32_t oldFocusWindowId,int32_t newFocusWindowId,int32_t oldFocusWindowPid,int32_t newFocusWindowPid)254 void DfxHisysevent::OnFocusWindowChanged(int32_t oldFocusWindowId, int32_t newFocusWindowId,
255 int32_t oldFocusWindowPid, int32_t newFocusWindowPid)
256 {}
257
OnZorderWindowChanged(int32_t oldZorderFirstWindowId,int32_t newZorderFirstWindowId,int32_t oldZorderFirstWindowPid,int32_t newZorderFirstWindowPid)258 void DfxHisysevent::OnZorderWindowChanged(int32_t oldZorderFirstWindowId, int32_t newZorderFirstWindowId,
259 int32_t oldZorderFirstWindowPid, int32_t newZorderFirstWindowPid)
260 {}
261
TouchDrawingManager()262 TouchDrawingManager::TouchDrawingManager() {}
263
~TouchDrawingManager()264 TouchDrawingManager::~TouchDrawingManager() {}
265
UpdateDisplayInfo(const DisplayInfo & displayInfo)266 void TouchDrawingManager::UpdateDisplayInfo(const DisplayInfo& displayInfo)
267 {}
268
RotationScreen()269 void TouchDrawingManager::RotationScreen()
270 {}
271
TouchDrawHandler(std::shared_ptr<PointerEvent> pointerEvent)272 void TouchDrawingManager::TouchDrawHandler(std::shared_ptr<PointerEvent> pointerEvent)
273 {}
274
GetOriginalTouchScreenCoordinates(Direction direction,int32_t width,int32_t height,int32_t & physicalX,int32_t & physicalY)275 void TouchDrawingManager::GetOriginalTouchScreenCoordinates(Direction direction, int32_t width, int32_t height,
276 int32_t &physicalX, int32_t &physicalY)
277 {}
278
IsWindowRotation()279 bool TouchDrawingManager::IsWindowRotation()
280 {
281 if (DfsMessageParcel::messageParcel == nullptr) {
282 return false;
283 }
284 return DfsMessageParcel::messageParcel->IsWindowRotation();
285 }
286
PointerDrawingManager()287 PointerDrawingManager::PointerDrawingManager() {}
288
GetInstance()289 std::shared_ptr<IPointerDrawingManager> IPointerDrawingManager::GetInstance()
290 {
291 if (iPointDrawMgr_ == nullptr) {
292 iPointDrawMgr_ = std::make_shared<PointerDrawingManager>();
293 }
294 return iPointDrawMgr_;
295 }
296
UpdatePointerDevice(bool hasPointerDevice,bool isPointerVisible,bool isHotPlug)297 void PointerDrawingManager::UpdatePointerDevice(bool hasPointerDevice, bool isPointerVisible,
298 bool isHotPlug)
299 {}
DrawPointer(int32_t displayId,int32_t physicalX,int32_t physicalY,const PointerStyle pointerStyle,Direction direction)300 void PointerDrawingManager::DrawPointer(int32_t displayId, int32_t physicalX, int32_t physicalY,
301 const PointerStyle pointerStyle, Direction direction) {}
UpdateDisplayInfo(const DisplayInfo & displayInfo)302 void PointerDrawingManager::UpdateDisplayInfo(const DisplayInfo& displayInfo) {}
OnDisplayInfo(const DisplayGroupInfo & displayGroupInfo)303 void PointerDrawingManager::OnDisplayInfo(const DisplayGroupInfo& displayGroupInfo) {}
OnWindowInfo(const WinInfo & info)304 void PointerDrawingManager::OnWindowInfo(const WinInfo &info) {}
Init()305 bool PointerDrawingManager::Init()
306 {
307 return true;
308 }
DeletePointerVisible(int32_t pid)309 void PointerDrawingManager::DeletePointerVisible(int32_t pid) {}
SetPointerVisible(int32_t pid,bool visible,int32_t priority,bool isHap)310 int32_t PointerDrawingManager::SetPointerVisible(int32_t pid, bool visible, int32_t priority, bool isHap)
311 {
312 return 0;
313 }
GetPointerVisible(int32_t pid)314 bool PointerDrawingManager::GetPointerVisible(int32_t pid)
315 {
316 return true;
317 }
SetPointerColor(int32_t color)318 int32_t PointerDrawingManager::SetPointerColor(int32_t color)
319 {
320 return 0;
321 }
GetPointerColor()322 int32_t PointerDrawingManager::GetPointerColor()
323 {
324 return 0;
325 }
SetPointerStyle(int32_t pid,int32_t windowId,PointerStyle pointerStyle,bool isUiExtension)326 int32_t PointerDrawingManager::SetPointerStyle(int32_t pid, int32_t windowId, PointerStyle pointerStyle,
327 bool isUiExtension)
328 {
329 return 0;
330 }
ClearWindowPointerStyle(int32_t pid,int32_t windowId)331 int32_t PointerDrawingManager::ClearWindowPointerStyle(int32_t pid, int32_t windowId)
332 {
333 return 0;
334 }
GetPointerStyle(int32_t pid,int32_t windowId,PointerStyle & pointerStyle,bool isUiExtension)335 int32_t PointerDrawingManager::GetPointerStyle(int32_t pid, int32_t windowId, PointerStyle &pointerStyle,
336 bool isUiExtension)
337 {
338 return 0;
339 }
DrawPointerStyle(const PointerStyle & pointerStyle)340 void PointerDrawingManager::DrawPointerStyle(const PointerStyle& pointerStyle) {}
IsPointerVisible()341 bool PointerDrawingManager::IsPointerVisible()
342 {
343 return false;
344 }
SetPointerLocation(int32_t x,int32_t y)345 void PointerDrawingManager::SetPointerLocation(int32_t x, int32_t y) {}
SetMouseDisplayState(bool state)346 void PointerDrawingManager::SetMouseDisplayState(bool state) {}
GetMouseDisplayState() const347 bool PointerDrawingManager::GetMouseDisplayState() const
348 {
349 if (DfsMessageParcel::messageParcel == nullptr) {
350 return false;
351 }
352 return DfsMessageParcel::messageParcel->GetMouseDisplayState();
353 }
SetCustomCursor(void * pixelMap,int32_t pid,int32_t windowId,int32_t focusX,int32_t focusY)354 int32_t PointerDrawingManager::SetCustomCursor(void* pixelMap, int32_t pid, int32_t windowId,
355 int32_t focusX, int32_t focusY)
356 {
357 return 0;
358 }
SetCustomCursor(int32_t pid,int32_t windowId,CustomCursor cursor,CursorOptions options)359 int32_t PointerDrawingManager::SetCustomCursor(int32_t pid, int32_t windowId, CustomCursor cursor,
360 CursorOptions options)
361 {
362 return 0;
363 }
GetUserIconCopy()364 std::shared_ptr<OHOS::Media::PixelMap> PointerDrawingManager::GetUserIconCopy()
365 {
366 return nullptr;
367 }
UpdateCursorProperty(CustomCursor cursor)368 int32_t PointerDrawingManager::UpdateCursorProperty(CustomCursor cursor)
369 {
370 return 0;
371 }
SetMouseIcon(int32_t pid,int32_t windowId,void * pixelMap)372 int32_t PointerDrawingManager::SetMouseIcon(int32_t pid, int32_t windowId, void* pixelMap)
373 {
374 return 0;
375 }
SetMouseHotSpot(int32_t pid,int32_t windowId,int32_t hotSpotX,int32_t hotSpotY)376 int32_t PointerDrawingManager::SetMouseHotSpot(int32_t pid, int32_t windowId, int32_t hotSpotX, int32_t hotSpotY)
377 {
378 return 0;
379 }
SetPointerSize(int32_t size)380 int32_t PointerDrawingManager::SetPointerSize(int32_t size)
381 {
382 return 0;
383 }
GetPointerSize()384 int32_t PointerDrawingManager::GetPointerSize()
385 {
386 return 0;
387 }
GetCursorSurfaceId(uint64_t & surfaceId)388 int32_t PointerDrawingManager::GetCursorSurfaceId(uint64_t &surfaceId)
389 {
390 surfaceId = uint64_t {};
391 return RET_OK;
392 }
GetLastMouseStyle()393 PointerStyle PointerDrawingManager::GetLastMouseStyle()
394 {
395 return {};
396 }
GetIconStyle(const MOUSE_ICON mouseStyle)397 IconStyle PointerDrawingManager::GetIconStyle(const MOUSE_ICON mouseStyle)
398 {
399 return {};
400 }
GetMouseIconPath()401 std::map<MOUSE_ICON, IconStyle> PointerDrawingManager::GetMouseIconPath()
402 {
403 return {};
404 }
SwitchPointerStyle()405 int32_t PointerDrawingManager::SwitchPointerStyle()
406 {
407 return 0;
408 }
DrawMovePointer(int32_t displayId,int32_t physicalX,int32_t physicalY)409 void PointerDrawingManager::DrawMovePointer(int32_t displayId, int32_t physicalX, int32_t physicalY) {}
Dump(int32_t fd,const std::vector<std::string> & args)410 void PointerDrawingManager::Dump(int32_t fd, const std::vector<std::string> &args) {}
InitPointerCallback()411 void PointerDrawingManager::InitPointerCallback() {}
EnableHardwareCursorStats(int32_t pid,bool enable)412 int32_t PointerDrawingManager::EnableHardwareCursorStats(int32_t pid, bool enable)
413 {
414 return 0;
415 }
GetHardwareCursorStats(int32_t pid,uint32_t & frameCount,uint32_t & vsyncCount)416 int32_t PointerDrawingManager::GetHardwareCursorStats(int32_t pid, uint32_t &frameCount, uint32_t &vsyncCount)
417 {
418 return 0;
419 }
420 #ifdef OHOS_BUILD_ENABLE_MAGICCURSOR
GetPointerSnapshot(void * pixelMap)421 int32_t PointerDrawingManager::GetPointerSnapshot(void *pixelMap)
422 {
423 return 0;
424 }
425 #endif // OHOS_BUILD_ENABLE_MAGICCURSOR
ForceClearPointerVisiableStatus()426 void PointerDrawingManager::ForceClearPointerVisiableStatus()
427 {}
InitPointerObserver()428 void PointerDrawingManager::InitPointerObserver()
429 {}
OnSessionLost(int pid)430 void PointerDrawingManager::OnSessionLost(int pid)
431 {}
SkipPointerLayer(bool isSkip)432 int32_t PointerDrawingManager::SkipPointerLayer(bool isSkip)
433 {
434 return 0;
435 }
DestroyPointerWindow()436 void PointerDrawingManager::DestroyPointerWindow()
437 {
438 }
439 std::shared_ptr<IPreferenceManager> IPreferenceManager::instance_;
440 std::mutex IPreferenceManager::mutex_;
GetInstance()441 std::shared_ptr<IPreferenceManager> IPreferenceManager::GetInstance()
442 {
443 if (instance_ == nullptr) {
444 std::lock_guard<std::mutex> lock(mutex_);
445 if (instance_ == nullptr) {
446 instance_ = std::make_shared<MultiModalInputPreferencesManager>();
447 }
448 }
449 return instance_;
450 }
451
InitPreferences()452 int32_t MultiModalInputPreferencesManager::InitPreferences()
453 {
454 return 0;
455 }
456
GetIntValue(const std::string & key,int32_t defaultValue)457 int32_t MultiModalInputPreferencesManager::GetIntValue(const std::string &key, int32_t defaultValue)
458 {
459 return 0;
460 }
461
GetBoolValue(const std::string & key,bool defaultValue)462 bool MultiModalInputPreferencesManager::GetBoolValue(const std::string &key, bool defaultValue)
463 {
464 if (DfsMessageParcel::messageParcel == nullptr) {
465 return false;
466 }
467 return DfsMessageParcel::messageParcel->GetBoolValue(key, defaultValue);
468 }
469
SetIntValue(const std::string & key,const std::string & setFile,int32_t setValue)470 int32_t MultiModalInputPreferencesManager::SetIntValue(const std::string &key, const std::string &setFile,
471 int32_t setValue)
472 {
473 return 0;
474 }
475
SetBoolValue(const std::string & key,const std::string & setFile,bool setValue)476 int32_t MultiModalInputPreferencesManager::SetBoolValue(const std::string &key, const std::string &setFile,
477 bool setValue)
478 {
479 return 0;
480 }
481
GetShortKeyDuration(const std::string & key)482 int32_t MultiModalInputPreferencesManager::GetShortKeyDuration(const std::string &key)
483 {
484 return 0;
485 }
486
SetShortKeyDuration(const std::string & key,int32_t setValue)487 int32_t MultiModalInputPreferencesManager::SetShortKeyDuration(const std::string &key, int32_t setValue)
488 {
489 return 0;
490 }
491
InputEventHandler()492 InputEventHandler::InputEventHandler() {}
493
~InputEventHandler()494 InputEventHandler::~InputEventHandler() {}
495
GetFilterHandler() const496 std::shared_ptr<EventFilterHandler> InputEventHandler::GetFilterHandler() const
497 {
498 return nullptr;
499 }
500
GetEventNormalizeHandler() const501 std::shared_ptr<EventNormalizeHandler> InputEventHandler::GetEventNormalizeHandler() const
502 {
503 return nullptr;
504 }
505
GetKeyCommandHandler() const506 std::shared_ptr<KeyCommandHandler> InputEventHandler::GetKeyCommandHandler() const
507 {
508 return eventKeyCommandHandler_;
509 }
510
511 #ifdef OHOS_BUILD_ENABLE_POINTER
HandlePointerEvent(const std::shared_ptr<PointerEvent> pointerEvent)512 void EventFilterHandler::HandlePointerEvent(const std::shared_ptr<PointerEvent> pointerEvent)
513 {}
514 #endif // OHOS_BUILD_ENABLE_POINTER
515
MouseEventNormalize()516 MouseEventNormalize::MouseEventNormalize() {}
517
~MouseEventNormalize()518 MouseEventNormalize::~MouseEventNormalize() {}
519
GetDisplayId() const520 int32_t MouseEventNormalize::GetDisplayId() const
521 {
522 return DfsMessageParcel::messageParcel->GetDisplayId();
523 }
524
KnuckleDrawingManager()525 KnuckleDrawingManager::KnuckleDrawingManager()
526 {}
527
UpdateDisplayInfo(const DisplayInfo & displayInfo)528 void KnuckleDrawingManager::UpdateDisplayInfo(const DisplayInfo& displayInfo)
529 {}
530
KnuckleDrawHandler(std::shared_ptr<PointerEvent> touchEvent)531 void KnuckleDrawingManager::KnuckleDrawHandler(std::shared_ptr<PointerEvent> touchEvent)
532 {}
533
KnuckleDynamicDrawingManager()534 KnuckleDynamicDrawingManager::KnuckleDynamicDrawingManager()
535 {}
536
UpdateDisplayInfo(const DisplayInfo & displayInfo)537 void KnuckleDynamicDrawingManager::UpdateDisplayInfo(const DisplayInfo& displayInfo)
538 {}
539
KnuckleDynamicDrawHandler(std::shared_ptr<PointerEvent> pointerEvent)540 void KnuckleDynamicDrawingManager::KnuckleDynamicDrawHandler(std::shared_ptr<PointerEvent> pointerEvent)
541 {}
542
SetKnuckleDrawingManager(std::shared_ptr<KnuckleDrawingManager> knuckleDrawMgr)543 void KnuckleDynamicDrawingManager::SetKnuckleDrawingManager(std::shared_ptr<KnuckleDrawingManager> knuckleDrawMgr)
544 {}
545
~SettingDataShare()546 SettingDataShare::~SettingDataShare() {}
547
548 std::shared_ptr<SettingDataShare> SettingDataShare::instance_ = nullptr;
549 std::mutex SettingDataShare::mutex_;
GetInstance(int32_t systemAbilityId)550 SettingDataShare& SettingDataShare::GetInstance(int32_t systemAbilityId)
551 {
552 if (instance_ == nullptr) {
553 std::lock_guard<std::mutex> lock(mutex_);
554 if (instance_ == nullptr) {
555 instance_ = std::make_shared<SettingDataShare>();
556 }
557 }
558 return *instance_;
559 }
560
GetBoolValue(const std::string & key,bool & value,const std::string & strUri)561 ErrCode SettingDataShare::GetBoolValue(const std::string& key, bool& value, const std::string &strUri)
562 {
563 return ERR_OK;
564 }
565
CreateObserver(const std::string & key,SettingObserver::UpdateFunc & func)566 sptr<SettingObserver> SettingDataShare::CreateObserver(const std::string& key, SettingObserver::UpdateFunc& func)
567 {
568 return nullptr;
569 }
570
RegisterObserver(const sptr<SettingObserver> & observer,const std::string & strUri)571 ErrCode SettingDataShare::RegisterObserver(const sptr<SettingObserver>& observer, const std::string &strUri)
572 {
573 return ERR_OK;
574 }
575
FingersenseWrapper()576 FingersenseWrapper::FingersenseWrapper() {}
577
~FingersenseWrapper()578 FingersenseWrapper::~FingersenseWrapper() {}
579
SendMsg(NetPacket & pkt) const580 bool UDSSession::SendMsg(NetPacket &pkt) const
581 {
582 if (DfsMessageParcel::messageParcel == nullptr) {
583 return false;
584 }
585 return DfsMessageParcel::messageParcel->SendMsg(pkt);
586 }
587
IsSceneBoardEnabled()588 bool Rosen::SceneBoardJudgement::IsSceneBoardEnabled()
589 {
590 if (DfsMessageParcel::messageParcel == nullptr) {
591 return false;
592 }
593 return DfsMessageParcel::messageParcel->IsSceneBoardEnabled();
594 }
595
596 #ifdef OHOS_BUILD_ENABLE_ANCO
AncoAddChannel(sptr<IAncoChannel> channel)597 int32_t InputWindowsManager::AncoAddChannel(sptr<IAncoChannel> channel)
598 {
599 return ERR_OK;
600 }
601
AncoRemoveChannel(sptr<IAncoChannel> channel)602 int32_t InputWindowsManager::AncoRemoveChannel(sptr<IAncoChannel> channel)
603 {
604 return ERR_OK;
605 }
606
607 #endif // OHOS_BUILD_ENABLE_ANCO
608
GetKnuckleSwitchValue()609 bool KeyCommandHandler::GetKnuckleSwitchValue()
610 {
611 return false;
612 }
613
CheckInputMethodArea(const std::shared_ptr<PointerEvent> touchEvent)614 bool KeyCommandHandler::CheckInputMethodArea(const std::shared_ptr<PointerEvent> touchEvent)
615 {
616 return false;
617 }
618 } // namespace OHOS