diff options
Diffstat (limited to 'src/com/android/nfc/NfcService.java')
-rwxr-xr-x | src/com/android/nfc/NfcService.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java index d63f84f..952b391 100755 --- a/src/com/android/nfc/NfcService.java +++ b/src/com/android/nfc/NfcService.java @@ -864,6 +864,39 @@ public class NfcService implements DeviceHostListener { } mNfcDispatcher.setForegroundDispatch(intent, filters, techLists); + + //check for PCD A or PCD B technology + //turn on if in list + //turn off if not + boolean PCD_A = false; + boolean PCD_B = false; + if(techLists!=null) + { + for(short j=0;j<techLists.length;j++) + { + if(techLists[j]!=null) + { + for(short k=0;k<techLists[j].length;k++) + { + if(techLists[j][k]!=null) + { + if(techLists[j][k].equals("android.nfc.tech.IsoPcdA")) + PCD_A = true; + if(techLists[j][k].equals("android.nfc.tech.IsoPcdB")) + PCD_B = true; + } + } + } + } + } + if(PCD_A) + mDeviceHost.enableCE_A(); + else + mDeviceHost.disableCE_A(); + if(PCD_B) + mDeviceHost.enableCE_B(); + else + mDeviceHost.disableCE_B(); } @Override |