The NXP official patch is for Android 15 r1 AOSP. As there are many changes in the newer release compare with the r1, you may need to change it one by one.
For example, for this error,
packages/apps/Nfc/src/com/android/nfc/NfcService.java:1762: error: NfcService.NfcAdapterService is not abstract and does not override abstract method fetchActiveNfceeList() in INfcAdapter
final class NfcAdapterService extends INfcAdapter.Stub {
Put the following function in final class NfcAdapterService extends INfcAdapter.Stub.
final class NfcAdapterService extends INfcAdapter.Stub {
@Override
public Map<String, Integer> fetchActiveNfceeList() throws RemoteException {
Map<String, Integer> map = new HashMap<String, Integer>();
if (isNfcEnabled()) {
map = mDeviceHost.dofetchActiveNfceeList();
}
return map;
}
..
..
FYI. You may copy it from NfcService.java - Android Code Search.
You could compare the code different between the AOSP release so you could change the code accordingly.
Another error:
packages/apps/Nfc/src/com/android/nfc/NfcService.java:2164: error: method does not override or implement a method from a supertype
@Override
For this error, the function at NfcService.java:2164 is not match in frameworks/base/nfc/java/android/nfc/INfcAdapter.aidl.
You could find the same function in the newer release (for example: r30) and then replace the mismatch one in NfcService.java.