NFC: Manual merge from third party

Manually merged from third party to align with 10.00.04 MW release,
added support for 1.2 HIDL.

NOT A CONTRIBUTION

Change-Id: I490e6fd867a4bb316495b57df2cc28584e7a6e33
diff --git a/1.2/default/Nfc.cpp b/1.2/default/Nfc.cpp
index 1acb030..e78865c 100644
--- a/1.2/default/Nfc.cpp
+++ b/1.2/default/Nfc.cpp
@@ -45,7 +45,7 @@
  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#define LOG_TAG "android.hardware.nfc@1.1-impl"
+#define LOG_TAG "android.hardware.nfc@1.2-impl"
 #include <log/log.h>
 #include "Nfc.h"
 #include "phNxpNciHal_Adaptation.h"
@@ -59,7 +59,7 @@
 namespace android {
 namespace hardware {
 namespace nfc {
-namespace V1_1 {
+namespace V1_2 {
 namespace implementation {
 
 sp<V1_1::INfcClientCallback> Nfc::mCallbackV1_1 = nullptr;
@@ -161,11 +161,17 @@
 }
 
 Return<void> Nfc::getConfig(getConfig_cb hidl_cb) {
-  NfcConfig nfcVendorConfig;
+  android::hardware::nfc::V1_1::NfcConfig nfcVendorConfig;
   phNxpNciHal_getVendorConfig(nfcVendorConfig);
   hidl_cb(nfcVendorConfig);
   return Void();
 }
+Return<void> Nfc::getConfig_1_2(getConfig_1_2_cb hidl_cb) {
+  NfcConfig nfcVendorConfig;
+  phNxpNciHal_getVendorConfig_1_2(nfcVendorConfig);
+  hidl_cb(nfcVendorConfig);
+  return Void();
+}
 
 }  // namespace implementation
 }  // namespace V1_1
diff --git a/1.2/default/Nfc.h b/1.2/default/Nfc.h
index 586cb85..c1b724e 100644
--- a/1.2/default/Nfc.h
+++ b/1.2/default/Nfc.h
@@ -45,11 +45,11 @@
  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef ANDROID_HARDWARE_NFC_V1_1_NFC_H
-#define ANDROID_HARDWARE_NFC_V1_1_NFC_H
+#ifndef ANDROID_HARDWARE_NFC_V1_2_NFC_H
+#define ANDROID_HARDWARE_NFC_V1_2_NFC_H
 
-#include <android/hardware/nfc/1.1/INfc.h>
-#include <android/hardware/nfc/1.1/types.h>
+#include <android/hardware/nfc/1.2/INfc.h>
+#include <android/hardware/nfc/1.2/types.h>
 #include <hidl/MQDescriptor.h>
 #include <hidl/Status.h>
 #include <log/log.h>
@@ -57,11 +57,11 @@
 namespace android {
 namespace hardware {
 namespace nfc {
-namespace V1_1 {
+namespace V1_2 {
 namespace implementation {
 
 using ::android::hidl::base::V1_0::IBase;
-using ::android::hardware::nfc::V1_1::INfc;
+using ::android::hardware::nfc::V1_2::INfc;
 using ::android::hardware::hidl_array;
 using ::android::hardware::hidl_memory;
 using ::android::hardware::hidl_string;
@@ -69,7 +69,7 @@
 using ::android::hardware::Return;
 using ::android::hardware::Void;
 using ::android::sp;
-struct Nfc : public V1_1::INfc, public hidl_death_recipient {
+struct Nfc : public V1_2::INfc, public hidl_death_recipient {
  public:
   // Methods from ::android::hardware::nfc::V1_0::INfc follow.
   Return<V1_0::NfcStatus> open(
@@ -88,6 +88,7 @@
   Return<void> factoryReset();
   Return<V1_0::NfcStatus> closeForPowerOffCase();
   Return<void> getConfig(getConfig_cb config);
+  Return<void> getConfig_1_2(getConfig_1_2_cb config);
 
   // Methods from ::android::hidl::base::V1_0::IBase follow.