From 0ba2686e1db2fff2e65fc53a478d1266aca6b776 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 12 Nov 2021 22:43:22 +0100 Subject: [PATCH] Simplify file_handler Call the target functions directly. --- app/src/file_handler.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/app/src/file_handler.c b/app/src/file_handler.c index 1e8d2641..73b6a004 100644 --- a/app/src/file_handler.c +++ b/app/src/file_handler.c @@ -62,16 +62,6 @@ file_handler_destroy(struct file_handler *file_handler) { } } -static sc_pid -install_apk(const char *serial, const char *file) { - return adb_install(serial, file); -} - -static sc_pid -push_file(const char *serial, const char *file, const char *push_target) { - return adb_push(serial, file, push_target); -} - bool file_handler_request(struct file_handler *file_handler, file_handler_action_t action, char *file) { @@ -129,10 +119,10 @@ run_file_handler(void *data) { sc_pid pid; if (req.action == ACTION_INSTALL_APK) { LOGI("Installing %s...", req.file); - pid = install_apk(serial, req.file); + pid = adb_install(serial, req.file); } else { LOGI("Pushing %s...", req.file); - pid = push_file(serial, req.file, push_target); + pid = adb_push(serial, req.file, push_target); } file_handler->current_process = pid; sc_mutex_unlock(&file_handler->mutex);