Modify plugin initialization of app-defined-loader 46/292846/2
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 15 May 2023 23:11:53 +0000 (23:11 +0000)
committerHwanKyu Jhun <h.jhun@samsung.com>
Thu, 18 May 2023 09:05:02 +0000 (09:05 +0000)
To avoid delay issue, caling _launchpad_plugin_prepare_app() is moved.

Change-Id: I1cf605fc43d1d75712640bb25fd5dcbbc5d2fc47
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/app-defined-loader/src/app-defined-loader.cc

index b5c1d5ade62f70016778402f05044bae2ff5a65b..3841cde56668982d539895d4acae7719580ababb 100644 (file)
@@ -125,12 +125,6 @@ class AppDefinedLoader {
 
   static void OnCreate(bundle* extra, int type, void* user_data) {
     _I("on create");
-    int ret = _launchpad_plugin_prepare_app(nullptr, extra);
-    if (ret != 0) {
-      _E("_launchpad_plugin_prepare_app() is failed. error(%d)", ret);
-      exit(EXIT_FAILURE);
-    }
-
     AppDefinedLoader* loader = static_cast<AppDefinedLoader*>(user_data);
     tizen_base::Bundle ex = tizen_base::Bundle(extra, false, false);
     std::string loader_type = ex.GetString(KEY_LOADER_TYPE);
@@ -147,6 +141,12 @@ class AppDefinedLoader {
       setenv("AUL_HWACC", "none", 1);
     else if (loader_type == LOADER_TYPE_HW)
       setenv("AUL_HWACC", "hw", 1);
+
+    int ret = _launchpad_plugin_prepare_app(nullptr, extra);
+    if (ret != 0) {
+      _E("_launchpad_plugin_prepare_app() is failed. error(%d)", ret);
+      exit(EXIT_FAILURE);
+    }
   }
 
   static int OnLaunch(int argc, char** argv, const char* app_path,