Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2022 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 16 | #pragma once |
| 17 | |
| 18 | #include <InputDevice.h> |
| 19 | #include <InputMapper.h> |
| 20 | #include <InputReader.h> |
Aditya Wazir | eea5be0 | 2022-10-31 12:40:10 +0530 | [diff] [blame^] | 21 | #include <ThreadSafeFuzzedDataProvider.h> |
Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 22 | #include "android/hardware/input/InputDeviceCountryCode.h" |
| 23 | |
| 24 | using android::hardware::input::InputDeviceCountryCode; |
| 25 | |
| 26 | constexpr size_t kValidTypes[] = {EV_SW, |
| 27 | EV_SYN, |
| 28 | SYN_REPORT, |
| 29 | EV_ABS, |
| 30 | EV_KEY, |
| 31 | EV_MSC, |
| 32 | EV_REL, |
| 33 | android::EventHubInterface::DEVICE_ADDED, |
| 34 | android::EventHubInterface::DEVICE_REMOVED, |
| 35 | android::EventHubInterface::FINISHED_DEVICE_SCAN}; |
| 36 | |
| 37 | constexpr size_t kValidCodes[] = { |
| 38 | SYN_REPORT, |
| 39 | ABS_MT_SLOT, |
| 40 | SYN_MT_REPORT, |
| 41 | ABS_MT_POSITION_X, |
| 42 | ABS_MT_POSITION_Y, |
| 43 | ABS_MT_TOUCH_MAJOR, |
| 44 | ABS_MT_TOUCH_MINOR, |
| 45 | ABS_MT_WIDTH_MAJOR, |
| 46 | ABS_MT_WIDTH_MINOR, |
| 47 | ABS_MT_ORIENTATION, |
| 48 | ABS_MT_TRACKING_ID, |
| 49 | ABS_MT_PRESSURE, |
| 50 | ABS_MT_DISTANCE, |
| 51 | ABS_MT_TOOL_TYPE, |
| 52 | SYN_MT_REPORT, |
| 53 | MSC_SCAN, |
| 54 | REL_X, |
| 55 | REL_Y, |
| 56 | REL_WHEEL, |
| 57 | REL_HWHEEL, |
| 58 | BTN_LEFT, |
| 59 | BTN_RIGHT, |
| 60 | BTN_MIDDLE, |
| 61 | BTN_BACK, |
| 62 | BTN_SIDE, |
| 63 | BTN_FORWARD, |
| 64 | BTN_EXTRA, |
| 65 | BTN_TASK, |
| 66 | }; |
| 67 | |
| 68 | constexpr InputDeviceCountryCode kCountryCodes[] = { |
| 69 | InputDeviceCountryCode::INVALID, |
| 70 | InputDeviceCountryCode::NOT_SUPPORTED, |
| 71 | InputDeviceCountryCode::ARABIC, |
| 72 | InputDeviceCountryCode::BELGIAN, |
| 73 | InputDeviceCountryCode::CANADIAN_BILINGUAL, |
| 74 | InputDeviceCountryCode::CANADIAN_FRENCH, |
| 75 | InputDeviceCountryCode::CZECH_REPUBLIC, |
| 76 | InputDeviceCountryCode::DANISH, |
| 77 | InputDeviceCountryCode::FINNISH, |
| 78 | InputDeviceCountryCode::FRENCH, |
| 79 | InputDeviceCountryCode::GERMAN, |
| 80 | InputDeviceCountryCode::GREEK, |
| 81 | InputDeviceCountryCode::HEBREW, |
| 82 | InputDeviceCountryCode::HUNGARY, |
| 83 | InputDeviceCountryCode::INTERNATIONAL, |
| 84 | InputDeviceCountryCode::ITALIAN, |
| 85 | InputDeviceCountryCode::JAPAN, |
| 86 | InputDeviceCountryCode::KOREAN, |
| 87 | InputDeviceCountryCode::LATIN_AMERICAN, |
| 88 | InputDeviceCountryCode::DUTCH, |
| 89 | InputDeviceCountryCode::NORWEGIAN, |
| 90 | InputDeviceCountryCode::PERSIAN, |
| 91 | InputDeviceCountryCode::POLAND, |
| 92 | InputDeviceCountryCode::PORTUGUESE, |
| 93 | InputDeviceCountryCode::RUSSIA, |
| 94 | InputDeviceCountryCode::SLOVAKIA, |
| 95 | InputDeviceCountryCode::SPANISH, |
| 96 | InputDeviceCountryCode::SWEDISH, |
| 97 | InputDeviceCountryCode::SWISS_FRENCH, |
| 98 | InputDeviceCountryCode::SWISS_GERMAN, |
| 99 | InputDeviceCountryCode::SWITZERLAND, |
| 100 | InputDeviceCountryCode::TAIWAN, |
| 101 | InputDeviceCountryCode::TURKISH_Q, |
| 102 | InputDeviceCountryCode::UK, |
| 103 | InputDeviceCountryCode::US, |
| 104 | InputDeviceCountryCode::YUGOSLAVIA, |
| 105 | InputDeviceCountryCode::TURKISH_F, |
| 106 | }; |
| 107 | |
| 108 | constexpr size_t kMaxSize = 256; |
| 109 | |
| 110 | namespace android { |
| 111 | |
| 112 | class FuzzEventHub : public EventHubInterface { |
| 113 | InputDeviceIdentifier mIdentifier; |
| 114 | std::vector<TouchVideoFrame> mVideoFrames; |
| 115 | PropertyMap mFuzzConfig; |
Aditya Wazir | eea5be0 | 2022-10-31 12:40:10 +0530 | [diff] [blame^] | 116 | std::shared_ptr<ThreadSafeFuzzedDataProvider> mFdp; |
Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 117 | |
| 118 | public: |
Aditya Wazir | eea5be0 | 2022-10-31 12:40:10 +0530 | [diff] [blame^] | 119 | FuzzEventHub(std::shared_ptr<ThreadSafeFuzzedDataProvider> fdp) : mFdp(std::move(fdp)) {} |
Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 120 | ~FuzzEventHub() {} |
| 121 | void addProperty(std::string key, std::string value) { mFuzzConfig.addProperty(key, value); } |
Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 122 | |
| 123 | ftl::Flags<InputDeviceClass> getDeviceClasses(int32_t deviceId) const override { |
| 124 | return ftl::Flags<InputDeviceClass>(mFdp->ConsumeIntegral<uint32_t>()); |
| 125 | } |
| 126 | InputDeviceIdentifier getDeviceIdentifier(int32_t deviceId) const override { |
| 127 | return mIdentifier; |
| 128 | } |
| 129 | int32_t getDeviceControllerNumber(int32_t deviceId) const override { |
| 130 | return mFdp->ConsumeIntegral<int32_t>(); |
| 131 | } |
| 132 | void getConfiguration(int32_t deviceId, PropertyMap* outConfiguration) const override { |
| 133 | *outConfiguration = mFuzzConfig; |
| 134 | } |
| 135 | status_t getAbsoluteAxisInfo(int32_t deviceId, int axis, |
| 136 | RawAbsoluteAxisInfo* outAxisInfo) const override { |
| 137 | return mFdp->ConsumeIntegral<status_t>(); |
| 138 | } |
| 139 | bool hasRelativeAxis(int32_t deviceId, int axis) const override { return mFdp->ConsumeBool(); } |
| 140 | bool hasInputProperty(int32_t deviceId, int property) const override { |
| 141 | return mFdp->ConsumeBool(); |
| 142 | } |
| 143 | bool hasMscEvent(int32_t deviceId, int mscEvent) const override { return mFdp->ConsumeBool(); } |
| 144 | status_t mapKey(int32_t deviceId, int32_t scanCode, int32_t usageCode, int32_t metaState, |
| 145 | int32_t* outKeycode, int32_t* outMetaState, uint32_t* outFlags) const override { |
| 146 | return mFdp->ConsumeIntegral<status_t>(); |
| 147 | } |
| 148 | status_t mapAxis(int32_t deviceId, int32_t scanCode, AxisInfo* outAxisInfo) const override { |
| 149 | return mFdp->ConsumeIntegral<status_t>(); |
| 150 | } |
| 151 | void setExcludedDevices(const std::vector<std::string>& devices) override {} |
Siarhei Vishniakou | 7b3ea0b | 2022-09-16 14:23:20 -0700 | [diff] [blame] | 152 | std::vector<RawEvent> getEvents(int timeoutMillis) override { |
| 153 | std::vector<RawEvent> events; |
| 154 | const size_t count = mFdp->ConsumeIntegralInRange<size_t>(0, kMaxSize); |
| 155 | for (size_t i = 0; i < count; ++i) { |
| 156 | int32_t type = mFdp->ConsumeBool() ? mFdp->PickValueInArray(kValidTypes) |
| 157 | : mFdp->ConsumeIntegral<int32_t>(); |
| 158 | int32_t code = mFdp->ConsumeBool() ? mFdp->PickValueInArray(kValidCodes) |
| 159 | : mFdp->ConsumeIntegral<int32_t>(); |
| 160 | events.push_back({ |
| 161 | .when = mFdp->ConsumeIntegral<nsecs_t>(), |
| 162 | .readTime = mFdp->ConsumeIntegral<nsecs_t>(), |
| 163 | .deviceId = mFdp->ConsumeIntegral<int32_t>(), |
| 164 | .type = type, |
| 165 | .code = code, |
| 166 | .value = mFdp->ConsumeIntegral<int32_t>(), |
| 167 | }); |
| 168 | } |
| 169 | return events; |
Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 170 | } |
| 171 | std::vector<TouchVideoFrame> getVideoFrames(int32_t deviceId) override { return mVideoFrames; } |
| 172 | |
| 173 | base::Result<std::pair<InputDeviceSensorType, int32_t>> mapSensor( |
| 174 | int32_t deviceId, int32_t absCode) const override { |
| 175 | return base::ResultError("Fuzzer", UNKNOWN_ERROR); |
| 176 | }; |
| 177 | // Raw batteries are sysfs power_supply nodes we found from the EventHub device sysfs node, |
| 178 | // containing the raw info of the sysfs node structure. |
| 179 | std::vector<int32_t> getRawBatteryIds(int32_t deviceId) const override { return {}; } |
| 180 | std::optional<RawBatteryInfo> getRawBatteryInfo(int32_t deviceId, |
| 181 | int32_t BatteryId) const override { |
| 182 | return std::nullopt; |
| 183 | }; |
| 184 | |
| 185 | std::vector<int32_t> getRawLightIds(int32_t deviceId) const override { return {}; }; |
| 186 | std::optional<RawLightInfo> getRawLightInfo(int32_t deviceId, int32_t lightId) const override { |
| 187 | return std::nullopt; |
| 188 | }; |
| 189 | std::optional<int32_t> getLightBrightness(int32_t deviceId, int32_t lightId) const override { |
| 190 | return std::nullopt; |
| 191 | }; |
| 192 | void setLightBrightness(int32_t deviceId, int32_t lightId, int32_t brightness) override{}; |
| 193 | std::optional<std::unordered_map<LightColor, int32_t>> getLightIntensities( |
| 194 | int32_t deviceId, int32_t lightId) const override { |
| 195 | return std::nullopt; |
| 196 | }; |
| 197 | void setLightIntensities(int32_t deviceId, int32_t lightId, |
| 198 | std::unordered_map<LightColor, int32_t> intensities) override{}; |
| 199 | |
| 200 | InputDeviceCountryCode getCountryCode(int32_t deviceId) const override { |
| 201 | return mFdp->PickValueInArray<InputDeviceCountryCode>(kCountryCodes); |
| 202 | }; |
| 203 | |
| 204 | int32_t getScanCodeState(int32_t deviceId, int32_t scanCode) const override { |
| 205 | return mFdp->ConsumeIntegral<int32_t>(); |
| 206 | } |
| 207 | int32_t getKeyCodeState(int32_t deviceId, int32_t keyCode) const override { |
| 208 | return mFdp->ConsumeIntegral<int32_t>(); |
| 209 | } |
| 210 | int32_t getSwitchState(int32_t deviceId, int32_t sw) const override { |
| 211 | return mFdp->ConsumeIntegral<int32_t>(); |
| 212 | } |
| 213 | int32_t getKeyCodeForKeyLocation(int32_t deviceId, int32_t locationKeyCode) const override { |
| 214 | return mFdp->ConsumeIntegral<int32_t>(); |
| 215 | } |
| 216 | status_t getAbsoluteAxisValue(int32_t deviceId, int32_t axis, |
| 217 | int32_t* outValue) const override { |
| 218 | return mFdp->ConsumeIntegral<status_t>(); |
| 219 | } |
| 220 | bool markSupportedKeyCodes(int32_t deviceId, const std::vector<int32_t>& keyCodes, |
| 221 | uint8_t* outFlags) const override { |
| 222 | return mFdp->ConsumeBool(); |
| 223 | } |
| 224 | bool hasScanCode(int32_t deviceId, int32_t scanCode) const override { |
| 225 | return mFdp->ConsumeBool(); |
| 226 | } |
| 227 | bool hasKeyCode(int32_t deviceId, int32_t keyCode) const override { |
| 228 | return mFdp->ConsumeBool(); |
| 229 | } |
| 230 | bool hasLed(int32_t deviceId, int32_t led) const override { return mFdp->ConsumeBool(); } |
| 231 | void setLedState(int32_t deviceId, int32_t led, bool on) override {} |
| 232 | void getVirtualKeyDefinitions( |
| 233 | int32_t deviceId, std::vector<VirtualKeyDefinition>& outVirtualKeys) const override {} |
| 234 | const std::shared_ptr<KeyCharacterMap> getKeyCharacterMap(int32_t deviceId) const override { |
| 235 | return nullptr; |
| 236 | } |
| 237 | bool setKeyboardLayoutOverlay(int32_t deviceId, std::shared_ptr<KeyCharacterMap> map) override { |
| 238 | return mFdp->ConsumeBool(); |
| 239 | } |
| 240 | void vibrate(int32_t deviceId, const VibrationElement& effect) override {} |
| 241 | void cancelVibrate(int32_t deviceId) override {} |
| 242 | |
| 243 | std::vector<int32_t> getVibratorIds(int32_t deviceId) const override { return {}; }; |
| 244 | |
| 245 | /* Query battery level. */ |
| 246 | std::optional<int32_t> getBatteryCapacity(int32_t deviceId, int32_t batteryId) const override { |
| 247 | return std::nullopt; |
| 248 | }; |
| 249 | |
| 250 | /* Query battery status. */ |
| 251 | std::optional<int32_t> getBatteryStatus(int32_t deviceId, int32_t batteryId) const override { |
| 252 | return std::nullopt; |
| 253 | }; |
| 254 | |
| 255 | void requestReopenDevices() override {} |
| 256 | void wake() override {} |
| 257 | void dump(std::string& dump) const override {} |
| 258 | void monitor() const override {} |
| 259 | bool isDeviceEnabled(int32_t deviceId) const override { return mFdp->ConsumeBool(); } |
| 260 | status_t enableDevice(int32_t deviceId) override { return mFdp->ConsumeIntegral<status_t>(); } |
| 261 | status_t disableDevice(int32_t deviceId) override { return mFdp->ConsumeIntegral<status_t>(); } |
| 262 | }; |
| 263 | |
| 264 | class FuzzPointerController : public PointerControllerInterface { |
Aditya Wazir | eea5be0 | 2022-10-31 12:40:10 +0530 | [diff] [blame^] | 265 | std::shared_ptr<ThreadSafeFuzzedDataProvider> mFdp; |
Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 266 | |
| 267 | public: |
Aditya Wazir | eea5be0 | 2022-10-31 12:40:10 +0530 | [diff] [blame^] | 268 | FuzzPointerController(std::shared_ptr<ThreadSafeFuzzedDataProvider> mFdp) : mFdp(mFdp) {} |
Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 269 | ~FuzzPointerController() {} |
| 270 | bool getBounds(float* outMinX, float* outMinY, float* outMaxX, float* outMaxY) const override { |
| 271 | return mFdp->ConsumeBool(); |
| 272 | } |
| 273 | void move(float deltaX, float deltaY) override {} |
| 274 | void setButtonState(int32_t buttonState) override {} |
| 275 | int32_t getButtonState() const override { return mFdp->ConsumeIntegral<int32_t>(); } |
| 276 | void setPosition(float x, float y) override {} |
| 277 | void getPosition(float* outX, float* outY) const override {} |
| 278 | void fade(Transition transition) override {} |
| 279 | void unfade(Transition transition) override {} |
| 280 | void setPresentation(Presentation presentation) override {} |
| 281 | void setSpots(const PointerCoords* spotCoords, const uint32_t* spotIdToIndex, |
| 282 | BitSet32 spotIdBits, int32_t displayId) override {} |
| 283 | void clearSpots() override {} |
| 284 | int32_t getDisplayId() const override { return mFdp->ConsumeIntegral<int32_t>(); } |
| 285 | void setDisplayViewport(const DisplayViewport& displayViewport) override {} |
| 286 | }; |
| 287 | |
| 288 | class FuzzInputReaderPolicy : public InputReaderPolicyInterface { |
| 289 | TouchAffineTransformation mTransform; |
| 290 | std::shared_ptr<FuzzPointerController> mPointerController; |
Aditya Wazir | eea5be0 | 2022-10-31 12:40:10 +0530 | [diff] [blame^] | 291 | std::shared_ptr<ThreadSafeFuzzedDataProvider> mFdp; |
Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 292 | |
| 293 | protected: |
| 294 | ~FuzzInputReaderPolicy() {} |
| 295 | |
| 296 | public: |
Aditya Wazir | eea5be0 | 2022-10-31 12:40:10 +0530 | [diff] [blame^] | 297 | FuzzInputReaderPolicy(std::shared_ptr<ThreadSafeFuzzedDataProvider> mFdp) : mFdp(mFdp) { |
Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 298 | mPointerController = std::make_shared<FuzzPointerController>(mFdp); |
| 299 | } |
| 300 | void getReaderConfiguration(InputReaderConfiguration* outConfig) override {} |
| 301 | std::shared_ptr<PointerControllerInterface> obtainPointerController(int32_t deviceId) override { |
| 302 | return mPointerController; |
| 303 | } |
| 304 | void notifyInputDevicesChanged(const std::vector<InputDeviceInfo>& inputDevices) override {} |
| 305 | std::shared_ptr<KeyCharacterMap> getKeyboardLayoutOverlay( |
| 306 | const InputDeviceIdentifier& identifier) override { |
| 307 | return nullptr; |
| 308 | } |
| 309 | std::string getDeviceAlias(const InputDeviceIdentifier& identifier) { |
| 310 | return mFdp->ConsumeRandomLengthString(32); |
| 311 | } |
| 312 | TouchAffineTransformation getTouchAffineTransformation(const std::string& inputDeviceDescriptor, |
Michael Wright | a9cf419 | 2022-12-01 23:46:39 +0000 | [diff] [blame] | 313 | ui::Rotation surfaceRotation) override { |
Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 314 | return mTransform; |
| 315 | } |
| 316 | void setTouchAffineTransformation(const TouchAffineTransformation t) { mTransform = t; } |
Prabir Pradhan | da20b17 | 2022-09-26 17:01:18 +0000 | [diff] [blame] | 317 | void notifyStylusGestureStarted(int32_t, nsecs_t) {} |
Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 318 | }; |
| 319 | |
| 320 | class FuzzInputListener : public virtual InputListenerInterface { |
| 321 | public: |
| 322 | void notifyConfigurationChanged(const NotifyConfigurationChangedArgs* args) override {} |
| 323 | void notifyKey(const NotifyKeyArgs* args) override {} |
| 324 | void notifyMotion(const NotifyMotionArgs* args) override {} |
| 325 | void notifySwitch(const NotifySwitchArgs* args) override {} |
| 326 | void notifySensor(const NotifySensorArgs* args) override{}; |
| 327 | void notifyVibratorState(const NotifyVibratorStateArgs* args) override{}; |
| 328 | void notifyDeviceReset(const NotifyDeviceResetArgs* args) override {} |
| 329 | void notifyPointerCaptureChanged(const NotifyPointerCaptureChangedArgs* args) override{}; |
| 330 | }; |
| 331 | |
| 332 | class FuzzInputReaderContext : public InputReaderContext { |
| 333 | std::shared_ptr<EventHubInterface> mEventHub; |
| 334 | sp<InputReaderPolicyInterface> mPolicy; |
Aditya Wazir | eea5be0 | 2022-10-31 12:40:10 +0530 | [diff] [blame^] | 335 | std::shared_ptr<ThreadSafeFuzzedDataProvider> mFdp; |
Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 336 | |
| 337 | public: |
| 338 | FuzzInputReaderContext(std::shared_ptr<EventHubInterface> eventHub, |
| 339 | const sp<InputReaderPolicyInterface>& policy, |
| 340 | InputListenerInterface& listener, |
Aditya Wazir | eea5be0 | 2022-10-31 12:40:10 +0530 | [diff] [blame^] | 341 | std::shared_ptr<ThreadSafeFuzzedDataProvider> mFdp) |
Siarhei Vishniakou | 2935db7 | 2022-09-22 13:35:22 -0700 | [diff] [blame] | 342 | : mEventHub(eventHub), mPolicy(policy), mFdp(mFdp) {} |
Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 343 | ~FuzzInputReaderContext() {} |
| 344 | void updateGlobalMetaState() override {} |
| 345 | int32_t getGlobalMetaState() { return mFdp->ConsumeIntegral<int32_t>(); } |
| 346 | void disableVirtualKeysUntil(nsecs_t time) override {} |
| 347 | bool shouldDropVirtualKey(nsecs_t now, int32_t keyCode, int32_t scanCode) override { |
| 348 | return mFdp->ConsumeBool(); |
| 349 | } |
| 350 | void fadePointer() override {} |
| 351 | std::shared_ptr<PointerControllerInterface> getPointerController(int32_t deviceId) override { |
| 352 | return mPolicy->obtainPointerController(0); |
| 353 | } |
| 354 | void requestTimeoutAtTime(nsecs_t when) override {} |
| 355 | int32_t bumpGeneration() override { return mFdp->ConsumeIntegral<int32_t>(); } |
| 356 | void getExternalStylusDevices(std::vector<InputDeviceInfo>& outDevices) override {} |
Siarhei Vishniakou | 2935db7 | 2022-09-22 13:35:22 -0700 | [diff] [blame] | 357 | std::list<NotifyArgs> dispatchExternalStylusState(const StylusState& outState) override { |
| 358 | return {}; |
| 359 | } |
Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 360 | InputReaderPolicyInterface* getPolicy() override { return mPolicy.get(); } |
Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 361 | EventHubInterface* getEventHub() override { return mEventHub.get(); } |
| 362 | int32_t getNextId() override { return mFdp->ConsumeIntegral<int32_t>(); } |
| 363 | |
| 364 | void updateLedMetaState(int32_t metaState) override{}; |
| 365 | int32_t getLedMetaState() override { return mFdp->ConsumeIntegral<int32_t>(); }; |
Prabir Pradhan | da20b17 | 2022-09-26 17:01:18 +0000 | [diff] [blame] | 366 | void notifyStylusGestureStarted(int32_t, nsecs_t) {} |
Michael Ensing | b8d9326 | 2020-05-12 00:41:30 -0700 | [diff] [blame] | 367 | }; |
| 368 | |
| 369 | } // namespace android |