summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2013-02-06 11:40:32 -0800
committerSteve Kondik <shade@chemlab.org>2013-02-06 11:40:32 -0800
commitf3b413c98dd08327dafa564a10c17c84beac7b8f (patch)
treed72a9fdbe1d45cc1b24ea52d1a3967db1436933d
parentfb908e2c4a086407fed5967aa3e1d7d53b348893 (diff)
downloadpackages_apps_nfc-f3b413c98dd08327dafa564a10c17c84beac7b8f.zip
packages_apps_nfc-f3b413c98dd08327dafa564a10c17c84beac7b8f.tar.gz
packages_apps_nfc-f3b413c98dd08327dafa564a10c17c84beac7b8f.tar.bz2
nfc: Add alternate firmware path
* So we stay bug-for-bug compatible with OEMs. Change-Id: I0c14568d9f587ebcd2d21c0f0490b705be7ce8ce
-rwxr-xr-xnxp/src/com/android/nfc/dhimpl/NativeNfcManager.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java b/nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java
index 36b6ea8..0446390 100755
--- a/nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java
+++ b/nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java
@@ -38,6 +38,8 @@ public class NativeNfcManager implements DeviceHost {
private static final String NFC_CONTROLLER_FIRMWARE_FILE_NAME = "/vendor/firmware/libpn544_fw.so";
+ private static final String NFC_CONTROLLER_FIRMWARE_FILE_NAME_2 = "/system/lib/libpn544_fw.so";
+
static final String PREF = "NxpDeviceHost";
private static final String PREF_FIRMWARE_MODTIME = "firmware_modtime";
@@ -101,6 +103,9 @@ public class NativeNfcManager implements DeviceHost {
int nbRetry = 0;
try {
firmwareFile = new File(NFC_CONTROLLER_FIRMWARE_FILE_NAME);
+ if (!firmwareFile.exists()) {
+ firmwareFile = new File(NFC_CONTROLLER_FIRMWARE_FILE_NAME_2);
+ }
} catch(NullPointerException npe) {
Log.e(TAG,"path to firmware file was null");
return;