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 | |
Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame] | 11 | binder::Status VirtualTouchpadService::touch(float x, float y, float pressure) { |
Kevin Schoedel | 89af70b | 2017-03-03 18:11:37 -0500 | [diff] [blame] | 12 | const status_t error = touchpad_->Touch(x, y, pressure); |
| 13 | return error ? binder::Status::fromStatusT(error) |
Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame] | 14 | : binder::Status::ok(); |
| 15 | } |
| 16 | |
Kevin Schoedel | 43b5b06 | 2017-01-19 13:46:17 -0500 | [diff] [blame] | 17 | binder::Status VirtualTouchpadService::buttonState(int buttons) { |
Kevin Schoedel | 89af70b | 2017-03-03 18:11:37 -0500 | [diff] [blame] | 18 | const status_t error = touchpad_->ButtonState(buttons); |
| 19 | return error ? binder::Status::fromStatusT(error) |
Kevin Schoedel | 43b5b06 | 2017-01-19 13:46:17 -0500 | [diff] [blame] | 20 | : binder::Status::ok(); |
| 21 | } |
| 22 | |
Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame] | 23 | } // namespace dvr |
| 24 | } // namespace android |