Send launch request asynchronously in alarm expired 35/125135/3
authorJiwoong Im <jiwoong.im@samsung.com>
Fri, 14 Apr 2017 02:35:02 +0000 (11:35 +0900)
committerJiwoong Im <jiwoong.im@samsung.com>
Fri, 14 Apr 2017 04:38:44 +0000 (21:38 -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/124571/

Change-Id: I65af5d9ba00bf378296899db2d6ff130e482fe18
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
alarm-manager.c

index 3e162c7..a5caf4b 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>
@@ -1737,7 +1738,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");
@@ -1753,10 +1754,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) {