summaryrefslogtreecommitdiff
path: root/halimpl/utils/phNxpConfig.cpp
diff options
context:
space:
mode:
authorTapas Dey <tdey@codeaurora.org>2020-05-01 16:32:16 +0530
committerTapas Dey <tdey@codeaurora.org>2020-05-08 16:13:49 +0530
commit8b2f27a98facd199c2f39aff526a3544a4b2cc45 (patch)
treea5eb785ddd615e7e325ad0b6da82bc4e4edb312c /halimpl/utils/phNxpConfig.cpp
parentdc689a37c4e5a96605b7cd4ac35f3bc0fa22fb2c (diff)
parentf8ca22078c945ece40dc262be09b5b14bf6cb64c (diff)
Merge branch 'caf/nxp-libnfc-nci/github-libnfc-nci/br_android_ncihalx_row_11' into nfc.vendor.lnx.2.1
* caf/nxp-libnfc-nci/github-libnfc-nci/br_android_ncihalx_row_11: (42 commits) Code cleanup on HAL 2.0 implementation HAL 2.0 implementation N*pNfcLegacy HAL implementation added following api to replace the IOCTL's and there wrapper function a) HAL_NFC_IOCTL_NCI_TRANSCEIVE -> nciTransceive(). N*pNfcLegacy HAL implementation added following api to replace the IOCTL's and there warapper functions HAL_NFC_GET_N*P_CONFIG -> getN*pConfig(). N*pNfcLegacy HAL implementation added following api to replace the IOCTL's and there warapper functions a) HAL_NFC_IOCTL_GET_CONFIG_INFO -> getCachedNfccConfig(). HciInitUpdateState null pointer access fixed. N*pNfcLegacy HAL implementation added following api to replace the IOCTL's and there warapper functions a) HAL_NFC_IOCTL_REL_SVDD_WAIT -> spiDwpSync() b) HAL_NFC_IOCTL_REL_DWP_WAIT -> RelForceDwpOnOffWait() c) HAL_NFC_GET_SPM_STATUS -> getSPMStatus() d) HAL_NFC_IOCTL_HCI_INIT_STATUS_UPDATE -> hciInitUpdateState() e) HAL_NFC_IOCTL_HCI_INIT_STATUS_UPDATE_COMPLETE -> hciInitUpdateStateComplete() {R-DP1} Move N*P MIFARE entern to HAL N*pNfcLegacy HAL implementation API added : getEseState -> Replacement of HAL_NFC_IOCTL_P61_PWR_MODE. This API is called for to get ese state getEseState() generates (uint16_t status); N*pNfcLegacy HAL implementation API added : setNfcServicePid -> Replacement of HAL_NFC_IOCTL_SET_NFC_SERVICE_PID. Introducing new app in NfcN*pHalLeagcy.and phN*pNciHal_setNfcServicePid to call Tml N*pNfcLegacy HAL implementation API added : getchipType -> Replacement of HAL_NFC_IOCTL_GET_FEATURE_LIST. getChipType is the api which will take chiptype info at init type and update to update to upper layer after invoking it. unused N*P NFC HAL IOCTL cleanup for HAL_NFC_IOCTL_SPI_DWP_SYNC. There is not caller for this ioctl. So, cleaning this ioctl. {R-DP2} Revert "Phase tirm offset sign bit update" {R-DP2} Do not enable factoryota mode by default N*pNfcLegacy HAL implementation API added : setEseState -> Replacement of HAL_NFC_IOCTL_P61_IDLE_MODE & HAL_NFC_IOCTL_P61_WIRED_MODE. {R-DP2} Update cfg files search rule {R-DP1} Remove libhwbinder/libhidltransport deps {R-DP1} Disable -Wimplicit-fallthrough unless src is fixed. IOCTL call sequence clean up for HAL_NFC_IOCTL_RF_ACTION_NTF and HAL_NFC_IOCTL_RF_STATUS_UPDATE IOCTL call sequence clean up for HAL_ESE_IOCTL_OMAPI_TRY_GET_ESE_SESSION & HAL_ESE_IOCTL_OMAPI_RELEASE_ESE_SESSION] [artf728185][PN8xt]:IOCTL call sequence clean up for HAL_NFC_IOCTL_SET_JCP_DWNLD_ENABLE & HAL_NFC_IOCTL_SET_JCP_DWNLD_DISABLE [artf728187][PN8xt]:IOCTL call sequence clean up for HAL_NFC_IOCTL_NFCEE_SESSION_RESET ... Change-Id: I1da3816ca9e0e8c676cdd82900857dc6a43f9957
Diffstat (limited to 'halimpl/utils/phNxpConfig.cpp')
-rw-r--r--halimpl/utils/phNxpConfig.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/halimpl/utils/phNxpConfig.cpp b/halimpl/utils/phNxpConfig.cpp
index 6f36560..8c57313 100644
--- a/halimpl/utils/phNxpConfig.cpp
+++ b/halimpl/utils/phNxpConfig.cpp
@@ -54,11 +54,11 @@
#include <vector>
#include <list>
#include <sys/stat.h>
-#include <stdlib.h>
#include <phNxpLog.h>
-#include <cutils/properties.h>
+#include <android-base/properties.h>
#include "sparse_crc32.h"
+#include <cutils/properties.h>
#if GENERIC_TARGET
const char alternative_config_path[] = "/data/vendor/nfc/";
@@ -579,18 +579,20 @@ inline int getDigitValue(char c, int base) {
** Returns: none
**
*******************************************************************************/
-void findConfigFilePathFromTransportConfigPaths(const string& configName,
+bool findConfigFilePathFromTransportConfigPaths(const string& configName,
string& filePath) {
for (int i = 0; i < transport_config_path_size; i++) {
+ if (configName.empty()) break;
filePath.assign(transport_config_paths[i]);
filePath += configName;
struct stat file_stat;
if (stat(filePath.c_str(), &file_stat) == 0 && S_ISREG(file_stat.st_mode)) {
- return;
+ return true;
}
}
// Config file didnt exist in any of the transport config_paths.
- filePath.assign("");
+ filePath = "";
+ return false;
}
/*******************************************************************************