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  
16  #include "core/common/stylus/stylus_detector_default.h"
17  
18  #include "frameworks/base/log/log_wrapper.h"
19  namespace OHOS::Ace {
GetInstance()20  StylusDetectorDefault* StylusDetectorDefault::GetInstance()
21  {
22      static StylusDetectorDefault instance;
23      return &instance;
24  }
25  
IsEnable()26  bool StylusDetectorDefault::IsEnable()
27  {
28      return isEnable_;
29  }
30  
RegisterStylusInteractionListener(const std::string & bundleName,const std::shared_ptr<IStylusDetectorCallback> & callback)31  bool StylusDetectorDefault::RegisterStylusInteractionListener(
32      const std::string& bundleName, const std::shared_ptr<IStylusDetectorCallback>& callback)
33  {
34      return false;
35  }
36  
UnRegisterStylusInteractionListener(const std::string & bundleName)37  void StylusDetectorDefault::UnRegisterStylusInteractionListener(const std::string& bundleName) {}
38  
Notify(const NotifyInfo & notifyInfo)39  bool StylusDetectorDefault::Notify(const NotifyInfo& notifyInfo)
40  {
41      defaultNodeId_ = 0;
42      return false;
43  }
44  
ExecuteCommand(const std::vector<std::string> & params)45  void StylusDetectorDefault::ExecuteCommand(const std::vector<std::string>& params) {}
46  } // namespace OHOS::Ace