VirtualTouchpadService.cpp revision 89af70bce420f011adfeb0f80984b3895c4d7d9b
1#include "VirtualTouchpadService.h" 2 3#include <binder/Status.h> 4#include <linux/input.h> 5#include <log/log.h> 6#include <utils/Errors.h> 7 8namespace android { 9namespace dvr { 10 11binder::Status VirtualTouchpadService::touch(float x, float y, float pressure) { 12 const status_t error = touchpad_->Touch(x, y, pressure); 13 return error ? binder::Status::fromStatusT(error) 14 : binder::Status::ok(); 15} 16 17binder::Status VirtualTouchpadService::buttonState(int buttons) { 18 const status_t error = touchpad_->ButtonState(buttons); 19 return error ? binder::Status::fromStatusT(error) 20 : binder::Status::ok(); 21} 22 23} // namespace dvr 24} // namespace android 25