mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-19 17:43:35 -04:00
Description:reviewbot amend
Match-id-93bf6599eace7b34dd5ca7f2ef538df320e22404
This commit is contained in:
@@ -40,12 +40,12 @@ namespace DistributedInput {
|
||||
class DistributedInputHandler : public IHardwareHandler {
|
||||
DECLARE_SINGLE_INSTANCE_BASE(DistributedInputHandler);
|
||||
public:
|
||||
API_EXPORT virtual int32_t Initialize() override;
|
||||
API_EXPORT int32_t Initialize() override;
|
||||
API_EXPORT virtual std::vector<DHItem> Query() override;
|
||||
API_EXPORT virtual std::map<std::string, std::string> QueryExtraInfo() override;
|
||||
API_EXPORT virtual bool IsSupportPlugin() override;
|
||||
API_EXPORT virtual void RegisterPluginListener(std::shared_ptr<PluginListener> listener) override;
|
||||
API_EXPORT virtual void UnRegisterPluginListener() override;
|
||||
API_EXPORT bool IsSupportPlugin() override;
|
||||
API_EXPORT void RegisterPluginListener(std::shared_ptr<PluginListener> listener) override;
|
||||
API_EXPORT void UnRegisterPluginListener() override;
|
||||
|
||||
API_EXPORT void FindDevicesInfoByType(const uint32_t inputTypes, std::map<int32_t, std::string> &datas);
|
||||
API_EXPORT void FindDevicesInfoByDhId(std::vector<std::string> dhidsVec, std::map<int32_t, std::string> &datas);
|
||||
@@ -66,8 +66,8 @@ private:
|
||||
void StopInputMonitorDeviceThread();
|
||||
|
||||
// The event queue.
|
||||
static const int INPUT_DEVICE_BUFFER_SIZE = 32;
|
||||
InputDeviceEvent mEventBuffer[INPUT_DEVICE_BUFFER_SIZE] = {};
|
||||
static const int inputDeviceBufferSize = 32;
|
||||
InputDeviceEvent mEventBuffer[inputDeviceBufferSize] = {};
|
||||
std::mutex operationMutex_;
|
||||
std::unique_ptr<InputHub> inputHub_;
|
||||
};
|
||||
|
||||
@@ -187,7 +187,7 @@ void DistributedInputHandler::StartInputMonitorDeviceThread(const std::string de
|
||||
return;
|
||||
}
|
||||
while (isCollectingEvents_) {
|
||||
size_t count = inputHub_->StartCollectInputHandler(mEventBuffer, INPUT_DEVICE_BUFFER_SIZE);
|
||||
size_t count = inputHub_->StartCollectInputHandler(mEventBuffer, inputDeviceBufferSize);
|
||||
if (count > 0) {
|
||||
DHLOGI("Count: %zu", count);
|
||||
for (size_t iCnt = 0; iCnt < count; iCnt++) {
|
||||
|
||||
Reference in New Issue
Block a user