diff options
Diffstat (limited to 'wearable/app/src/nsa-main.c')
-rwxr-xr-x | wearable/app/src/nsa-main.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/wearable/app/src/nsa-main.c b/wearable/app/src/nsa-main.c index 482cf04..57c0845 100755 --- a/wearable/app/src/nsa-main.c +++ b/wearable/app/src/nsa-main.c @@ -115,22 +115,17 @@ static void __parse_service(app_control_h service, void *user_data) 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); @@ -177,11 +172,10 @@ void _nsa_main_app_service(app_control_h service, void *user_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); |