summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHwankyu Jhun <h.jhun@samsung.com>2024-04-04 16:34:18 +0900
committerHwankyu Jhun <h.jhun@samsung.com>2024-04-04 16:34:48 +0900
commite97dabb2137cb55db81a4a0c49b2a2e03fec1236 (patch)
treeb91419683785854c81e76604e5eb2dfa4589f8a5
parente43d64342d497f5357c6dba31fa3d08185caf351 (diff)
downloadaul-1-e97dabb2137cb55db81a4a0c49b2a2e03fec1236.tar.gz
aul-1-e97dabb2137cb55db81a4a0c49b2a2e03fec1236.tar.bz2
aul-1-e97dabb2137cb55db81a4a0c49b2a2e03fec1236.zip
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 <h.jhun@samsung.com>
-rw-r--r--src/tool/app_launcher/app_launcher.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tool/app_launcher/app_launcher.c b/src/tool/app_launcher/app_launcher.c
index 44b411a1..302a90fc 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);
}