Sync with Tizen 2.4 for internal TC fail 49/64249/1 accepted/tizen/common/20160331.051401 submit/tizen/20160331.022340
authorJihoon Jung <jh8801.jung@samsung.com>
Thu, 31 Mar 2016 02:19:04 +0000 (11:19 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Thu, 31 Mar 2016 02:19:54 +0000 (11:19 +0900)
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
Change-Id: Idcceef41e15c56f9912e4ff557608e19cf583d65

src/nfc_p2p_handover.c

index fce373c..174b1a7 100755 (executable)
@@ -240,14 +240,29 @@ int nfc_connection_handover_unset_event_cb(void)
 
 bool nfc_p2p_is_supported_ac_type(nfc_ac_type_e carrier)
 {
-       bool result = false;
+       bool _is_support_p2p = false;
+       bool _is_support_ac_type = false;
 
        LOG_BEGIN();
 
+       _is_support_p2p = nfc_common_is_supported(NFC_P2P_FEATURE);
+       if (!_is_support_p2p) {
+               set_last_result(NFC_ERROR_NOT_SUPPORTED);
+               return false;
+       }
+
+       /* LCOV_EXCL_START */
        if (carrier == NFC_AC_TYPE_BT)
-               result = true;
+               _is_support_ac_type = true;
 
-       return result;
+       if (_is_support_ac_type) {
+               set_last_result(NFC_ERROR_NONE);
+       } else {
+               set_last_result(NFC_ERROR_NOT_SUPPORTED);
+       }
+
+       return _is_support_ac_type;
+       /* LCOV_EXCL_STOP */
 }
 
 int nfc_handover_message_import_from_ndef_message(nfc_handover_message_h *result, nfc_ndef_message_h msg)