Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame] | 1 | #include "VirtualTouchpadService.h" |
| 2 | |
| 3 | #include <binder/Status.h> |
Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame] | 4 | #include <linux/input.h> |
Alex Vakulenko | 4fe6058 | 2017-02-02 11:35:59 -0800 | [diff] [blame] | 5 | #include <log/log.h> |
Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame] | 6 | #include <utils/Errors.h> |
| 7 | |
| 8 | namespace android { |
| 9 | namespace dvr { |
| 10 | |
Kevin Schoedel | 3002b8a | 2017-03-06 14:34:39 -0500 | [diff] [blame^] | 11 | binder::Status VirtualTouchpadService::touch(int touchpad, |
| 12 | float x, float y, float pressure) { |
| 13 | const status_t error = touchpad_->Touch(touchpad, x, y, pressure); |
| 14 | return error ? binder::Status::fromStatusT(error) : binder::Status::ok(); |
Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame] | 15 | } |
| 16 | |
Kevin Schoedel | 3002b8a | 2017-03-06 14:34:39 -0500 | [diff] [blame^] | 17 | binder::Status VirtualTouchpadService::buttonState(int touchpad, int buttons) { |
| 18 | const status_t error = touchpad_->ButtonState(touchpad, buttons); |
| 19 | return error ? binder::Status::fromStatusT(error) : binder::Status::ok(); |
Kevin Schoedel | 43b5b06 | 2017-01-19 13:46:17 -0500 | [diff] [blame] | 20 | } |
| 21 | |
Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame] | 22 | } // namespace dvr |
| 23 | } // namespace android |