summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaurav Singhal <gsinghal@codeaurora.org>2019-04-19 13:06:06 +0530
committerGaurav Singhal <gsinghal@codeaurora.org>2019-04-19 13:06:06 +0530
commitc4ac14deaf879f537cb96ddb128f4860e385f93b (patch)
tree01ebd673b5b5a9f6289701f79702200e4dc9e4d0
parentc2f2deddd6b3a2a82d7ae69c69582bf722af7e4b (diff)
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
-rw-r--r--1.2/default/Nfc.cpp12
-rw-r--r--1.2/default/Nfc.h15
2 files changed, 17 insertions, 10 deletions
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 @@ extern bool nfc_debug_enabled;
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<V1_0::NfcStatus> Nfc::closeForPowerOffCase() {
}
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::hidl_vec;
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 @@ struct Nfc : public V1_1::INfc, public hidl_death_recipient {
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.