if (operation != NULL) {
LOGD("reply to launch request : operation %s", operation);
- app_control_reply_to_launch_request(reply, service, result);
- ret = true;
+ if (strncmp(operation, APP_CONTROL_OPERATION_SETTING_NFC,
+ strlen(APP_CONTROL_OPERATION_SETTING_NFC)) == 0) {
+ LOGD("reply to launch request : operation %s", operation);
+ app_control_reply_to_launch_request(reply, service, result);
+ ret = true;
+ }
}
app_control_destroy(reply);
<operation name="http://tizen.org/appcontrol/operation/setting/nfc"/>
</app-control>
</ui-application>
+ <privileges>
+ <privilege>http://tizen.org/privilege/nfc</privilege>
+ <privilege>http://tizen.org/privilege/nfc.admin</privilege>
+ </privileges>
</manifest>
Name: ug-nfc-efl
Summary: NFC Setting UI
-Version: 3.1.7
+Version: 3.1.8
Release: 0
Group: App/Network
License: Flora-1.1
# if common || tv || ivi || "undefined"
%if "%{?profile}" != "wearable" && "%{?profile}" != "mobile"
%post profile_common
+mkdir -p /usr/ug/bin/
+ln -sf /usr/bin/ug-client /usr/ug/bin/ug-nfc-efl
mkdir -p /usr/ug/lib
ln -sf /usr/ug/common/lib/libug-nfc-efl* /usr/ug/lib/
# if mobile || "undefined"
%if "%{?profile}" != "common" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
%post profile_mobile
+mkdir -p /usr/ug/bin/
+ln -sf /usr/bin/ug-client /usr/ug/bin/ug-nfc-efl
mkdir -p /usr/ug/lib
ln -sf /usr/ug/mobile/lib/libug-nfc-efl* /usr/ug/lib/
#ifdef __cplusplus
}
#endif
-#endif /* __NFC_SETTING_APP_DEBUG_H__ */
\ No newline at end of file
+
+#endif /* __NFC_SETTING_APP_DEBUG_H__ */
Evas_Object *radio_main;
nsa_operation_type op_type;
+ app_control_h service;
} appdata;
#ifdef __cplusplus
NSA_DEBUG("extra data [%s] >>>>> ", GET_SAFE_STRING(ex_data));
ad->op_type = NSA_OP_NFC;
- if (!ex_data) {
- NSA_DEBUG_ERR("extra data is NULL");
- goto end;
- }
if (strncmp(operation, APP_CONTROL_OPERATION_SETTING_NFC,
strlen(APP_CONTROL_OPERATION_SETTING_NFC)) == 0) {
/* launched by app-control */
- if (strncmp(ex_data, "nfc", strlen("nfc")) == 0) {
+ app_control_clone(&(ad->service), service);
+ if (!ex_data || strncmp(ex_data, "nfc", strlen("nfc")) == 0)
ad->op_type = NSA_OP_NFC;
- } else if (strncmp(ex_data, "tap_n_pay", strlen("tap_n_pay")) == 0) {
+ else if (strncmp(ex_data, "tap_n_pay", strlen("tap_n_pay")) == 0)
ad->op_type = NSA_OP_TAP_N_PAY;
- }
}
-end:
NSA_MEM_FREE(operation);
NSA_MEM_FREE(app_id);
NSA_MEM_FREE(ex_data);
__parse_service(service, ad);
/* launch nss */
- if (ad->op_type == NSA_OP_TAP_N_PAY){
+ if (ad->op_type == NSA_OP_TAP_N_PAY)
_nsa_view_tap_n_pay_create(ad);
- } else {
+ else
_nsa_view_main_create(ad);
- }
elm_win_activate(ad->main_win);
elm_object_focus_set(layout, EINA_FALSE);
- if(edc_path != NULL)
+ if (edc_path != NULL)
elm_layout_file_set(layout, EDJ_FILE, edc_path);
evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND,
#include "nsa-popup.h"
#include "nsa-string.h"
+static bool __reply_to_launch_request(app_control_h service, app_control_result_e result)
+{
+ app_control_h reply;
+ bool ret = false;
+
+ LOGD("BEGIN >>>>");
+
+ if (service != NULL) {
+ LOGD("launched by NFC appcontrol");
+ app_control_create(&reply);
+ app_control_reply_to_launch_request(reply, service, result);
+ app_control_destroy(reply);
+ ret = true;
+ }
+
+ LOGD("END >>>>");
+ return ret;
+}
+
static void __get_payment_handler(char **handler)
{
char *appid;
int ret;
ret = pkgmgrinfo_pkginfo_get_pkginfo(appid, &pkginfo);
- if (ret != 0) {
+ if (ret != 0)
return;
- }
ret = pkgmgrinfo_pkginfo_get_label(pkginfo, &label);
if (ret != 0) {
/* update ui after activation is completed */
__update_onoff_obj(ad);
__update_tap_and_pay_obj(ad);
+
+ if (__reply_to_launch_request(ad->service, APP_CONTROL_RESULT_SUCCEEDED) == true)
+ ui_app_exit();
}
static void __change_nfc_onoff_setting(void *data)
NSA_BEGIN();
/* V1.9 : instead of toast popup, disable item during operation */
- if(ad->on_off != NULL)
+ if (ad->on_off != NULL)
elm_object_item_disabled_set(ad->on_off, true);
result = nfc_manager_set_activation(!nfc_manager_is_activated(),
static char *__gl_text_get_nfc(void *data, Evas_Object *obj,
const char *part)
{
- if (!strcmp(part, "elm.text")) {
+ if (!strcmp(part, "elm.text"))
return strdup(IDS_NFC_NFC);
- } else {
+ else
return NULL;
- }
}
static char *__gl_text_get_tap_n_pay(void *data, Evas_Object *obj,
if (ad->payment_handler != NULL) {
NSA_DEBUG("ad->payment_handler : %s", ad->payment_handler);
return strdup(ad->payment_handler);
- }
- else
+ } else {
return NULL;
+ }
} else {
return NULL;
}
return genlist;
}
-static void __payment_handler_vconf_key_changed (keynode_t *key,
+static void __payment_handler_vconf_key_changed(keynode_t *key,
void *data)
{
appdata *ad = data;
NSA_DEBUG("__get_launch_app_id [%s]", pkgid);
ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &pkginfo);
- if (ret != 0) {
+ if (ret != 0)
return strdup(pkgid);
- }
ret = pkgmgrinfo_pkginfo_get_mainappid(pkginfo, &main_appid);
- if (ret == 0) {
+ if (ret == 0)
return strdup(main_appid);
- } else {
+ else
return strdup(pkgid);
- }
}
static void __launch_application(char *appid)
}
ret = app_control_send_launch_request(service, NULL, NULL);
- if(ret != APP_CONTROL_ERROR_NONE) {
+ if (ret != APP_CONTROL_ERROR_NONE)
NSA_DEBUG_ERR("app_control_send_launch_request failed[%d]", ret);
- }
END:
app_control_destroy(service);
static char *__gl_text_get_title(void *data, Evas_Object *obj,
const char *part)
{
- if (!strcmp(part, "elm.text")) {
+ if (!strcmp(part, "elm.text"))
return strdup(IDS_TAP_AND_PAY);
- } else {
+ else
return NULL;
- }
}
static char *__gl_text_get(void *data, Evas_Object *obj,