VirtualTouchpadService.cpp revision e4eec20f6263f4a42ae462456f60ea6c4518bb0a
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
8namespace android {
9namespace dvr {
10
11int VirtualTouchpadService::Initialize() {
12  return touchpad_.Initialize();
13}
14
15binder::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
24