Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame^] | 1 | #include "VirtualTouchpadService.h" |
| 2 | |
| 3 | #include <binder/Status.h> |
| 4 | #include <cutils/log.h> |
| 5 | #include <linux/input.h> |
| 6 | #include <utils/Errors.h> |
| 7 | |
| 8 | namespace android { |
| 9 | namespace dvr { |
| 10 | |
| 11 | int VirtualTouchpadService::Initialize() { |
| 12 | return touchpad_.Initialize(); |
| 13 | } |
| 14 | |
| 15 | binder::Status VirtualTouchpadService::touch(float x, float y, float pressure) { |
| 16 | // Permissions check added and removed here :^) |
| 17 | const int error = touchpad_.Touch(x, y, pressure); |
| 18 | return error ? binder::Status::fromServiceSpecificError(error) |
| 19 | : binder::Status::ok(); |
| 20 | } |
| 21 | |
| 22 | } // namespace dvr |
| 23 | } // namespace android |