return true;
}
-//TODO: remove when implementation is done
-void print_all(const char *k, const char *v, void *data)
-{
- LOGD("%s -> %s ", k, v);
-}
-
static void app_control(app_control_h app_control, void *data)
{
LOGD("app_control()");
char* caller_appid = NULL;
ret = app_control_get_caller(app_control, &caller_appid);
if (ret != APP_CONTROL_ERROR_NONE) {
- LOGE("app_control_get_caller() failed. Can't get caller info. Terminate.");
+ LOGE("app_control_get_caller() failed. Can't get caller info. Terminate. ret = %d", ret);
ui_app_exit();
}
LOGD("caller appid = %s", caller_appid);
+ ret = app_control_get_launch_mode(app_control, &(ad->mode));
+ if (ret != APP_CONTROL_ERROR_NONE) {
+ LOGE("app_control_get_launch_mode() failed. Terminate. ret = %d", ret);
+ ui_app_exit();
+ }
+
app_info_h app_info;
ret = app_info_create(caller_appid, &app_info);
free(caller_appid);
ui_app_exit();
}
- //bundle_iterate(b, print_all, NULL); //TODO: remove or comment it when implementation is done
-
size_t popup_id_size;
int *popup_id;
privacies[i] = strdup(pd->privacy);
responses[i] = pd->response;
}
- ret = ppm_popup_send_response(ad->popup_id, (const char**)privacies, responses, i);
+ ret = ppm_popup_send_response(ad->popup_id, (const char**)privacies, responses, ad->privacy_num);
for (i = 0; i < ad->privacy_num; ++i) {
free(privacies[i]);
Eina_Bool __hw_key_clicked_cb(void *data, int type, void *event_info)
{
+ app_data_s *ad = (app_data_s*)data;
Ecore_Event_Key *ev = (Ecore_Event_Key*)event_info;
ALOGD("HW key clicked. type <%d> pressed key is <%s>", type, ev->key);
if (ev->event_flags & ECORE_EVENT_FLAG_CANCEL) return ECORE_CALLBACK_PASS_ON;
- if (!strcmp(ev->key, "XF86Back")) {
+ if (ad->mode == APP_CONTROL_LAUNCH_MODE_SINGLE && !strcmp(ev->key, HOME_KEY)) {
+ LOGD("launch mode single. home key terminate.");
+ ui_app_exit();
+ }
+ if (!strcmp(ev->key, BACK_KEY)) {
ui_app_exit();
}
return EINA_TRUE;