Replace libnfc-nci.conf with Oreo's on Oreo vendor devices

As of pie the previous PRODUCT_COPY_FILES line was ignored because
it got copied from device/generic/common/nfc/libnfc-nci.conf instead

Change-Id: Ib1f97259aac93031fcdec49fca4c5cd04746e5d1
diff --git a/base.mk b/base.mk
index 3253c56..ab8dc62 100644
--- a/base.mk
+++ b/base.mk
@@ -45,7 +45,7 @@
 #   Provide default libnfc-nci.conf file for devices that does not have one in
 #   vendor/etc
 PRODUCT_COPY_FILES += \
-	device/phh/treble/nfc/libnfc-nci.conf:system/etc/libnfc-nci.conf
+	device/phh/treble/nfc/libnfc-nci.conf:system/phh/libnfc-nci-oreo.conf
 
 # LineageOS build may need this to make NFC work
 PRODUCT_PACKAGES += \
diff --git a/rw-system.sh b/rw-system.sh
index 286cebd..7144e8d 100644
--- a/rw-system.sh
+++ b/rw-system.sh
@@ -1,6 +1,7 @@
 #!/system/bin/sh
 
 
+vndk="$(getprop persist.sys.vndk)"
 setprop sys.usb.ffs.aio_compat true
 
 fixSPL() {
@@ -152,3 +153,7 @@
 if [ -f /vendor/bin/hw/vendor.samsung.hardware.miscpower@1.0-service ];then
 	mount -o bind /system/phh/empty /vendor/bin/hw/android.hardware.power@1.0-service
 fi
+
+if [ "$vndk" == 27 -o "$vndk" == 26 ];then
+    mount -o bind /system/phh/libnfc-nci-oreo.conf /system/etc/libnfc-nci.conf
+fi