Support mountable tpk 09/68709/1 accepted/tizen/common/20160513.123158 accepted/tizen/common/20160513.123435 accepted/tizen/ivi/20160513.082044 accepted/tizen/mobile/20160513.082019 accepted/tizen/tv/20160513.082036 accepted/tizen/wearable/20160513.082007 submit/tizen/20160511.132536 submit/tizen/20160513.010234
authorJunghoon Park <jh9216.park@samsung.com>
Mon, 9 May 2016 11:02:52 +0000 (20:02 +0900)
committerJunghoon Park <jh9216.park@samsung.com>
Mon, 9 May 2016 11:02:52 +0000 (20:02 +0900)
- use array type bundle
- requires:
  https://review.tizen.org/gerrit/#/c/68650/

Change-Id: I8322c8a6b66a541ee67d7b2734287daf99a6a3bd
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
src/appcore.c

index 31ce92f..fd4fca6 100644 (file)
@@ -512,7 +512,9 @@ static void __remove_suspend_timer(struct appcore *ac)
 static int __aul_handler(aul_type type, bundle *b, void *data)
 {
        int ret;
-       const char *tep_path = NULL;
+       const char **tep_path = NULL;
+       int len = 0;
+       int i;
 #ifdef _APPFW_FEATURE_BACKGROUND_MANAGEMENT
        const char *bg = NULL;
        struct appcore *ac = data;
@@ -521,12 +523,14 @@ static int __aul_handler(aul_type type, bundle *b, void *data)
        switch (type) {
        case AUL_START:
                _DBG("[APP %d]     AUL event: AUL_START", _pid);
-               tep_path = bundle_get_val(b, AUL_TEP_PATH);
+               tep_path = bundle_get_str_array(b, AUL_TEP_PATH, &len);
                if (tep_path) {
-                       ret = aul_check_tep_mount(tep_path);
-                       if (ret == -1) {
-                               _ERR("mount request not completed within 1 sec");
-                               exit(-1);
+                       for (i = 0; i < len; i++) {
+                               ret = aul_check_tep_mount(tep_path[i]);
+                               if (ret == -1) {
+                                       _ERR("mount request not completed within 1 sec");
+                                       exit(-1);
+                               }
                        }
                }