From e97dabb2137cb55db81a4a0c49b2a2e03fec1236 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 4 Apr 2024 16:34:18 +0900 Subject: [PATCH] Modify -f option of app_launcher If amd is ready, the tool should send the launch request to amd. Before getting the application information from the pkgmgr db, the tool checks whether amd is ready or not. Change-Id: I1eaed48176bc0fdd2fa83dcb0cedc7671c6518b6 Signed-off-by: Hwankyu Jhun --- src/tool/app_launcher/app_launcher.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/tool/app_launcher/app_launcher.c b/src/tool/app_launcher/app_launcher.c index 44b411a..302a90f 100644 --- a/src/tool/app_launcher/app_launcher.c +++ b/src/tool/app_launcher/app_launcher.c @@ -52,6 +52,7 @@ struct launch_arg { bool debug; bool web_debug; bool sync; + bool amd_ready; }; enum command_e { @@ -604,6 +605,11 @@ static int __cmd_fast_start_init(struct launch_arg *arg) char buf[PATH_MAX]; int retry_count = 0; + if (!access(PATH_AMD_READY, F_OK)) { + arg->amd_ready = true; + return 0; + } + if (__set_appinfo_for_launchpad(arg->b, arg->appid, arg->uid) < 0) { fprintf(stderr, "Failed to set appinfo. appid(%s), uid(%u)\n", arg->appid, arg->uid); @@ -627,7 +633,7 @@ static int __cmd_fast_start_run(struct launch_arg *arg) { int fd; - if (!access(PATH_AMD_READY, F_OK)) { + if (arg->amd_ready) { bundle_del(arg->b, AUL_K_FAST_LAUNCH); return __cmd_start_run(arg); } -- 2.7.4