Send launch request asynchronously in alarm expired 10/125310/3 accepted/tizen/3.0/common/20170420.151450 accepted/tizen/3.0/ivi/20170420.092458 accepted/tizen/3.0/mobile/20170420.092323 accepted/tizen/3.0/tv/20170420.092420 accepted/tizen/3.0/wearable/20170420.092439 submit/tizen_3.0/20170417.033122
authorJiwoong Im <jiwoong.im@samsung.com>
Fri, 14 Apr 2017 02:35:02 +0000 (11:35 +0900)
committerJiwoong Im <jiwoong.im@samsung.com>
Mon, 17 Apr 2017 00:52:12 +0000 (17:52 -0700)
- If target application is in ANR status, appsvc_usr_run_service api can be blocked.
  To solve this, use async api in sending launch request.

- Requires:
[aul-1] https://review.tizen.org/gerrit/#/c/125305/
[amd] https://review.tizen.org/gerrit/#/c/125306/

Change-Id: I65af5d9ba00bf378296899db2d6ff130e482fe18
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
(cherry picked from commit 74dd73c38e0f0ecc34c80a215c117ea6a01d7366)

alarm-manager.c

index 356f3df..e2ed729 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <tzplatform_config.h>
 #include <aul.h>
+#include <aul_svc.h>
 #include <bundle.h>
 #include <db-util.h>
 #include <vconf.h>
@@ -1694,7 +1695,7 @@ static void __alarm_expired()
 
                                        if (result < 0) {
                                                /* before 2.4 */
-                                               if (appsvc_usr_run_service(b, 0, NULL, NULL, __alarm_info->uid) < 0)
+                                               if (aul_svc_run_service_async_for_uid(b, 0, NULL, NULL, __alarm_info->uid) < 0)
                                                        ALARM_MGR_EXCEPTION_PRINT("Unable to run app svc\n");
                                                else
                                                        ALARM_MGR_LOG_PRINT("Successfuly run app svc\n");
@@ -1710,10 +1711,10 @@ static void __alarm_expired()
                                                                        ALARM_MGR_EXCEPTION_PRINT("Fail to get login user\n");
                                                                        ret = -1;
                                                                } else {
-                                                                       ret = appsvc_usr_run_service(b, 0, NULL, NULL, target_uid);
+                                                                       ret = aul_svc_run_service_async_for_uid(b, 0, NULL, NULL, target_uid);
                                                                }
                                                        } else {
-                                                               ret = appsvc_usr_run_service(b, 0, NULL, NULL, __alarm_info->uid);
+                                                               ret = aul_svc_run_service_async_for_uid(b, 0, NULL, NULL, __alarm_info->uid);
                                                        }
 
                                                        if (ret < 0) {