added minlength check for editfield of setting-plugin-efl
[apps/home/settings.git] / setting-plugin / src / setting-plugin-main.c
index bfaa484..dfdb7be 100755 (executable)
@@ -56,6 +56,18 @@ static int setting_plugin_main_create(void *cb)
 
        Evas_Object *scroller = NULL;
 
+       char* pappid = NULL;
+       int pid = getpid();
+       char appid[1024];
+       if (aul_app_get_appid_bypid(pid, appid, 1024) == 0)
+       {
+               SETTING_TRACE(" >> ******** AUL K APPID : (%s) \n", appid );
+               pappid = appid;
+       } else {
+               SETTING_TRACE(" >> ******** AUL K APPID : ERROR \n");
+       }
+
+
        /* add basic layout */
        char setBtnStr[MAX_DISPLAY_NAME_LEN_ON_UI];
        snprintf(setBtnStr, sizeof(setBtnStr), "%s",
@@ -64,9 +76,14 @@ static int setting_plugin_main_create(void *cb)
        /////////////////////////////////////////////////////////////////////////////////////////////////
 #if 1
        // there's no argument, use pappid
-       if (ad->pkgname == NULL) {
-               SETTING_TRACE("pkgname is NULL, it's error, assign it");
-               goto errorhandle;
+       if (ad->pkgname == NULL)
+       {
+               if (pappid == NULL)
+               {
+                       SETTING_TRACE(">>> pappid == NULL");
+                       goto errorhandle;
+               }
+               ad->pkgname = pappid;
        }
 
        char plugin_path[1024];
@@ -85,8 +102,12 @@ static int setting_plugin_main_create(void *cb)
        plugin_node->plugin_path = strdup(plugin_path);
        int ret = setting_plugin_load(plugin_node, (const char *)plugin_node->plugin_path);
        if (ret < 0)
+       {
+               SETTING_TRACE(" >>> plugin_load FAILED");
                goto errorhandle;
-
+       } else {
+               SETTING_TRACE(" >>> plugin_load OK");
+       }
        ad->ly_main = plugin_node->ly_main;
 
        ad->plugin_node = plugin_node; // the selected plugin name
@@ -159,5 +180,6 @@ static void setting_plugin_main_click_softkey_back_cb(void *data, Evas_Object *o
        /* Send destroy request */
        ug_destroy_me(ad->ug);
        SETTING_TRACE_END;
+
 }