Fix fast launch option of app_launcher tool 33/251333/1
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 12 Jan 2021 23:15:01 +0000 (08:15 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 12 Jan 2021 23:17:37 +0000 (08:17 +0900)
Currently, the app_launcher tool checks whether the socket of AMD exists or NOT.
If AMD initialization is slow, the launch request of the tool is delayed.
After this patch is applied, the tool sends the launch request to the launchpad
directly if AMD is not ready.

Change-Id: Ic96dcf54263f52ac8723afdbc530b5cb61863000
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
tool/app_launcher/app_launcher.c

index 0deeb46..820b88d 100644 (file)
@@ -33,9 +33,8 @@
 #include "launch.h"
 
 #define LAUNCHPAD_PROCESS_POOL_SOCK ".launchpad-process-pool-sock"
-#define AMD_SOCK ".amd-sock"
 #define PATH_AUL_DAEMONS "/run/aul/daemons"
-#define PATH_AMD_SOCK PATH_AUL_DAEMONS "/" AMD_SOCK
+#define PATH_AMD_READY "/run/.amd_ready"
 #define APP_TYPE_UI "uiapp"
 #define APP_TYPE_SERVICE "svcapp"
 #define INOTIFY_BUF (1024 * ((sizeof(struct inotify_event)) + 16))
@@ -601,7 +600,7 @@ end:
 
 static int __cmd_fast_start_run(struct launch_arg *arg)
 {
-       if (!access(PATH_AMD_SOCK, F_OK))
+       if (!access(PATH_AMD_READY, F_OK))
                return __cmd_start_run(arg);
 
        if (__set_appinfo_for_launchpad(arg->b, arg->appid, arg->uid) < 0) {