blob: a1f281c0a95062cd8f1eb8567444fe4c7e729a52 [file] [log] [blame]
Alex Vakulenkoe4eec202017-01-27 14:41:04 -08001#include "VirtualTouchpadService.h"
2
3#include <binder/Status.h>
Alex Vakulenkoe4eec202017-01-27 14:41:04 -08004#include <linux/input.h>
Alex Vakulenko4fe60582017-02-02 11:35:59 -08005#include <log/log.h>
Alex Vakulenkoe4eec202017-01-27 14:41:04 -08006#include <utils/Errors.h>
7
8namespace android {
9namespace dvr {
10
Kevin Schoedel3002b8a2017-03-06 14:34:39 -050011binder::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 Vakulenkoe4eec202017-01-27 14:41:04 -080015}
16
Kevin Schoedel3002b8a2017-03-06 14:34:39 -050017binder::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 Schoedel43b5b062017-01-19 13:46:17 -050020}
21
Alex Vakulenkoe4eec202017-01-27 14:41:04 -080022} // namespace dvr
23} // namespace android