Adjust a position of calling OnCreate() method of base class 95/273795/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 14 Apr 2022 01:51:36 +0000 (10:51 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 14 Apr 2022 01:57:00 +0000 (10:57 +0900)
To improve performance about returning the result to the caller process,
the AppCoreEflBase::OnCreate() method has to be invoked before calling the
app_create_cb() function. When calling the AppCoreEflBase::OnCreate() method,
the application core calls the aul_launch_init() function. In that time,
the application sends the app startup signal to AMD to notify that the
application is started. And then, AMD sends the result of the launch
request to the caller process.

Change-Id: I34be9040a8a7c89facedd62db62ad89dbf8ec2e6
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/app_main.cc

index 771d0ea00aa4e0957a3a5e34c603d932c4632402..1b327806771471e2adee9d5115f3790aa7b51655 100644 (file)
@@ -55,10 +55,11 @@ class UiAppContext : public AppCoreEflBase {
 
   int OnCreate() override {
     LOGW("ui_app_create()");
-    if (callback_.create == nullptr || callback_.create(data_) == false)
+    AppCoreEflBase::OnCreate();
+    if (callback_.create == nullptr || callback_.create(data_) == false) {
       return app_error(APP_ERROR_INVALID_CONTEXT, __FUNCTION__,
           "app_create_cb() returns false");
-    AppCoreEflBase::OnCreate();
+    }
 
     return APP_ERROR_NONE;
   }