#include <setting-plugin-main.h>
#include <Ecore_X.h>
+extern int service_to_bundle(service_h service, bundle **data);
+
static int setting_plugin_main_create(void *cb);
static int setting_plugin_main_destroy(void *cb);
static int setting_plugin_main_update(void *cb);
};
+
+
static void setting_plugin_main_click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info);
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",
/////////////////////////////////////////////////////////////////////////////////////////////////
#if 1
// there's no argument, use pappid
- if (ad->pkgname == NULL)
- {
- if (pappid == NULL)
- goto errorhandle;
-
- ad->pkgname = pappid;
+ if (ad->pkgname == NULL) {
+ SETTING_TRACE("pkgname is NULL, it's error, assign it");
+ goto errorhandle;
}
char plugin_path[1024];
/* Send destroy request */
ug_destroy_me(ad->ug);
SETTING_TRACE_END;
-
}
if (pkgname) {
pluginUG->pkgname = strdup(pkgname);
+ } else {
+ char* val = NULL;
+ bundle *t = NULL;
+ int ret = service_to_bundle(service, &t);
+ if(ret != SERVICE_ERROR_NONE)
+ return;
+ // it's tricky
+ // look for other way
+ val = (char*)bundle_get_val(t, AUL_K_CALLER_APPID);
+ val[10] = '\0'; // cut string FpeK59wYdV.FormBasedApp -> FpeK59wYdV
+
+ pluginUG->pkgname = strdup(val);
+ SETTING_TRACE("get pkg name ==== %s from AUL_K_CALLDER_APPID",pluginUG->pkgname);
}
/* register view node table */