Merge "Apply recovery sequence if the CLF is mute after a nReset pulse"
diff --git a/1.1/Nfc.cpp b/1.1/Nfc.cpp
index f3e6741..97820d9 100644
--- a/1.1/Nfc.cpp
+++ b/1.1/Nfc.cpp
@@ -73,8 +73,12 @@
 
 Return<V1_0::NfcStatus> Nfc::coreInitialized(const hidl_vec<uint8_t>& data) {
   hidl_vec<uint8_t> copy = data;
+  int ret;
 
-  int ret = StNfc_hal_core_initialized(&copy[0]);
+  if (copy.size() == 0)
+    ret = 1;
+  else
+    ret = StNfc_hal_core_initialized(&copy[0]);
   return ret == 0 ? V1_0::NfcStatus::OK : V1_0::NfcStatus::FAILED;
 }
 
diff --git a/1.2/Nfc.cpp b/1.2/Nfc.cpp
index c197255..3273294 100644
--- a/1.2/Nfc.cpp
+++ b/1.2/Nfc.cpp
@@ -75,8 +75,12 @@
 
 Return<V1_0::NfcStatus> Nfc::coreInitialized(const hidl_vec<uint8_t>& data) {
   hidl_vec<uint8_t> copy = data;
+  int ret;
 
-  int ret = StNfc_hal_core_initialized(&copy[0]);
+  if (copy.size() == 0)
+    ret = 1;
+  else
+    ret = StNfc_hal_core_initialized(&copy[0]);
   return ret == 0 ? V1_0::NfcStatus::OK : V1_0::NfcStatus::FAILED;
 }
 
diff --git a/st21nfc/hal_wrapper.cc b/st21nfc/hal_wrapper.cc
index 05bbc09..65cfc1a 100644
--- a/st21nfc/hal_wrapper.cc
+++ b/st21nfc/hal_wrapper.cc
@@ -392,8 +392,9 @@
                 property_get_int32("persist.vendor.nfc.firmware_debug_enabled", 0);
 
             // Check if FW DBG shall be set
-            if (GetNumValue(NAME_STNFC_FW_DEBUG_ENABLED, &num, sizeof(num))) {
-              if (firmware_debug_enabled && isDebuggable) num = 1;
+            if (GetNumValue(NAME_STNFC_FW_DEBUG_ENABLED, &num, sizeof(num)) ||
+                isDebuggable) {
+              if (firmware_debug_enabled) num = 1;
               // If conf file indicate set needed and not yet enabled
               if ((num == 1) && (p_data[7] == 0x00)) {
                 STLOG_HAL_D("%s - FW DBG traces enabling needed", __func__);