| 30 | } |
| 31 | |
| 32 | bool AdbShellInput::click(int x, int y) |
| 33 | { |
| 34 | LogInfo << VAR(x) << VAR(y); |
| 35 | |
| 36 | merge_replacement({ { "{X}", std::to_string(x) }, { "{Y}", std::to_string(y) } }); |
| 37 | |
| 38 | auto argv_opt = click_argv_.gen(argv_replace_); |
| 39 | if (!argv_opt) { |
| 40 | return false; |
| 41 | } |
| 42 | |
| 43 | auto output_opt = startup_and_read_pipe(*argv_opt); |
| 44 | return output_opt && output_opt->empty(); |
| 45 | } |
| 46 | |
| 47 | bool AdbShellInput::swipe(int x1, int y1, int x2, int y2, int duration) |
| 48 | { |